Suleiman:

It's less about the cost of resources than consolidating your automation.
If you can look at the VMUTIL SCHEDULE file - and see all the events you
execute - it's much simpler than keeping track of all the userids you've
created to do various checking/monitoring and adding them to an autolog
list, etc etc.   Consolidate your automation as much as you can (Scott's
credo).

Of course, other functions can be added as you like and as you think of
them.. I'm trying to show how easy that is (which will be more obvious with
some code - i'll come up with a 'finished' version incorporating
suggestions).

Wakeup and sleep both imply 'waiting' -- but Wakeup has the advantage of
honoring a schedule file, reacting to reader files and iucv interrupts,
etc.  You don't have to specify a particular interval and do absolutely
nothing between those intervals - real work can be accomplished while
waiting for your particular event.

And -- here we drift into possible religious wars.  Some find it easier to
see VM userids as 'threads' or 'processes' that can be started up to do
particular tasks and sit there spinning.  My view is that these are valid --
but for extremely quick and simple tasks - you're better off consolidating
these tasks into a single VM userid.  Use separate VM userids for long
running processes - not those that are as trivial as checking/writing values
from CP INDICATE.

Scott

On Tue, Apr 7, 2009 at 4:22 PM, Suleiman Shahin <s_s_sha...@hotmail.com>wrote:

>  Two things come to mind. Maybe three!
>
> 1) "userids" are so inexpensive!  A simple userid with one or two megabytes
> of virtual
>      storage (It aint even real!) and one measly cylinder of a disk. And no
> measurable CPU activity.
>
> 2)  Other functions can be added like whatever you can think of.
> 3)  Wakeup implies someone or something is asleep doing nothing!
>
> Am I wrong?
>
>
> Suleiman Shahin
>
>
>
> ------------------------------
> Date: Tue, 7 Apr 2009 16:04:17 -0600
>
> From: scott.rohl...@gmail.com
> Subject: Re: Creating two logs from an exec
> To: IBMVM@LISTSERV.UARK.EDU
>
> I'll propose another change - but it depends on what type of automation you
> set up.  Rather than dedicating a VM userid to run this CPU monitor -- I
> would probably implement it under an existing userid (like VMUTIL) that is
> already running, waiting to do scheduled events.  (In fact I do have things
> like this already running that do simple checking/alerting via VMUTIL)
>
> In that case - rather than a 'Do Forever' loop -- you would simply execute
> what's contained in that loop once, minus the CP SLEEP, and exit.   You let
> the caller do the waiting (hopefully via WAKEUP rather than SLEEP) and call
> the EXEC at the desired intervals.
>
> So..   let's call this CPULOG  (thanks David Juarez ;-) -- and add an
> option:
>
> CPULOG (ONCE
>
> The option ONCE indicates we don't loop forever and we don't sleep - but we
> do all the other logic and write values to files.
>
> Take this a step further in terms of sending the file.  Rather than
> hardcoding a time check and the recipients of the report:
>
> CPULOG (SEND SULEIMAN ROHLING AT BLDVMB TOM AT KERNVM
>
> The option SEND indicates that today's (or yesterdays??) file(s) be sent
> via SENDFILE to the recipients listed after SEND and we just exit -- forget
> about any of the other logic that checks CPU values.
>
> The objective here is to make it unnecessary to hard code things into the
> EXEC and provide ways (from a scheduler or other userid) to invoke CPULOG,
> rather than dedicating a userid to sit and spin running it forever -
> SLEEPing 99.2% of the time.
>
> I'll code up the above options - but wanted some input first, since we're
> on a roll..
>
> Scott
>
> On Tue, Apr 7, 2009 at 2:34 PM, Suleiman Shahin <s_s_sha...@hotmail.com>wrote:
>
> Kool again!
>
> I will still be listening
>
> Thanks so much!
>
> Suleiman Shahin
>
>
>
> ------------------------------
>
> From: scott.rohl...@gmail.com
> Subject: Re: Creating two logs from an exec
> To: IBMVM@LISTSERV.UARK.EDU
>
> Good point!   So change the 'ERASE' statements to:
>
>
>
>  ------------------------------
> Quick access to your favorite MSN content and Windows Live with Internet
> Explorer 8. Download FREE 
> now!<http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A>
>
>
>
> ------------------------------
> Quick access to your favorite MSN content and Windows Live with Internet
> Explorer 8. Download FREE 
> now!<http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A>
>

Reply via email to