1825795 Members
2916 Online
109687 Solutions
New Discussion

Re: Process behaviour

 
Robert_73
Occasional Advisor

Process behaviour

Hi List,
Is there any other commands available on UNIX other than TRUSS to find out the problem with a particular process or command?.
Thnaks in advance
UNIXDUDE
8 REPLIES 8
Robert True
Frequent Advisor

Re: Process behaviour

Shell scripts, of course, can have the 'set -x' placed in them.
RAC_1
Honored Contributor

Re: Process behaviour

you can several freely available utilities in this regard. Also you can q4 to trace the process in the kernel.

If required I can post the detailed procedure for this.-q4

Regards,
There is no substitute to HARDWORK
Robert_73
Occasional Advisor

Re: Process behaviour

Anil,
I have no clue about the q4, could you please post the procedure? any utilities?.
Thanks
UNIXDUDE
harry d brown jr
Honored Contributor

Re: Process behaviour

See this thread for info on q4:

http://forums.itrc.hp.com/cm/QuestionAnswer/0,,0xc6abd5fab40ed6118ff40090279cd0f9,00.html


live free or die
harry
Live Free or Die
RAC_1
Honored Contributor

Re: Process behaviour

Check the thread.
Check the following.

Regards,

Use q4 to get a stack trace using the process ID number.

Note: q4 is available at HP-UX Version 10.10 and above. An example (using process id 21699):

# q4 /dev/mem /stand/vmunix

q4> load struct proc from proc max nproc; keep p_stat

loaded 1284 struct proc's as an array (stopped by max count)

kept 571 of 1284 struct proc's, discarded 713

q4> keep p_pid == 21699;trace pile

kept 1 of 571 struct proc's, discarded 570

stack trace for process at 0x843edc0 (pid 21699), thread at

0x8500300 (tid 28011)

process was not running on any processor

save+0x0

_swtch+0x138

real_sleep+0x330

_sleep_one+0x14

semop+0x71c

syscall+0x1a4

q4> quit
The above indicates that the process is sleeping after doing a semop call. The next step might be to see how this process is using semaphores or, if this is a system process, whether there are any known issues with this process sleeping on semop.

Steps to set up q4 on your system are as follows:

cd /usr/contrib/lib

uncompress Q4Lib.tar.Z:

tar -xvf Q4Lib.tar

cp /usr/contrib/lib/q4lib/sample.q4rc.pl ~/q4rc.pl
Change the following line in ~/q4rc.pl:


# push (INC, "/usr/local/lib/q4lib");
to

push (INC, "/usr/local/lib/q4lib");
Set up your PATH:

export PATH=$PATH:/usr/contrib/bin
Prep your kernel:

q4pxdb /stand/vmunix
Note: dde (requires DCE product) and analyze (10.01 and below) can also be used to look at a process's stack trace.

8. Public domain software such as trace can be used to trace a process's system calls. trace is available for download from the public domain software page located off of the www.software.hp.com Web site.

This software is particularly useful because it enables you to see what calls a process is making, if any, and whether the process is looping.
There is no substitute to HARDWORK
Steven Mertens
Trusted Contributor

Re: Process behaviour

hi Robert,

You can also try tusc. You can find
it here :

http://hpux.cict.fr/hppd/hpux/Sysadmin/tusc-7.0/


Regards,

Steven
Steven Mertens
Trusted Contributor

Re: Process behaviour


... or there's also the trace command :
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/trace-1.6/

Steven
Mark Greene_1
Honored Contributor

Re: Process behaviour

For commands, the first thing you want to do is capture the error code returned in $? and then check the man page for that command to interpret the code.

For binaries you can try trace or adb, the absolute debugger.

HTH
mark
the future will be a lot like now, only later