diff options
Diffstat (limited to 'sysfiles.sh')
-rw-r--r-- | sysfiles.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sysfiles.sh b/sysfiles.sh new file mode 100644 index 0000000..54229d8 --- /dev/null +++ b/sysfiles.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cputime_file=${TMPDIR-/tmp}/cputime + +mpstat -P ALL 1 > "$cputime_file" & + +while true; do + cputime="`tail -n4 "$cputime_file"`" + echo "$cputime">"$cputime_file" + sleep 1 +done |