From 23be1a5e2aea1eca7149cef5a8b12514f1584f0d Mon Sep 17 00:00:00 2001 From: Francesco Minnocci Date: Sun, 24 Dec 2023 18:37:58 +0100 Subject: [PATCH] fix: add hostname to cpu.sh --- backend/scripts/cpu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/scripts/cpu.sh b/backend/scripts/cpu.sh index a1b45b0..c34ea6d 100644 --- a/backend/scripts/cpu.sh +++ b/backend/scripts/cpu.sh @@ -3,4 +3,4 @@ # Returns CPU percentages of all machines in the cluster # 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)'