Process and Memory Management Commands on the Cisco ASR 9000 Series Router
This chapter describes the Cisco IOS XR software commands used to manage processes and memory.
For more information about using the process and memory management commands to perform troubleshooting tasks, see
Cisco ASR 9000 Series Aggregation Services Router
Getting Started Guide.
To clear core dump context information, use the clearcontext command in administration EXEC mode or in EXEC mode.
clearcontextlocation
{ node-id | all }
Syntax Description
location{node-id
| all}
(Optional) Clears core dump context information for a specified node. The node-id argument is expressed in the rack/slot/module notation. Use the all keyword to indicate all nodes.
Command Default
No default behavior or values
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the clearcontext command to clear core dump context information. If you do not specify a node with the locationnode-id keyword and argument, this command clears core dump context information for all nodes.
Use the showcontext command to display core dump context information.
Task ID
Task ID
Operations
diag
execute
Examples
The following example shows how to clear core dump context information:
Suspends a process, generates a core dump for the process, and resumes the process.
job-id
Process instance identifier.
locationnode-id
Generates a core dump for a process running on the specified node. The node-id argument is expressed in the rack/slot/module notation.
Command Default
No default behavior or values
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
When a process crashes on the
Cisco IOS XR software, a core dump file of the event is written to a designated destination without bringing down the router. Upon receiving notification that a process has terminated abnormally, the
Cisco IOS XR software then respawns the crashed process. Core dump files are used by Cisco Technical Support Center engineers and development engineers to debug the
Cisco IOS XR software.
Core dumps can be generated manually for a process, even when a process has not crashed. Two modes exist to generate a core dump manually:
running—Generates a core dump for a running process. This mode can be used to generate a core dump on a critical process (a process whose suspension could have a negative impact on the performance of the router) because the core dump file is generated independently, that is, the process continues to run as the core dump file is being generated.
suspended—Suspends a process, generates a core dump for the process, and resumes the process. Whenever the process is suspended, this mode ensures data consistency in the core dump file.
Core dump files contain the following information about a crashed process:
Register information
Thread status information
Process status information
Selected memory segments
Task ID
Task ID
Operations
diag
read, write
Examples
The following example shows how to generate a core dump in suspended mode for the process instance 52:
To modify core dump settings, use the
exception filepath command in administration configuration mode or in global configuration mode.
To remove the configuration, use the no form of this command.
exception
[ choicepreference ]
[ compress
{ on | off } ]
filenamefilenamelower-limit-higher-limitfilepathfilepath
noexception
[ choicepreference ]
[ compress
{ on | off } ]
filenamefilenamelower-limit-higher-limitfilepathfilepath
Syntax Description
choicepreference
(Optional) Configures the order of preference for the destination of core
dump files. Up to the three destinations can be defined. Valid values are 1
to 3.
compress {on | off}
(Optional) Specifies whether or not the core dump file should be sent
compressed. By default, core dump files are sent compressed. If you specify
the compress keyword, you must specify one of the following required keywords:
on—Compresses the core dump file before sending it.
off—Does not compress the core dump file before sending it.
filenamefilenamelower-limit-higher-limit
(Optional) Specifies the filename to be appended to core dump files and the
lower and higher limit range of core dump files to be sent to a specified
destination before being recycled by the circular buffer.
See Table 1 for a description of the default core dump file naming convention.
Valid values for the lower-limit argument are 0 to 4. Valid values for the higher-limit argument are 5 to 64. A hyphen (-) must immediately follow the lower-limit argument.
Note
To uniquely identify each core dump file, a value is appended to each
core dump file, beginning with the lower limit value configured for the lower-limit argument and continuing until the higher limit value configured
for the higher-limit argument has been reached. After the higher limit value has been
reached, the Cisco IOS XR software begins to recycle the values appended to core dump files, beginning
with the lower limit value.
filepath
Local file system or network protocol, followed by the directory path. All
local file systems are supported. The following network protocols are
supported: TFTP and FTP.
Command Default
If you do not specify the order of preference for the destination of core dump files
using the choicepreference keyword and argument, the default preference is the primary location or 1.
Core dump files are sent compressed.
The default file naming convention used for core dump files is described in Table 1.
Command Modes
Administration configuration
Global configuration
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the exception filepath command to modify core dump settings, such as the destination file path to
store core dump files, file compression, and the filename appended to core dumps.
Up to three user-defined locations may be configured as the preferred destinations for
core dump files:
Primary location—The primary destination for core dump files. Enter the choice keyword and a value of 1 (that is, choice1) for the preference argument to specify a destination as the primary location for core dump
files.
Secondary location—The secondary fallback choice for the destination for core dump
files, if the primary location is unavailable (for example, if the hard disk is
set as the primary location and the hard disk fails). Enter the choice keyword and a value of 2 (that is, choice2) for the preference argument to specify a destination as the secondary location for core dump
files.
Tertiary location—The tertiary fallback choice as the destination for core dump
files, if the primary and secondary locations fail. Enter the choice keyword and a value of 3 (that is, choice3) for the preference argument to specify a destination as the tertiary location for core dump
files.
When specifying a destination for a core dump file, you can specify an absolute file
path on a local file system or on a network server. The following network protocols are
supported: TFTP and FTP.
Note
We recommend that you specify a location on the hard disk as the primary location.
In addition to the three preferred destinations that can be configured, Cisco IOS XR software provides three default fallback destinations for core dump files in the event that
user-defined locations are unavailable.
The default fallback destinations are:
harddisk:/dumper
disk1:/dumper
disk0:/dumper
Note
If a default destination is a boot device, the core dump file is not sent to that
destination.
We recommend that you configure at least one preferred destination for core dump files
as a preventive measure if the default fallback paths are unavailable. Configuring at
least one preferred destination also ensures that core dump files are archived because
the default fallback destinations store only the first and last core dump files for a
crashed process.
Note
Cisco IOS XR software does not save a core file on a local storage device if the size of the core
dump file creates a low-memory condition.
By default, Cisco IOS XR software assigns filenames to core dump files according to the following format:
If the core dump was generated because of a request by a process
(requester), the core filename contains the string “.by.requester” where the requester variable is the name or process ID (PID) of the process that
requested the core dump. If the core dump was due to a self-generated
abort call request, the core filename contains the string “.abort” instead
of the name of the requester.
.sparse
If a sparse core dump was generated instead of a full core dump, “sparse”
appears in the core dump filename.
.date-time
Date and time the dumper process was called by the process manager to
generate the core dump. The .date-time time-stamp variable is expressed in the yyyy.mm.dd-hh.mm.ss
format. Including the time stamp in the filename uniquely identifies the
core dump filename.
.node
Node ID, expressed in the rack/slot/module notation, where the process that generated the core dump was
running.
.processor-type
Type of processor (mips or ppc).
.Z
If the core dump was sent compressed, the filename contains the .Z
suffix.
You can modify the default naming convention by specifying a filename to be appended to
core dump files with the optional filenamefilename keyword and argument and by specifying a lower and higher limit ranges of
values to be appended to core dump filenames with the lower-limit and higher-limit arguments, respectively. The filename that you specify for the filename argument is appended to the core dump file and the lower and higher limit
ranges of core dump files to be sent to a specified destination before the filenames are
recycled. Valid values for the lower-limit argument are 0 to 4. Valid values for the higher-limit argument are 5 to 64. A hyphen (-) must immediately follow the lower-limit argument. In addition, to uniquely identify each core dump file, a value is
appended to each core dump file, beginning with the lower-limit value specified with the lower-limit argument and continuing until the higher-limit value specified with the higher-limit argument has been reached. When the configured higher-limit value has been
reached, Cisco IOS XR software begins to recycle the values appended to core dump files, beginning with the
lower-limit value.
Task ID
Task ID
Operations
diag
read, write
Examples
The following example shows how to configure the core dump setting for the primary
user-defined preferred location. In this example, core files are configured to be sent
uncompressed; the filename of core dump files is set to “core” (that is, all core
filenames will be named core); the range value is set from 0 to 5 (that is, the values 0
to 5 are appended to the filename for the first five generated core dump files,
respectively, before being recycled); and the destination is set to a directory on the
hard disk.
To configure the collection of packet memory information in core dump files, use the exceptionpakmem command in administration configuration mode or in global configuration mode. To remove the configuration, use the no form of this command.
exceptionpakmem
{ on | off }
noexceptionpakmem
{ on | off }
Syntax Description
on
Enables the collection of packet memory information in core dump files.
off
Disables the collection of packet memory information in core dump files.
Command Default
Packet memory information is not included in core dump files.
Command Modes
Administration configuration
Global configuration
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the exceptionpakmem command with the on keyword to configure the collection of packet memory information in core dump files. Cisco Technical Support Center engineers and development engineers use packet memory information to debug packet memory issues related to a process.
Caution
Including packet memory information in core dump files significantly increases the amount of data generated in the core dump file, which may delay the restart time for the process.
Task ID
Task ID
Operations
diag
read, write
Examples
The following example shows how to configure core dumps to include packet memory information:
RP/0/RSP0/CPU0:router(config)# exception pakmem on
To enable or disable sparse core dumps, use the exceptionsparse command in administration configuration mode or in global configuration mode. To remove the configuration, use the no form of this command.
exceptionsparse
{ on | off }
noexceptionsparse
Syntax Description
on
Enables sparse core dumps.
off
Disables sparse core dumps
Command Default
Sparse core dumps are disabled.
Command Modes
Administration configuration
Global configuration
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the exceptionsparse command to reduce the amount of data generated in the core dump file. Sparse core dumps reduce the amount of time required to generate the core dump file because only referenced data is generated in the core file (at the cost of lost information in the core file). Reducing the time required to generate core dump files corresponds to faster process restart times.
Sparse core dumps contain the following information about crashed processes:
Register information for all threads, and any memory pages referenced in these register values
Stack information for all threads, and any memory pages referenced in these threads
All memory pages referenced by a loaded dynamic loadable library (DLL) data section, if the final program counter falls in a DLL data section
Any user-specified marker pages from the lib_dumper_marker DLL
The exceptionsparse command dumps memory pages based on trigger addresses found in the previously listed dump information, according to the following criteria:
If the trigger address in the memory page is in the beginning 128 bytes of the memory page, the previous memory page in the continuous address region is dumped also.
If the trigger address in the memory page is in the final 128 bytes of the memory page, the next memory page in the continuous address region is dumped also.
In all other instances, only the memory page that includes the trigger address is dumped.
Note
Use the exception sparse off command in administration configuration mode to get a complete coredump of the transient processes on the RP.
Task ID
Task ID
Operations
diag
read, write
Examples
The following example shows how to enable sparse core dumps:
RP/0/RSP0/CPU0:router(config)# exception sparse on
To specify the maximum file size for core dumps, use the exceptionsprsize command in administration configuration mode or in global configuration mode. To remove the configuration, use the no form of this command.
exceptionsprsizemegabytes
noexceptionsprsize
Syntax Description
megabytes
Size in megabytes (MB).
Command Default
megabytes: 192
Command Modes
Administration configuration
Global configuration
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the exceptionsprsize command to specify the maximum file size for core dumps. The maximum file size configured for the megabytes argument is used with the configuration set for the exception sparse command to determine whether or not to generate a sparse core dump file. If sparse core dumps are disabled and a core dump file is predicted to exceed the default value (192 MB) uncompressed or the value specified for the megabytes argument uncompressed, a sparse core dump file is generated. If sparse core dumps are enabled, a sparse core dump file is generated, regardless of the size of the core dump file.
Task ID
Task ID
Operations
diag
read, write
Examples
The following example shows how to set the file size of sparse core dumps to 300 MB:
Follows the process with the process ID (PID) specified for the pid argument.
locationnode-id
Follows the target process on the designated node. The node-id argument is expressed in the rack/slot/module notation.
all
(Optional) Follows all threads.
blocked
(Optional) Follows the chain of thread IDs (TIDs) or PIDs that are blocking the target process.
debuglevel
(Optional) Sets the debug level for the following operation. Valid values for the level argument are 0 to 10.
delayseconds
(Optional) Sets the delay interval between each iteration. Valid values for the seconds argument are 0 to 255 seconds.
dumpaddresssize
(Optional) Dumps the memory segment starting with the specified memory address and size specified for the address and size arguments.
iterationcount
(Optional) Specifies the number of times to display information. Valid values for the count argument are 0 to 255 iterations.
prioritylevel
(Optional) Sets the priority level for the following operation. Valid values for the level argument are 1 to 63.
stackonly
(Optional) Displays only stack trace information.
threadtid
(Optional) Follows the TID of a process or job ID specified for the tid argument.
verbose
(Optional) Displays register and status information pertaining to the target process.
Command Default
Entering the follow command without any optional keywords or arguments performs the operation for five iterations from the local node with a delay of 5 seconds between each iteration. The output includes information about all live threads. This command uses the default scheduling priority from where the command is being run.
Command Modes
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use this command to unintrusively debug a live process or a live thread in a process. This command is particularly useful for debugging deadlock and livelock conditions, for examining the contents of a memory location or a variable in a process to determine the cause of a corruption issue, or in investigating issues where a thread is stuck spinning in a loop. A livelock condition is one that occurs when two or more processes continually change their state in response to changes in the other processes.
The following actions can be specified with this command:
Follow all live threads of a given process or a given thread of a process and print stack trace in a format similar to core dump output.
Follow a process in a loop for a given number of iterations.
Set a delay between two iterations while invoking the command.
Set the priority at which this process should run while this command is being run.
Dump memory from a given virtual memory location for a given size.
Display register values and status information of the target process.
Take a snapshot of the execution path of a thread asynchronously to investigate performance-related issues by specifying a high number of iterations with a zero delay.
Task ID
Task ID
Operations
basic-services
read
Examples
The following example shows how to use the follow command to debug the process associated with job ID 257 for one iteration:
RP/0/RSP0/CPU0:router# follow job 257 iteration 1
Attaching to process pid = 28703 (pkg/bin/packet)
No tid specified, following all threads
DLL Loaded by this process
-------------------------------
DLL path Text addr. Text size Data addr. Data size Version
/pkg/lib/libovl.dll 0xfc0c9000 0x0000c398 0xfc0c31f0 0x0000076c 0
/pkg/lib/libplatform.dll 0xfc0d6000 0x0000aa88 0xfc0e1000 0x00002000 0
/pkg/lib/libsysmgr.dll 0xfc0e3000 0x0000aeac 0xfc0c395c 0x00000388 0
/pkg/lib/libinfra.dll 0xfc0ee000 0x000332ec 0xfc122000 0x00000c70 0
/pkg/lib/libios.dll 0xfc123000 0x0002c4bc 0xfc150000 0x00002000 0
/pkg/lib/libc.dll 0xfc152000 0x00077ae0 0xfc1ca000 0x00002000 0
/pkg/lib/libsyslog.dll 0xfc1d4000 0x0000530c 0xfc122c70 0x00000308 0
/pkg/lib/libbackplane.dll 0xfc1da000 0x0000134c 0xfc0c3e6c 0x000000a8 0
/pkg/lib/libnodeid.dll 0xfc1e7000 0x000091fc 0xfc1e61a8 0x00000208 0
/pkg/lib/libdebug.dll 0xfc23e000 0x0000ef64 0xfc1e6680 0x00000550 0
/pkg/lib/lib_procfs_util.dll 0xfc24d000 0x00004e2c 0xfc1e6bd0 0x000002a8 0
/pkg/lib/libsysdb.dll 0xfc252000 0x00046224 0xfc299000 0x0000079c 0
/pkg/lib/libsysdbutils.dll 0xfc29a000 0x0000ae04 0xfc29979c 0x000003ec 0
/pkg/lib/libwd_evm.dll 0xfc2a9000 0x0000481c 0xfc299b88 0x00000188 0
/pkg/lib/lib_mutex_monitor.dll 0xfc35e000 0x00002414 0xfc340850 0x00000128 0
/pkg/lib/libchkpt.dll 0xfc477000 0x0002ee04 0xfc474388 0x00000950 0
/pkg/lib/libpacket_common.dll 0xfc617000 0x000130f0 0xfc6056a0 0x000007b0 0
Iteration 1 of 1
------------------------------
Current process = "pkg/bin/packet", PID = 28703 TID = 1
trace_back: #0 0xfc1106dc [MsgReceivev]
trace_back: #1 0xfc0fc840 [msg_receivev]
trace_back: #2 0xfc0fc64c [msg_receive]
trace_back: #3 0xfc0ffa70 [event_dispatch]
trace_back: #4 0xfc0ffc2c [event_block]
trace_back: #5 0x48204410 [<N/A>]
ENDOFSTACKTRACE
Current process = "pkg/bin/packet", PID = 28703 TID = 2
trace_back: #0 0xfc1106dc [MsgReceivev]
trace_back: #1 0xfc0fc840 [msg_receivev]
trace_back: #2 0xfc0fc64c [msg_receive]
trace_back: #3 0xfc0ffa70 [event_dispatch]
trace_back: #4 0xfc0ffc2c [event_block]
trace_back: #5 0xfc48d848 [chk_evm_thread]
ENDOFSTACKTRACE
Current process = "pkg/bin/packet", PID = 28703 TID = 3
trace_back: #0 0xfc17d54c [SignalWaitinfo]
trace_back: #1 0xfc161c64 [sigwaitinfo]
trace_back: #2 0xfc10302c [event_signal_thread]
ENDOFSTACKTRACE
Current process = "pkg/bin/packet", PID = 28703 TID = 4
trace_back: #0 0xfc1106c4 [MsgReceivePulse]
trace_back: #1 0xfc0fc604 [msg_receive_async]
trace_back: #2 0xfc0ffa70 [event_dispatch]
trace_back: #3 0xfc0ffc5c [event_block_async]
trace_back: #4 0xfc35e36c [receive_events]
ENDOFSTACKTRACE
Current process = "pkg/bin/packet", PID = 28703 TID = 5
trace_back: #0 0xfc17d564 [SignalWaitinfo_r]
trace_back: #1 0xfc161c28 [sigwait]
trace_back: #2 0x48203928 [<N/A>]
ENDOFSTACKTRACE
The following example shows how to use the follow command to debug TID 5 of the process associated with job ID 257 for one iteration:
The following example shows how to use the follow command to debug the chain of threads blocking thread 2 associated with the process assigned PID 139406:
The following example shows how to use the follow command to debug the chain of threads blocking thread 2 associated with the process assigned PID 139406:
RP/0/RSP0/CPU0:router# follow process 139406 blocked iteration 1 stackonly thread 2
Attaching to process pid = 139406 (pkg/bin/lpts_fm)
Iteration 1 of 1
------------------------------
Current process = "pkg/bin/lpts_fm", PID = 139406 TID = 2
trace_back: #0 0xfc110744 [MsgSendv]
trace_back: #1 0xfc0fbf04 [msg_sendv]
trace_back: #2 0xfc0fbbd8 [msg_send]
trace_back: #3 0xfcec7580 [pa_fm_close]
trace_back: #4 0xfcec78b0 [pa_fm_process_0]
ENDOFSTACKTRACE
REPLY (node node0_RP1_CPU0, pid 57433)
No specific TID, following all threads of 57433 (pkg/bin/lpts_pa)
-----------------------------------------------------------------
Current process = "pkg/bin/lpts_pa", PID = 57433 TID = 1
trace_back: #0 0xfc1106dc [MsgReceivev]
trace_back: #1 0xfc0fc840 [msg_receivev]
trace_back: #2 0xfc0fc64c [msg_receive]
trace_back: #3 0xfc0ffa70 [event_dispatch]
trace_back: #4 0xfc0ffc2c [event_block]
trace_back: #5 0x48201904 [<N/A>]
trace_back: #6 0x48201e3c [<N/A>]
ENDOFSTACKTRACE
Current process = "pkg/bin/lpts_pa", PID = 57433 TID = 2
trace_back: #0 0xfc1106dc [MsgReceivev]
trace_back: #1 0xfc0fc840 [msg_receivev]
trace_back: #2 0xfc0fc64c [msg_receive]
trace_back: #3 0xfc0ffa70 [event_dispatch]
trace_back: #4 0xfc0ffc2c [event_block]
trace_back: #5 0x4821e978 [<N/A>]
ENDOFSTACKTRACE
Current process = "pkg/bin/lpts_pa", PID = 57433 TID = 3
trace_back: #0 0xfc1106dc [MsgReceivev]
trace_back: #1 0xfc0fc840 [msg_receivev]
trace_back: #2 0xfc0fc64c [msg_receive]
trace_back: #3 0xfc0ffa70 [event_dispatch]
trace_back: #4 0xfc0ffc2c [event_block]
trace_back: #5 0x482064c4 [<N/A>]
ENDOFSTACKTRACE
To display auto-updating statistics on processes in a full-screen mode, use the monitor processes command in administration EXEC mode or in EXEC mode.
monitorprocesses [dumbtty]
[ locationnode-id ]
Syntax Description
dumbtty
(Optional) Displays the output of the command as if on a dumb terminal (the screen is not refreshed).
locationnode-id
(Optional) Displays the output of the command from the designated node. The node-id argument is entered in the rack/slot/module notation.
Command Default
If you omit all keywords, the monitor processes command displays the top 10 processes of CPU usage for the local node, sorted in descending order by the time used. The display is cleared and updated every 5 seconds until you quit the command by pressing the q key.
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the monitor processes command to display the top ten processes based on CPU usage. The display refreshes every 10 seconds.
To change the parameters displayed by the monitor processes command, enter one of the interactive commands described in Table 1.
To terminate the display and return to the system prompt, enter the q key.
To list the interactive commands, type ? during the display.
Table 2
Interactive Commands Available for the monitor processes Command
Command
Description
?
Displays the available interactive commands.
c
Sorts display by number of open channels.
d
Changes the delay interval between updates.
f
Sorts display by number of open files.
k
Kills a process.
l
Refreshes the screen.
m
Sorts display by memory used.
n
Changes the number of processes to be displayed.
q
Quits the interactive display and returns the prompt to EXEC mode.
t
Sorts display by time (default).
Task ID
Task ID
Operations
basic-services
execute
Examples
The following example shows sample output from the monitor processes command:
When the n or d interactive command is used, the monitor processes command prompts you to enter a number. For example, when the interactive command n is entered, the prompt responds as shown in the following example:
(Optional) Displays the output of the command as if on a dumb terminal (the screen is not refreshed).
iterationnumber
(Optional) Number of times the statistics display is to be updated, in the range from 0 to 4294967295.
locationnode-id
(Optional) Displays the output from the command from the designated node. The node-id argument is entered in the rack/slot/module notation.
Command Default
When all keywords are omitted, the monitor threads command displays the first ten threads for the local node, sorted in descending order by the time used. The display is cleared and updated every 5 seconds until you quit the command.
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the monitor threads command to show the top ten threads based on CPU usage. The display refreshes every 10 seconds.
To change the parameters displayed by the monitor threads command, enter one of the key commands described in Table 1.
To terminate the display and return to the system prompt, enter the q key.
To list the interactive commands, type ? during the display.
Table 1
describes the available interactive display commands.
Table 4
Interactive Display Commands for the monitor threads Command
Command
Description
?
Displays the available interactive commands.
d
Changes the delay interval between updates.
k
Kills a process.
l
Refreshes the screen.
n
Changes the number of threads to be displayed.
q
Quits the interactive display and returns the prompt to EXEC mode.
Task ID
Task ID
Operations
basic-services
execute
Examples
The following example shows sample output from the monitor threads command:
Table 2
describes the significant fields shown in the display.
Table 5
monitor threads Field Descriptions
Field
Description
JID
Job ID.
TIDS
Thread ID.
LAST_CPU
Number of open channels.
PRI
Priority level of the thread.
STATE
State of the thread.
HH:MM:SS
Run time of process since last restart.
CPU
Percentage of CPU used by process thread.
COMMAND
Process name.
Examples
Using Interactive Commands
When the n or d interactive command is used, the monitor threads command prompts for a number appropriate to the specific interactive command. The following example shows sample output from the monitor threads command using the interactive n command after the first display cycle to change the number of threads:
RP/0/RSP0/CPU0:router# monitor threads
Computing times... 87 processes; 249 threads;
CPU states: 84.8% idle, 4.2% user, 10.9% kernel
Memory: 256M total, 175M avail, page size 4K
JID TID PRI STATE HH:MM:SS CPU COMMAND
1 6 10 Run 0:00:10 10.92% kernel
553049 1 10 Rply 0:00:00 4.20% top
58 3 10 Rcv 0:00:24 0.00% sysdbsvr
1 3 10 Rcv 0:00:21 0.00% kernel
69 1 10 Rcv 0:00:20 0.00% wdsysmon
1 5 10 Rcv 0:00:20 0.00% kernel
159 2 10 Rcv 0:00:05 0.00% qnet
160 1 10 Rcv 0:00:05 0.00% netio
157 1 10 NSlp 0:00:04 0.00% envmon_periodic
160 9 10 Intr 0:00:04 0.00% netio
n
Enter number of threads to display: 3
Please enter a number between 5 and 40
Enter number of threads to display: 8
87 processes; 249 threads;
CPU states: 95.3% idle, 2.9% user, 1.7% kernel
Memory: 256M total, 175M avail, page size 4K
JID TID PRI STATE HH:MM:SS CPU COMMAND
1 6 10 Run 0:00:11 1.76% kernel
69 1 10 Rcv 0:00:20 1.11% wdsysmon
58 3 10 Rcv 0:00:24 0.40% sysdbsvr
157 1 10 NSlp 0:00:04 0.23% envmon_periodic
159 19 10 Rcv 0:00:02 0.20% qnet
553049 1 10 Rply 0:00:00 0.20% top
159 12 10 Rcv 0:00:03 0.13% qnet
160 1 10 Rcv 0:00:05 0.10% netio
When a number outside the acceptable range is entered, the acceptable range is displayed:
Please enter a number between 5 and 40
Enter number of threads to display:
Stops a process. The process is not restarted (even if considered “mandatory�?).
start
Starts a process.
executable-name
Executable name of the process to be started, terminated, or restarted. Supplying an executable name for the executable-name argument performs the action for all the simultaneously running instances of the process, if applicable.
job-id
Job ID of the process instance to be started, terminated, or restarted. Supplying a job ID for the job-id argument performs the action for only the process instance associated with the job ID.
location {
node-id
| all}
Starts, terminates, or restarts a process on the designated node. The node-id argument is entered in the rack/slot/module notation. The all keyword specifies all nodes.
Command Default
No default behavior or values
Command Modes
Administration EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Under normal circumstances, processes are started and restarted automatically by the operating system as required. If a process crashes, it is automatically restarted.
Use this command to manually stop, start, or restart individual processes.
Caution
Manually stopping or restarting a process can seriously impact the operation of a router. Use these commands only under the direction of a Cisco Technical Support representative.
process shutdown
The process shutdown command shuts down (terminates) the specified process and copies associated with the specified process. The process is not restarted, even if considered “mandatory.�? Use the show processes command to display a list of executable processes running on the system.
Caution
Stopping a process can result in an RP switchover, system failure or both. This command is intended for use only under the direct supervision of a Cisco Technical Support representative.
process restart
The process restart command restarts a process, such as a process that is not functioning optimally.
process start
The process start command starts a process that is not currently running, such as a process that was terminated using the process kill command. If multiple copies are on the system, all instances of the process are started simultaneously.
Task ID
Task ID
Operations
root-lr
execute
Examples
The following example shows how to restart a process. In this example, the IS-IS process is restarted:
Executable name of the process for which you want to change core dump options. Specifying a value for the executable-name argument changes the core dump option for multiple instances of a running process.
job-id
Job ID associated with the process instance. Specifying a job-id value changes the core dump option for only a single instance of a running process.
context
Dumps only context information for a process.
copy
Copies a core dump locally before performing the core dump.
fallback
Sets the core dump options to use the fallback options (if needed).
iomem
Dumps the I/O memory of a process.
mainmem
Dumps the main memory of a process.
off
Indicates that a core dump is not taken on the termination of the specified process.
sharedmem
Dumps the shared memory of a process.
sparse
Enables sparse core dumps of a process.
sync
Enables only synchronous core dumping.
text
Dumps the text of a process.
maxcore value
(Optional) Specifies the maximum number of core dumps allowed for the specified process on its creation.
locationnode-id
Sets the core dump options for a process on a designated node. The node-id argument is entered in the rack/slot/module notation.
Command Default
By default, processes are configured to dump shared memory, text area, stack, data section, and heap information.
Command Modes
Administration EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
The modular architecture of Cisco IOS XR software allows core dumps for individual processes. By default, processes are configured to dump shared memory, text area, stack, data section, and heap information.
Specifying an executable name for the executable-namejob-id argument changes the core dump option for all instances of the process. Specifying a job ID for the value changes the core dump option for a single instance of a running process.
Task ID
Task ID
Operations
root-lr
execute
Examples
The following example shows how to enable the collection of shared memory of a process:
RP/0/RSP0/CPU0:router# process ospf core sharedmem
The following example shows how to turn off core dumping for a process:
RP/0/RSP0/CPU0:router# process media_ether_config_di core off
Turns off the mandatory process attribute. The process is not considered mandatory.
reboot {
enable
| disable}
Enables or disables the reboot action when a mandatory process fails.
toggle
Toggles a mandatory process attribute.
executable-name
Executable name of the process to be terminated. Specifying an executable name for the executable-name argument terminates the process and all the simultaneously running copies, if applicable.
job-id
Job ID associated with the process to be terminated. Terminates only the process associated with the job ID.
locationnode-id
Sets the mandatory settings for a process on a designated node. The node-id argument is expressed in the rack/slot/module notation.
Command Default
No default behavior or values
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
If a process unexpectedly goes down, the following action occurs based on whether the process is considered mandatory.
If the process is mandatory and the process cannot be restarted, the node automatically reboots.
If the process is not mandatory and cannot be restarted, it stays down and the node does not reboot.
Task ID
Task ID
Operations
root-lr
execute
Examples
The following example shows how to turn on a mandatory attribute. In this example, the mandatory attribute is turned on for the media_ether_config_di process.
RP/0/RSP0/CPU0:router# process mandatory on media_ether_config_di
The following example shows how to turn the reboot option on. In this example, the router is set to reboot the node if a mandatory process goes down and cannot be restarted.
RP/0/RSP0/CPU0:router# process mandatory reboot enable
RP/0/RSP00/CPU0:Mar 19 19:28:10 : sysmgr[71]: %SYSMGR-4-MANDATORY_REBOOT_ENABLE :
mandatory reboot option enabled by request
The following example shows how to turn off the reboot option. In this example, the router is set not to reboot the node if a mandatory process goes down and cannot be restarted. In this case, the mandatory process is restarted, but the node is not rebooted.
RP/0/RSP0/CPU0:router# process mandatory reboot disable
RP/0/RSP00/CPU0:Mar 19 19:31:20 : sysmgr[71]: %SYSMGR-4-MANDATORY_REBOOT_OVERRIDE
: mandatory reboot option overridden by request
(Optional) Core dump context information to be displayed based on the occurrence of the core dump. Valid values are 1 to 10.
clear
(Optional) Clears the current context information.
location {
node-id
| all}
Displays core dump information that occurred on the designated node. The node-id argument is expressed in the rack/slot/module notation. The all keyword specifies to display information for all nodes.
Command Default
If no coredump-occurrence value is specified, core dump context information for all core dumps is displayed.
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the show context command to display core dump context information. This command displays context information for the last ten core dumps. Cisco Technical Support Center engineers and development engineers use this command for post-analysis in the debugging of processes.
Use the clear context command to clear core dump context information.
Task ID
Task ID
Operations
diag
read
Examples
The following example shows sample output from the show context command:
RP/0/RSP0/CPU0:router# show context
Crashed pid = 20502 (pkg/bin/mbi-hello)
Crash time: Thu Mar 25, 2004: 19:34:14
Core for process at disk0:/mbi-hello.20040325-193414.node0_RP0_CPU0
Stack Trace
#0 0xfc117c9c
#1 0xfc104348
#2 0xfc104154
#3 0xfc107578
#4 0xfc107734
#5 0x482009e4
Registers info
r0 r1 r2 r3
R0 0000000e 481ffa80 4820c0b8 00000003
r4 r5 r6 r7
R4 481ffb18 00000001 481ffa88 48200434
r8 r9 r10 r11
R8 00000000 00000001 00000000 fc17ac58
r12 r13 r14 r15
R12 481ffb08 4820c080 481ffc10 00000001
r16 r17 r18 r19
R16 481ffc24 481ffc2c 481ffcb4 00000000
r20 r21 r22 r23
R20 00398020 00000000 481ffb6c 4820a484
r24 r25 r26 r27
R24 00000000 00000001 4820efe0 481ffb88
r28 r29 r30 r31
R28 00000001 481ffb18 4820ef08 00000001
cnt lr msr pc
R32 fc168d58 fc104348 0000d932 fc117c9c
cnd xer
R36 24000022 00000004
DLL Info
DLL path Text addr. Text size Data addr. Data size Version
/pkg/lib/libinfra.dll 0xfc0f6000 0x00032698 0xfc0f5268 0x00000cb4
The following example shows sample output from the show context command. The output displays information about a core dump from a process that has not crashed.
RP/0/RSP0/CPU0:router# show context
node: node0_RP0_CPU0
------------------------------------------------------------------
Crashed pid = 28703 (pkg/bin/packet)
Crash time: Tue Sep 21, 2004: 02:48:00
Core for process at harddisk:/packet.by.dumper_gen.20040921-024800.node0_RP0_CPU0.ppc.Z
Table 1
describes the significant fields shown in the display.
Table 6
show context Field Descriptions
Field
Description
Crashed pid
Process ID (PID) of the crashed process followed by the executable path.
Crash time
Time and date the crash occurred.
Core for process at
File path to the core dump file.
Stack Trace
Stack trace information.
Registers Info
Register information related to crashed threads.
DLL Info
Dynamically loadable library (DLL) information used to decode the stack trace.
(Optional) Displays DLL information for the specified job identifier.
virtual
(Optional) Displays the virtual path of DLLs. The virtual path is expressed in the /pkg/lib/library-name.dll format where the library name is the name of the DLL followed by the .dll suffix.
symbol
(Optional) Displays the symbol at the virtual address specified for the virtual-address argument.
addressvirtual-address
(Optional) Displays the DLL that is mapped at the virtual address specified for the virtual-address argument.
dllnamedll-virtual-path
(Optional) Displays the process IDs (PIDs) of the process that have downloaded the DLL specified for the dll-virtual-path argument.
memory
(Optional) Displays a summary of DLL memory usage.
locationnode-id
(Optional) Displays DLLs for the specified node. The node-id argument is expressed in the rack/slot/module notation.
Command Default
No default behavior or values
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
basic-services
read
Examples
The following example shows sample output from the show dll command. In this example, the output displays all the DLLs loaded on the router.
Table 2
describes the significant fields shown in the display.
Table 8
show dll dllname Field Descriptions
Field
Description
PID:
Process ID of the process.
Refcount
Number of references to the DLL by the process.
The following example shows sample show dll output from the command with the optional memory keyword:
RP/0/RSP0/CPU0:router# show dll memory
----------------------------------------------------------------------------
Total DLL Text - 14778896 bytes Total DLL Data - 12688500 bytes
Total DLL Memory - 27467396 bytes
show exception
To display the configured core dump settings, use the showexception command in administration EXEC mode or in EXEC mode.
(Optional) Specifies the process for which to display the information.
locationnode-id
(Optional) Displays configured settings for a specified node. The node-id argument is expressed in the rack/slot/module notation.
Command Default
None
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Release 3.9.0
Support for the core-options keyword was added.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the showexception command to display the configured core dump settings. The output from this command displays the core dump settings configured with the following commands:
The following example shows sample output from the show exception command with the location keyword. All processes for the specified node are displayed.
RP/0/RSP0/CPU0:router# show excep core-options location 0/rp0/cpu0
Mon Nov 30 01:31:31.391 PST
Process
Options
attach_server:
TEXT SHAREDMEM MAINMEM
attachd:
TEXT SHAREDMEM MAINMEM
ksh-aux:
TEXT SHAREDMEM MAINMEM
bcm_logger:
TEXT SHAREDMEM MAINMEM
devf-scrp:
TEXT SHAREDMEM MAINMEM
bfm_server:
TEXT SHAREDMEM MAINMEM
ksh:
TEXT SHAREDMEM MAINMEM
dllmgr:
COPY
dumper:
TEXT SHAREDMEM MAINMEM
eth_server:
COPY SPARSE
inflator:
TEXT SHAREDMEM MAINMEM
insthelper:
TEXT SHAREDMEM MAINMEM
mbi-hello:
TEXT SHAREDMEM MAINMEM
cat:
TEXT SHAREDMEM MAINMEM
mq:
COPY
mqueue:
TEXT SHAREDMEM MAINMEM
nname:
TEXT SHAREDMEM MAINMEM
nvram:
TEXT SHAREDMEM MAINMEM
--More--
The following example shows sample output from the showexception command for a specific process:
RP/0/RSP0/CPU0:router# show excep core-options process upgrade_daemon location 0/6/cpu0
Mon Nov 30 01:32:20.207 PST
Process
Options
upgrade_daemon:
TEXT SHAREDMEM MAINMEM
To display the available physical memory and memory usage information of processes on the router, use the show memory command in administration EXEC mode or in EXEC mode.
(Optional) Job ID associated with a process instance. Specifying a job ID for the job-id argument displays the memory available and memory usage information for only the process associated with the specified job ID. If the job-id argument is not specified, this command displays information for all running processes.
summary
(Optional) Displays a summary of the physical memory and memory usage information.
bytes
(Optional) Displays numbers in bytes for an exact count.
detail
(Optional) Displays numbers in the format “nnn.dddM” for more detail.
locationnode-id
Displays the available physical memory from the designated node. The node-id argument is entered in the rack/slot/module notation.
Command Default
No default behavior or values
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
To display detailed memory information for the entire router, enter the show memory command without any parameters.
Task ID
Task ID
Operations
basic-services
read
Examples
This example shows partial sample output from the show memory command entered without keywords or arguments. This command displays details for the entire router.
RP/0/RSP0/CPU0:router# show memory
Physical Memory:2048M total
Application Memory :1802M (1636M available)
Image:116M (bootram:116M)
Reserved:128M, IOMem:0, flashfsys:0
Total shared window:0
kernel:jid 1
Address Bytes What
0008f000 12288 Program Stack
000b2000 12288 Program Stack
Total Allocated Memory:0
Total Shared Memory:0
sbin/devc-pty:jid 68
Address Bytes What
4817f000 4096 Program Stack (pages not allocated)
48180000 516096 Program Stack (pages not allocated)
481fe000 8192 Program Stack
48200000 28672 Physical Mapped Memory
48207000 4096 ANON FIXED ELF SYSRAM
48208000 4096 ANON FIXED ELF SYSRAM
This example shows sample output from the show memory command entered with the job ID 7 to show the memory usage information for the process associated with this job identifier:
RP/0/RSP0/CPU0:router# show memory 7
Physical Memory: 256M total
Application Memory : 249M (217M available)
Image: 2M (bootram: 2M)
Reserved: 4M, IOMem: 0, flashfsys: 0
sbin/pipe: jid 7
Address Bytes What
07f7c000 126976 Program Stack (pages not allocated)
07f9b000 4096 Program Stack
07f9d000 126976 Program Stack (pages not allocated)
07fbc000 4096 Program Stack
07fbe000 126976 Program Stack (pages not allocated)
07fdd000 4096 Program Stack
07fdf000 126976 Program Stack (pages not allocated)
07ffe000 4096 Program Stack
08000000 122880 Program Stack (pages not allocated)
0801e000 8192 Program Stack
08020000 12288 Physical Mapped Memory
08023000 4096 Program Text or Data
08024000 4096 Program Text or Data
08025000 16384 Allocated Memory
08029000 16384 Allocated Memory
7c001000 319488 DLL Text libc.dll
7e000000 8192 DLL Data libc.dll
This example shows how to display a detailed summary of memory information for the router:
To display details about heap memory usage for all processes on the router at different moments in time and compare the results, use the showmemorycompare command in administration EXEC mode or in EXEC mode.
showmemorycompare
{ start | end | report }
Syntax Description
start
Takes the initial snapshot of heap memory usage for all processes on the router and sends the report to a temporary file named /tmp/memcmp_start.out.
end
Takes the second snapshot of heap memory usage for all processes on the router and sends the report to a temporary file named /tmp/memcmp_end.out. This snapshot is compared with the initial snapshot when displaying the heap memory usage comparison report.
report
Displays the heap memory comparison report, comparing heap memory usage between the two snapshots of heap memory usage.
Command Default
No default behavior or values
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the showmemorycompare command to display details about the heap memory usage of all processes on the router at different moments in time and compare the results. This command is useful for detecting patterns of memory usage during events such as restarting processes or configuring interfaces.
Use the following steps to create and compare memory snapshots:
Enter the showmemorycompare command with the start keyword to take the initial snapshot of heap memory usage for all processes on the router.
Note
The snapshot is similar to that resulting from entry of the show memory heap command with the optional summary keyword.
Perform the test you want to analyze.
Enter the showmemorycompare command with the end keyword to take the snapshot of heap memory usage to be compared with the initial snapshot.
Enter the showmemorycompare command with the report keyword to display the heap memory usage comparison report.
Task ID
Task ID
Operations
basic-services
read
Examples
This example shows sample output from the showmemorycompare command with the
report keyword:
To display information about the heap space for a process, use the show memory heap command in administration EXEC mode or in EXEC mode.
showmemoryheap [allocated] [dllname] [failure] [free]
{ jobid | all }
Syntax Description
allocated
(Optional) Displays a list of all allocated heap blocks.
dllname
(Optional) Displays heaps with dynamic link library (DLL) names.
failure
(Optional) Displays a summary of heap failures.
free
(Optional) Displays a list of all free heap blocks.
summary
(Optional) Displays a summary of the information about the heap space.
job-id
Job ID associated with the process instance.
all
(Optional) Displays information about the heap space for all processes. The all keyword is only available when the failure or summary keywords are used.
Command Default
No default behavior or values
Command Modes
Administration EXEC
EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
basic-services
read
Examples
This example shows sample output from the show memory heap command, specifying a job ID for the job-id argument:
Job identifier for which information for only the process instance associated with the job-id argument is displayed.
process-name
Process name for which all simultaneously running instances are displayed, if applicable.
aborts
Displays process abort information.
all
Displays summary process information for all processes.
blocked
Displays details about reply, send, and mutex blocked processes.
boot
Displays process boot information.
cpu
Displays CPU usage for each process.
distribution
Displays the distribution of processes.
dynamic
Displays process data for dynamically created processes.
failover
Displays process switchover information.
family
Displays the process session and family information.
files
Displays information about open files and open communication channels.
locationnode-id
Displays information about the active processes from a designated node. The node-id argument is entered in the rack/slot/module notation.
log
Displays process log.
mandatory
Displays process data for mandatory processes.
memory
Displays information about the text, data, and stack usage for processes.
pidin
Displays all processes using the QNX command.
searchpath
Displays the search path.
signal
Displays the signal options for blocked, pending, ignored, and queued signals.
startup
Displays process data for processes created at startup.
threadname
Displays thread names.
detail
(Optional) Displays more detail. This option is available only with the process-name argument.
run
(Optional) Displays information for only running processes. This option is available only with the process-name argument.
Command Default
No default behavior or values
Command Modes
EXEC
Administration EXEC
Command History
Release
Modification
Release 3.7.2
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the show processes command to display general information about the active processes. To display more detailed information for a process, specify a job ID or process for the job-id argument or process-name argument, respectively.
You can also use the monitor processes command to determine the top processes and threads based on CPU usage.
Task ID
Task ID
Operations
basic-services
read
Examples
The show processes command with the
process-name argument displays detailed information about a process:
Job ID. This field remains constant over process restarts.
PID
Process ID. This field changes when process is restarted.
Executable path
Path for the process executable.
Instance
There may be more than one instance of a process running at a given time (each instance may have more than one thread).
Version ID
API version.
Respawn
ON or OFF. The field indicates if this process restarts automatically in case of failure.
Respawn count
Number of times this process has been started or restarted (that is, the first start makes this count 1).
Max. spawns per minute
Number of respawns not to be exceeded in 1 minute. If this number is exceeded, the process stops restarting.
Last started
Date and time the process was last started.
Process state
Current state of the process.
Started on config
Configuration command that started (or would start) this process.
core
Memory segments to include in core file.
Max. core
Number of times to dump a core file. 0 = infinity.
The show processes command with the memory keyword displays details of memory usage for a given process or for all processes, as shown in the following example:
Size of data region (initialized and uninitialized variables).
Stack
Size of process stack.
Dynamic
Size of dynamically allocated memory.
Process
Process name.
The show processes command with the all keyword displays summary information for all processes, as shown in the following example:
RP/0/RSP0/CPU0:router# show processes all
JID LAST STARTED STATE RE- PLACE- MANDA- MAINT- NAME(IID) ARGS
START MENT TORY MODE
-------------------------------------------------------------------------------------
82 03/16/2007 14:54:52.488 Run 1 M Y wd-mbi(1)
58 03/16/2007 14:54:52.488 Run 1 M Y dllmgr(1)-r 60 -u 30
74 03/16/2007 14:54:52.488 Run 1 M Y pkgfs(1)
57 03/16/2007 14:54:52.488 Run 1 Y devc-conaux(1) -h -d
librs232.dll -m
libconaux.dll -u
libst16550.dll
76 03/16/2007 14:54:52.488 Run 1 Y devc-pty(1) -n 32
56 Not configured None 0 Y clock_chip(1) -r -b
--More--
Table 15
show processes all Field Description
Field
Description
JID
Job ID.
Last Started
Date when the process was last started.
State
State of the process.
Restart
Number of times the process has restarted since the node was booted. If a node is reloaded, the restart count for all processes is reset. Normally, this value is 1, because usually processes do not restart. However, if you restart a process using the process restart command, the restart count for the process increases by one.
Placement
Indicates whether the process is a placeable process or not. Most processes are not placeable, so the value is blank. ISIS, OSPF, and BGP are examples of placeable processes.
Mandatory
M indicates that the process is mandatory. A mandatory process must be running. If a mandatory process cannot be started (for example, sysmgr starts it but it keeps crashing), after five attempts the sysmgr causes the node to reload in an attempt to correct the problem. A node cannot function properly if a mandatory process is not running.
Maint Mode
Indicates processes that should be running when a node is in maintenance mode. Maintenance mode is intended to run as few processes as possible to perform diagnostics on a card when a problem is suspected. However, even the diagnostics require some services running.
Name (IID)
Name of the process followed by the instance ID. A process can have multiple instances running, so the IID is the instance ID.