SUMMARY: Debugging process in Unix

From: Dirk Moolman <DirkM_at_mxgroup.co.za>
Date: Fri Apr 29 2005 - 08:17:59 EDT
Thanks everyone. Again I had lots of replies, and I will copy the the
most complete answers below:


[Ric Anderson]

There are many
	truss -p pid
shows what system calls a process is making.

	ps -fp pid
shows general status

	pldd pid
shows what dynamic libraries (.so) files a process is using.

In addition, there are a number of tools in /usr/proc/bin
that let you look at the actions of a process.

If you have lsof installed, then
	lsof -p pid
will show open files for a process.

Some debuggers (e.g., gdb) can also be used with a pid
to interactively debug a running process.



[Jonathan Birchall]

It all depends on how deep you wish to go and what version of Solaris
you are using.

Truss -wall -vall -fall -o<outputfilename> -p <PID> will give you
details of system calls etc. see Man truss

You can also use the p commands see man pfiles , ptree , pmap etc.

In Solaris 10 you can also now use dtrace for a detailed view of what
the process is doing.

Using a mixture of the about should give you a fairly detailed view of
what is happening.

You can also use adb (debugger).... which also pointed me to mdb
(solaris 9)





With Ric's help, using lsof, we managed to track down the problem.


[ORIGINAL POST]

> -----Original Message-----
> From: sunmanagers-bounces@sunmanagers.org
> [mailto:sunmanagers-bounces@sunmanagers.org] On Behalf Of Dirk Moolman
> Sent: Friday, April 29, 2005 12:27 AM
> To: sunmanagers@sunmanagers.org
> Subject: Debugging process in Unix
>
>
> What is the command to see what a process is doing in Unix ?  I know
> there is a command that you type in with the PID, and it show you
> exactly what that process is doing.
> _______________________________________________
> sunmanagers mailing list
> sunmanagers@sunmanagers.org
> http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Apr 29 08:17:48 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:46 EST