Skip to content

Instantly share code, notes, and snippets.

@VadimKirilchuk
Last active December 27, 2015 04:58
Show Gist options
  • Save VadimKirilchuk/7270203 to your computer and use it in GitHub Desktop.
Save VadimKirilchuk/7270203 to your computer and use it in GitHub Desktop.
Collect some useful performance stats from linux pc
# to be improved later
#deletel old files
rm -rf vmstat.*
rm -rf iostat.*
rm -rf mpstat.*
date > vmstat.log
date > iostat.log
date > mpstat.log
# Collect each 5 seconds
# pids are required to stop
vmstat -n -a -SM 5 >> vmstat.log &
echo $! > vmstat.pid
iostat -mtx 5 >> iostat.log &
echo $! > iostat.pid
mpstat -P ALL 5 >> mpstat.log &
echo $! > mpstat.pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment