Created
October 29, 2013 08:57
-
-
Save ethanfu/7211197 to your computer and use it in GitHub Desktop.
vmstat监控cpu信息,每隔10s一次记录日志,日志每天一个
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function eg { | |
while read line | |
do | |
printf "$line" | |
date '+ %m-%d-%Y %H:%M:%S' | |
done | |
} | |
vmstat 10 | eg >> vmstat_`date +%y%m%d`.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment