Process and Memory Management Commands on Cisco IOS XR Software

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 IOS XR Getting Started Guide.

affinity location-set

To set the affinity of a placement program (process) to or from a group of nodes, use the affinity location-set command in placement program configuration mode. To remove the affinity location set, use the no form of this command.

Syntax Description

The node-id argument is expressed in the rack/slot/module notation. To specify multiple nodes, enter the node-id for each node. You can specify a node pair, or up to 5 nodes.

attract

Specifies a positive affinity.

repulse

Specifies a negative affinity.

strength

A positive or negative strength. The range is from 1 to 100000 points.

default

Sets the affinity location-set default value.

none

Sets the affinity value to zero points.

Defaults

The affinity location set value is 200 points.

Command Modes

Placement program configuration

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The affinity location-set command assigns an affinity for a process to run on a specific node, node pair or set of up to 5 nodes.

A node pair is either an active and standby pair of nodes [hosted on route processors (RPs) or distributed RPs], or a single active node on an RP or DRP that does not have a standby.

You can use this command to override the placement process logic for determining optimal placement for processes. It forces a process to remain in or away from a location on the router regardless of what might occur in the system. This command also makes the configuration more specific to a router and less general.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example shows how to configure placement affinity for the OSPF process class on the node pair:

Related Commands

Assigns a process or group of processes to an RP, and enters placement program configuration mode to set process affinities (preferences).

affinity location-type

To set the affinity of a placement program (process) to or from a location type, use the affinity location-set command in placement program configuration mode. To remove the affinity of a location set, use the no form of this command.

A positive or negative strength. The range is from 1 to 100000 points.

default

Sets the affinity location-type default values.

none

Sets the affinity value to zero points.

Defaults

The process does not move automatically (current value = 100).

The value of paired affinity is 20.

Command Modes

Placement program configuration

Command History

Release

Modification

Release 3.2.50

This command was introduced on the Cisco CRS-1.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The affinity location-type command is used to a place process at a particular location. The default policy is that the location type be a node pair (active and standby nodes), and that the process does not move automatically (current = 100) unless a solo node fails and the process must be started on a different node.

You can configure the placement policy to allow certain processes to stay where they are (current) or move just by indicating so through the various affinity choices. The higher the positive value of an affinity, the stronger the requirement that the process run at a location, and so on. A low or zero point value would indicate a weaker requirement (or no preference) that a process run at a location.

The affinity location type with the paired option configures the affinity towards the nodes that are paired (active and standby nodes), and as mentioned earlier, this is the default policy. The affinity location type using the primary option configures the affinity towards the designated Logical Router System Controller (dLRSC) node.

Note Change the current affinity with assistance from Cisco support personnel.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

This example shows how to place Border Gateway Protocol (BGP) in a specific location by setting it with a high attract value. The result is that BGP does not move location under any circumstances other than a node pair removal.

Related Commands

Assigns a process or group of processes to an RP, and enters placement program configuration mode to set process affinities (preferences).

affinity program

To set the affinity of a placement program (process) to or from another program, use the affinity program command in placement program configuration mode. To remove the affinity of a program, use the no form of this command.

Defaults

The affinity program default is initially set in by the system placement files.

Command Modes

Placement program configuration

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The affinity program command is used to collocate processes or keep them apart. You would want to use this command because you have learned that certain processes perform better when they are running together on the same node (attract)—or on different nodes, apart from each other (repulse).

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example shows how to keep IPv4 and IPv6 Routing Information Bases (RIBs) apart:

Related Commands

Assigns a process or group of processes to an RPs, and enters placement program configuration mode to set process affinities (preferences).

affinity self

To set the affinity of a placement program (process) to or from one of its own instances, use the affinity self command in placement program configuration mode. To remove the affinity self setting, use the no form of this command.

Syntax Description

A positive or negative strength. The range is from 1 to 100000 points.

default

Sets the affinity value to the default.

