i posted this on stack overflow but a user recommended i post here. sorry for cross posting:
0 vote down star
i have access to a few linux clusters at school. sometimes they are busy and sometimes they are not. i usually log into each machine manually, use the "top" command to see if the server is busy (to see if both cores are used). from there, i execute my program to use some servers that are free to run my computations.
what i'd like to do is to automate this process with a script. suppose i have a list of servers, say server1 ... server N. I'd like to log into each of these servers sequentially, run some command (top?), and output a list of servers that are unused (or output the top two processes, showing cpu %, for each server).
any suggestions would be greatly appreciated.