Server Monitor Utility
To run the utility, you need to locally setup ssh-keys first. This will allow you to securely ssh between servers without password prompts. This only needs to be run once.
Type the command ssh-keygen
in a terminal and hit enter for each prompt to give defaults for path and passphrase:
[user@server]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (~/.ssh/id_rsa): # Hit Enter
Enter passphrase (empty for no passphrase): # Hit Enter
Enter same passphrase again: # Hit Enter
Your identification has been saved in ~/.ssh/id_rsa.
Your public key has been saved in ~/.ssh/id_rsa.pub.
Now type:
ssh-copy-id uniquename@calhoun.eecs.umich.edu
, changing uniquename to your name. Any server name will also work (I used calhoun in this example)
If successful, you should now be able to ssh between servers without it asking for password.
The server utility is written in python on my share drive. You should run this file instead of making a local copy, that way I can update the utility as we get new servers, add features, etc. Its best just to use an alias to run it easily.
If you use tcsh, add this to your ~/.cshrc
(change uniquename to yours):
alias check_servers "python /afs/eecs.umich.edu/wics/users/odelberg/server_utility/run_servers.py uniquename"
If you use bash, add this to your ~/.bashrc
(change uniquename to yours):
alias check_servers="python /afs/eecs.umich.edu/wics/users/odelberg/server_utility/run_servers.py uniquename"
Now reset your terminal, and typing check_servers
should run the utility. The numbers next to the usernames represents total CPU % usage across all cores. It won't always catch idle users but will catch active activity like simulations.
NOTE: The first time you run you may need to say yes to all prompts for connection to each server. This only needs to be done the first time.