Sunday, December 20, 2009

xargs

It was only today that I probably recognized the power of this command. For the first time in my life I combined this with "find" to play songs from a folder. Why is it interesting? Because, mostly the song name will contain spaces.

find ./ | grep mp3 | ls -Q | xargs mplayer

The above command will play all the mp3 songs in the current directory tree!

Wednesday, November 18, 2009

fedora 12

Fedora 12 is out. Grab it from here: http://fedoraproject.org/en/get-fedora

I am downloading it. Will take a while before I get it. More after I get it and install it.

Monday, November 16, 2009

gPXE

It was only today I noticed this. I was using etherboot in 1998 for remote boot. Well, I think I must have written about it somewhere. But, it was only today I went back to their site. A lot has changed. They now have a complete TCP stack on those boot roms and they support various protocols including HTTP and iSCSI. Well, one day I will go back to all these and enjoy doing the IE lab once again :)

http://etherboot.org/wiki/index.php

Sunday, November 15, 2009

Redoing the world: The google way

Google has been a pioneer in many areas. Be it search, mail or any other web related technology they have been treading paths which were/are avoided by many. Android, Chrome, Gears... the list is endless. About an year back they disclosed the hardware secret of their servers and the power supply used by them. There is something special about this company. They don't stop at getting their business done. But, they go far beyond and make everything they touch (or everything which touches them) their business.

Here are two new things they have disclosed recently. The first one is a programming language. It is called "Go". The more details can be found from this site:

http://golang.org/

What makes go special? For me these are the things which makes go special

  • Open source
  • Systems language with features from high level languages
  • Created by Rob Pike, Ken Thompson and Robert Griesemer
  • Compilation of code written in GO is much faster
Well, Rob mentioned this is to be used for web servers etc. So, I see a direct business interest for Google. However, many claim that it will take at least an year for this language to mature. Well, we lived with C, Java and C# for decades. who is in a hurry? :)



The second one that I wanted to mention here is the SPDY protocol. The link is below

http://blog.chromium.org/2009/11/2x-faster-web.html

SPeeDY is the HTTP replacement/enhancement from Google. They claim that page loading times can be improved as much as 55% with the help of this new protocol. They use multiplexed streams, HTTP header compression etc for achieving this. Well, you think this is all trivial and you can do it better? Feel free make suggestions and even modification to code :)

rsyslog

Today I had to get the logs of a machine on another. The simple reason was that the first machine was crashing and its log file was not on persistent storage. This was what I did.

On the client machine, edit /etc/rsyslog.conf. Add an entry like the one shown below


*.*                                                   @10.0.0.2


*.* says that any message of any priority comes under this rule. 10.0.0.2 is the address of the server where the log daemon is running. (Note the @ sign). After making this change, I restarted rsyslog on the client.

On the server, again edit /etc/rsyslog.conf. Look for lines shown below

# Provides UDP syslog reception
#$ModLoad imudp.so
#$UDPServerRun 514

# Provides TCP syslog reception
#$ModLoad imtcp.so
#$InputTCPServerRun 514

Uncomment (remove the #) the module and port number to allow receiving of log messages from the remote client. Restart the rsyslog here again. You will start receiving the messages from the client on your server.

How to test it?

The testing can be done very easily. Use logger on the client to log a message. For example, run,

logger "Test message from the client"


You will then see the message appear on the /var/log/messages of the server!