fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
hpt has joined #systemtap
ton31337 has quit [Ping timeout: 260 seconds]
ton31337 has joined #systemtap
orivej has joined #systemtap
orivej has quit [Ping timeout: 248 seconds]
Humble has joined #systemtap
hpt_ has joined #systemtap
sanoj has joined #systemtap
hpt has quit [Ping timeout: 248 seconds]
slowfranklin has joined #systemtap
hpt_ has quit [Ping timeout: 248 seconds]
hpt has joined #systemtap
hpt_ has joined #systemtap
hpt has quit [Ping timeout: 240 seconds]
hpt_ has quit [Ping timeout: 248 seconds]
hpt has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
slowfranklin has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
Humble has quit [Ping timeout: 246 seconds]
nkambo has joined #systemtap
Humble has joined #systemtap
nkambo has quit [Ping timeout: 246 seconds]
nkambo has joined #systemtap
slowfranklin has joined #systemtap
nkambo_ has joined #systemtap
nkambo has quit [Ping timeout: 246 seconds]
sanoj has quit [Ping timeout: 240 seconds]
nkambo__ has joined #systemtap
nkambo_ has quit [Ping timeout: 260 seconds]
nkambo_ has joined #systemtap
nkambo__ has quit [Ping timeout: 252 seconds]
nkambo__ has joined #systemtap
nkambo_ has quit [Ping timeout: 248 seconds]
nkambo__ has quit []
nkambo has joined #systemtap
hpt has quit [Quit: Lost terminal]
sanoj has joined #systemtap
nkambo_ has joined #systemtap
nkambo has quit [Ping timeout: 246 seconds]
scox has quit [Ping timeout: 248 seconds]
nkambo__ has joined #systemtap
nkambo_ has quit [Ping timeout: 252 seconds]
orivej has joined #systemtap
sanoj has quit [Ping timeout: 246 seconds]
v0rt_ has joined #systemtap
<v0rt_> hello
Humble has quit [Ping timeout: 252 seconds]
<v0rt_> is it possible to run a code on event match? for example probe syscall.wait4 { ... } when wait4 is called run an external code (C/python/etc)
sanoj has joined #systemtap
lindi- has quit [Remote host closed the connection]
lindi- has joined #systemtap
lindi- has quit [Changing host]
lindi- has joined #systemtap
Humble has joined #systemtap
mjw has joined #systemtap
sanoj has quit [Ping timeout: 240 seconds]
<fche> v0rt_, certainly, that is the basic model
<v0rt_> how?
<fche> as you say - probe syscall.wait4 { ... } ?
<v0rt_> I mean to execute external code on event match, not stap scripting
<fche> how external do you mean? example?
<v0rt_> I have a C code that receive a file path and do some operation on the file, so if I do probe syscall.exec { run_my_c_code($filepath) }
<fche> hm, probe syscall.* stuff runs in kernel context, so running random c code is not generally okay; userspace c-code not directly possible
<fche> but see probe foo %{ /* embedded-c */ %}
<fche> or probe foo { system("/path/to/my/binary arg1 arg2") }
<v0rt_> so it is possible with system()
<v0rt_> nice, thanks
<v0rt_> second question, is there a way to block the process that matched the probe and wait for the system() finishes?
<fche> it's quite abnormal for a stap probe to try to do this - it normally tries to be atomic, instant, that sort of thing
<v0rt_> yes..
<fche> you may be able to send a SIGSTOP to the target process
<fche> and then have your system()-run job do a SIGCONT
<fche> (you'd probably have to create the system() parameter with sprintf, as in system(sprintf("/path/to/tool %d", pid()))
<v0rt_> it is tricky but system is very slow
<fche> another option worth considering may be stap --runtime=dyninst if you're specifically targeting one process. that stuff runs purely in userspace, and %{ %} blocks in there can do user-spacey things
<v0rt_> unfortunately I need it on all new processes, not on a given one
<fche> (may be worth the shot anyway)
<fche> but yeah, the most powerful version is the normal --runtime, but it's also the most constrained in other ways
<v0rt_> if I try to port my code in kernel space, can I call it in systemtap context?
<fche> making it safe is your responsibility; but that is what the embedded-c mode is for: an escape hatch from our safety measures, for when you really need it
<v0rt_> the code is too big, porting in kernel is dangerous
<fche> indeed it is
<fche> maybe the SIGSTOP / userspace system()/SIGCONT would work for you then
<v0rt_> huge impact on performance I guess
wcohen has quit [Remote host closed the connection]
<fche> you can filter it based on syscall parameters, process name, etc.
scox has joined #systemtap
drsmith_away is now known as drsmith
wcohen has joined #systemtap
v0rt_ has quit [Quit: Page closed]
nkambo_ has joined #systemtap
nkambo__ has quit [Ping timeout: 248 seconds]
nkambo__ has joined #systemtap
nkambo_ has quit [Ping timeout: 248 seconds]
brolley has joined #systemtap
nkambo__ has quit [Ping timeout: 252 seconds]
nkambo__ has joined #systemtap
nkambo_ has joined #systemtap
nkambo__ has quit [Ping timeout: 248 seconds]
nkambo__ has joined #systemtap
nkambo_ has quit [Ping timeout: 258 seconds]
nkambo_ has joined #systemtap
nkambo__ has quit [Ping timeout: 240 seconds]
nkambo__ has joined #systemtap
nkambo_ has quit [Ping timeout: 248 seconds]
nkambo_ has joined #systemtap
nkambo__ has quit [Ping timeout: 240 seconds]
nkambo__ has joined #systemtap
nkambo_ has quit [Ping timeout: 240 seconds]
nkambo_ has joined #systemtap
nkambo__ has quit [Ping timeout: 248 seconds]
nkambo__ has joined #systemtap
nkambo_ has quit [Ping timeout: 246 seconds]
nkambo_ has joined #systemtap
nkambo__ has quit [Ping timeout: 260 seconds]
nkambo_ has quit [Ping timeout: 255 seconds]
tromey has joined #systemtap
ppetraki has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
mjw has quit [Quit: Leaving]
pwithnall has joined #systemtap
slowfranklin has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
slowfranklin has joined #systemtap
Humble has quit [Ping timeout: 252 seconds]
slowfranklin has quit [Quit: slowfranklin]
tromey has quit [Quit: ERC (IRC client for Emacs 26.0.90)]
orivej has quit [Ping timeout: 248 seconds]
Humble has joined #systemtap
wcohen has quit [Ping timeout: 264 seconds]
brolley has left #systemtap [#systemtap]
scox has quit [Ping timeout: 240 seconds]
drsmith is now known as drsmith_away
scox has joined #systemtap
wcohen has joined #systemtap
pwithnall has quit [Quit: pwithnall]
pwithnall has joined #systemtap
pwithnall has quit [Client Quit]
pwithnall has joined #systemtap