sar (Unix)
In computing, sar
(System Activity Report) is a Unix System V-derived system monitor command used to report on various system loads, including CPU activity, memory/paging, device load, network. Linux distributions provide sar
through the sysstat
package.
Syntax
sar [-flags] [ -e time ] [ -f filename ] [-i sec ] [ -s time ]
-f filename Uses filename as the data source for sar. The default is the current daily data file /var/adm/sa/sadd.
-e time Selects data up to time. The default is 18:00.
-i sec Selects data at intervals as close as possible to sec seconds.
Example
user@localhost:$ sar
Displays current CPU activity.
To add hourly and average CPU usage to a logfile:
echo "SAR on the 1/2 hour and average CPU" >> $LOGFILE sar | head -4 | tail -1 >> $LOGFILE sar | tail -3 >> $LOGFILE
See also
-
sag
- "system activity graph" command[1] - ksar- BSD licensed Java based application to create graph of all parameters from the data collected by Unix sar utilities.
- CURT, IBM AIX CPU Usage Reporting Tool
References
- – Solaris 10 User Commands Reference Manual
- Easy system monitoring with SAR (IBM developerWorks)
- System Activity Reporter (Softpanorama)
- Sysstat package homepage
- Article on sar at Computerhope
- Article on Sar at ITWorld (mentions sar's starting on Solaris)
Footnotes
This article is issued from Wikipedia - version of the 7/7/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.