Pidgin - A replacement of Yahoo messenger

Nowadays I have started using Pidgin as IM. I was using yahoo but it was consuming near about 60M memory. So I was looking for alternate solution and I found Pidgin. It takes around 13M memory. So pretty light weight.
I installed it, and was not comfortable with look and feel of it. I searched for applying skin to it. And I did it through below steps.
As of version 2.7.0, Pidgin ships with a private GTK+ runtime and doesn't include extra themes or a GUI theme switching application.
There is an easy way to use the GTK+ theme binaries and theme switcher.
Download the GTK+ Themes and GTK+ Theme Switcher zip files and extract them to a temporary directory.
Copy the lib and share directories from the GTK+ Themes zip file into your \Gtk directory (you want to merge those with the existing lib and share directories). Copy the gtk2_prefs.exe from the GTK Theme Switcher zip file into your \Gtk\bin directory.
You can now run the gtk2_prefs.exe applications to choose a theme. You probably will want to use the "Apply for all users" checkbox so that the changes are made to Pidgin's private GTK+ runtime.
Note: If you had previously set up a user-specific GTK+ theme with the global GTK+ Runtime, you will need to delete or rename the %USERPROFILE%/.gtkrc-2.0 file in order to have your changes take effect.

Cron Job Output to mail

I was looking for a output of Cron Job, whenever it runs. The output can be a general output of script or any error generated by script.

There's standard output (STDOUT) and standard errors (STDERR). STDOUT is marked 1, STDERR is marked 2. So the following statement tells Linux to store STDERR in STDOUT as well, creating one datastream for messages & errors:


2>&1

Lets say if you want to send cron output to mail then edit below entry in crontab.


13 15 * * * /root/my.sh 2>&1 | mail -s "Cronjob ouput" alpesh.bhavsar@yahoo.c0m


Monitoring JMX port in Amazon EC2 hosted server

Recently I have started work on Amazon EC2 servers. At some point I got requirement to monitor JMX port of server which was hosted on Amazon EC2. I followed the steps which was previously posted in my blog. But it did not help. I tried changing CATALINA_OPTS parameters as well as I opened all ports in Amazon "Security Group". After all I got help from Feil Figg blog. So below are steps to achieve it.

(1) First download catalina-jmx-remote.jar file as per tomcat's version and keep it in tomcat\lib folder.

(2) Now open tomcat/conf/server.xml file and add below line into it.

<Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="8999" rmiServerPortPlatform="8999"/>



(3) Now open tomcat/bin/setenv.sh file and add below java parameters.



JAVA_OPTS="${JAVA_OPTS} -Djava.rmi.server.hostname=ec2-xx-xxx-x-xxx.compute-1.amazonaws.com -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

(4) Now restart tomcat. You need to open port 8999 in Amazon "Security Group".

Hope this will help.