SystemTap output to syslog

Frank Ch. Eigler fche@redhat.com
Fri May 4 14:49:00 GMT 2007


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



More information about the Systemtap mailing list