Editing Sar

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 28: Line 28:
  
 
== Activation in Debian ==
 
== Activation in Debian ==
* To start collection data modify file <code>[[/etc/default/sysstat]]</code>, changing text <code>disabled</code> by <code>enabled</code>: <code>vi /etc/default/sysstat</code>
+
* To start collection data modify file <code>/etc/default/sysstat</code>, changing text <code>disabled</code> by <code>enabled</code>: <code>vi /etc/default/sysstat</code>
* <code>[[service sysstat restart]]</code> (sysstat written with two "ss" do not misspell with systat with just one "s")
+
* <code>service sysstat restart</code> (sysstat written with two "ss" do not misspell with systat with just one "s")
  
 
Modifying number of days to keep and some other options are done in <code>/etc/sysstat/sysstat</code> file. By default Debian collect files for <code>HISTORY=7</code> 7 days.
 
Modifying number of days to keep and some other options are done in <code>/etc/sysstat/sysstat</code> file. By default Debian collect files for <code>HISTORY=7</code> 7 days.
Line 66: Line 66:
  
 
Binaries
 
Binaries
* <code>[[/usr/bin/sar]]</code> -- reporting utility --  it is a link to /usr/bin/sar.sysstat
+
* <code>/usr/bin/sar</code> -- reporting utility --  it is a link to /usr/bin/sar.sysstat
 
* <code>/usr/lib64/sa/sadc</code>  -- System activity data collector binary, a backend to the sar command. Writes binary log of kernel data to the /var/log/sa/sadd file, where the dd parameter indicates the current day
 
* <code>/usr/lib64/sa/sadc</code>  -- System activity data collector binary, a backend to the sar command. Writes binary log of kernel data to the /var/log/sa/sadd file, where the dd parameter indicates the current day
  
Line 108: Line 108:
 
# Install and configure sar to record system activity every 5 minutes
 
# Install and configure sar to record system activity every 5 minutes
 
# Read [[sysstat changelog]]: https://github.com/sysstat/sysstat/blob/master/CHANGES
 
# Read [[sysstat changelog]]: https://github.com/sysstat/sysstat/blob/master/CHANGES
# Read data from day 07 to day 11: <code>echo /var/log/sysstat/sa{07..11}  | [[xargs]] -n1 sar -f</code>
+
# Read data from day 07 to day 11: <code>echo sa{07..11}  | [[xargs]] -n1 sar -f</code>
# [[Read all sar collected files]]: <code>[[for]] SA_FILE in $(ls -1 [[/var/log/sysstat/]]sa??); do sar -f $SA_FILE; done</code>
+
 
  
 
== Related==
 
== Related==
 
* <code>[[collectl]]</code>
 
* <code>[[collectl]]</code>
 
* [[Prometheus Node exporter]]
 
* [[Prometheus Node exporter]]
* [[Grafana agent]]
 
 
* [[Metricbeat]]
 
* [[Metricbeat]]
 
* [[Zabbix agent]]
 
* [[Zabbix agent]]
 
* [[libsensors4]] package
 
* [[libsensors4]] package
* <code>[[%nice]]</code>
+
* <code>[[for]] SA_FILE in $(ls -1 [[/var/log/sysstat/]]sa??); do sar -f $SA_FILE; done</code>
  
 
== See also ==
 
== See also ==
 +
 
* {{io performance commands}}
 
* {{io performance commands}}
 
* {{sar}}  
 
* {{sar}}  
 
* systat [[FreeBSD]]<ref>https://www.freebsd.org/cgi/man.cgi?query=systat&apropos=0&sektion=1&manpath=FreeBSD+Ports+11.2&arch=default&format=html</ref> or NetBSD commands.
 
* systat [[FreeBSD]]<ref>https://www.freebsd.org/cgi/man.cgi?query=systat&apropos=0&sektion=1&manpath=FreeBSD+Ports+11.2&arch=default&format=html</ref> or NetBSD commands.
* {{sysstat}}
 
 
* {{Metrics collectors}}
 
* {{Metrics collectors}}
  
 
[[Category:Server administration]]
 
[[Category:Server administration]]
 +
[[Category:Operating systems]]
 +
[[Category:Linux]]
 
[[Category:monitoring]]
 
[[Category:monitoring]]
  

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: