Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

2013-08-24

Real-time console based monitoring of PostgreSQL databases (pg_view)

In many cases, it is important to be able to keep your hand on the pulse of your database in real-time. For example when you are running a big migration task that can introduce some unexpected locks, or when you are trying to understand how the current long running query is influencing your IO subsystem.

For a long time I was using a very simple bash alias that was injected from the .bashrc script and that included the calls to system utilities like watch, iostat, uptime, df, some additional statistics from the /proc/meminfo and psql that was extracting information about currently running queries and if that queries are waiting for a lock. But this approach had several disadvantages. In many cases I was interested in the disk read/write information for query processes or PostgreSQL system processes, like WAL and archive writers. Also I wanted to have a really easy way to notice the queries that are waiting for locks and probably highlight them by color.
Several weeks ago we finally open-sourced our new tool, that makes our lives much easier. That tool combines all the feature requests that I was dreaming of for a long time. Here it is: pg_view.

I already have some more feature requests actually and hope that Alexey will find some time to add them to the tool in nearest future. So if somebody wants to contribute or give some more ideas, please comment and open feature requests on the github page :)

2011-10-30

How to remove SIM Card PIN from your GSM/UMTS modem on Ubuntu (Linux)

If your GSM modem SIM Card is configured with a PIN a NetworkManager is constantly trying to ask for that PIN on every wake up... and this is quite annoying indeed. So the easy way to remove a PIN protection from your SIM Card under Ubuntu would be:
sudo apt-get install gsm-utils
sudo gsmctl -d /dev/ttyACM0 -o unlock sc all 1234
here 1234 is actually your SIM Card PIN to be removed.

2007-12-12

sar monitoring failure

On Monday we had a very strange problem on one of our servers. %iostat values reported by sar dramatically increased the values and stayed at that range. After long investigation I could not find any problem that could be causing such a havy IO load and then I noticed, that the output of iostat and sar differ for %iostat values.

It appears that older version of sar could have some kind of overflow problem that makes it show invalid data values after kind of long time after system startup.

Updating sar to the newer version helped this (or maybe just reset the counters somehow)