Workload and Resource Management
Showing results for 
Search instead for 
Do you mean 

Identify a process

SOLVED
Go to Solution
Regular Advisor

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!
12 REPLIES
Trusted Contributor Trusted Contributor

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...
Honored Contributor Honored Contributor

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!
Honored Contributor Honored Contributor

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.
Regular Advisor

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.
Trusted Contributor Trusted Contributor

Re: Identify a process

Don't these perl modules have any tracing/logging switches you could activate?
If not, maybe consider adding some?
Honored Contributor Honored Contributor

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!
Honored Contributor Honored Contributor

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!
Honored Contributor Honored Contributor

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"
Honored Contributor Honored Contributor

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"
Highlighted
Honored Contributor Honored Contributor

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!
Honored Contributor Honored Contributor

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"
Regular Advisor

Re: Identify a process

I just installed the newest Webmin V. 1.270
Will watch what happens.