sar (Unix)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
sar
Stable release
sysstat 12.7.6[1] / July 3, 2024; 2 years ago (2024-07-03)
Repositorygithub.com/sysstat
Written inC
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemAIX, Linux, Solaris, HP-UX
    TypeSystem reporting
    Websitesysstat.github.io
    File:Sysstat tools sadc and sar.svg
    Called regularly by cron, sadc does the monitoring and stores its measurements to files in the /var/log/sa/ folder. The sar client can be used to explore this data.

    System Activity Report (sar) is a Unix System V-derived system monitor command used to report on various system loads, including CPU activity, memory/paging, interrupts, device load, network and swap space utilization. Sar uses /proc filesystem for gathering information.[2]

    Platform support

    [edit | edit source]

    Sar was originally developed for the Unix System V operating system; it is available in AIX, HP-UX, Solaris and other System V based operating systems but it is not available for macOS or FreeBSD. Prior to 2013 there was a bsdsar tool, but it is now deprecated.[3]

    Most Linux distributions provide sar utility through the sysstat package.

    Syntax

    [edit | edit source]
    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

    [edit | edit source]
    [user@localhost]$ sar  # Displays current CPU activity.
    

    Sysstat package

    [edit | edit source]

    Additional to sar command, Linux sysstat package in Debian,[4] RedHat Enterprise Linux and SuSE provides additional reporting tools:

    See also

    [edit | edit source]
    • atopsar
    • Nmon
    • sag - "system activity graph" command[5]
    • 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
    • isag, tcl based command to plot sar/sysstat data

    References

    [edit | edit source]

    Footnotes

    [edit | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).