Tuesday, October 11, 2011

Performance Monitoring For Linux Servers

some of important commands and links to monitor the Linux servers performance monitoring are as fiollows:

1) htop command:

Press Shift + P to sort the processes by CPU consumption
Press Shift + M to sort the processes by Memory consumption


2) In top command.

When stats are in front of you with top command

Press 1 -->gives you the utilization of all CPU individually(If more than 1 cpu is used at that machine)
Shift + A to group the proesses by CPU,Memory consumption.
Press Shift + P to sort the processes by CPU consumption
Press Shift + M to sort the processes by Memory consumption

3) mpstat -P ALL

For multirocessor usage

4) free----->Memory Usage


To see Tcp connections:

netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c


To see requests currently served by apache ( http://httpd.apache.org/docs/2.0/programs/apachectl.html)

watch -d apache2ctl fullstat

4) Get Sub process of Process
Top -p PID->Shift H ->press Key c

5) For the description of Sub process
ps -ALcf | grep Sub_PID

6) Tool Used for Thread Dump Analysis [Samurai]

1.Capature Thread Dump
2.Convert PID [Decimal to hexadecimal]
3.Find process Id in thread Dump for the description.


7) Tool to Analyze GC Logs and heap dump is HP Jmeter

8) command to get info related to Heap Size GC Info

java location\jmap -heap instantid

10) Clear content of the file
: >FileName

11) info relate gc
http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html

12) Performance Monitoring :
http://publib.boulder.ibm.com/infocenter/javasdk/tools/index.jsp?topic=%2Fcom.ibm.java.doc.igaa%2F_1vg00011e17d8ea-1163a087e6c-7ffe_1001.html

13) Tool to Analyze GC Logs and heap dump is HP Jmeter
14) Command to open hpJmeter from Cmd prompt[to deal with out of memory exception when open directly]
java -Xmx15000m -jar hpjmeter.jar

15) Heap dump Analysis using tool jhat
http://dev.zhourenjian.com/blog/2011/01/08/use-jmap-and-jhat-to-detect-memory-leak.html

Thursday, August 4, 2011

What To Choose: Development Or Testing???

Give Your views favouring your point...