From db468693ef5faa294d9bc3cd3c5d70c0d99d488b Mon Sep 17 00:00:00 2001 From: Rahul C S Date: Fri, 17 Feb 2012 17:23:28 +0530 Subject: Adding the performance framework to the qa repo Change-Id: Ia7dbd82e9bb2e5e65e9345234ce34f8518a091ad Signed-off-by: Rahul C S --- perf-framework/stat_collect | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 perf-framework/stat_collect (limited to 'perf-framework/stat_collect') 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 -- cgit