none

Sets the affinity value to zero points.

Defaults

The affinity self default is initially set in system placement files.

Command Modes

Placement program configuration

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The affinity self command is used to adjust placement decisions when multiple instances of a process are started. An attract (positive) affinity indicates a preference to have all instances of a process run on the same node, while a repulse (negative) affinity indicates a preference to have each instance of a process run on different nodes.

Typically, you would want to monitor how a process on your system best performs, and whether instances of the same class should be collocated or not.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example shows how to configure BGP speakers to run on different nodes:

Related Commands

Assigns a process or group of processes to an RP, and enters placement program configuration mode to set process affinities (preferences).

clear context

To clear core dump context information, use the clearcontext command in Administration EXEC mode or in EXEC mode.

clearcontext [locationnode-id | location all]

Syntax Description

locationnode-id

(Optional) Clears core dump context information for a specified node. The node-id argument is expressed in the rack/slot/module notation.

locationall

(Optional) Clears core dump context information for all nodes.

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the clear context command to clear core dump context information. If you do not specify a node with the location keyword and node-id argument, this command clears core dump context information for all nodes.

Use the show context 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:

Related Commands

dumpcore

To manually generate a core dump, use the dumpcore command in Administration EXEC mode or in EXEC mode.

dumpcore {running | suspended} job-id [locationnode-id]

Syntax Description

running

Generates a core dump for a running process.

suspended

Suspends a process, generates a core dump for the process, and resumes the process.

job-id

Process instance identifier.

locationnode-id

(Optional) 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 Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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.

On 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. Because 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:

exception dump-tftp-route

To configure the TFTP server on the route processor (RP) to receive kernel core dumps from modular service cards (MSCs) or service processors (SPs), use the exceptiondump-tftp-route command in Administration configuration mode or in global configuration mode. To remove the configuration, use the no form of this command.

Command History

The command syntax was corrected to make the keyword and argument locationnode-id optional.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the exception dump-tftp-route command to configure the TFTP server on the RP to receive kernel core dumps from MSCs and SPs. Once the TFTP server is configured, use the exception kernel memorycommand to define the filename for the core dump, the type of memory to collect, and the destination (local or remote) where kernel core dumps will be stored.

Command modes in the Cisco CRS-1

On a Cisco CRS-1 router, the exceptiondump-tftp-route command can be run from either global configuration mode or Administration configuration mode.

•To configure the TFTP server on the RP to receive kernel core dumps from MSCs, issue this command from global configuration mode.

•To configure the TFTP server on the RP to receive kernel core dumps from SPs, issue this command from Administration configuration mode.

•Issue the command from both global configuration and Administration configuration mode to gather kernel core dumps from all nodes.

Command modes in the Cisco XR 12000 Series Router

On Cisco XR 12000 Series Routers, the exceptiondump-tftp-route command can only be run from global configuration mode. This configures the TFTP server on the RP to receive kernel core dumps from MSCs.

Note SPs are not supported on the Cisco XR 12000 Series Router. In effect, configuring the TFTP server on the RP to receive kernel core dumps from MSCs gathers kernel core dumps from all nodes.

Task ID

Task ID

Operations

diag

read, write

Examples

In the following example, the exception kernel memory command is used to enable the collection of kernal core dumps, and the hard disk as the destination for kernel core dumps. The exception dump-tftp-route command is then used to configure the TFTP server on the RP to receive kernel core dumps from MSCs and SPs. This example is for a Cisco CRS-1 router.

Syntax Description

choice preference

