Difference between revisions of "Sar -F"

From wikieduonline
Jump to navigation Jump to search
 
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<code>sar -F</code> requires <code>sadc</code> option in <code>[[/etc/sysstat/sysstat</code> <code>-S XDISK</code> or <code>-S XALL</code> activated.
+
{{lowercase}}
 +
Display [[filesystems usage]] statistics for currently mounted filesystems. Pseudo-filesystems are ignored. At the end of the report, sar will display a summary of all those filesystems.  Use of the MOUNT parameter  keyword  indicates  that mountpoint will be reported instead of filesystem device.  Note that filesystems statistics depend on sadc option -S XDISK to be collected.
  
 +
* <code>sar -F</code>
 +
* <code>sar -F --human</code>
 +
* <code>[[for i in]] `ls /var/log/sysstat/sa??`; do sar -f $i -F --human; done</code>
 +
 +
Usage filesystem <code>[[/dev/root]]</code> at the end of the day:
 +
for i in `ls [[/var/log/sysstat/]]sa??`; do echo "DAY:$i"; sar -f $i -F --human; done | egrep "/dev/root|DAY" | awk '{print $1" "$3}' | egrep "DAY|00:10"
 +
 +
 +
 +
To activate it: <code>[[sadc]]</code> option in <code>[[/etc/sysstat/sysstat]]</code> <code>[[-S]] [[XDISK]]</code> or <code>-S [[XALL]]</code> activated.
 +
 +
[[Filesystems]] statistics, disk and [[inodes]] usage
  
 
  Linux 4.15.0-74-generic (gitlab-runner-2) 01/19/2020 _x86_64_ (4 CPU)
 
  Linux 4.15.0-74-generic (gitlab-runner-2) 01/19/2020 _x86_64_ (4 CPU)
Line 14: Line 27:
 
  Summary:        10276    90003    89.75    94.87  4456522  2097078    32.00 /dev/vdb1
 
  Summary:        10276    90003    89.75    94.87  4456522  2097078    32.00 /dev/vdb1
  
 +
              %fsused
 +
                    Percentage of filesystem space used, as seen by a [[privileged]] user.
 +
 +
              %ufsused
 +
                    Percentage of filesystem space used, as seen by an unprivileged user.
 +
 +
 +
 +
 +
sar -F
 +
[[Requested activities not available in file]] /var/log/sysstat/sa16
 +
 +
Solution: configure disk collection <code>-S [[XDISK]]</code> information in <code>[[/etc/sysstat/sysstat]]</code>
  
  
 
== Related terms ==
 
== Related terms ==
 +
* <code>/usr/lib/sysstat/[[debian-sa1]]</code>
 
* <code>[[journalctl --disk-usage]]</code>
 
* <code>[[journalctl --disk-usage]]</code>
 
* [[No space left on device]]
 
* [[No space left on device]]
 +
* <code>[[docker system df]]</code>
 +
* <code>[[sar -d]]</code> [[disk activity]]
 +
* <code>[[df -kh]]</code>
 +
* <code>[[/var/log/sysstat/]]</code>
 +
* [[Prometheus node exporter]]: <code>[[--collector.diskstats]]</code>
 +
* [[Ubuntu]]: [[/etc/sysstat/sysstat]]
 +
* [[Amazon Linux]]: [[/etc/sysconfig/sysstat]]
  
 
== See also ==
 
== See also ==

Latest revision as of 14:25, 15 March 2024

Display filesystems usage statistics for currently mounted filesystems. Pseudo-filesystems are ignored. At the end of the report, sar will display a summary of all those filesystems. Use of the MOUNT parameter keyword indicates that mountpoint will be reported instead of filesystem device. Note that filesystems statistics depend on sadc option -S XDISK to be collected.

  • sar -F
  • sar -F --human
  • for i in `ls /var/log/sysstat/sa??`; do sar -f $i -F --human; done

Usage filesystem /dev/root at the end of the day:

for i in `ls /var/log/sysstat/sa??`; do echo "DAY:$i"; sar -f $i -F --human; done | egrep "/dev/root|DAY" | awk '{print $1" "$3}' | egrep "DAY|00:10"


To activate it: sadc option in /etc/sysstat/sysstat -S XDISK or -S XALL activated.

Filesystems statistics, disk and inodes usage
Linux 4.15.0-74-generic (gitlab-runner-2) 	01/19/2020 	_x86_64_	(4 CPU)
08:07:01 PM  MBfsfree  MBfsused   %fsused  %ufsused     Ifree     Iused    %Iused FILESYSTEM
08:08:01 PM      3231      6781     67.73     73.00    541674    113686     17.35 /dev/vda2
08:08:01 PM         0        89    100.00    100.00         0     12842    100.00 /dev/loop0
08:08:01 PM         0        89    100.00    100.00         0     12842    100.00 /dev/loop1
08:08:01 PM     10276     90003     89.75     94.87   4456522   2097078     32.00 /dev/vdb1
Summary:         3231      6781     67.73     73.00    541674    113686     17.35 /dev/vda2
Summary:            0        89    100.00    100.00         0     12842    100.00 /dev/loop0
Summary:            0        89    100.00    100.00         0     12842    100.00 /dev/loop1
Summary:        10276     90003     89.75     94.87   4456522   2097078     32.00 /dev/vdb1
             %fsused
                    Percentage of filesystem space used, as seen by a privileged user.
             %ufsused
                    Percentage of filesystem space used, as seen by an unprivileged user.



sar -F
Requested activities not available in file /var/log/sysstat/sa16
Solution: configure disk collection -S XDISK information in /etc/sysstat/sysstat 


Related terms[edit]

See also[edit]

Advertising: