RAID Monitor for LSI/3Ware MegaRAID controllers

I still manage a few old servers with 3Ware/LSI MegaRAID controllers (e.g. the 9650SE) and wrote the following Python3 script which is sitting in /etc/cron.daily and sends and email if there is any problem with the battery, disks or units. Keep in mind that scripts inside the /etc/cron.* folders are not allowed to have a dot in the filename, otherwise those will be ignored. If you don’t have a working mail configuration, I recommend exim4 which is easily set up in a few minutes with standard settings....

April 5, 2021 · 2 min

pip update-all

Problem to solve Update all packages which are managed by pip. Fix pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U Alternatively pip freeze|grep '=='|awk -F= '{print $1}' | xargs pip install -U

March 15, 2019 · 1 min · Tamás Gál

st terminal support in tmux

Symptoms You try to attach to or create a new tmux session and you get the following error message: open terminal failed: missing or unsuitable terminal: st-256color Fix Copy over your terminfo definition with this one-liner: infocmp st-256color|ssh USER@TARGETHOST "mkdir -p .terminfo && cat >/tmp/ti && tic /tmp/ti" That’s it…

March 6, 2019 · 1 min · Tamás Gál

Data Exchange Between Python and C++ via protobuf

Installing protobuf The first step is of course installing the protobuf library. I used homebrew for the main library and pip to install the Python modules: brew install protobuf pip install protobuf Then I defined a very simple data structure using the proto-syntax: // Filename: foo.proto package prototest; message Foo { required int32 id = 1; required string bar = 2; optional string baz = 3; } This proto-file can now be translated into C++ and Python classes via:...

March 22, 2014 · 2 min · Tamás Gál