首页  

linux sar 使用简介     所属分类 linux 浏览量 809
sar System Activity Reporter ,可从多方面对系统的活动进行报告,
包括 文件的读写 系统调用 磁盘I/O CPU 内存使用 进程活动及IPC有关的活动等


sar -h

Usage: sar [ options ] [ interval [ count ] ]

Main options and reports:

    -b    I/O and transfer rate statistics显示I/O和传送速率的统计信息
    -B    Paging statistics 内存分页统计信息
    -d    Block device statistics 显示块设备的统计信息

    -I { < int > | SUM | ALL | XALL } Interrupts statistics

    -m    Power management statistics

    -n { < keyword > [,...] | ALL } Network statistics
        Keywords are:
        DEV    Network interfaces
        EDEV    Network interfaces (errors)
        NFS    NFS client
        NFSD    NFS server
        SOCK    Sockets    (v4)
        IP    IP traffic    (v4)
        EIP    IP traffic    (v4) (errors)
        ICMP    ICMP traffic    (v4)
        EICMP    ICMP traffic    (v4) (errors)
        TCP    TCP traffic    (v4)
        ETCP    TCP traffic    (v4) (errors)
        UDP    UDP traffic    (v4)
        SOCK6    Sockets    (v6)
        IP6    IP traffic    (v6)
        EIP6    IP traffic    (v6) (errors)
        ICMP6    ICMP traffic    (v6)
        EICMP6    ICMP traffic    (v6) (errors)
        UDP6    UDP traffic    (v6)
        
    -q    Queue length and load average statistics 队列长度和平均负载
    -r    Memory utilization statistics 显示内存使用的统计信息
    -R    Memory statistics 显示内存页面的统计信息
    -S    Swap space utilization statistics 显示swap空间的统计信息
    -u [ ALL ]
        CPU utilization statistics 显示CPU的统计信息
    -v    Kernel table statistics        显示inode、文件和其他内核表的统计信息
    -w    Task creation and system switching statistics
    -W    Swapping statistics swap统计信息
    -y    TTY device statistics 显示设备终端统计信息

CPU相关  sar -u   -q 
内存     sar -B  -r   -W 
磁盘IO   sar -b  -d -u 
网络     sar -n



CPU监控                    sar -u
inode 文件和其他内核表监控    sar -v
内存使用监控                 sar –r
内存分页监控                sar –B
IO和传输速率监控     sar –b
块设备监控           sar –d
队列长度和平均负载监控 sar –q
swap统计信息swap –W
网络统计  sar -n DEV 1


dentunusd 目录缓存中未使用的条目数量
file-nr  Number of file handles used by the system.
inode-nr Number of inode handlers used by the system.

上一篇     下一篇
linux pidstat 命令

linux load 简介

linux watch 命令

Linux系统监控工具大全

linux stress 工具简介

busybox编译