(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 in the "Usage Guidelines" section 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

The 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.

Defaults

If you do not specify the order of preference for the destination of core dump files using the choice keyword and preference argument, the default preference is the primary location (that is, choice1). Core dump files are sent compressed.

The default filenaming convention used for core dump files is described in the "Usage Guidelines" section. See Table 1.

Command Modes

Administration configurationGlobal configuration

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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 files, 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 on the Cisco CRS-1.

In addition to the three preferred destinations that can be configured, the Cisco IOS XR software provides three default fallback destinations for core dump files in the event that user-defined locations are unavailable.

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 The 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, the 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 will contain the .Z suffix.

You can modify the default naming convention by specifying a filename to be appended to core dump files with the optional filename keyword and filename 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 keyword has been reached. When the configured 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.

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.

exception kernel memory

To enable the collection of kernel core dumps and specify kernel core dump settings, use the exceptionkernalmemory command in Administration configuration mode or in global configuration mode. To remove the configuration, use the no form of this command.

Command History

Corrections made to the command syntax. The name of this command was changed from exception kernel filepath to exception kernel memory.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The exception kernel memory command is used with the exception dump-tftp-route command. The exception dump-tftp-route command configures the TFTP server on the route processor (RP) to receive kernel core dumps from modular service cards (MSCs) or service processors (SPs). The exception kernel memory command specifies the core dump settings, including the following:

•The type of kernel collected in kernel core dump files.

•(Optional) The filename of the kernel core dump files.

•The destination for kernel core dump files.

Command modes in the Cisco CRS-1

On a Cisco CRS-1 router, the exceptionkernelmemory command can be issued from global configuration mode or Administration configuration mode:

•Issuing this command from global configuration mode enables the collection of kernel core dumps for MSCs.

•Issuing this command from Administration configuration mode enables the collection of kernel core dumps for SPs.

•Enabling this command in both global configuration mode and Administration configuration mode ensures the collection of all kernel dumps.

Command modes in the Cisco XR 12000 Series Router

On Cisco XR 12000 Series Routers, the exceptionkernelmemory command can only be run from global configuration mode. This enables the collection of kernel core dumps for MSCs.

Note SPs are not supported on the Cisco XR 12000 Series Router. In effect, enabling core dumps from MSCs enables core dumps for all nodes.

Kernel core dump filename

By default, the filename "kernel_core" is appended to kernel core dumps. To modify the filename appended to kernel core dump files, use the filename keyword and filename argument.

Filepath for core dump files

There is no default destination for kernel core dump files. You must specify a destination by using the filepath keyword and filepath argument. You can specify an absolute file path on a local file system or on a network server.

Cisco CRS-1 supported devices and protocols

The following storage devices are supported on the Cisco CRS-1:

•bootflash:

•disk0:

•disk1:

•harddisk:

The following network protocols are supported on the Cisco CRS-1:

•TFTP

•FTP

Cisco XR 12000 Series Router supported devices and protocols

On the Cisco XR 12000 Series Router, bootflash: is the supported storage device and TFTP is the supported network protocol.

Task ID

Task ID

Operations

diag

read, write

Examples

The following example shows how to enable the collection of kernal core dumps and specify the hard disk as the destination for kernel core dumps:

Related Commands

exception pakmem

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.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the exception pakmem on command 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:

exception sparse

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

Defaults

Sparse core dumps are disabled.

Command Modes

Administration configurationGlobal configuration

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the exception sparse command to reduce the amount of data generated in the core dump file. Sparse core dumps, thus, 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:

Pages referenced from the top 512 bytes of the stack of any thread, the stack of a crashed threads, and register information of threads from the data section of a process and from the section of the DLL that contains the function that caused the crash to occur.

exception sprsize

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).

Defaults

megabytes: 192 MB

Command Modes

Administration configurationGlobal configuration

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the exception sprsize 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:

Defaults

Entering the follow command without any optional keywords or arguments performs the operation for 5 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.2

This command was introduced on the Cisco CRS-1 and the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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:

Related Commands

monitor processes

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.

Defaults

If you omit all keywords, the 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 monitor processes command by entering the q key.

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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 2.

•To terminate the display and return to the system prompt, enter the q key.

Related Commands

monitor threads

