Operating System - OpenVMS
1752810 Members
5883 Online
108789 Solutions
New Discussion юеВ

Re: Queue script CPU monitoring

 
SOLVED
Go to solution
smsc_1
Regular Advisor

Queue script CPU monitoring


Hello all,
I already know the following command:
MON PROC /TOPCPU
to monitoring the TOP processes.

Is there a way to monitoring a specific script in the queue?
My goal is to know how many CPU resources get a specific "homemade" script during its execution (every "x" minutes)

Thanks!
./ Lucas
9 REPLIES 9
abrsvc
Respected Contributor

Re: Queue script CPU monitoring

You can do this using home grown tools, but I'm not sure what the value would be. Generally, VMS does pre-emptive scheduling which means that a process will use up to a quantum of CPU at a time unless another higher prioriry job interrupts it or it does an I/O. Perhaps rather than trying to monitor indicuidual CPU consumption. we should concentrate on understanding the problem you are really trying to solve. CAn you define more clearly what the problem is?

Thanks,
Dan
John Gillings
Honored Contributor

Re: Queue script CPU monitoring

To monitor a process while it's running

$ SHOW PROCESS/ACCOUNTING/ID=pid

gives an instantaneous snapshot of the process. Add /QUOTA for the state of quota consumption.

For the same information automatically updated, like MONITOR:

$ SHOW PROCESS/CONTINUOUS/ID=pid

Hit "Q" to see quota usage or "V" to see a virtual memory map (restructed to very low P0 space, expand your terminal rows and columns to maximise). Space bar returns you to the main screen. ^Z to exit.

If by "specific script in the queue" you mean "Batch Job" then at the end of the log file you'll see accounting information for the job, but, of course, only after the job completes.

"during its execution (every "x" minutes)"

If you want to run a procedure to collect data about the execution of a process over time, see the lexical function F$GETJPI. It returns information about the process, given a PID. For example:

$ cpu=F$GETJPI(pid,"CPUTIM")

returns the elapsed CPU time in hundredths of a second. The lexical function can only return a single datum at a time. To gather more information, write a program and use the corresponding system service SYS$GETJPI, which can return a block of data items.
A crucible of informative mistakes
smsc_1
Regular Advisor

Re: Queue script CPU monitoring


Thanks to reply, both.
As already said, I have no problem on the system, just I need to know if the script I made got a huge resource during its execution (every 5 minutes) causing problem to the other applications running on the system.

So, to be sure I'm asking if there's a way to monitoring the script behavior!

Btw, I think the commands procided by John Gillings is enough to do that.

Rgds
Lucas
./ Lucas
labadie_1
Honored Contributor

Re: Queue script CPU monitoring

You can go a little further and sort all the processes who uses CPU, by Kernel ticks, Exec ticks, Supervisor ticks, User ticks, User ticks, percentage of a category...

See this Python script
http://www.vmspython.org/CPUModesExample

To use it, install Python just for your process (or for everybody)

http://pi-net.dyndns.org/DownloadAndInstallationPython
Robert Atkinson
Respected Contributor

Re: Queue script CPU monitoring

Lucas, perhaps LOGOUT/FULL added to the end of the script is what you need :-

LOGOUT

/FULL

Requests the long form of the logout message. When you specify
the /FULL qualifier, the command interpreter displays a summary
of accounting information for the terminal session. The default
qualifier for a batch job is /FULL.


This should display something like :-

├в ├в Accounting information:
Buffered I/O count: 831 Peak working set size: 17648
Direct I/O count: 985 Peak virtual size: 188576
Page faults: 1778 Mounted volumes: 0
Charged CPU time: 0 00:00:00.45 Elapsed time: 0 00:00:01.39
Jan van den Ende
Honored Contributor
Solution

Re: Queue script CPU monitoring

Lucas,

>>>
just I need to know if the script I made got a huge resource during its execution (every 5 minutes) causing problem to the other applications running on the system.
<<<

VMS has an excellent an simple means to avoid such problems.

As the first statement in your job,

$ SET PROCESS/PRIO=0

From there on, this process _ONLY_ uses system resources if _NO_ other process requires them, and gets shoved aside IMMEDIATELY if ANY other process gets somehow activated (well, strictly speaking, it still competes with any other process also at prio 0, but that should not be any problem neither. Another nuance to resource use: any IO started by this process will proceed independant).

Effectively, you will have created something to do for the NULL process.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Jan van den Ende
Honored Contributor

Re: Queue script CPU monitoring

Lucas,

from your Forum Profile:


I have assigned points to 30 of 81 responses to my questions.


Maybe you can find some time to do some assigning?

http://forums1.itrc.hp.com/service/forums/helptips.do?#33

Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.
Consider, that every poster took at least the trouble of posting for you!

To easily find your streams with unassigned points, click your own name somewhere.
This will bring up your profile.
Near the bottom of that page, under the caption "My Question(s)" you will find "questions or topics with unassigned points " Clicking that will give all, and only, your questions that still have unassigned postings.
If you have closed some of those streams, you must "Reopen" them to "Submit points". (After which you can "Close" again)

Do not forget to explicitly activate "Submit points", or your effort gets lost again!!

Thanks on behalf of your Forum colleagues.

PS. - nothing personal in this. I try to post it to everyone with this kind of assignment ratio in this forum. If you have received a posting like this before - please do not take offence - none is intended!

PPS. - Zero points for this.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
smsc_1
Regular Advisor

Re: Queue script CPU monitoring


Thanks all for responses,
and Jan, I always leave points, but I think the goal is leave point only on usefull post. Normally I omit post with comments (btw, are always welcome!) ;-)

Points left, thread closed! ;)
./ Lucas
smsc_1
Regular Advisor

Re: Queue script CPU monitoring

Closed!
./ Lucas