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: Logging information through printk


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

> I want to get the output into the system log, and it seemed like the
> best way. Now I'm experimenting with printf, staprun -o and staprun >>
> /var/bla, but I'm not totally pleased with it. 

Appending to a file also written to by syslogd is a bit ugly.  You can
just pipe to logger(1) for relaying to your local syslogd:

stap netlog.stp | logger

> For one, I loose the nice looking timestamps. :(

# stap -e 'probe begin { log (ctime(gettimeofday_s())) exit() }'
Mon Jun  4 17:34:04 2007

- FChE


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