If you apt-get install sysstat, and sar returns:
Cannot open /var/log/sysstat/sa27: No such file or directory
Sar needs to be enabled before it can be used. The error message in this case is completely useless, and the solution I have found is as below:
Enable sysstat data collection by doing
# dpkg-reconfigure sysstat
or manually by changing value of ENABLED from "false" to "true" in "/etc/default/sysstat".
Then start sysstat via:
# /etc/init.d/sysstat start
Check "/var/log/sysstat/" for the missing file.
Run sar after about 10 minutes to see the collected data.
# sar -A
- wizap's blog
- Login or register to post comments
Comments
i have reinstall sysstat:
apt-get install -fy sysstat
then install zimbra server ok, anyone same me?
Instanteneous values can also be shown using the commandline "interval" and "count" options, e.g.:
# sar -u 1 5
bsp; CPU %user %nice %system %iowait %steal %idle bsp; all &nb sp; 1.00 99.00 & nbsp; 0.00 &n bsp; 0.00 &n bsp; 0.00 &n bsp; 0.00 bsp; all &nb sp; 0.00 100.00 0.00 &n bsp; 0.00 &n bsp; 0.00 &n bsp; 0.00 bsp; all &nb sp; 0.00 99.00 & nbsp; 1.00 &n bsp; 0.00 &n bsp; 0.00 &n bsp; 0.00 bsp; all &nb sp; 0.00 100.00 0.00 &n bsp; 0.00 &n bsp; 0.00 &n bsp; 0.00 bsp; all &nb sp; 1.00 99.00 & nbsp; 0.00 &n bsp; 0.00 &n bsp; 0.00 &n bsp; 0.00 bsp; all &nb sp; 0.40 99.40 & nbsp; 0.20 &n bsp; 0.00 &n bsp; 0.00 &n bsp; 0.00
[uname output]
08:46:40 &n
08:46:41 &n
08:46:42 &n
08:46:43 &n
08:46:44 &n
08:46:45 &n
Average: &n