1752798 Members
6019 Online
108789 Solutions
New Discussion юеВ

Process searching

 
SOLVED
Go to solution
Oren_3
Occasional Contributor

Process searching

Hello.
I have a problem identifying processes in a hp-ux 11 system.
I am writting a bash script which should search processes in the system and be sensiteve to different parameters which could be longer than 64 letters. (or full path of the program make it's description exsceed
max. size)
Since niether ps nor pstat() can extract more tahn 64 letters from the kernel, i seek different solutions.
I would really be glad to get some ideas.

Thanks, Oren.
2 REPLIES 2
Armin Feller
Honored Contributor
Solution

Re: Process searching

There is a new pstat(2) function PSTAT_GETCOMMANDLINE used by ps '-x' option which returns a buffer up to 1024 chars for the command.

Regards,
Armin
Armin Feller
Honored Contributor

Re: Process searching

You need PHCO_26274 to get the new "-x" option:

----
pstat(2) is enhanced to give command names upto 1024 bytes, a new option -x
is added to ps(1) to give command names up to 1024 bytes.
----

Regrads,
Armin