Controlling a systemtap script from userspace

Frank Ch. Eigler fche@redhat.com
Wed Jan 10 21:42:00 GMT 2007


> [...] the question is how to get that user space C++ program to set
> a global in a systemTap script?  [...]

Other than hunt's solution, someone will eventually implement
our old bug #1154, which would allow direct expression thusly:

> # turn on logging
> probe ### something from user space ### {isLogging = 1}
> # turn off logging
> probe ### something else from user space #### {isLogging = 0}

global logging
probe procfs("stap/myscript/logging").write {
  logging = ($value == "1")
}
...


# echo 1 > /proc/stap/myscript/logging


- FChE



More information about the Systemtap mailing list