Search code examples
linuxdebuggingtracesysloguserspace

How to create high frequency logging (tracing) in Linux userspace?


I am starting a new user-space application and i want to create some common utilities for logging and tracing

i distinguish between the 2 utilities. in my prespective logging should be something that is always on and used for high level information and debug. Where as tracing is much more detailed and more frequent.

i think syslog is a good candidate for the logging facility but i have no idea about tracing. i think using syslog for tracing is not a good option

i assume there should be some mechanisms for tracing in linux user-space. i mean some facility that allows me to create a trace like this: ", , , dispatched 1200 packets to processing"

i am considering using uprobes but i don't know if it allowes me to add my own custom trace messages or it just tells me which functions where called when


Solution

  • After some more googling i found LTTNG. Linux Tracing Tool Next Generation http://lttng.org/

    it seems to support everything i need and more