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: Controlling a systemtap script from userspace


> [...] 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


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