Unix Debugging Cheat Sheet

pmap
To check the memory address mapping of the core dumped process.

e.g.

036AA000 2592k [heap]

So, it means 036AA000 and above is heap address.

FFB3A000 [stack]

And likewise.

Also can be used to check shared memory, shared libraries used and etc.

truss -d -o -p
System API trace.

gcore - o
Force core dump

Use dbx later to investigate the core file.

pstack

call stack.

ps -ef

getting running process PID.

Monitor system log file.
tail -f /var/adm/SYSLOG
tail -f /var/adm/messages
tail -f /var/log/syslog


ls -l /proc//as
ps -p -o pmem,vsz,osz,rss,pid
To check memory usage.

pldd
check dependencies

pargs
check all arguments passed to process.
Note: arg[0] is always the process execution path like even Win32. Useful also if the ls -l return truncated path.

Comments

Popular posts from this blog

Clearcase check in/uncheck out all the checked out files script

MSSQL GROUP_CONCAT

Duplicating a local copy of project from TFS and making web software client factory to work