Sunday, November 15, 2009

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!

Sunday, November 8, 2009

Tech Trends

I am looking at new trends in technology which I would like to closely follow. Of course, I am going to be biased by what I do in real life.

Here is a quick list of items that I want to skim through and then short list a few. I will then deep dive into few of them to find the possibilities.

1. DLNA
http://www.dlna.org/home

They say that there will be more than 300M+ which are DLNA enabled by the year 2012. The seamless interaction of these devices are going to be a really new experience. Well, certain things need to be experienced before they are being judged.

I recently moved from 256kbps internet connection to 512kbps. The differences are dramatic. I am sure I could have never thought about these possibilities and experience when I was on 256kbps. The entire thought process would have been crippled by my experience so far. I believe its going to be the same for DLNA. You think of DLNA as something, and you will experience it as something else when you have 300M+ devices using it tomorrow.

2. Cloud computing

This has to somehow happen. It is happening. The likes of Google, Amazon, HP, Microsoft are pushing it. The day is not far when you move your applications to internet along with your data. The interoperability between various cloud apps and their desktop counterparts are aiming and promoting exactly this. As part of this, there will be higher synergy between various www sites.

Another offshoot of this will be tremendous growth in mobile computing and related technologies such as wireless technologies such as 3G, WiFi and WIMAX.

3. Augmented Reality

I need to pay more attention to this. This is still a fantasy for many. But not for all. http://www.hindu.com/2009/11/08/stories/2009110851251100.htm. I will study this further in coming days and then form my opinion on this.



These are also

Remember the milk

I went back to that site today. They have improved a lot and they got lot number of 3rd party services to link RTM with gmail, google calender etc. I am planning to try this for a few days. Most of the technology stuff will be done here as I have put a link to labels on this blog to many of the tasks.

Wednesday, October 7, 2009

Threads in GDB

I was recently facing some issue with a multi threaded program. The program was getting terminated because one thread was dying and it was causing a broken pipe in other threads. Now, there were multiple threads that are opening a pipe. The program had quite a few number of threads. Hence I could not find out which thread was misbehaving and causing the entire application to fail. However, this made me to look into threads support in GDB.

I found the following interesting articles on the net on debugging threads using gdb.

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gdb/threads.html

Here is a summary of commands

1. info threads
Shows information on threads

2. thread
Allows you to switch to that thread. Then you can do a bt or something similar

3. break file.c:lineno thread if condition
Allows to set a break point conditionally for a specific thread

4. set print thread-events on
Turns on printing entry and exit of a thread

5. thread apply args
Applies a command to a thread/all threads

I still don't know how to tackle my issue of dying thread. However, I expect a combo of 3,4 might shed some light. I will post the details tomorrow after trying.

Sunday, October 4, 2009

Picasa name tags

Well, I noticed this only recently. Today while adding a few photos to Picasa, I experienced the power of this feature myself. It could,

1. Detect almost all faces present in the images
2. Relate a number of detected photos and recognize they are photos of same person
3. Suggest close matches for most of the photos from already tagged photos.

The below image is a screenshot of google detecting almost all occurrences of my face from an album and suggesting that it is me! It has made a single mistake but that is the picture of one of my paternal uncle.



There was one more amazing factor. For every picture it was making some suggestions. The suggestions were mainly either a correct match or a person who is of close blood relation!

Well, I am not an expert in this field. But, I can see Google coming up with real image search in near future. Well done Google.