http://www.atoptool.nl/
atop
atop [-g|-m|-d|-n|-u|-p|-s|-c|-v|-o|-y] [-C|-M|-D|-N|-A] [-afFG1xR] [-L line-len] [-Plabel[,label]...] [ interval [ samples ]]
interval:采样时间,默认10s
atop 5 #每5s刷新一次
samples:采样次数
atop 5 3 #一共采样3次,间隔5s
Writing and reading raw logfiles:
atop -w rawfile [-a] [-S] [ interval [ samples ]]
atop -r [ rawfile ] [-b hh:mm ] [-e hh:mm ] [-g|-m|-d|-n|-u|-p|-s|-c|-v|-o|-y]
[-C|-M|-D|-N|-A] [-fFG1xR] [-L linelen] [-Plabel[,label]...]
i 设置采样时间
t/T 切换时间
r 跳到文件头
b 输入时间点,跳转到此时间点
l 设置各指标统计显示的行数
a 切换是否只显示active的进程/线程
S 筛选disk、eth、volume,只显示特定的disk、eth、volume等等
g generic默认输出,cpu
m memory查看内存
d disk查看进程磁盘IO
n network网络
o 自定义内容显示
C 按cpu排序
M 按MEM排序
D 按DISK排序
N 按NET排序
A 自动排序
v 进程信息、状态等
c command命令
y 显示线程
u 按用户统计资源 U 按用户名过滤
p 按进程统计资源 P 按进程名过滤 I 按pid过滤
/ 字符搜索
z 冻结窗口
k kill进程
atopsar
make: *** /lib/modules/2.6.32.59-0.7-default/build: No such file or directory. Stop.
/lib/modules/2.6.32.59-0.7-default # ln -s /usr/src/linux-2.6.32.59-0.7/ build
make
make install
service netatop start
chkconfig --add netatop
atopsar -r 20161208 -d -b 13:00 -e 14:35
atopsar -r /var/log/atop/atop_20161208 -m -b 13:00 -e 14:35
-a 包含非活动的