NETLOGSTART(1M) — Series 300 and 800 Only
NAME
netlogstart − turn on and configure network logging
SYNOPSIS
Series 300 only: /usr/bin/netlogstart [ -c mask ]
[ -m mask ] [ -f filename [ -b ] ]
Series 800 only: /usr/bin/netlogstart [ -c mask ]
[ -m mask ] [ -C console ] [ -d ] [ -o optionfile ]
[ -f filename [ -b ] ] [ -Bqueue-size ]
DESCRIPTION
Network logging allows various network errors, warnings, and other information to be sent to a file or the console. By default all errors and disasters (see event classes below) are sent to the system console. These commands utilize services provided by the Network Services (NS) diagnostics facility. (This facility is currently only used by logging and is not documented separately).
A log consists of a series of “events.” Event classes are:
Logging Returns status information about logging.
Disasters A fatal error occurred in the networking system.
Errors A fatal error has occurred in a networking module.
Warnings A non-fatal error has occured.
Resource Limitations Some resource has been exhausted
Protocol Specific Info Logs Protocol specific information, which generates a multitude of log records and should be used only if you are debugging the network.
netlogstart initiates and configures network logging. Network events may be logged to a file or to the console. Console logging is controlled by the console log mask set via the netlogstart command. All events of the classes specified in the console mask will be sent to the console. Note that as mentioned above, the default mask for console logging includes disasters and errors. This mask will be set when the network comes up. Thus, if an error or disaster occurs as the network or the system is initializing itself (before netlogstart has been executed) the log message will be sent to the console.
File logging is initiated by specifying the -f parameter and a file name to netlogstart. There is a separate mask to denote those event classes which are to be logged to the file. This mask will also default to disasters and errors. Note that only events occurring after a netlogstart -f will be sent to the specified file.
Parameters
−f filename send formatted logged data to file <filename>. The file will be appended to if it exists or created if new.
−b Log records are stored to filename unformatted, in binary form. The −b option must be used with the −f filename option. The binary log record file is formatted later using the netlogfmt command. Storing log records in binary form minimizes the overhead associated with network logging.
−C console specifies a console file other than /dev/console. This option must be used with the −d or −ffilename options.
−d causes netlogstart to run as a background daemon process. Useful for forwarding console log events to another file with the −Cconsole option.
−m mask set the file logging mask to <mask>.
−c mask set the console logging mask to <mask>.
−Bqueue-size sets the size of the logging event queue. queue-size is an integer indicating the number of messages the queue can hold. Minimum queue size, also the default, is 32. The maximum queue size is limited by the available memory.
−o optionfile specifies a filter option file which causes only designated subsystems or events to be logged. The option file and filtering is described below. (Series 800 Only).
A log <mask> is a string containing any combination of the letters LDEWRPC (upper- and lower-case is not significant) which refer to the event classes as follows:
Mask Value Corresponding Event
L Logging Events
D Disasters
E Errors
W Warnings
R Resource Limitations
P Protocol Specific Information
C Clear the mask
Filtering with the Option File
Filtering log events with the option file limits the number of events queued and thus avoids excessive dropping of events. A filter is compared against values in the events. If an event matches a filter, then the event is logged, otherwise the event is dropped. Event filters can also be “negative“ by specifying “!“ before the filter value in the option file. If an event matches a negative filter the event is dropped. Option file filters are cleared by netlogstop; when the filters are cleared all events are logged.
Each line in the option file, optionfile, is divided into five fields. The first field describes the type of entry, the second and third fields specify the “subsystem“ of the entry, and the last two fields give the events to be filtered. A line can also consist of a commment preceded by a “#“.
Filters are order-dependent. If the same event is mentioned twice, the latter entry overrides the former entry. The forms the entries in the optionfile can take are given below with their corresponding value representations.
# <comment> Optional
filter subsystem subsys_name event event_list
subsys_name can be one the following:
| lan | rfa-requestor |
| nfs | rfadaemon |
| nft | rlbdaemon |
| pxp | sockregd |
| nsdiag | ip |
| bufs | tcp |
| ipc | udp |
| probe |
Event_list takes the following form: event_spec [,...]
where event_spec takes the following form:
[ ! ]integer
[ ! ]range
[ ! ]*
Integer is an integer in hexidecimal (leading 0x), octal (leading 0), or decimal, which specifies an event for the subsystem indicated.
Range takes the form integer-integer, and indicates an inclusive set of events.
With no parameters, netlogstart prints out a status message. You can activate the logging daemon ( netlogstart −f or −d ) only once. File logging must then be deactivated with netlogstop. Only the super-user may use this command.
DIAGNOSTICS
Usage: netlogstart [ -c <mask> ] [ -m <mask> ]
[ -f <logfile> ] [ -b ] [ -o <optionfile> ]
[ -C <console file> ] [ -B <bufsize> ] [ -d ]
Illegal invocation of netlogstart command.
Invalid mask: ’<mask string>’. A mask consists of ’LEDWRPC’
User specified a mask to the netlogstart -c or -m parameters which did not consist of a combination of the letters LEDWRPC.
NS logging daemon has already been started
netlogstart -f <filename> or netlogstart −d executed more than once.
Open of <file> failed: <error message>
Either the file specified in netlogstart -f could not be opened or created, or one of the NS diagnostics files could not be opened.
Illegal option -- <opt>, Usage: ...
An illegal parameter was specified.
Read failed: <number> bytes read: <errno value>
Read of the NS diagnostics driver failed.
Write failed: <number> bytes written: <errno value>
Write to file specified in netlogstart -f failed.
Ioctl(<ioctl>) failed: <errno value>
Ioctl() request to NS diagnostics driver failed.
getopt returned <value>
Library routine getopt() returned unexpected value.
Permission denied.
The command must be initiated by the super-user.
Unknown subsystem in configuration line <num>:<subsys>
Error in configuration line <number> near: <token>
Invalid entry in configuration.
EXAMPLES
The following examples show the format of entries in the option file specified using the -o option.
1. Log all events for subsystem “ip“. No other events are logged. By default, all events not specified when an option file is used are not logged.
filter subsystem ip event *
2. Log only event 5003 for subsystem “ip“. Log all events except 3000 for subsystem “tcp“. No other events are logged.
filter subsystem ip event 5003
filter subsystem tcp event *,!3000
3. Log only events 5003, 5004, 5005, and 5006 for subsystem “ip“. Log all events except events 3000, 3002, and 3003 for subsystem “tcp“. No other events are logged.
filter subsystem ip event 5003-5006
filter subsystem tcp event *,!3000,!3002-3003
DEPENDENCIES
Implemented on the Series 300 and 800 only.
Series 800 Only: The -o, -d, -B, and -C, flags are supported on the Series 800 only.
AUTHOR
HP
FILES
/dev/nsdiag0 NS diagnostics exclusive access device file used for daemon logging.
/dev/nsdiag1 NS diagnostics multiple access device file used for ioctl()’s.
/etc/nsdiag2 NS diagnostics multiple access device file used for user-level logging. (Series 800 only)
SEE ALSO
netlogfmt(1M), netlogstop(1M).
Series 300 only: For details on logging by NS daemons, refer to the "Daemon Logging Interface" section of the "Network Event Logging" chapter of the Installing and Maintaining NS-ARPA Services manual for the Series 300.
Series 300 and Series 800 only: For information about logging with windows, refer to the "Netlogstart Syntax" section of the "Network Event Logging" chapter of the Installing and Maintaining NS-ARPA Services manual for the Series 300, or the "LAN, NS, ARPA Services/9000 Series 800 Node Manager’s Guide" for the Series 800.
Series 800 only: If you are using windows, you can redirect console output using the -C option.
Hewlett-Packard Company — May 11, 2021