To display auto-updating statistics on threads in a full-screen mode, use the monitor threads command in Administration EXEC mode or in EXEC mode.

monitorthreads [dumbtty] [iterationnumber] [locationnode-id]

Syntax Description

dumbtty

(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.

Defaults

When all keywords are omitted, the 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 monitorthreads command.

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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 4.

•To terminate the display and return to the system prompt, enter the q key.

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 is sample output from the monitor threads command showing the use of the interactive command n after the first display cycle to change the number of threads:

RP/0/RP0/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:

Related Commands

placement memory

To set the process memory threshold, use the placement memory command in global configuration or Administration configuration mode. To return the settings to the default value, use the no form of this command.

placement memory {maximum | threshold} value

no placement memory

Syntax Description

maximum

Defines the maximum memory load level. The value is 10% to 2000%. The default value is 200%.

threshold

Defines the memory load level to trigger migration. The value is 10% to 400%. The default value is 80%.

value

Percent memory load value

Defaults

The maximum value is 200%.

The threshold value is 80%.

Command Modes

Administration configuration

Global configuration

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Routers.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the placement memory command with the maximumvalue keyword and argument to set the maximum percentage of memory that can be used on a node (based on the estimated memory usage of the processes). For example:

•The command placement memorymaximum100sets the maximum memory usage on nodes to 100 percent. If a node has 2 GB of available memory, then only 2 GB of processes can be placed on the node (estimated memory usage). This means that oversubscription is not allowed.

•The command placement memorymaximum50 sets the maximum memory usage on nodes to 50 percent, so that placeable processes can use only half the memory on the node.

•The command placement memorymaximum200 would allow the system to attempt to run more than the available memory on a node.

Use the placement memory command with the thresholdvalue keyword and argument to set the preferred percentage of memory use for each node. The system attempts to balance all nodes at or below the threshold memory percentage. In other words, the system does not place a process on a node that has exceeded the threshold value, unless all other nodes have also reached their thresholds (or unless some other large affinity overrides this consideration).

Use the show placementpolicyglobal command to display the current settings:

RP/0/RP0/CPU0:router#show placement policy global

Per-location placement policy parameters

----------------------------------------

Memory preferred threshold: 80%

Memory maximum threshold: 200%

Threshold satisfaction affinity points: 50

Task ID

Task ID

Operations

sysmgr

read, write

Examples

In the following example, the maximum memory threshold is set to 80 percent:

RP/0/RP0/CPU0:router(config)# placement memory maximum 80

Related Commands

placement program

To assign a process or group of processes to a route processor (RP), and enter placement program configuration mode to set process affinities (preferences), use the placement program command in global configuration mode. To remove the assigned process placement, use the no form of this command.

Syntax Description

Specifies a program name that uniquely identifies a placement process. The process name is any alphanumeric string no longer than 40 characters.

default

Specifies all processes instead of a specific process instance.

slow-migration-interval

Sets the slow migration interval for the program.

seconds

Specifies the time interval from 0 to 3600 seconds.

Defaults

No default behavior or values.

Command Modes

Global configuration

Command History

Release

Modification

Release 3.3.0

This command was supported on the Cisco CRS-1 and the Cisco XR 12000 Series Router.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The placement program command allows you to change the placement policy for any placeable process, such as Open Shortest Path First (OSPF) and Border Gateway Protocol (BGP).

Placement policy consists of two types: resource consumption and affinities. Resource consumption involves CPU and memory usage and is a "hard" resource requirement. Affinities are preferences, and are considered "soft" requirements for a placement policy. Only affinities can be configured by the operator.

The placement program command handles configuration for these affinity types:

•affinity location set

•affinity location type

•affinity program

•affinity self

•affinity existence

To obtain a list of running placeable processes and placement policy parameters on your router system, use the show placement policy command.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example enters placement program configuration mode to set all Protocol Independent Multicast (PIM) processes on the node pair that it had already started on so PIM will not move automatically when system conditions change:

placement reoptimize

To reoptimize the placement of processes on a system, use the placement command in EXEC mode.

placementreoptimize

Syntax Description

reoptimize

Reoptimize the placement among the available RP and DRP nodes in a logical router (LR).

Defaults

The default is to reoptimize process placement for all processes.

Command Modes

EXEC

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Routers.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the placementreoptimize command to reoptimize the placement of running proccesses on the available RP and DRP nodes. The processed are redistributed to the available nodes based on memory usage and other calculations. This placementreoptimize command first displays the predicted results of the reoptimization before running the command. You can accept the changes and run the command, or cancel the procedure without impacting the router.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example is for the placementreoptimize command. The predicted changes are displayed, showing the current location of the process and the new location of the process. The user can then decide to continue the operation or abort the reoptimization.

RP/0/RP0/CPU0:router# placement reoptimize

Predicted changes to the placement:

bpm 0/RP0/CPU0 (0/RP1/CPU0) --> 0/2/CPU0 (0/3/CPU0)

bgp instance 0 0/RP0/CPU0 (0/RP1/CPU0) --> 0/2/CPU0 (0/3/CPU0)

ipv4_rib 0/RP0/CPU0 (0/RP1/CPU0) --> 0/2/CPU0 (0/3/CPU0)

ipv4_arm 0/RP0/CPU0 (0/RP1/CPU0) --> 0/2/CPU0 (0/3/CPU0)

rcp_fs 0/RP0/CPU0 (0/RP1/CPU0) --> 0/2/CPU0 (0/3/CPU0)

Continue? [yes/no] yes

RP/0/RP0/CPU0:router#

RP/0/RP0/CPU0:Nov 12 1:1:1.1 : placed[170]: %PLACED_PLACE-6-

REOP_START: Re-optimization of the placement requested. You will be notified on
completion.

Syntax Description

Collects debug information. The node will be restarted if the mandatory reboot flag is set.

crash

Crashes a process.

restart

Restarts a process.

shutdown

Stops a process. The process will not be restarted (even if considered "mandatory").

start

Starts a process.

executable-name

(Optional) 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

(Optional) 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.

locationnode-id

(Optional) Starts, terminates, or restarts a process on the designated node. The node-id argument is entered in the rack/slot/module notation.

location all

(Optional) Starts, terminates, or restarts a process on all nodes.

Defaults

No default behavior or values

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

The shutdown keyword was introduced to replace the kill keyword.

Support for the crash keyword was added to crash a process.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Under normal circumstances, processes are started and restarted automatically by the operating system as required. If a process crashes, it will be 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 Assistance Center (TAC) 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 failover, system failure or both. This command is intended for use only under the direct supervision of a Cisco TAC 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 will be started simultaneously.

process blocked

This command is used by CiscoTAC engineers to collect debug information about a process. If the process mandatory command is set for a process, the process blocked command will also cause the node to restart.

Task ID

Task ID

Operations

root-lr

execute

Examples

The following example shows how to restart a process. In this example, the ISIS process is restarted:

Syntax Description

executable-name

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 IO 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

(Optional) Sets the core dump options for a process on a designated node. The node-id argument is entered in the rack/slot/module notation.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Specifying a executable name for the executable-name argument changes the core dump option for all instances of the process. Specifying a job ID for the job-id 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/RP0/CPU0:router# process ospf core sharedmem

The following example shows how to turn off core dumping for a process:

Syntax Description

Turns off the mandatory process attribute. The process will not be 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 a 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

(Optional) Sets the mandatory settings for a process on a designated node. The node-id argument is entered in the 8i

notation.

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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/RP0/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.

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.

Related Commands

show context

To display core dump context information, use the showcontext command in Administration EXEC mode or in EXEC mode.

show context [coredump-occurrence | all] [location {node-id | all}]

Syntax Description

coredump-occurrence

(Optional) Core dump context information to be displayed based on the occurrence of the core dump. Valid values are 1 to 10.

For example, entering a value of 1 for the coredump-occurrence argument displays core dump context information for the most recent core dump, while entering a value of 2 for the coredump-occurrence argument displays information for the second most recent core dump. This command stores context information for the last 10 core dumps.

all

(Optional) Displays core dump information for all core dumps.

location {node-id | all}

(Optional) Displays core dump information that occurred on the designated node. The node-id argument is expressed in the rack/slot/module notation.

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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.

Syntax Description

(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.

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.

symboladdressvirtual-address

(Optional) Displays the symbol at the virtual address specified for the virtual-address argument.

locationnode-id

(Optional) Displays DLLs for the specified node. The node-id argument is expressed in the rack/slot/module notation.

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID

Task ID

Operations

basic-services

read

Examples

The following is sample output from the show dll command. In this example, the output displays all the DLLs loaded on the router:

show exception

To display the configured core dump settings, use the showexception command in Administration EXEC mode or in EXEC mode.

showexception

Syntax Description

This command has no arguments or keywords.

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the show exception command to display the configured core dump settings. The output from this command displays the core dump settings configured with the following commands:

show memory

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.

showmemory [job-id | locationnode-id | summary]

Syntax Description

job-id

(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.

locationnode-id

(Optional) Displays the available physical memory from the designated node. The node-id argument is entered in the rack/slot/module notation.

summary

(Optional) Displays a summary of the physical memory and memory usage information.

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

To display detailed memory information for the entire router, enter the show memorycommand without any parameters.

Task ID

Task ID

Operations

basic-services

read

Examples

The following is partial sample output from the show memory command entered without keywords or arguments. This command displays details for the entire router.

RP/0/RP0/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

The following is 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:

Related Commands

show memory compare

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.

Command Modes

Command History

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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:

Step 1 Enter the show memory compare start command 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.

Step 2 Perform the test you want to analyze.

Step 3 Enter the show memory compare end command to take the snapshot of heap memory usage to be compared with the initial snapshot.

(Optional) Displays a summary of the information about the heap space.

all

Displays a summary of the information about the heap space for all processes.

Defaults

No default behavior or values

Command Modes

Administration EXECEXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in Administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID

Task ID

Operations

basic-services

read

Examples

The following is sample output from the show memory heap command, specifying a job ID for the job-id argument:

Syntax Description

Specifies the location of the node whose memory usage information you want to display. The node-id is expressed in the rack/slot/module notation.

location all

Indicates that you want to display memory usage information for all nodes installed in the router.

job-id

(Optional) Identifies the job whose memory information you want to display. Replace job-id with a job identifier. Range is from 1 through 4294967295.

summary

(Optional) Displays summarized memory information. Enter the summary option, followed by one of following keywords:

•bytes

•detail

bytes

(Optional) Displays numbers in bytes for an exact count.

detail

(Optional) Displays numbers as nnn.dddM for more detail.

Defaults

No default behavior or values

Command Modes

Administration EXEC

EXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID

Task ID

Operations

basic-services

read

Examples

The following example shows how to display a detailed summary of memory information for a specific node:

Syntax Description

Note To display information in bytes for a specific node only, follow the bytes keyword with the optional locationnode-id argument.

detail

(Optional) Displays numbers as nnn.dddM for more detail.

Note To display detailed information for a specific node only, follow the detail keyword with the optional locationnode-id argument.

locationnode-id

(Optional) Specifies the location of the node whose memory usage information you want to display. The node-id is expressed in the rack/slot/module notation.

location all

(Optional) Indicates that you want to display memory usage information for all nodes installed in the router or SDR.

Defaults

No default behavior or values

Command Modes

Administration EXEC

EXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

To display the memory information for a specific SDR, use the show memory summarycommand in EXEC mode. To display memory information for the entire system, use the show memory summarycommand in Administration EXEC mode.

Task ID

Task ID

Operations

basic-services

read

Examples

The following example shows how to display a detailed summary of memory information for the router:

show placement location

To display all placeable processes by location, use the show placement location command in EXEC mode.

show placement location {node-id | all}

Syntax Description

node-id

The node-id argument is expressed in the rack/slot/module notation.

all

Displays all placement locations.

Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The show placement location command identifies the process placement locations, the operational state of the nodes, and the processes currently running on the nodes.

To display the node location and operational state for a program, use the show placement program command.

Task ID

Task ID

Operations

sysmgr

read

Examples

The following example shows all the nodes on the routing system and the placeable programs on those node locations:

Related Commands

show placement policy

To display placement policy parameters and programs, use the show placement policy command in EXEC mode.

show placement policy {global | program {program | all | default}}

Syntax Description

global

Displays system-wide placement policies.

program

Displays program placement policies.

program

A specific program or program group.

all

Displays all program placement policies.

default

Displays the default placement policies.

Command Modes

EXEC

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The show placement policy command displays placement policy items that influence program or process placement. The global option lists the per node threshold parameters, and the remaining options list the policy based on program.

If you configured the placement policy, the scope could be the default program, a given program, or even a particular program instance. Alternatively, the policy could be specified in a .placement file (entered by the system) with different levels of affinities. To view all this information, you can specify the program all option to display the source of each program, and the policy applied to the default program or the program that you configured to override it.

Task ID

Task ID

Operations

sysmgr

read

Examples

The following example shows how to display the global parameters for the placement policy:

Position in the hierarchy for the policy origination: default entity, process class, or specific instance.

Assumed mem

Memory usage value from configuration or program placement file; defaults to 1MB.

show placement program

To display the operational state for each placement program, use the show placement program command in EXEC mode.

show placement program {program | all}

Syntax Description

program

A specific program or program group.

all

Displays operational state for all placement programs.

Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The show placement program command displays information that identifies the process (or program) is running, where the process is located, locations where the process was rejected, and location where the process is waiting to start.

Task ID

Task ID

Operations

sysmgr

read

Examples

The following example shows that all placement programs are running on the node pair 0/RP0/CPU0 and 0/RP1/CPU0:

RP/0/RP0/CPU0:router# show placement program all

If a program is shown as having 'rejected locations' (i.e., locations on which

it cannot be placed), the locations in question can been seen using the "show

placement policy program" command.

If a program has been placed but not yet started, the amount of time elapsed

since the program was placed is shown in the 'waiting to start' field.

Parentheses around the node indicate that the node has not yet fully booted.

Related Commands

show placement reoptimize

To display the predicted changes to reoptimize the placement of processes, use the show placement reoptimize command in EXEC mode.

show placement reoptimize [program {program | all | default}]

Syntax Description

program

Displays changes for a particular program.

program

A specific program or program group.

all

Displays changes for all programs.

Defaults

The default is to display predicted changes for all for all RP and DRP nodes and processes.

Command Modes

EXEC

Command History

Release

Modification

Release 3.3.0

This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Routers.

Release 3.4.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the show placementreoptimize command to display the predicted changes that will occur when the placement reoptimizecommand is run.

Task ID

Task ID

Operations

sysmgr

read

Examples

The following example is of the show placement reoptimize command, entered without keywords or arguments.:

(Optional) Displays information about the active processes from a designated node. The node-id argument is entered in the rack/slot/module notation.

process-name

(Optional) Process name for which all simultaneously running instances are displayed, if applicable.

run

(Optional) Displays information for only running processes.

Command Default

If no keywords are specified, the threads of all processes running on the node are displayed.

Syntax Description

EXECAdministration EXEC

Command History

Release

Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router. The command was made available in administration EXEC mode.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Release 3.5.0

No modification.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the show processes command to display general information on 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.

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 for some reason a mandatory process can not be started (for example, sysmgr starts it but it keeps crashing), after 5 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.