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: SystemTap output to syslog


Alex Iribarren <alex.iribarren.lists@gmail.com> writes:

> What's the best way to get SystemTap scripts to send their output to
> syslog? [...]

It depends.  If you mean, "have a systemtap script call printk", you
would have to write your own embedded-C function to do that, since
printk is not universally safe to call.  If you mean, "just find some
way to print to the user-space syslog", you may be able to use the
"system" tapset function for deferred user-space printing to the logs,
as in:

probe foo {
      system("/usr/bin/logger [OPTIONS] MESSAGE")
}

- FChE


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