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: documentation for user-space usage?


Hi, Grant -


grant.b.edwards wrote:

> I've figured out how to do kernel-tracing on an embedded system by
> cross-compiling .stp files and then running them on a target that has
> only staprun installed.

Great.  (Were you doing this by manual copying, or via the stap-server
code?)

> [...]
> I want to put logging statements in user application source code that
> log various events along with maybe one or two parameter values along
> with an event.  I need to log up to a few thousand events/second for
> short periods of time into a circular buffer and then transfer the raw
> log data to a different machine for display/analysis.  I need to start
> stop tracing and enable/disable various subsets of those trace points
> at runtime (hopefully without having to restart the processes doing
> the logging).

All those look within the realm of systemtap (and probably some other
tools).

> About the only documentation I can find on systemtap user-space stuff
> is http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps,

The beginner's guide is going to get more content about this soon.
In the mean time, stapprobes(3stap) includes documentation.  See
the
     process("/path/to/binary").{statement,function,mark}(...)
probes.

> I was under the impression that uprobes support was required, but
> that page says only mentions utrace as a requirement.

uprobes (for several platforms) is currently provided as a part of the
systemtap distribution.  It prereqs utrace in the kernel.  Depending
on your architecture and kernel distribution of interest, this could
be all done, or else a moderate amount of porting work.

> All the examples I can find of user-space probes seem to require that
> stap be installed on the machine where the probed user-processes are
> being run.  [...]

User-space probing and kernel-space probing are basically identical
from the point of view of the stap user.  You can cross-compile probes
the same way.

> Am I on the right track looking at systemtap for user application
> event logging, or not?

The theoretical fit is pretty good.  If in practice you are blocked by
some missing unported layer, you could decide between helping port,
prototyping on x86 while someone else ports, and/or investigating
other logging-related tools/libraries.

- FChE


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