Hivemind displays usage stats for the Berkeley EECS instructional computers. It was originally developed by Allen Guo and is now maintained by HKN's Compserv committee and hosted by the OCF.
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
).
You can view the most recently generated JSON file here: https://www.ocf.berkeley.edu/~hkn/hivemind/data/latest.json.
The "overall load" heuristic is implemented in toRating()
in
main.js
.
Want to host the website locally? Clone this repo, 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:
- Clone this repo.
- Run
make venv
to create a virtualenv and install paramiko. You can also runpip install paramiko
, but you'll probably want to install it locally to avoid polluting your system libraries, so a virtualenv works well for that. - Create an RSA key pair with no passphrase, rename the private key to
hivemind_rsa
and the public key tohivemind_rsa.pub
and put them inside your home directory's SSH directory (~/.ssh
). - Add the public key to your class account's
~/.ssh/authorized_keys
file to allow hivemind to log in to the servers automatically. - Change the value of
LOGIN_USERNAME
incensus.py
to 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, which run_census
puts into
a file for the frontend to fetch.
Hivemind was made using jQuery, Vue.js, Moment.js, Skeleton, clipboard.js, and Hint.css.
Hivemind was originally developed by Allen Guo and is now maintained by HKN's Compserv committee and hosted by the OCF.