diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-02-18 10:36:44 -0800 |
---|---|---|
committer | Gerrit Code Review <root@dev.gluster.com> | 2012-02-18 10:36:44 -0800 |
commit | 6ed4ac470d7aaddd05ce179bc304ef688f5553aa (patch) | |
tree | 095187e0649d88c226563f41f19a6fba0b4a156e /perf-framework/stat_collect | |
parent | 4de9a1a4df6667a59dd36148167d7ea188c69831 (diff) | |
parent | db468693ef5faa294d9bc3cd3c5d70c0d99d488b (diff) |
Merge "Adding the performance framework to the qa repo"
Diffstat (limited to 'perf-framework/stat_collect')
-rwxr-xr-x | perf-framework/stat_collect | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/perf-framework/stat_collect b/perf-framework/stat_collect new file mode 100755 index 0000000..8b63203 --- /dev/null +++ b/perf-framework/stat_collect @@ -0,0 +1,36 @@ +#!/bin/bash -ue + +function start_stat_collect() +{ + echo "Interrupts details:" >> $SYSINFO + cat /proc/interrupts >> $SYSINFO + echo "CPU details:" >> $SYSINFO + cat /proc/cpuinfo >> $SYSINFO + echo "Memory details:" >> $SYSINFO + cat /proc/meminfo >> $SYSINFO + + iostat -xcdh 5 >> $IOSTAT_LOG & + mpstat -P ALL 5 >> $MPSTAT_LOG & + vmstat 5 >> $VMSTAT_LOG & + LC_TIME="POSIX" sar -n DEV 5 0 >> $SAR_NETSTAT_LOG & +} + +function init() +{ + mkdir -p $LOGDIR + IOSTAT_LOG=$LOGDIR/iostat_log + VMSTAT_LOG=$LOGDIR/vmstat_log + MPSTAT_LOG=$LOGDIR/mpstat_log + SAR_NETSTAT_LOG=$LOGDIR/sar_netstat_log + SYSINFO=$LOGDIR/sysinfo + echo "" > $IOSTAT_LOG + echo "" > $VMSTAT_LOG + echo "" > $MPSTAT_LOG + echo "" > $SAR_NETSTAT_LOG + echo "" > $SYSINFO +} + +LOGDIR=$1 +init $LOGDIR; +start_stat_collect; +wait |