Monitoring PowerWare 9120 UPSes with NUT

August 21st, 2007 by Alexander Mamchenkov

Finally I have managed to set up a monitoring of two PowerWare 9120 USPes with NUT (Network UPS Tools). The point is that the standard software which comes with this UPS sucks in all ways and I needed something to take data from UPSes and then pass it to Nagios. So here is how we go about it:

1. Install nut and (if you are going to read data about UPS from same machine, nut-client)

yum install nut nut-client

2. Connect UPS(es) with serial cables (I assume there is not optional networking module installed on UPSes)

3. Add your UPSes to /etc/ups/ups.conf file as follows:

[ups1]
driver = upscode2
port = /dev/ttyS0
baudrate = 9600
manufacturer = PowerWare
desc = "UPS 1"

4. Modify /etc/sysconfig/ups to contain these two lines

SERVER=yes
MODEL=upsdrvctl

5. If you don’t want upsmon to act in any ways corresponding to your UPS(es) state, disable it by putting the next line in /etc/ups/upsmon.conf (otherwise edit it as described in it)

MINSUPPLIES 0

6. Enable upsd to start automatically

chkconfig --level 2345 ups on

7. Start the service

service ups on

8. Check it up

upsc ups1@localhost

That’s it. Now you can get the data anytime with upsc command as in step 8.

Posted in Technology, Linux, OS, Hardware | No Comments »

To Remember: NetworkManager on servers

August 20th, 2007 by Alexander Mamchenkov

Few days ago I had that nice experience setting up a server on (already installed not by me) Fedora 7. Among other things, this server should be a gateway for LAN running DHCPd, DNS, iptables and all those other services for service the LAN. One thing was just driving me crazy: I had static IP for LAN ethernet, but each time I was restarting either network service or dhcp, that ethernet was getting an IP from local dhcp (that sux). I checked almost everything to make sure I specified that the ethernet should use statically assigned IP and still had no luck.

After fighting for some time I found our that NetworkManager was running and watching all those network changes. Each time I was restarting network or dhcp, NetworkManager was ignoring all the bloody settings and just trying to find best solution for me screwing everything up :(

Posted in Technology, Linux, Network, OS | No Comments »

Transparent background in Midnight Commander

June 13th, 2007 by Leonid Mamchenkov

Transparent background in Midnight Commander has been around for some time, but far too less people realize and use it. If you are one of those guys who just have to have everything transparent, then here is the quick fix for you.

Add these two lines to the end of your ~/.mc/ini file:


[Colors]
base_color=normal=,default:selected=,:marked=,default:markselect=,:menu=,:menuhot=,:menusel=,:menuhotsel=,:dnormal=,:dfocus=,:dhotnormal=,:dhotfocus=,:input=,:reverse=,:executable=,default:directory=,default:link=,default:device=,default:special=,:core=,:helpnormal=,:helplink=,:helpslink=,:

Now restart Midnight Commander, and you should be fine.

An extra tip for KDE users - edit your konsole settings and choose “Transparent for MC” schema.

That’s about it.

Posted in Technology, Linux, OS, Programming, Shell | No Comments »

Metisse project

May 22nd, 2007 by Alexander Mamchenkov

Found one (hopefully) nice project for desktop improvements under Linux: Metisse. In is a nice thing to be used along with Beryl or Compiz. See it in action in this video while I will try to install it on my laptop, check it and write some more here later on.

Posted in Technology, Linux, OS | No Comments »

The best use for GNU Screen

March 29th, 2007 by Alexander Mamchenkov

I have worked with GNU screen WM for a while now and I have heard a lot of people also like it. Personally, I find the tool to be very handy when you need to run something on a remote terminal without being connected to it all the time. The idea is that I login to the remote machine using SSH, then start screen (screen -a), then start the app I need (for ex top) and then just detach the screen using <Ctrl>-A,D shortcut and disconnect from the remote server, while my top command continues running there. In while, when I need to check how thing are going with my app, I just connect back through SSH and reattach the screen by using screen -r  command.

Though top is a too trivial example of a command one may run, I use screen for real-time parsing of Nagios perf-data which is retrieved by my script (will publish it here one day) from named pipe (to which nagios writes all performance data) and then creates RRDs.

Posted in Technology, Linux, Network, OS, SSH, Communications | 2 Comments »

« Previous Entries