Determine CPU time per process

Determine CPU time per process

Post by Erik Hendri » Fri, 21 Mar 2003 03:26:19



Hi,

I'm wondering if there is any method to determine % off user CPU time,
kernel CPU time and IO wait on a per process basis.
I know how to get it for the complete system, but I'm wondering if one can
also get this on a / process?

Thanks

 
 
 

Determine CPU time per process

Post by Darren Dunha » Fri, 21 Mar 2003 04:17:54



> Hi,
> I'm wondering if there is any method to determine % off user CPU time,
> kernel CPU time and IO wait on a per process basis.
> I know how to get it for the complete system, but I'm wondering if one can
> also get this on a / process?

Programmatically, or interactively?  I know 'prstat' can do that if you
just want to see it over a particular interval.

I'm not familiar with how it might be done in a program.

--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

 
 
 

Determine CPU time per process

Post by Erik Hendri » Fri, 21 Mar 2003 06:14:26


Programmatically. I looked at the prstat. I would like to get the actual CPU
time and not the % for the process.
There is a CPU Time column, but I would like to see that time split in:
User, System, Io Wait.



> > Hi,

> > I'm wondering if there is any method to determine % off user CPU time,
> > kernel CPU time and IO wait on a per process basis.
> > I know how to get it for the complete system, but I'm wondering if one
can
> > also get this on a / process?

> Programmatically, or interactively?  I know 'prstat' can do that if you
> just want to see it over a particular interval.

> I'm not familiar with how it might be done in a program.

> --

> Unix System Administrator                    Taos - The SysAdmin Company
> Got some Dr Pepper?                           San Francisco, CA bay area
>          < This line left intentionally blank to confuse you. >

 
 
 

Determine CPU time per process

Post by Rich Tee » Fri, 21 Mar 2003 08:36:37


Please don't top post.

Quote:> Programmatically. I looked at the prstat. I would like to get the actual CPU
> time and not the % for the process.
> There is a CPU Time column, but I would like to see that time split in:
> User, System, Io Wait.

Poking around in /proc/<pid> might help you here.  The proc
man page contains more details.

--
Rich Teer, SCNA

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

Determine CPU time per process

Post by Erik Hendri » Sat, 22 Mar 2003 07:37:54


Hey Rich,

Found out how to get it using the SE toolkit. The /proc indeed does contain
the amount of user and system cpu time.
Too bad the wait time there is a aggregate off a number of things. But at
least I'm getting more information which I need.

Thanks.



> Please don't top post.

> > Programmatically. I looked at the prstat. I would like to get the actual
CPU
> > time and not the % for the process.
> > There is a CPU Time column, but I would like to see that time split in:
> > User, System, Io Wait.

> Poking around in /proc/<pid> might help you here.  The proc
> man page contains more details.

> --
> Rich Teer, SCNA

> President,
> Rite Online Inc.

> Voice: +1 (250) 979-1638
> URL: http://www.rite-online.net

 
 
 

Determine CPU time per process

Post by Solari » Mon, 24 Mar 2003 03:20:37


Use prstat with options. It can resolve all your problems.



Quote:> Hi,

> I'm wondering if there is any method to determine % off user CPU time,
> kernel CPU time and IO wait on a per process basis.
> I know how to get it for the complete system, but I'm wondering if one can
> also get this on a / process?

> Thanks

 
 
 

Determine CPU time per process

Post by Erik Hendri » Wed, 26 Mar 2003 04:03:37


I looked at this. It does nicely give a lot of information, it will not give
me the IO wait time / process.

I would love to find out how long a process has been waiting for disk IO to
complete. Which I believe one can see
on a system ide basis using for example top or so. But I would want to find
out on a / process basis.


> Use prstat with options. It can resolve all your problems.



> > Hi,

> > I'm wondering if there is any method to determine % off user CPU time,
> > kernel CPU time and IO wait on a per process basis.
> > I know how to get it for the complete system, but I'm wondering if one
can
> > also get this on a / process?

> > Thanks