![how to extract sar file how to extract sar file](https://www.computerhope.com/cdn/linux/sar.gif)
We can use the sadf command to read data files generated by sar and display them in different formats depending on our requirements.īefore getting to examples I’ll describe the various flags I’ll be using: tmp/SAR_datafile: data Formatting sar data using sadf: This command will run sar every 1 minute 5 times and write the output to /tmp/SAR_datafile file. Here is an example: sudo sar -o /tmp/SAR_datafile 60 5 >/dev/null 2>&1 & For example, the command “sar -u -f /var/log/sa12” will display the recorded CPU utilization information for the 12 th day of the month as shown below: $ sudo sar -u -f /var/log/sa/sa12 | head
![how to extract sar file how to extract sar file](https://i0.wp.com/4xone.com/wp-content/uploads/2019/03/Parabolic-sar-signals.png)
The metric flag will specify the metric whose information we’d like to access. The -f flag denotes that we’ll be reading input from a file followed by the file name. HISTORY=28 Reading historical SAR data from saXX filesĮxample10: To read data from a saXX file we use the following syntax: sar -f /var/log/sa/saXX Sysstat saves the files generated by sa1 and sa2 for 28 days by default, but this can be changed by modifying the HISTORY variable in the /etc/sysconfig/sysstat file.
![how to extract sar file how to extract sar file](https://connectedenterprise.files.wordpress.com/2012/08/image31.png)
HOW TO EXTRACT SAR FILE INSTALL
When we install sysstat, it adds the following additional utilities which are responsible for collecting and storing sar data: In this article, we talk about sar data is collected, stored and retrieved. In a previous article, we described how sar reports data on various system performance metrics in real time. SAR file collection and historical reporting data: