RSS feed [root] /unix /weblog



title search:


Mon Nov 09 15:34:36 HKT 2015


Look like a nice tools provide more information for performance issue -

Check CPU problem with prstat[..]stat-solaris-pinpoint-high-cpu-java.html[..]stat-linux-how-to-pinpoint-high-cpu.html[..]prstat-aix-how-to-pinpoint-high-cpu.html

If we like to trace process detail flow, system call and file opened -

-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

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

Check where is the core dump to -[..]s/browse_thread/thread/9f46dfb277c72cc8#

Use gcore to generate coredump for running process -

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
Current rlimit: 1024 file descriptors
0: S_IFCHR mode:0666 dev:85,0 ino:980953 uid:0 gid:3 rdev:13,2

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

125: S_IFSOCK mode:0666 dev:313,0 ino:40404 uid:0 gid:0 size:0
sockname: AF_INET port: 18075
peername: AF_INET 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]

If we like to check the which process id using which file, we can use fuser -

Check host and port that any process accessing using lsof -[..]-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 -[..]thread-count-of-a-certain-process-on-aix

Examples of using strace, use -e to trace function call is useful -

The nm commands provides information on the symbols being used in an object file or executable file. -

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)
download zip of files only