{"id":8895,"date":"2022-04-29T09:26:10","date_gmt":"2022-04-29T14:26:10","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=8895"},"modified":"2022-04-29T09:26:38","modified_gmt":"2022-04-29T14:26:38","slug":"linux-disk-utilization-reducing-size-of-var-log-sa","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=8895","title":{"rendered":"Linux Disk Utilization &#8211; Reducing Size of \/var\/log\/sa"},"content":{"rendered":"<p>We occasionally get alerted that our \/var volume is over 80% full &#8230; which generally means \/var\/log has a lot of data, some of which is really useful and some of it not so useful. The application-specific log files already have the shortest retention period that is reasonable (and logs that are rotated out are compressed). Similarly, the system log files rotated through logrotate.conf and logrotate.d\/* have been configured with reasonable retention.<\/p>\n<p>Using <tt>du -sh \/var\/log\/<\/tt> showed the \/var\/log\/sa folder took half a gig of space.<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=8896\" rel=\"attachment wp-att-8896\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8896\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/04\/LinuxDiskUsage-SARFiles.png\" alt=\"\" width=\"373\" height=\"33\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/04\/LinuxDiskUsage-SARFiles.png 373w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/04\/LinuxDiskUsage-SARFiles-300x27.png 300w\" sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/a><\/p>\n<p>This is the daily output from sar (a &#8220;daily summary of process accounting&#8221; cron&#8217;d up with \/etc\/cron.d\/sysstat). This content doesn&#8217;t get rotated out with the expected logrotation configuration. It&#8217;s got a special configuration at \/etc\/sysconfig\/sysstat &#8212; changing the number of days (or, in my case, compressing some of the older files) is a quick way to reduce the amount of space the sar output files consume).<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=8897\" rel=\"attachment wp-att-8897\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8897\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/04\/LinuxDiskUsage-SARFilesRotation.png\" alt=\"\" width=\"665\" height=\"283\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/04\/LinuxDiskUsage-SARFilesRotation.png 665w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/04\/LinuxDiskUsage-SARFilesRotation-300x128.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We occasionally get alerted that our \/var volume is over 80% full &#8230; which generally means \/var\/log has a lot of data, some of which is really useful and some of it not so useful. The application-specific log files already have the shortest retention period that is reasonable (and logs that are rotated out are &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[1298,47,294,1599,1195,1598],"class_list":["post-8895","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-centos","tag-fedora","tag-linux","tag-performance-stats","tag-redhat","tag-sar"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8895"}],"version-history":[{"count":2,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8895\/revisions"}],"predecessor-version":[{"id":8899,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8895\/revisions\/8899"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}