Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

shmlog (Shared Memory Log)

Syntax

Hierarchy Level

Description

Junos OS uses a shared memory space to store log entries for subscriber service daemons including jpppd, jdhcpd, jl2tpd, autoconfd, bbe-smgd, authd, cosd, and dfwd. Shared memory logging is enabled by default and occurs at the client level. You can view the shmlogs on a per subscriber basis, or use filters to retrieve logs according to a variety of different parameters such as interface name, IP address, session ID, subnet, and VLAN in addition to the Client Identifier or Client DUID. Filtering is disabled by default. To see a complete list of supported filters, use this command:

When viewing logs you can limit results on the basis of event flags that include interface events, routing process interaction events, l2tp tunneling events, and ldap authentication events. To see a complete list of supported flags, use this command:

Note:

Some platforms other than MX Series routers use shared memory logs for internal processes. These logs are not intended for customer use.

Options

disable

Name of the command to override the default behavior. Use this option to disable shared memory logging; it is always enabled otherwise.

file

Name of the file containing the shmlogs. Use this option to redirect shmlogs to a file for file-based logging. Specify the file name, define the number of files (from 2 to 1000), and set the maximum file size (from 10240 to 1073741824 bytes). Data will be written to the /var/log/shmlog/ directory. Files follow this naming convention: <cfg-file-name>-<daemon>-<severity>.log. The shmlog files are not human-readable, so to access the logs you must first run the following command to generate a file in the /var/log/<file-name>/ directory with logs from all daemons:

If you then want to view logs from a specific daemon, you need to run the following command to generate a file under the /var/log/<file-name>/ directory with complete logs:

filtering

Command to enable filtering. Filtering is subscriber centric and is useful for debugging and troubleshooting. It is disabled by default so you must use this option to enable it.

For example, if you want to quickly view the transmit packet logs for subscribers with interface-name pp0.100, you could use the following command to display only the relevant results:

To debug sessions according to the interface name, use this command:

To debug sessions that are logging in via VLAN 7 on physical-interface ge-0/0/0, use this command:

log-name

Name of the file containing the log output. Use this option to override all logs or a specified log, and to set the verbosity level (brief, detail, extensive, none, or terse). For example, to configure bbe-autoconf-info for detailed file logging, you would use the following command:

log-type

Severity level of the collected logs. Use this option to configure the severity level for captured logs (notice, info, or debug).

Required Privilege Level

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 16.2.