Take a Glance at Your Server.

Sulstice
1 min readMar 28, 2021

--

I’m back! Before the next wave of exam hits. I’ve got a lot of chemical compound data to process and using a pretty complex but simple pipeline (my own). So I need to choose my tools wisely. Well, what monitoring tool can actually give me value rather than just look pretty and….you know me…..is it pythonable?

I’m looking for cpu load speeds, how much it takes up, can I obtain the data somehow for benchmark tests, and is it interoperable.

After looking through Prometheus and other ones I stumbled upon glances for python. Setup was simple, these are the base two I recommend.

python -m pip install glances bottle 

Here are others that I also figured were useful:

python -m pip install pymdstat pySMART.smartx nvidia-ml-py3 pygal zeroconf wifi

Alright, pretty simple.

Next launch the glances server and run it in the background.

python -m glances -w --enable-plugin core,cpu,folders,gpu,load,mem,processcount,raid,wifi,processlist --enable-process-extended &

Depending on it’s starting port to the server (could be 0.0.0.0:61208 — that was mine originally). Port forward from the server into your localhost I chose the port 8890.

ssh -N -f -L localhost:8890:0.0.0.0:61208 user@ip

If you haven’t already you might need to assign localhost to 0.0.0.0 in /etc/hosts

And voila:

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sulstice
Sulstice

No responses yet

Write a response