1833707 Members
2465 Online
110063 Solutions
New Discussion

CPU load generated by lp

 
Claire Daelman
Advisor

CPU load generated by lp

Hello,

I want to know how to obtain the CPU load generated by the printing for an HPUX server 9000 in 11.11. I need this statistics for one day or one week.

Claire
3 REPLIES 3
Paula J Frazer-Campbell
Honored Contributor

Re: CPU load generated by lp

Hi

Load is calculated so :-

The value used by top, xload, and other performance tools is a
one-minute load average. Every five seconds, the kernel walks the proc
table and counts how many runnable and imminently runnable processes
there are at that specific time. The load average is an average of the
last 12 totals.

The actual formula is statistical, so the kernel doesn't have to
remember each of the last 12 values. The formula is:

new average = [previous average * e^(-1/12)]
+ (new value * [1 - e^(-1/12)])


An option is to motitor the cpu time for things like lpshed and note start and end figures.


Paula
If you can spell SysAdmin then you is one - anon
Claire Daelman
Advisor

Re: CPU load generated by lp

Thanks for your an answer but how can I apply it?

Claire
Paula J Frazer-Campbell
Honored Contributor

Re: CPU load generated by lp

Claire

To do this sort of calculation you will have to do several things:-

Collect load figures for the time period:-
uptime | awk '{print $10}' | sed 's/,//'

Will pull out the one min load figue.

At start time ps -ef and add the cpu usage colmumn

At each collection time ps -ef and sum the cpu column then remove the start cpu - this will give cpu usage during collection period.

From the start process list, and all concurrent process list extract the printing related processes and total their cpu usage.


So from this info we have:-

Load
Total cpu usage
Printing Cpu usage

Print Load = print cpu/total cpu * load.


HTH

Paula
If you can spell SysAdmin then you is one - anon