This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Storing lists of CPU on/off times


On 01/11/2017 12:24 PM, Paddie O'Brien wrote:
> Hi,
> 
> I want to store a per process list of CPU on/off times. So in probe
> scheduler.cpu_on I had hoped to do something like:
> 
> timestamps[execname()][count] = gettimeofday_us()
> count++
> 
> This above is illegal but illustrates what I'm trying to do. Can it be done?
> 
> Thanks.
> 

Hi,

The cyclethief.stp example does something like that to provide histograms of time a single process is on and off a processor.  (https://sourceware.org/systemtap/examples/process/cycle_thief.txt)

You might take a look at how it is getting that information by looking at the cyclethief.stp script in /usr/share/doc/systemtap*/examples/process/cycle_thief.stp.

-Will


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]