06/03/2008 5:03 PM
Tip #1: Getting logs from MM applications
We'll be posting tips in this forum on a frequent basis to keep discussion going as well provide useful tips to
customers. Feel free to ask any questions in these forums.
Today's tip is how to get logs from MM applications.
MME provides two ways to turn on logs.
The first is to pass '-v' to the mme process when you start it. If you pass one '-v' then the MME is at verbosity level
1. If you three ('-vvv') then it runs at verbosity level 3 and will log more content. Keep in mind the more that you
log the slower the system gets, but the more information you have to work with to debug.
The second way is to tell the MME at runtime what verbosity to run at and you can do this using the command line
application mmecli: "mmecli set_debug 4 0". That would turn on verbosity level 4.
If you want to dump mme logs only from slogger you can do that with sloginfo:
sloginfo -m 27 # dump only major code 27 which is MME.
io-media can be configured to have different debug levels at startup. You can do this similar to how you start the MME
except that you use '-D' instead of '-v'. The more '-D's you use the higher the debug verbosity.
If you want to dump the io-media logs only, you can do it with this command:
sloginfo -m 20 # dump only major code 20 which is io-media
QDB offers a few debug capabilities:
Runtime error reporting: This prints any critical errors while interacting with the system (not queries). This is
enabled by passing in '-v' on the command line. I recommend while debugging your system to run with 6 -v's: "-vvvvvv".
Runtime tracing: If tracing is enabled it will log all SQL queries that are passed into QDB from clients as soon as the
query starts to execute. It will log the SQL query, the client, and the database. You can enable this by using "-o
trace" on the command line.
Runtime profiling: If profiling is enabled it will log all SQL queries that are passed into QDB from clients as soon as
the query completes execution. It will log the client, the database, the query string, and the time it took to
execute (world time, not CPU time). You can enable this by using "-o profile" on the command line to QDB.
Since tracing and profiling run through slogger, you can get timestamps for when exactly the command executed. With
sloginfo usually it will print second accuracy, if you want millisecond accuracy then pass sloginfo the '-t' option.
If you want to dump all slog'd QDB logs (including tracing and profiling) with millisecond accuracy then you can use
sloginfo -t -m 26 # major code for QDB is 26