You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
237 B
Bash

#!/bin/bash
# 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