Monitoring tree of Linux processes

Once in a while there is a need to see the tree of processes on a Linux system.  When such a need arises, I usually run “ps auxw –forest“, which results in something like this (partial output, top only):

/bin/ps auxw --forest

Today, via this blog post, I’ve learned that there is another way – “pstree“.  This command accepts a number of parameters, but in its simplest form, results in something like this (partial output, top only):

/usr/bin/pstree

On my Fedora box, /usr/bin/pstree is a part of the psmisc RPM, which is the one that brings /usr/bin/killall to the system.

Zip vs. Bzip2

While investigating an unrelated issue on our backup server, I came across an interesting discussion about gzip vs. bzip2. I was surprised to read on how much slower bzip2 is.  I even tested it on our server.  And as expected, I saw the huge difference.

$ du -sh home
819M  home

$ time tar czf test.tar.gz home
real	3m29.741s
user	1m4.026s
sys	0m5.629s

$ time tar cjf test.tar.bz2 home
real	11m38.751s
user	6m19.259s
sys	0m7.237s

$ ll test.tar*
-rw-r--r-- 1 leonid users 365987716 2010-06-29 13:08 test.tar.bz2
-rw-r--r-- 1 leonid users 390655750 2010-06-29 12:56 test.tar.gz

For such a small difference in size, the compression time difference is huge! Of course, I should play with more parameters, repeat the tests several times, and test the decompression time too. But the above test is still a good indication. Way too many scripts out there use the default parameters and substitute gzip with gzip2 without any testing. That’s obviously asking for trouble.

Google services via command line

I don’t know how I missed the announcement and why there is no noise around this release, but here it goes.  GoogleCL is a tool that you use from the command line to access Google web services.  I just installed it on my Fedora 13 laptop and its awesome!

Here is what you need to do to intall

$ sudo yum install python-gdata
$ wget http://googlecl.googlecode.com/files/googlecl-0.9.7.tar.gz
$ tar xzvf googlecl-0.9.7.tar.gz
$ cd googlecl-0.9.7
$ sudo python setup.py install

Here are some of the things that you can do.  And I guess more is coming shortly.

The first time you’ll connect to any of the Google web services using this tool, you’ll need to authenticate and grant access to the application.  After that – it’s all pure honey.

Google Calendar wishlist

Google Calendar team recently ran a survey, asking users what is it that they like and dislike about the product and how to make it better.  Of course, I submitted my opinions, but, as always, better thoughts come after the action has been already taken.  Here is my two items wishlist for Google Calendar.

  1. [Update: not true anymore, see comments] SMS notifications for additional calendars.  Google Calendar only supports SMS notifications for your primary calendar.  But if you want to have a separate calendar for work and personal life, then you’ll have to choose which of these will send you messages to the phone.
  2. Related events.  Quite often I get into a situation where I need two related entries in the calendar.  For example, I might have a birthday party event and shopping for presents, or a beer session at the pub and table reservation.  Having just one event and a tonne of reminders for it doesn’t really work.  Having two events however makes it more difficult to manage them.  If the party was rescheduled, I’ll need to update my calendar to reflect the change, but I’ll also need to find and update the related event.  It would be so much more convenient if I could just relate one event to another and when I move one (a couple of days later, for example), the related event would reschedule itself as well.

What are the features that you want to see Google Calendar?