UNSOLVED

DavidHampson-rY

updated

14 years ago

DR

DavidHampson-rY

1 Rookie

•

294 Posts

0

4969

December 18th, 2012 05:00

nsr_render_log fields

Could anyone point me in the direction of a document which explains the nsr_render_log fields and what values are valid and what they mean!

Cheers


David

  • xiazhen

    1 Rookie

    •

    44 Posts

    1922

    0

    Posted December 18th, 2012 18:00

    the command is under install_directory/bin, actualy , it is base type of operation system.

  • DavidHampson-rY

    1 Rookie

    •

    294 Posts

    1922

    0

    Posted December 19th, 2012 08:00

    Since no one seems to know let me document what I have discovered.

    Firstly there is a mistake in the man pages, where it says -g/-G program name replace that with -o/-O program name.  There is another switch, -z/-Z which seems to convert hostnames into an internal name (they come out host#).

    Secondly the format of the data you get out is like this for the default output:

    77561 12/18/2012 06:01:31 PM  2 0 0 4146657120 25773 0 hostname savegrp command 'savefs command'' for client xxxyyy exited with return code 1

    Fields in the above are:

    message ID, timestamp, severity, category, error no, thread id, process id, activity id, hostname, program name, message

    The basic functionality of the switches is that each field is represented by a letter and:

    -(lower case letter) = exclude field in output

    -(upper case letter) value = include lines where the specified field matches the specified value

    The fields mean the following:

    m message ID = code mapping to the logged message (the last field), things like waiting for job to complete etc

         timestamp = time error logged

    s   severity = this returns fields EQUAL OR MORE to the specified value, the higher the level the more severe the problems returned (and less info returned)(0-5 for notification, information, alert, warning, critical, emergency)

    c    category = there appears to be two valid values, 0 is regular server logging, 3 is alerts relating to permissions

    e    error = note here the -e switch excludes the error code, but the -E switch specifies the end time; it appears you cannot specify an error code in query

    t      thread ID = specific thread ID

    process ID = process ID

    a    activity ID = seems to always be 0

    h    hostname = this seems to always be the hostname the log file is on

    p    program name = savegrp, nsrmmdbd, nsrjobsd etc

           message = the message corresponding to the message ID which may have specific things relating the message such as client name, saveset name and so on.

  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    1922

    0

    Posted December 19th, 2012 08:00

    man nsr_render_log will give you enought... as to what is the meaning of what you get, it will take some digging, but some are message ids related to which daemon is generating them and rest is pretty much easy to figure out.  One of the most disturbing things I find about nsr_render_log is fact that if I use -G it does not capture completion as that is given by another owner which is not covered by -G grep. 

  • DavidHampson-rY

    1 Rookie

    •

    294 Posts

    1922

    0

    Posted December 19th, 2012 09:00

    Other useful things to know:

    You can query on a particular client with -J

    You can query specific dates using nsr_get_date format, one useful way of doing this is:

    nsr_render_log -S "yesterday 09:00:00" -E "today 09:00:00" /nsr/logs/daemon.raw

    - will return all backups from 9AM yesterday morning to 9AM this morning.

    You can set a character to use as a separator:

    -x 'c \t'    (will tab separate the fields)

    A list of message IDs would be useful if I can find that!

  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    1922

    0

    Posted December 19th, 2012 10:00

    Yes, -S and -E are the only switches I use with nsr_render_log... others I didn't find useful to use and if I need to get rid of them I simply post process it.

  • jkernagh

    35 Posts

    1922

    0

    Posted December 19th, 2012 13:00

    Hello, you may be happy to hear that this is under review at the moment; many of the fields you mentioned are currently not used to any great effect (severity, category, error, activity).

    Also, please note that while the intent as been to ensure a unique message ID for all messages, this is currently not a guarantee either.

    man nsr_render_log, or the Command Reference should provide you all you need to know; meanwhile, we will be working hard to expand upon the potential of the format for better usability.

    HTH, James.

  • jkernagh

    35 Posts

    1922

    0

    Posted December 19th, 2012 13:00