Re: most efficient method to determine "used cpu time" within a particular subtask

2011-07-13 Thread Charles Mills
Frankly, one could always make an argument for using a supported API in all
but the most extreme of situations.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf
Of Walt Farrell
Sent: Wednesday, July 13, 2011 10:26 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: most efficient method to determine "used cpu time" within a
particular subtask

>OTOH if you have a more normal sort of some IO/some computing/some 
>system services type of program and would just like to know roughly how 
>much CPU time you have consumed up to this point, then TCBTIME should 
>be totally satisfactory.

But if you have that kind of program, and a rough answer would suffice, do
you really need to figure out the most efficient way of getting it?
(Conversely, if you do want the most efficient way, doesn't that (perhaps)
imply that you don't have that kind of program?)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: most efficient method to determine "used cpu time" within a particular subtask

2011-07-13 Thread Shane
On Wed, 13 Jul 2011 09:26:27 -0500 Walt Farrell wrote:

> But if you have that kind of program, and a rough answer would
> suffice, do you really need to figure out the most efficient way of
> getting it? (Conversely, if you do want the most efficient way,
> doesn't that (perhaps) imply that you don't have that kind of
> program?)

Personally, I would consider the pursuit of "most efficient" a most
worthy aim - always.
Mindlessly chasing "exact" might be another matter.

Shane ...

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: most efficient method to determine "used cpu time" within a particular subtask

2011-07-13 Thread Walt Farrell
On Wed, 13 Jul 2011 09:29:51 -0400, Charles Mills  wrote:

>> if you look at system control blocks (such as TCBTTIME) you will not pick
>up the time since the last dispatch.
>
>Which may or may not be satisfactory.
>
>If you are computing pi to a million digits on an otherwise idle machine and
>would like to know how much CPU time each pass through the main loop
>consumes, then TCBTIME is totally unsatisfactory.
>
>OTOH if you have a more normal sort of some IO/some computing/some system
>services type of program and would just like to know roughly how much CPU
>time you have consumed up to this point, then TCBTIME should be totally
>satisfactory.

But if you have that kind of program, and a rough answer would suffice, do you 
really need to figure out the most efficient way of getting it? (Conversely, if 
you do want the most efficient way, doesn't that (perhaps) imply that you don't 
have that kind of program?)

-- 
Walt

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: most efficient method to determine "used cpu time" within a particular subtask

2011-07-13 Thread Charles Mills
> if you look at system control blocks (such as TCBTTIME) you will not pick
up the time since the last dispatch.

Which may or may not be satisfactory.

If you are computing pi to a million digits on an otherwise idle machine and
would like to know how much CPU time each pass through the main loop
consumes, then TCBTIME is totally unsatisfactory.

OTOH if you have a more normal sort of some IO/some computing/some system
services type of program and would just like to know roughly how much CPU
time you have consumed up to this point, then TCBTIME should be totally
satisfactory.

IMHO

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf
Of Peter Relson
Sent: Wednesday, July 13, 2011 8:56 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: most efficient method to determine "used cpu time" within a
particular subtask

If by "within a particular subtask" you mean "not my task, but a subtask of
it", then you're mostly on your own.  There are no programming interfaces
provided to accomplish that. And no control block fields that contain time
for a task are programming interfaces.

If you're interested in time for "my task", and if you happen to be running
on a machine with the ECTG instruction available, then TIMEUSED
ECTG=YES,STORADR=x is far and away the best. The output is not in "MIC", it
will be in TOD clock units.
Alternately, TIMEUSED ECTG=COND,STORADR=x,LINKAGE=SYSTEM can be used. It
will get the fast path if ECTG is available, and a slower PC-entered path if
ECTG is not available.

As Binyamin correctly pointed out, if you look at system control blocks
(such as TCBTTIME) you will not pick up the time since the last dispatch.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: most efficient method to determine "used cpu time" within a particular subtask

2011-07-13 Thread Peter Relson
If by "within a particular subtask" you mean "not my task, but a subtask 
of it", then you're mostly on your own.  There are no programming 
interfaces provided to accomplish that. And no control block fields that 
contain time for a task are programming interfaces.

If you're interested in time for "my task", and if you happen to be 
running on a machine with the ECTG instruction available, then
TIMEUSED ECTG=YES,STORADR=x is far and away the best. The output is not in 
"MIC", it will be in TOD clock units.
Alternately, TIMEUSED ECTG=COND,STORADR=x,LINKAGE=SYSTEM can be used. It 
will get the fast path if ECTG is available, and a slower PC-entered path 
if ECTG is not available.

As Binyamin correctly pointed out, if you look at system control blocks 
(such as TCBTTIME) you will not pick up the time since the last dispatch.

Peter Relson
z/OS Core Technology Design

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: most efficient method to determine "used cpu time" within a particular subtask

2011-07-12 Thread Binyamin Dissen
On Tue, 12 Jul 2011 07:48:39 +0200 "Dr. Stephen Fedtke"
 wrote:

:>several sources provide "used cpu time". calculating the difference between
:>two points of time allows to calculate the required cpu time for particular
:>parts of the processing.

:>question: which is the most efficient and reliable method to determine the
:>"cpu time used" in order to apply the above given delta calculation? is
:>there anything more efficient than call a service, such as

:>TIMEUSED CPU=MIC,STORADR=WORK_UCPU,   *
:>  LINKAGE=SYSTEM   

:>for example, reading out any control block fields.

The problem with control block fields is that they are only updated when a
decision is made to dispatch a different unit of work. Thus they will only
show figures valid up to the last dispatch.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


most efficient method to determine "used cpu time" within a particular subtask

2011-07-11 Thread Dr. Stephen Fedtke
hi all,

several sources provide "used cpu time". calculating the difference between
two points of time allows to calculate the required cpu time for particular
parts of the processing.

question: which is the most efficient and reliable method to determine the
"cpu time used" in order to apply the above given delta calculation? is
there anything more efficient than call a service, such as

TIMEUSED CPU=MIC,STORADR=WORK_UCPU,   *
  LINKAGE=SYSTEM   

for example, reading out any control block fields.

best
stephen


---
Dr. Stephen Fedtke
Enterprise-IT-Security.com

Seestrasse 3a
CH-6300  Zug
Switzerland
Tel. ++41-(0)41-710-4005
www.enterprise-it-security.com


++NEWS++ SF-NoEvasion lets you avoid all 10 pitfalls when connecting z/OS to
your SIEM ++NEWS++

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html