Re: Identify a process (90 Views)
Reply
Regular Advisor
Kalin Evtimov
Posts: 196
Registered: ‎04-10-2005
Message 1 of 13 (90 Views)
Accepted Solution

Identify a process

Hi!
On my machine (Hp-ux 11.23) there is a perl-programm, which sometimes doesn't finish correctly (in my opinion), because it runs constantly with alsmost 100% of CPU-time. I would like to identify which programm starts, but I have no idea how to do this. How can I determine which programm was run by perl. As I am running webmin, I always get

1212:07 /opt/perl_64/bin/perl /usr/local/webmin-1.260/miniserv.pl /etc/

for any perl-programm run by webmin.

Thanks for any ideas!
Please use plain text.
Trusted Contributor
Antonio Cardoso_1
Posts: 244
Registered: ‎10-21-2002
Message 2 of 13 (90 Views)

Re: Identify a process

if you see in top result that the perl programm is using 100% CPU, that means that it is not a process ran by this one, but the perl script itself...
Please use plain text.
Honored Contributor
Muthukumar_5
Posts: 4,030
Registered: ‎06-09-2004
Message 3 of 13 (90 Views)

Re: Identify a process

Get the parent process ID.

# ps -ef | grep webmin

3rd field gives that.

--
Muthu
Easy to suggest when don't know about the problem!
Please use plain text.
Honored Contributor
Peter Godron
Posts: 4,470
Registered: ‎02-13-2002
Message 4 of 13 (90 Views)

Re: Identify a process

Kalin,
what do you mean by "which program starts"?

To find the process taking the CPU: top
which should give you the PID

You can then use: ps -ef | grep PID_value
to get the ParentPID (second column).

Repeating this process will eventually lead you to the process that started all your sub-processes.
Please use plain text.
Regular Advisor
Kalin Evtimov
Posts: 196
Registered: ‎04-10-2005
Message 5 of 13 (90 Views)

Re: Identify a process

Webmin's web server, which is written in perl, starts modules, also written in perl. The web severs' process is always the parent. But it is not the one, causing the problem. One of the procs started by webmin causes a problem, but I cannot identificate it, as they are run over the web server from webmin, which causes that all these perl-processes have the same name.
Please use plain text.
Trusted Contributor
Antonio Cardoso_1
Posts: 244
Registered: ‎10-21-2002
Message 6 of 13 (90 Views)

Re: Identify a process

Don't these perl modules have any tracing/logging switches you could activate?
If not, maybe consider adding some?
Please use plain text.
Honored Contributor
Muthukumar_5
Posts: 4,030
Registered: ‎06-09-2004
Message 7 of 13 (90 Views)

Re: Identify a process

If the process are started by webmin they will be using that as PPID.

# ps -ef | grep

will give all process which are started by it.

--
Muthu
Easy to suggest when don't know about the problem!
Please use plain text.
Honored Contributor
Muthukumar_5
Posts: 4,030
Registered: ‎06-09-2004
Message 8 of 13 (90 Views)

Re: Identify a process

You can find which process is occupying more cpu resource as,

UNIX95=1 ps -ef -o cpu= -o pcpu= -o comm= -o pid | sort -rnk 2

or

top

will give that.

Hope webmin is maintaining a log file. Try to trace it.

--
Muthu
Easy to suggest when don't know about the problem!
Please use plain text.
Honored Contributor
Arunvijai_4
Posts: 4,194
Registered: ‎04-07-2005
Message 9 of 13 (90 Views)

Re: Identify a process

Hello,

You can esily find out by giving,

# ps ef |grep -i perl

Also, You can download and install HP's Webmin which is fully supported on HP-UX/.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Please use plain text.
Honored Contributor
Arunvijai_4
Posts: 4,194
Registered: ‎04-07-2005
Message 10 of 13 (90 Views)

Re: Identify a process

Hi Kalin,

You can download http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXWSARCHIVE

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Please use plain text.
Honored Contributor
Muthukumar_5
Posts: 4,030
Registered: ‎06-09-2004
Message 11 of 13 (90 Views)

Re: Identify a process

perl scripts will use cpu resource more. Check is there any patch available for webmin or install new webmin. Performance issues must be fixed in new releases.

--
Muthu
Easy to suggest when don't know about the problem!
Please use plain text.
Honored Contributor
Arunvijai_4
Posts: 4,194
Registered: ‎04-07-2005
Message 12 of 13 (90 Views)

Re: Identify a process

Hi Kalin,

Latest version of Webmin supported by HP is HP-UX Webmin-based Admin 1.070.07. Not sure it is sync with Opensource webmin and it is a trimmed down version of Opensource webmin.

You will only have two modules, one for Apache and other for Tomcat.

You need to install other modules from web.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Please use plain text.
Regular Advisor
Kalin Evtimov
Posts: 196
Registered: ‎04-10-2005
Message 13 of 13 (90 Views)

Re: Identify a process

I just installed the newest Webmin V. 1.270
Will watch what happens.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation