## Debugging Servers
Servers are multithreaded, so if one hangs, it is most interesting to see
what the different threads are doing.
Using gdb, you can get a stack trace of all threads
(provided, you compiled your server with "--enable-debug").
First, we need to get the pid and the full path of the server (e.g. fileserver):
PID=`ps -eaf | grep fileserver | grep -v grep | awk '{print $2}'`
SRV_PATH=`ps -eaf | grep fileserver | grep -v grep | awk '{print $9}'`
Then we need to attach the gdb and make it display the stack of all threads :
gdb --batch --eval-command="thread apply all where" $SRV_PATH $PID > /tmp/threads.log
After this you might use the attached script [[threadLogParser.py]] to display the intersting threads.
e.g.
threadLogParser.py -g /tmp/threads.log -e rx_GetCall
displays only threads which are not in this boring rx_GetCall (threads are waiting for a new call).
## Debugging Clients [Funny Quotes](http://itshumour.blogspot.com/2010/06/twenty-hilarious-funny-quotes.html) [Hilarious Quotes](http://bit.ly/1AHm7r) [Funny Jokes](http://itshumour.blogspot.com/2011/07/funny-marriage-jokes.html) [Dental Implants](http://dentaldentistsolutions.blogspot.com/2009/10/process-and-pictures-dental-implants.html)[Funny status for facebook](http://itshumour.blogspot.com/2011/08/funny-statuses-quotes-for-facebook.html)
Low-level debugging of a client can be done using "fstrace".
Unfortunately, this produces a lot of output, so it is not easy
to catch an intermittent error-condition with "fstrace".
The attached script [[ClientTracing.py]] gives you the opportunity to continuously run a fstrace,
where the output is stored in rotating log-files.
In case of an external-event (the existence of a predefined file), it saves this log and does not overwrite
it again.
Thus, all you need to do is to write a script which creates this predefined file, when that event happens.
[Meriahkan Pesta Ulang Tahun Bersama GarudaFood](http://aladiw.us/meriahkan-pesta-ulang-tahun-bersama-garudafood/)
[TOP 1 Oli Sintetik Mobil-Motor Indonesia](http://aladiw.com/seo/top-1-oli-sintetik-mobil-motor-indonesia.html)
[Mobil Keluarga Terbaik Di Indonesia](http://aladiw.com/seo/mobil-keluarga-terbaik-di-indonesia.html)