= LoggingTools = [[TOC(Projects/LoggingTools, depth=2)]] = Introduction = When creating, testing, and running RTEMS appplications, many developers use the printf family of functions to log information. For large applications, viewing logs is a pain. Logs are often cluttered, making it difficult to find the information that you need. This page suggests some uses for logging information and describes open source tools that can be used to view and manage logs. = Common Uses for Logging = * Debugging embedded applications * Offline tuning of PID (or arbitrary) control loops * Real time monitoring and/or maintenance of embedded systems * Optimizing applications by profiling them, analyzing performance, and identifying possible speed improvements = Open Source Logging Tools = All of these tools work out of the box with generic log files. Please note that many of them cannot run on RTEMS itself. You'll need to connect your RTEMS system to another computer for analysis. = Graphing and Visualizing Time-Series Data = * [http://oss.oetiker.ch/rrdtool/index.en.html RRDTool] - '''RRDTool is the recommended tool for graphing time-series data.''' RRDTool is a library for writing custom monitoring tools. It can easily create custom graphs with your data. If you don't want to write any code, there are a [http://oss.oetiker.ch/rrdtool/rrdworld/index.en.html multitude of RRDTool-based programs which can parse and graph your logs automatically.] * [http://log2timeline.net/ Log2Timeline] - Log2Timeline can be used to create stunning and interactive visualizations of simple logs. Log2Timeline converts log files to "timeline body files," which can be viewed with tools like [http://www.simile-widgets.org/timeline/ Simile Timeline] and [http://www.simile-widgets.org/timeplot/ Simile Timeplot]. = Application Profiling = You can use the following tools to trace and profile your application. * [http://wiki.rtems.org/wiki/index.php/RTEMS_Trace_Tool RTEMS Trace Tool] - RTEMS Trace Tool is a tool to trace your RTEMS applications and visualize an application's run process. * [http://wiki.rtems.org/wiki/index.php/Capture_Engine RTEMS Capture Engine] - RTEMS Capture Engine is a software module for RTEMS that captures context switches. = Statistical Analysis = For complex event analysis, you may want to consider [http://www.wolfram.com/ Mathematica], [http://en.wikipedia.org/wiki/R_(programming_language) R], or [http://www.sagemath.org/ Sage]. = Other Tools = These tools may work with RTEMS, but they require a high-level of customization. * [http://www.8pussy.org/doku.php?id=home Octopussy] - Octopussy is a web-based server for log monitoring. It supports live monitoring, events filtering, and email alerts. Octopussy is usually used to monitor Apache and the like, however [http://www.8pussy.org/doku.php?id=tutorial_new_service it can be customized to analyze any type of log file.] See [http://www.8pussy.org/doku.php?id=config here] for information on setting up Octopussy - you'll have to dump RTEMS logs into /var/lib/octopussy/logs//Incoming/ * [http://www.cs.uoregon.edu/research/tau/home.php Tuning and Analysis Utilities (TAU)] - TAU was formerly included as an application profiling tool. I'm not sure if it's compatible with RTEMS. (It can automatically instrument code and log information to file - I'm not sure how to use TAU to instrument RTEMS applications.) TAU includes tools for viewing application profiles and traces. It may be worth modifying RTEMS' own trace tools so that their traces can be viewed with TAU. = Ideas for Future RTEMS Improvements = * Modify RTEMS Trace Tool and Capture Engine or write a conversion tool so that they use standardized output formats. (Then we'll be able to view traces with the regular trace programs available for Windows and Linux.) * Write a small C logging library. Output should be compatible with RRDTool. (I'm not sure if this is in the scope of the RTEMS project.) = Notes = This page was written as part of the Google Code-In 2010 contest. Please see http://www.google-melange.com/gci/task/show/google/gci2010/rtems/t129018536044 for more information.