ntlog

Reference Documentation

product_line_custom
Intel® PAC
Napatech SmartNIC
category
Reference Information
Napatech Software Suite: ntlog

ntlog

The ntlog tool is used to read the log generated by the driver and is used mainly for debugging purposes.

Note
For more information about logging see Logging.

Syntax

ntlog [-m <mask> -s <mask> -l <message> -h]

Optional Commands
Command Description
-h, --help Show help and exit
-m <mask> Bitmask that specifies the level of log information to show in the log dump
  • 0x001 : ERROR
    Shows error information
  • 0x002 : WARNING
    Shows warning information
  • 0x004 : INFO
    Shows common information
  • 0x008 : DEBUG
    Shows debug information
  • 0x010 : DIAG
    Shows diagnostic information
  • 0x020 : EVENT
    Shows information about events
  • 0x040 : COMMAND
    Shows information about commands
  • 0x080 : API
    Shows information about API calls
  • 0x100 : AVR
    Shows information about AVR
-s <mask> Bitmask that specifies the level of log information to record.
The initial bitmask is defined in the ntservice.ini file (see below),
but it can be temporarily changed by this command. Changes to the initial
bitmask has effect until next time the service is (re)started.

Note: Using this option it is possible to completely disable all logging temporarily.
  • 0x01 : ERROR
    Records error information
  • 0x02 : WARNING
    Records warning information
  • 0x04 : INFO
    Records initilisation information
  • 0x08 : DEBUG
    Records debug information
  • 0x10 : DIAG
    Records diagnostic information
  • 0x20 : EVENT
    Records information about events.
  • 0x40 : COMMAND
    Records information about commands
  • 0x80 : API
    Records information about API calls
-l, --logmsg <message> Log a message to the ntservice log system. The message is logged at the INFO log level.

If no command is specified, it defaults to ntlog -m 0xff.

Examples

  • ntlog -m 0x1ff
    Dump all log information to the screen.
  • ntlog -m 0x1ff > log.log
    Dump all log information to the log.log file.
  • ntlog -s 0xff
    Temporarily enable all log information.
  • ntlog -s 0x00
    Temporarily disable all logging
    Note: AVR logging cannot be disabled.
  • ntlog -l "Some use full message"
    Writes a message to the ntservice log system.
Note
For information about how to setup logging in the ini-file see Logging.

Log Output Format

The output from the log file has the following format:

-------------------------+--------+---------+-----+------------+------------------------------------------------------------------
Timestamp                |   PID  | LogType | Src |    Rel     | Log entry
-------------------------+--------+---------+-----+------------+------------------------------------------------------------------
10/23/14 15:42:26.175000 |  32028 | INFO    | SRV |  525-f8f4a | ********************************************************************
10/23/14 15:42:26.175000 |  32028 | INFO    | SRV |  525-f8f4a | *                NTService is now operational.                     *
10/23/14 15:42:26.177000 |  32028 | INFO    | SRV |  525-f8f4a | ********************************************************************

where:

  • Column 1: Timestamp - date and time
    The date and time when the log is written
  • Column 2: PID - Process ID
    The process ID of the process issuing the log
  • Column 3: LogType - log type
    The log types available are:
    • ERROR:
      A severe error has occured - the system is not able to continue
    • WARNING:
      A less severe has occured - the system is able to continue
    • INFO:
      Information about adapters and settings, etc.
    • DEBUG:
      Internal - information used for debugging
    • EVENT:
      Internal - event sent from NTService, mainly used for debugging. When an event is sent the event is logged, if enabled. Enabling this log type can result in a huge amount of data.
    • COMMAND:
      Internal - Commands received by NTService, mainly used for debugging. When a command is received the command is logged, if enabled. Enabling this log type can result in a huge amount of data.
    • API:
      Internal - API functions called, mainly used for debugging. When any API function is called it results in one or more logs, if enabled. Enabling this log type can result in a huge amount of data.
    • DIAG:
      Internal - Diagnostic messages, mainly used for debugging
    • AVR:
      Internal - Hardware logs, mainly used for debugging. Log messages from the hardware.
  • Column 4: Src - log source
    The log sources available are:
    • OSS:
      LibNTOS - logs from the OS abstraction layer library
    • API
      LibNTAPI - logs from the API library
    • SRV
      NTService - logs from the ntservice deamon
    • APP
      APP - logs from an application
    • DRV
      Kernel - logs from the kernel mode driver.
  • Column 5: Rel - Release build ID
    The release build ID of the running software/firmware version
    • OSS:
      LibNTOS - logs from the OS abstraction layer library
  • Column 6: Log entry - log message
    This is the log message which will always start with the build number. The build number is used to identify the release used by the customer. The log message can span multiple lines.

The log message shown is available when the service is up and running and ready to receive connections.