fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
orivej has quit [Ping timeout: 240 seconds]
hpt has joined #systemtap
khaled has quit [Quit: Konversation terminated!]
khaled has joined #systemtap
orivej has joined #systemtap
orivej has quit [Ping timeout: 246 seconds]
hpt has quit [Ping timeout: 268 seconds]
hpt has joined #systemtap
fedeztk has joined #systemtap
orivej has joined #systemtap
mjw has joined #systemtap
hpt has quit [Ping timeout: 240 seconds]
tromey has joined #systemtap
fedeztk has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 246 seconds]
fedeztk has joined #systemtap
amerey has joined #systemtap
fedeztk_ has joined #systemtap
fedeztk has quit [Ping timeout: 265 seconds]
<fedeztk_>
Hi, I'm a new systemtap user. I'm sorry if this is a simple/stupid question, but how should I migrate my systemtap script (and its probes) to a specific CPU? This should happen periodically, so I opted for a timer probe where i called the system function and doing something like that:
<fedeztk_>
system(sprintf("taskset -a --pid --cpu-list %lu %lu >/dev/null", next_cpu, pid()))
<serhei>
Hmm. As I understand it, the systemtap probes run on the same CPU as the events they're probing?
<fedeztk_>
Yes, I'm running a benchmark on cpu X and in my systemtap script I need to be on the same CPU in order to read meaningful data
<serhei>
Hmm. Which types of probes are you using in your script?
<fche>
fedeztk_, note that the taskset command itself will be run some time later, possibly on a separate cpu from that of the probe
<fedeztk_>
serhei, I use 2 timer probes and also the scheduler.ctxswitch
<fche>
fedeztk_, suggest also printing out the command or the next_cpu field to ensure the correct number is being passed
<fedeztk_>
I already checked that and it seems to be correct. As for the latency of the system function I knew that from the language manual, but that shouldn't be a problem since when I record data I check the cpu again
<serhei>
hmm. If the probes aren't specific to the program, you could check cpu() inside the probe and only record data if it matches the CPU where the benchmark is running?
<serhei>
assuming I understand your question correctly
<serhei>
if the benchmark migrates from CPU to CPU you'd have to adjust the value you're checking cpu() against
<fedeztk_>
yes, that's an option too but I was looking for a way to migrate from one cpu to another. It works when I start the script because I managed to get both my benchmark process and my systemtap script to start on the same cpu, but when I need to switch to the next cpu -for both the benchmark and the script- I'm 'lost". Hope it is more clear now
<fedeztk_>
The benchmark doesn't migrate on itself between CPUs, my goal is to force it to migrate together with my systemtap script
<fche>
fedeztk_, what you have there looks like it should work, if the rate of taskset changes is small
<fedeztk_>
Ok, thank you. I'll investigate on that again. So just as a confirm, systemtap doesn't provide any built-in function to migrate the current script and in general a particular process from one CPU to another?
<fche>
there is no such thing as migrating a stap script
<fche>
it runs systemwide all the time as/where the events occur
<fche>
timers e.g. might fire on whatever cpu the kernel sees fit
<fche>
re. migrating a task from cpu to cpu --- no there's no tapset function for that I'm aware of, so system(taskset ...) seems right
<fche>
just racy, in case you want to frequently change it
<fedeztk_>
Ok, so I'm in the right direction
<fche>
I think so!
khaled has quit [Quit: Konversation terminated!]
khaled has joined #systemtap
fedeztk has joined #systemtap
fedeztk_ has quit [Read error: Connection reset by peer]
fedeztk_ has joined #systemtap
fedeztk has quit [Ping timeout: 252 seconds]
fedeztk_ has quit [Ping timeout: 240 seconds]
orivej has joined #systemtap
tux3_ is now known as tux3
tromey has quit [Quit: ERC (IRC client for Emacs 27.1)]
fedeztk has joined #systemtap
fedeztk has quit [Client Quit]
fedeztk has joined #systemtap
fedeztk has quit [Client Quit]
fedeztk has joined #systemtap
fedeztk has quit [Client Quit]
LeoB has joined #systemtap
<LeoB>
After I build systemtap from git, install it an try to run a simple stp, step 5 staprun returns: NONE/libexec/systemtap/stapio: No such file or directory
<LeoB>
is that a known issue?
<LeoB>
Pass 5: starting run. \n NONE/libexec/systemtap/stapio: No such file or directory \n WARNING: /usr/local/bin/staprun exited with status: 1
<LeoB>
I thought it was some issue on generating the correct path, but then I ran `sed -i 's/NONE/\/usr/' /usr/local/bin/staprun`, but there was another error:
<LeoB>
stapio:init_relayfs:353: ERROR: ncpus=40, bulkmode = 0 \n stapio:init_relayfs:354: ERROR: This is inconsistent! Please file a bug report. Exiting now.\n ERROR: Cannot attach to module stap_a9384f4d225052a3dc78252f754d04_186126 control channel; not running? \n ERROR: 'stap_a9384f4d225052a3dc78252f754d04_186126' is not a zombie systemtap module.
LeoB has quit [Ping timeout: 265 seconds]
<fche>
LeoB, that NONE tells me something was weird about hwo it was configured
<fche>
try configure --prefix=$INSTALLATION_DIRECTORY ; make all install
<fche>
you don't want to edit binaries with sed, that way lies madness :)