fix: add hostname to cpu.sh

This commit is contained in:
2023-12-24 18:37:58 +01:00
parent 55b0af1d33
commit 23be1a5e2a
+1 -1
View File
@@ -3,4 +3,4 @@
# Returns CPU percentages of all machines in the cluster # Returns CPU percentages of all machines in the cluster
# Example output: steffe3 3.5 # Example output: steffe3 3.5
parallel --nonall --slf /home/rock/macchine.txt top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | sed "s/^/100 - /" | bc parallel --nonall --slf /home/rock/macchine.txt 'echo $HOSTNAME $(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | sed "s/^/100 - /" | bc)'