Mercurial > hg > cc > azure
comparison master/wecu/get_hardware_util.sh @ 57:ac1a20e627a9
from lukasz git repo 2020-05-26 (see ~/src/wecu), then editted,
sac not quite working yet
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Wed, 27 May 2020 20:54:34 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
56:8ce6a81e2bb4 | 57:ac1a20e627a9 |
---|---|
1 seconds=$1 | |
2 wait_seconds=$(expr "$1" + "5") | |
3 | |
4 echo $seconds | |
5 echo $wait_seconds | |
6 | |
7 # Get hardware utilisation at each machine | |
8 parallel --sshloginfile hosts --nonall --jobs 1 --will-cite "rm -f usage_raw.txt usage_cpu.txt" | |
9 parallel --sshloginfile hosts --nonall --jobs 1 --will-cite "iostat -x 1 $seconds > usage_raw.txt &" | |
10 sleep $wait_seconds | |
11 parallel --sshloginfile hosts --onall --jobs 1 --will-cite 'cat usage_raw.txt | grep "avg-cpu" -A 1 | grep -oP "^.*?\d+.\d+\s" | grep -oP {} > usage_cpu.txt' ::: '[\w\.]+' | |
12 cat hosts | xargs -i scp -o "StrictHostKeyChecking no" {}:/home/cc/usage_cpu.txt ./{}.usage.txt |