1819870 Members
2645 Online
109607 Solutions
New Discussion юеВ

process trace

 
SOLVED
Go to solution
Fabrizio_6
New Member

process trace

I have to trace a process and I would like to know the entire starting command line (ps command shows only a part of) and the files opened by an executable for read/write.

Tanks
FabrizioF
4 REPLIES 4
Uday_S_Ankolekar
Honored Contributor

Re: process trace


Hi,

try downloading lsof utility from hp's porting centre.

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/

This is a good tool to have for the sysadmins.

-USA..
Good Luck..
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: process trace

What you see of the command-line in ps -f is all you are going to see with any other tool. That is as much as the kernel knows. To see the open file, the best tool to use is lsof which can be downloaded from any of the HP-UX Porting Centre's. It's one of those tools that should be on every system. Fuser can also be used but lsof is much more convenient and powerful.
If it ain't broke, I can fix that.
Carlos Fernandez Riera
Honored Contributor

Re: process trace

You need 'tusc'.
unsupported
H.Merijn Brand (procura
Honored Contributor

Re: process trace

Tracing in what sense? If you want to do a lot of ps calls to see if a precess grows, or to trace which process user the most memory/cpu/..., top might be something to look at. lsof is good as the others noticed, but you can also use perl with Proc::ProcessTable giving you all the options of ps at your perl fingertips.

Attached is a script that uses this module. Example outpout of the script at the end of the script
Enjoy, Have FUN! H.Merijn