RSS feed [root] /unix /weblog




login:

password:

title search:




 


Mon Nov 09 07:34:36 GMT 2015

tracing



Look like a nice tools provide more information for performance issue - http://oprofile.sourceforge.net/examples/

Check CPU problem with prstat
http://javaeesupportpatterns.blogspot.ca[..]stat-solaris-pinpoint-high-cpu-java.html
http://javaeesupportpatterns.blogspot.ca[..]stat-linux-how-to-pinpoint-high-cpu.html
http://javaeesupportpatterns.blogspot.ca[..]prstat-aix-how-to-pinpoint-high-cpu.html

http://www.thegeekstuff.com/2012/03/reverse-engineering-tools

If we like to trace process detail flow, system call and file opened - http://www.ussg.iu.edu/UAU/advcomm/truss.html http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?truss+1


-l Includes the id of the responsible lightweight process
(LWP) with each line of trace output. If -f is also
specified, both the process-id and the LWP-id are
included.



If the process hang and we like to check why, can try pstack - http://www.google.com[..]=pstack&sourceid=opera&ie=utf-8&oe=utf-8

Check where is the core dump to - http://groups.google.com[..]s/browse_thread/thread/9f46dfb277c72cc8#

Use gcore to generate coredump for running process - http://www.gsp.com/cgi-bin/man.cgi?section=1&topic=gcore

If we like to check the which process id using which port, we can use lsof or "pfiles /proc/*"
1) save the output of "pfiles /proc/*" to a file
2) grep the file for that port, then find the PID, e.g., say here is the part of the output:

5859: java -Djava.awt.headless=true -DX_R_BRGD -Xms512M -Xmx1024M -Djava.io.
Current rlimit: 1024 file descriptors
0: S_IFCHR mode:0666 dev:85,0 ino:980953 uid:0 gid:3 rdev:13,2
O_RDONLY|O_LARGEFILE

....... ( 125 FD after) ......

125: S_IFSOCK mode:0666 dev:313,0 ino:40404 uid:0 gid:0 size:0
O_RDWR
sockname: AF_INET 10.152.22.22 port: 18075
peername: AF_INET 169.19.21.63 port: 41792

Then PID 5859 is the process working with the port 18075, however, it only work for process which is viewable according to your permission setting

Another probably easier way, and provide more information, is using
lsof -i :[port]
- http://javarevisited.blogspot.com[..]-unix-netstat-lsof-command-examples.html

If we like to check the which process id using which file, we can use fuser - http://linuxcommand.org/man_pages/fuser1.html

Check host and port that any process accessing using lsof - http://www.geekology.co.za[..]-are-accessing-internet-on-unix-machine/

How do I monitor or view the thread count of a certain process - ps -o pid,comm,user,thcount -p - http://superuser.com[..]thread-count-of-a-certain-process-on-aix

Examples of using strace, use -e to trace function call is useful - http://www.thegeekstuff.com/2011/11/strace-examples

The nm commands provides information on the symbols being used in an object file or executable file. - http://www.thegeekstuff.com/2012/03/linux-nm-command/

Use pmap -s -x to look at what's in the virtual address space of yr process and what portion thereof is resident in physical memory.


(google search) (amazon search)
second
download zip of files only