Operating System - HP-UX
1832645 Members
3213 Online
110043 Solutions
New Discussion

CPU utilization and performance

 
alok jain
New Member

CPU utilization and performance

I have a process which runs as a server process and whenever there is a request from the client it forks . I want to know what is the total CPU utilization and memory usage by that process and what is the max number of forks i can do on HP 10.2.
Is it possible to monitor all the child process's forked by it and the total USAGE of CPU for that process.
Is there any specific in gpm or glance to do that.
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: CPU utilization and performance

Hi Alok,

You can do it with Measureware. You will need to enable logging of all the processes through measureware to accomplish your task. Look at /var/opt/perf/parm file to see how you can adjust to get the processes to be logged.

Once you start collecting the data, you can extract it later using 'extract' utility. You will need to basically create the template file using the following metrics

FORMAT ASCII
SEPERATOR=" "
DATE
TIME
PROC_PROC_NAME
PROC_PROC_ID
PROC_PARENT_PROC_ID
PROC_CPU_TOTAL_UTIL

Then run 'extract' using the above template file. This will generate an ascii file
for all the processes.

Then you will need to write a small script to grep the information only for the PID of the processes and the processes that had it as PPID.

You can get a lot of other information about this process like Disk, memory utilization etc., Look at /var/opt/perf/reptall file for more info.

-Sri


You may be disappointed if you fail, but you are doomed if you don't try
Christopher McCray_1
Honored Contributor

Re: CPU utilization and performance

Hello,

In gpm, you can select Reports --> Process List. Choose the process you want to look at by double-clicking it and a window full of various information will appear.

You can also use measureware and get a historical report using the PROC_APP_ID, PROC_PROC_NAME, and PROC_CPU_TOTAL_UTIL


Hope this helps

Chris
It wasn't me!!!!
alok jain
New Member

Re: CPU utilization and performance

I tried to get the information by using extract command.It gives me the information about the client process . There is no entry for the server process. I did not mention my client process name anywhere . Where can i mention the Server process name so that i can get the results for that also.
Christopher McCray_1
Honored Contributor

Re: CPU utilization and performance

Hello,

You can define this in the parm file, which is located either in /var/opt/perf or /opt/perf/bin (I don't have a system in front of me).

You can make a class for these procs to separate them.

You must stop and start measureware after making the updates to the parm file.

Hope this helps

Chris
It wasn't me!!!!
Mladen Despic
Honored Contributor

Re: CPU utilization and performance

The problem is that you can't extract what you don't log.
Measureware logs process metrics for "interesting processes" only, during any given interval. A process is "interesting" if it meets the criteria of the threshold statement from your /var/opt/perf/parm.

Instaed, you could try configuring an "application" statement in your parm file.
You define an "application" as a group of processes whose names and/or userids you specify (wild characters can be used - see /opt/perf/examples/mwaconfig/parm_apps for some examples).

Once you modify the parm file, you need to restart scopeux:

mwa restart scope

When extracting applications metrics, you can just edit a copy of the file /var/opt/perf/reptall by uncommenting the relevant metrics under "DATA TYPE APPLICATION" section. If you save this file to, say, /tmp/myrept, then just run:

extract -xp -r /tmp/myrept -a

HTH,

Mladen

Mladen Despic
Honored Contributor

Re: CPU utilization and performance

The max number of forks is controlled by the kernel. Check the values of the kernel parameters maxuprc (a number of concurrent processes that a user can run) and nproc (the total number of concurrent processes) on your system.

If you run Glance, you can get a lot more information at a processes level. You can also log customized output from Glance by using Glance in "adviser only" mode. For more information, see:
/opt/perf/paperdocs/gp/C/adviser.pdf
and
/opt/perf/examples/adviser/*
Mladen Despic
Honored Contributor

Re: CPU utilization and performance

In Glance, you can monitor the metric PROC_FORK. This metrics is not logged by Measureware.

You could also monitor fork and vfork systemcalls at a global level and/or for a particular process.

If you want to get a nice log on this, running Glance in adviser_only mode would probably give you the best results, although it might take some time to create the custom syntax.

HTH,

Mladen