A nice way to get system load

linux python script

Since Linux 5.2, there is a new metric in the hood: Pressure Stall Information (PSI). Currently it supplies 3 ciritical metrics from kernel: CPU, IO and memory. You can find the values simply by looking to files under /proc/pressure folder. I am not going to try explaining it in detail, since this page already does that pretty good. I've found it way better than just the load metric because of granularity.

Read more →

Generating server report from ILO interface (HP servers)

python script

I should use this blog more. Here is one of the things might be useful for other admins I wrote meantime. This script generates a report, which includes all important information via ILO interface on HP servers (using python-hpilo package). Supports ILO2-3-4, which is a pretty good range for non-ancient servers I think. I've started to study golang as hobby, so might port this to Go later. But for now, this is really handy:

Read more →

Memcached check script

linux script

Couldn't find an easy & reliable way to check if memcached is running (for HA tools). Current check scripts on the net are generally stalling when memcached hits to maximum connections. So I wrote a dirty script that timeouts after 1 second on unsuccesful try. It's ugly but you get the idea. Why if ? Because my version of netcat wasn't exiting with correct error status on timeout for some reason.

Read more →