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

安装执行#sar 命令时会提示如下错误
[root@payne sysstat-10.2.0]# sar
Cannot open /var/log/sa/sa23: No such file or directory
23代表当天日期
使用参数-o 让其生成该文件
[root@payne sysstat-10.2.0]# sar -o 23
Linux 2.6.32-358.el6.i686 (payne)       01/23/2014      _i686_  (1 CPU)
08:57:07 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
08:57:30 AM     all      0.00      0.00      0.79      0.04      0.00     99.17
^C
08:57:43 AM     all      0.00      0.00      0.79      0.08      0.00     99.13
Average:        all      0.00      0.00      0.79      0.06      0.00     99.15
[root@payne sysstat-10.2.0]# sar
Linux 2.6.32-358.el6.i686 (payne)       01/23/2014      _i686_  (1 CPU)
08:57:07 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
08:57:30 AM     all      0.00      0.00      0.79      0.04      0.00     99.17
08:57:43 AM     all      0.00      0.00      0.79      0.08      0.00     99.13
Average:        all      0.00      0.00      0.79      0.06      0.00     99.15


或者Put a time interval and count following the sar command:
[root@payne sysstat-10.2.0]# sar 1 2
Linux 2.6.32-358.el6.i686 (payne)       01/23/2014      _i686_  (1 CPU)
08:57:07 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
08:57:30 AM     all      0.00      0.00      0.79      0.04      0.00     99.17
08:57:43 AM     all      0.00      0.00      0.79      0.08      0.00     99.13
Average:        all      0.00      0.00      0.79      0.06      0.00     99.15


又或者添加crontab,自动创建该sa*文件
[root@payne sa]# crontab -l
*/20 * * * * root /usr/lib/sa/sa1 1 2
30 23 * * * root /usr/lib/sa/sa2 -A
 详见http://www.webhostingtalk.com/showthread.php?t=540137

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27135177/viewspace-1193624/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27135177/viewspace-1193624/

strace: Process 5953 attached strace: Process 5954 attached [pid 5954] +++ exited with 0 +++ [pid 5953] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5954, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- strace: Process 5955 attached [pid 5955] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8 [pid 5955] connect(8, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) [pid 5955] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8 [pid 5955] connect(8, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) [pid 5955] +++ exited with 1 +++ [pid 5953] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5955, si_uid=1000, si_status=1, si_utime=0, si_stime=0} --- strace: Process 5956 attached [pid 5956] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7 [pid 5956] connect(7, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) [pid 5956] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7 [pid 5956] connect(7, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) /usr/bin/fusermount: mount failed: Operation not permitted [pid 5956] +++ exited with 1 +++ [pid 5953] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5956, si_uid=1000, si_status=1, si_utime=0, si_stime=0} --- Cannot mount AppImage, please check your FUSE setup. You might still be able to extract the contents of this AppImage if you run it with the --appimage-extract option. See https://github.com/AppImage/AppImageKit/wiki/FUSE for more information [pid 5953] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5953, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- open dir error: No such file or directory +++ exited with 127 +++
11-03
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值