Using option -p (pretty-print) along with -d make the dev column more readable, example is shown below : ~]# sar -d -p 2 4 d option in the sar command is used to display the block device statistics report. 5) Generating Block Device Statistics Report Zero value indicates that there is no page scanned during that time. %vmeff indicates the number of pages scanned per second, if it’s vaule is 100 % its is consider OK and when it is below 30 % then there is some issue with virtual memory. In the report majflts/s shows the major faults per second means number of pages loaded into the memory from disk (swap), if its value is higher then we can say that system is running out of RAM. B option in the sar command is used to display paging statistics. Kbcommit & %commit is the overall memory used including RAM & Swap 4) Generating Paging Statistics Report r option in the sar command is used to generate memory usage report. $ sar -f /tmp/data 3) Generating Memory Usage Report Now use “ sar -f ” to display the reports. To save the sar command output to a file, use -o option, example is shown below $ sar 2 5 -o /tmp/data > /dev/null 2>&1 If the %I/O wait is more than zero for a longer period of time then we can consider there is some bottleneck in I/O system (Hard disk or Network ) 2) Saving sar command output to a file To generate the CPU report 5 times every 2 seconds, run 1) Generating CPU Report on the Fly 5 times every 2 seconds Without any further delay, let’s deep dive into examples of sar command and see how the reports are generated. $ cat /etc/cron.d/sysstatīelow is the default config file of sysstat (sar command) on RHEL systems.ĭefault Configuartion of sysstat on Ubuntu 22.04/20.04 $ cat /etc/default/sysstat On Ubuntu 22.04/20.04, following cron tab is responsible for generating the report every 10 minutes. On RHEL 8/ RHEL 9, following systemd file is responsible for collecting and generating reports. Once the sysstat service started then sar will start collecting the data every 10 minutes and generate its report daily.
0 Comments
Leave a Reply. |