This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: SystemTap output to syslog
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Alex Iribarren <alex dot iribarren dot lists at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: 04 May 2007 10:49:12 -0400
- Subject: Re: SystemTap output to syslog
- References: <463B3DCD.2080407@gmail.com>
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