About Me

My photo
Working as Technical Lead in CollabNET software private limited.

Wednesday, 8 April 2009

Ubuntu youtube no sound in firefox

I was continuously facing problem with sound while playing youtube using firefox. The youtube inturn uses gstreamer library to render the sound.

Finally got sound working after installing restricted packages!

Run "sudo apt-get install ubuntu-restricted-extras"

Paly and check your youtube for sound.

Friday, 3 April 2009

Subversion stress testing.

Today for one of my friend I've explored a new tool, which was used for stress testing on subversion.

You can find the script here.

Basically the script is for performing multiple operations on the repository to test the load.

Tuesday, 31 March 2009

Find and Grep

The find and grep are very usefull commands for development.

When you want to grep a content for the matching files, below commands will help you out.


In linux:
find /tmp -name 'page.xml' -print0 | xargs -0 grep "view_link=\"ReportView" | awk '{print $1}' | wc -l

In solaris:
find /tmp -name 'page.xml' -exec grep "view_link=\"ReportView" {} \; | wc -l

In the above command I'm trying to find page.xml inside /tmp dir and then search content "view_link=\"ReportView" from the find output.

Monday, 30 March 2009

STOP and START a running process.

Send signals to the running process.

# sending STOP signal to the process will halt the process in it's current state.
sudo kill -STOP $pid.

# To confirm the process is stopped for a moment
sudo strace -p $pid. #this will leave traces of "STOPPED".

# send CONT signal to resume the process to start it's work
sudo kill -CONT $pid.


Inorder to make the process idle (to simulate deadlock situation) I've used the above technique to stop the process and test the status of the process.

Monday, 23 March 2009

To print shared library dependencies

To know what are the libraries used by any program.

>>ldd /usr/bin/svn | grep db
>>libdb-4.7.so => /lib/libdb-4.7.so (0x00154000)
>>libdb-4.3.so => /lib/libdb-4.3.so (0x00cb0000)