Sean,
Thanks for the pointer to the RFE.
The RFE they refer to does not feel like it answers the original problem.
The RFE refers to an RFE from 2017 which says it has delivered the function in SMF 123-1 records. Please can someone point me to the page in the documentation where the SMF 123 record has the CPU figures in it, as I cannot find it.
The solution I would have written goes as follows ( I am guess it works in a similar way to MQ support on LIberty/CICS/etc)
There is an HTTP listener- when a request comes in, it is given to a thread in a pool.
This thread gets the 'before' CPU used by the TCB.
The thread does the work
The thread gets the "after CPU used by the TCB, and calculates the difference. Pass this back to the HTTP listener, so it can report the CPU in the SMF record.
The hard part may be getting the CPU on the TCB. SMF120-9 gets this so it is possible.
The authorised macro timeused, with ENCLAVE=SUP gives the 3 times we need - time on CP, time on ZAAP/ZIIP, ZIIP time on CP. I would expect the Angel task could be configured to provide this function - as it would be useful for all liberty users.
The unauthorised timeused give you a CPU figure which would be better than nothing. This should be a small JNI call, so should not be difficult.
I would try to write my own interceptor - but I think this only runs in the http listener - and would not capture the CPU time on the threads in the pool.
regards
Colin
------------------------------
Colin Paice
------------------------------
Original Message:
Sent: Fri September 25, 2020 11:44 AM
From: Sean Frantti
Subject: SMF - can I get the CPU used by a request?
I don't believe you can. We've been trying to figure out a solution as well and currently can only get CPU at the server level. There is a declined RFE for what your asking for here:
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=106156
If you have Omegamon for JVM they are working on a solution here but we aren't able to get this yet:
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=136338
but I'm not sure if this will address both the Service and API or just the API
------------------------------
Sean Frantti
Original Message:
Sent: Thu September 24, 2020 10:28 AM
From: Colin Paice
Subject: SMF - can I get the CPU used by a request?
Is it possible to get the CPU used by a request from the SMF records?
Im looking for the CPU on GP, on ZIIP,and on could_have_run_on_zip.
from the smf 123 records I can see elapsed time. From the smf 120 records I can see CPU time stamps, but cannot see a correlator between 123 and 120 to link them.
With MQJMS there would be a listener thread which takes the request and passes it on to one of a pool of threads to do the work. Im looking for the CPU used on this thread, not on the listener thread(though this would also be interesting for an overall statistics usage)
thank you
Colin