Operating System - OpenVMS
1748154 Members
3585 Online
108758 Solutions
New Discussion юеВ

Re: Resource usage by drivers

 
Wim Van den Wyngaert
Honored Contributor

Resource usage by drivers

I would like to see what driver is eating how much of the cpu and is doing how much IO. E.g. the amds driver and the mscp driver.

How/where can I find that info ? SDA ?

Have one (Duvel) on me

Wim
Wim
8 REPLIES 8
labadie_1
Honored Contributor

Re: Resource usage by drivers

While this does not answer exactly your question, you have a python program that does cpu stats for all processes at

http://vmspython.dyndns.org/cgiplus-bin/pythoncolor?script=/demosrc/modes.py

sample output
http://vmspython.dyndns.org/demosrc/modes_result.txt

In fact, it plays with the number of Cpu ticks for a process (in the pcb)

pcb$l_kernel_counter
pcb$l_exec_counter
pcb$l_super_counter
pcb$l_user_counter


and for the I/O see

http://vmspython.dyndns.org/demosrc/procio_result.txt
and
http://vmspython.dyndns.org/cgiplus-bin/pythoncolor?script=/demosrc/procio.py







Wim Van den Wyngaert
Honored Contributor

Re: Resource usage by drivers

Gerard,

Nice but this is for interrupt stack usage by processes. AMDS and MSCP (and others) don't have a process. How can you find the usage per driver ?

As far as I understand it, it is simply accounted in the interrupt stack without further details. Is it ?

Btw : are drivers without usage by a process such as AMDS also possible on Unix/Windows ?

Wim
Wim
Kris Clippeleyr
Honored Contributor

Re: Resource usage by drivers

Wim,

As you said: "drivers have no processes".
And since on Alpha there isn't an interrupt stack anymore (AFAIK), whenever a driver routine needs to do something, the code is executed on the kernel stack of the process that is CURrent (or in absence thereof, on a "system" kernel stack).
So I don't think you can find out how much of your CPU is eaten by driver routines.
Maybe some of our friends at engineering can shed some light on this.

Greetz,
Kris
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Volker Halle
Honored Contributor

Re: Resource usage by drivers

Wim,

there are no statistics kept inside OpenVMS about 'which driver' consumes how much CPU. CPU statistics are only kept regarding processes and overall CPU modes.

IO statistics are typically kept per device (operations count in UCB) and in some other places (e.g. to be displayed by MONI MSCP).

Some of the performacne data collectors have 'system PC sampling' functionality, which would tell you, where the CPU time will be spent (by execlet/driver and IPL).

More recents versions of OpenVMS (V7.3-2) include (unsupported !) SDA extensions (PCS$SDA = PC sampling and IO$SDA = IO statistics), which may provide some additional data.

So what is the problem ?

Volker.
Wim Van den Wyngaert
Honored Contributor

Re: Resource usage by drivers

Volker,

No problem, just thinking about monitoring the interruptstack.

So, if I understand correctly, some drivers keep counters (like MSCP) that can be monitored by dedicated software (monitor mscp). Other drivers don't keep the counters and so there are no statistics available.

Last hope : any statistics on the non-process interrupt stack as a whole ?

Kris,

What do you mean with "And since on Alpha there isn't an interrupt stack anymore" ?

Wim
Wim
Kris Clippeleyr
Honored Contributor

Re: Resource usage by drivers

Wim,

I quote from an old ref.guide (Alpha AXP Architecture Concepts, EY-K725E-SG.0003, p. 7-3):

"There are four processor stacks in OpenVMS: kernel, executive, supervisor, user
...
There is no separate interrupt stack or system-wide stack as there was in the VAX architecture."

And AFAIK, when interrupts are to be serviced, they are serviced using the kernel stack of the process being CURrent at that moment, but with IPL raised (from memory, from the Internals courses).

Greetz,

Kris
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Volker Halle
Honored Contributor

Re: Resource usage by drivers

Wim,

unlike on VAX, there is no 'interrupt stack' on Alpha. Interrupts are serviced on the kernel stack of the current process.

The INT bit (bit 2 in PS) is set, to indicate that the system is executing in interrupt mode, so that when the timer routine runs, it sees that the code is running in interrupt mode and can increment the appropriate 'mode' counter.

Volker.
Wim Van den Wyngaert
Honored Contributor

Re: Resource usage by drivers

Volker was right. PC sampling gives the result. But only for cpu usage.

But most important : it's in DECps/performace advisor.

adv coll sys /begin=/end=/out=wim1.lis
adv coll rep /out=wim2.lis wim1.lis

You can see which process is doing what but also get an overview of which driver was doing how much.

Wim
Wim