Hivemind displays usage stats for the Berkeley EECS instructional computers.
Every five minutes, backend/census.py is executed. It connects to each server listed in backend/server.txt via SSH and collects information. The results from all of the servers are combined into a single JSON file (data/latest.json), which is then uploaded to Firebase Hosting.
You can view the most recently generated JSON file here: https://hivemind-data.firebaseapp.com/latest.json.
The "overall load" heuristic is implemented in toRating() in main.js.
Want to host the website locally? Clone this repo, switch to the gh-pages branch, and start a web server in the project root directory.
The backend (i.e. the script that grabs data from the servers) is a little harder to set up:
- Install pysftp.
- Clone this repo, switch to the
gh-pagesbranch, and navigate tobackend/. - Make a directory called
private/. - Create an RSA key pair (
id_rsaandid_rsa.pub) insideprivate/with no passphrase. - Add the public key to your class account's
~/.ssh/authorized_keysfile. - Change the value of
LOGIN_USERNAMEincensus.pyto your login.
You should then be able to execute census.py to grab data from each server in servers.txt.
The results are printed to stdout.
Usage stats for the Hive servers, collected between 11/14/2015 and 12/21/2015 at approximately 10 minute intervals, are available as a educational dataset. There are a total of 5,252 JSON files (~50 MB uncompressed, 7.4 MB zipped).
For details, contact the author.
Hivemind was made using jQuery (with the Tablesorter plugin), Moment.js, Skeleton, clipboard.js, and Hint.css.