A guide to the main Service Desk log file, the stdlog.

Document ID : KB000026081
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

All the errors are recorded in the Stdlog (i,e Standard Log), how to understand / Analyse these log files ?


Background:

There are lot many log files with STD(Standard) get created, how to interpret them.

Instructions:

The main Service Desk log file is the stdlog. It is usually found in the NX_ROOT\log directory, although this location can be changed by modifying the NX_LOG environment in the NX.env file. There are up to 10 stdlog files, stdlog.0 through to stdlog.9. These files are written to in a round-robin method, When stdlog.0 is full, stdlog.1 is written, then stdlog.2 and so on to stdlog.9. When stdlog.9 is full, stdlog.0 is erased and started again. This limits the space taken up by the stdlogs, while maintaining a large amount of historical information.

The layout of the lines in the stdlog are like this:

Date  Time        Node     Process     PID  Level        File       Line Message           
11/14 12:12:47.58 USRD112  web:local   3572 SIGNIFICANT  session.c  5272 Session 018F1288 created; session 
count 2
  • Date and Time are the system date and time from when the line was written to the file.

  • Node is the system name on which the Service Desk system is running. For a single file, the node name is always the same, as the stdlog only contains information from one system. It is possible to merge stdlogs from different systems, so this then becomes crucial.

  • Process is the name of the process that generated the message written to the stdlog. The process name is the name which appears in a UNIX "ps" command output or the task manager processes list (minus the .exe file extension) on Windows.

  • PID is the process ID for the process, either from the Windows Task manager process list, or the Unix "ps" command. This is useful when several processes have the same process name (e.g. the SQL database agent, sql_agent_nxd)

  • Level is the significance of the message which is written. There are several defined levels:

    • FATAL - Always logged. The highest possible message significance level. The process will be terminated. On UNIX, a core file will be generated unless the system is configured to prohibit writing cores. The core files are placed in the NX_ROOT/bin directory if the daemon manager started the process.

    • EXIT - Always logged. The process will exit. No core file written.

    • SIGNIFICANT - Always logged. The most common significance level of entries appearing in the stdlog. A significant message is normal and indicates that a significant event, useful for monitoring the system, has occurred.

    • SEVERE_ERROR - Always logged. This is a condition that will generate a bop-log trace file if pdm_trace is turned on. A SEVERE_ERROR is often recoverable.

    • ERROR - Always logged. An error condition that is judged not significant enough to require a bop-log trace or is from a process that will not generate a bop-log trace.

    • WARNING - A condition that is unexpected but not clearly an error.

    • INFORMATION - Normal. Useful information for troubleshooting. Not written unless logging level is increased for trouble-shooting.

    • MILESTONE - Normal. Milestones generally mark entrance or exit to significant code sections. Not written unless logging level is increased for trouble-shooting.

    • TRACE - Normal. Track processing progress between milestones. Not written unless logging level is increased for trouble-shooting.

    • VERBOSE - Normal. Any information the programmer thought might be useful. Not written unless logging level is increased for trouble-shooting.
      (Levels from WARNING to VERBOSE are not normally logged in the stdlog. Anything above WARNING will always be logged in the stdlog)

  • File is the code source file from which the message was generated.

  • Line is the line in the source code file that generated the log entry.

  • Message is the text of the message written to the stdlog. Often, the message will contain the runtime value of variables in the system

The stdlog files can be controlled in two ways:
pdm_logfile - This command enables you to change the maximum size that each stdlog file can reach before Service Desk starts writing to the next stdlog file.

pdm_logfile -L - This will list the current setting for the file size.
pdm_logfile -b <N> - This will set the file size of the stdlog files to <N> bytes. The default value is 3000000 Bytes. Please check that you have suitable disk space before changing this value.

pdm_logstat - This command enables you to change the runtime logging level of the stdlog files in several different ways.
Increasing the logging level in the stdlog will create an additional overhead on the Service Desk system, as it has more work to do. The size of this overhead will depend on the logging level which is set. You may want to check the impact that increasing the logging level has on your system before setting this for any significant length of time.
If you execute the command "pdm_logstat -h", you will see the options which you can use:

pdm_logstat -F                -- to list open file table
pdm_logstat -L                -- to list level table
pdm_logstat -p pid            -- to remove level by pid
pdm_logstat -n name           -- to remove level by procname
pdm_logstat -f file           -- to remove level by source file
pdm_logstat -p pid level      -- to set level by pid
pdm_logstat -n name level     -- to set level by procname
pdm_logstat -f file level     -- to set level by source file
pdm_logstat -a level          -- to set a default level
pdm_logstat -v                -- to get extra info

(For details of the numeric values you can use, please refer to techdoc TEC418749)

You can control logging using 4 different criteria:

Globally - using the "-a" parameter. This will set the specified logging level for all Service Desk processes.
Process - using the "-p" parameter. This will set the specified logging level for the process with the PID specifies (e.g. pdm_logstat -p 3428 250 increases logging for the process whose PID is 3428.)
File - using the "-f" parameter. This will set the specified logging level for all lines in the stdlog which have this filename in the line.

Name - using the "-n" parameter. This will set the specified logging level for all processes with this process name.

Any combination of these can be used together, should the situation call for logging of multiple processes/filenames etc.