Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

CPU busy for a detached process

SOLVED
Go to solution
Sk Noorul Hassan
Regular Advisor

CPU busy for a detached process

Hi,
When running a dcl script as detached procees, it is taking almost 90% of CPU time. The script monitors the system error messages continuously and notifies the operator if it receives any potential error string on message. So, is there any idea how to reduce the CPU usage or this script can be submitted in other way which will have less impact on the system. Pls suggest..
10 REPLIES
Bojan Nemec
Honored Contributor
Solution

Re: CPU busy for a detached process

Hassan,

You can put a reasonable wait in the script loop. The other posibility is to reduce the process priority to minimum but in this case the process will also take all the idle CPU time.

Bojan
Ian Miller.
Honored Contributor

Re: CPU busy for a detached process

How does the DCL procedure monitor the system error messages?
____________________
Purely Personal Opinion
Hein van den Heuvel
Honored Contributor

Re: CPU busy for a detached process

May we assume that you tested the script interactively and it presented a reasonable load, but when putting in production, detached, it became unreasonable?

What timeout / poll mechanisme do you use?

Is is something like a basic SLEEP where it either waits on a time to elaps, or for terminal action? Running detached there will be no terminal to wait on, and a timeout based on that could well fail.

Hein.
Antoniov.
Honored Contributor

Re: CPU busy for a detached process

It sounds like detached process run differently from intereactive one.
May be your dcl procedure asks for interactive terminal and when detached goes into error section and loops infinitely.
Have you some log?

Antonio Vigliotti
Antonio Maria Vigliotti
Sk Noorul Hassan
Regular Advisor

Re: CPU busy for a detached process

The DCL script uses the f$search to locate for the latest error which is generated as part of application errors in the system.We keep a log of 500 such errors. So, whenever any new warning message generates, the dcl script takes this to a file and in a perticular line it searches for a string, If it gets that string it will notify otherwise it will again go to loop for searching the latest warning message.when I am giving some time wait, the CPU usage gets reduced to almost negligible. But buffered I/O usage looks 10 to 20 in MON SYSTEM command. So, will it be ok to go ahead with a time wait in the loop, as I do not want to miss the error messages.

I am submitting this DCL script using run loginout.exe/input=dcl script/output=nl:/detached


Antoniov.
Honored Contributor

Re: CPU busy for a detached process

Did you execute that dcl procdure interactively?
Also try adding /prio=1

Antonio Vigliotti
Antonio Maria Vigliotti
Robert_Boyd
Respected Contributor

Re: CPU busy for a detached process

You might try varying the wait time in the loop. The amount of CPU used will depend entirely on how long you make the wait time.

I like to use a symbol to set the wait time as a parameter in the beginning of any DCL script. Then in the wait loop I refer to the symbol:

$ delta_wait = "0:0:10.0"
$ ...

$LOOP:
$ < do some things>
$ wait 'delta_wait'
$ goto LOOP

Have you thought about setting up another mechanism to receive the messages? It would be more efficient if you could read the messages continuously with normall queued IO either from a mailbox or shared read access to the file. Have you considered these and other possibilities?

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Sk Noorul Hassan
Regular Advisor

Re: CPU busy for a detached process

Roberts, Thanks for the suggestions. Can you please guide me for the queued IO read mechanism ?
Thomas Ritter
Respected Contributor

Re: CPU busy for a detached process

May we examine the script for constructive comment ?
Ian Miller.
Honored Contributor

Re: CPU busy for a detached process

The programming concepts manual is always a good place to start when looking for other ways to do something.
http://h71000.www7.hp.com/doc/82FINAL/5841/5841PRO.HTML
____________________
Purely Personal Opinion