forked from haiwan/sledge
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
337 B
19 lines
337 B
6 months ago
|
#!/bin/bash
|
||
|
|
||
|
function usage {
|
||
|
echo "$0 [vmstat file] [pidstat file]"
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
if [ $# != 2 ] ; then
|
||
|
usage
|
||
|
exit 1;
|
||
|
fi
|
||
|
|
||
|
vmstat_file=$1
|
||
|
pidstat_file=$2
|
||
|
|
||
|
sledge_pid=`ps -ef|grep "sledgert"|grep -v grep |awk '{print $2}'`
|
||
|
vmstat 1 > $vmstat_file 2>&1 &
|
||
|
pidstat -w 1 150 -p $sledge_pid > $pidstat_file 2>&1 &
|