Operating System - Tru64 Unix
1833313 Members
2791 Online
110051 Solutions
New Discussion

Collect 'usrtim' and 'systim' data

 
SOLVED
Go to solution
Mark Poeschl_2
Honored Contributor

Collect 'usrtim' and 'systim' data

I've got a 4 processor ES45 running 5.1B / PK4.

We are preparing to make some major application changes and are trying to gauge what the impact will be on our load. I'm using the per-process statistics from the collect utility to look at 'before' and 'after' application sessions' usage of system resources. I need to be sure I'm interpreting the CPU utilization statistics usrtim and systim correctly. I am running collect with a 120s process data collection interval and without the '-ot' flag. Here is an excerpt from the 'man collect' page describing the 'usrtim' field:

The user-mode CPU time being consumed by the process. It has two modes, depending on whether the -ot option was specified. In the default mode, the value is a normalized delta, that is, how much user time has been consumed since the last sample, normalized over 1 second. (Excerpt ends)

- Given my H/W config and the 120s interval does this mean that a single usrtim entry represents 1/120th of the absolute amount of CPU time consumed during this interval? If I multiply 'usrtim' and 'systim' by 120 will I get an idea of the total number of CPU-seconds consumed by the process over the entire interval?

- Are these single-CPU numbers - i.e. one-fourth the capacity of my whole machine?

As always, TIA!
4 REPLIES 4
Venkatesh BL
Honored Contributor

Re: Collect 'usrtim' and 'systim' data

>> Given my H/W config and the 120s interval does this mean that a single usrtim entry represents 1/120th of the absolute >> amount of CPU time consumed during this interval?

No. it represents the delta from the previous sample normalized to a per-second value.
eg. the formula would be something like this:
(u2 - u1)/dt
where u2 is current sample value (absolute); u1 is previuos sample value (also absolute); and dt is the time elapsed between time at which u2 was taken and time at which u1 was taken.

>> If I multiply 'usrtim' and 'systim' by 120 will I get an idea of the total number of CPU-seconds consumed by the process over the entire interval?

No. See above. To get this kind of figure, you'd have to get the absolute values (with -ot) first and then process the o/p.

>> Are these single-CPU numbers - i.e. one-fourth the capacity of my whole machine?

The usrtim and systim values are per-process values (regardless of the cpu on which they actually ran).
Mark Poeschl_2
Honored Contributor

Re: Collect 'usrtim' and 'systim' data

Now I'm really confused. The formula you gave DOES give me 1/120th of the amount of CPU time consumed by the process during the interval - e.g. let's say u2 = 3s, u1 = 2s, and dt = 120s. The process used 1s of CPU time during the interval and the formula gives 1/120 as its output. What am I missing?
Venkatesh BL
Honored Contributor
Solution

Re: Collect 'usrtim' and 'systim' data

oops....yes, you are right. The answer should have been "YES" instead of "NO". The explanation is correct.
Mark Poeschl_2
Honored Contributor

Re: Collect 'usrtim' and 'systim' data

See BL's revised comment - question answered.