Cannot open /var/log/sa/sa26: No such file or directory

First-time error when installing sar tool, you know sar is an external tool, linux is not unique,

The first time you use the file to be created

[root@leader ~]# sar
Cannot open /var/log/sa/sa26: No such file or directory

26 represents today's date, use the -o Makefile add value date

[root@leader ~]# sar -o 26
Linux 2.6.32-504.el6.x86_64 (leader) 12/26/2019 _x86_64_ (2 CPU)


10:38:31 PM CPU %user %nice %system %iowait %steal %idle
10:38:57 PM all 0.08 0.00 0.23 0.06 0.00 99.63
10:39:23 PM all 0.14 0.00 0.37 0.02 0.00 99.47
10:39:49 PM all 0.12 0.00 0.25 0.04 0.00 99.59
10:40:15 PM all 0.16 0.00 0.35 0.12 0.00 99.37
10:40:41 PM all 0.12 0.00 0.23 0.12 0.00 99.53
10:41:07 PM all 0.08 0.00 0.20 0.02 0.00 99.71
10:41:33 PM all 0.12 0.00 0.21 0.04 0.00 99.63
10:41:59 PM all 0.12 0.00 0.23 0.04 0.00 99.61
^C
[root@leader ~]# sar
Linux 2.6.32-504.el6.x86_64 (leader) 12/26/2019 _x86_64_ (2 CPU)

10:38:31 PM CPU %user %nice %system %iowait %steal %idle
10:38:57 PM all 0.08 0.00 0.23 0.06 0.00 99.63
10:39:23 PM all 0.14 0.00 0.37 0.02 0.00 99.47
10:39:49 PM all 0.12 0.00 0.25 0.04 0.00 99.59
10:40:15 PM all 0.16 0.00 0.35 0.12 0.00 99.37
10:40:41 PM all 0.12 0.00 0.23 0.12 0.00 99.53
10:41:07 PM all 0.08 0.00 0.20 0.02 0.00 99.71
10:41:33 PM all 0.12 0.00 0.21 0.04 0.00 99.63
10:41:59 PM all 0.12 0.00 0.23 0.04 0.00 99.61
Average: all 0.11 0.00 0.26 0.06 0.00 99.57

Guess you like

Origin www.cnblogs.com/guipeng/p/12104918.html