Beruflich Dokumente
Kultur Dokumente
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 2
Agenda
Processes
Memory
System Monitoring
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 3
Process Management Terms
Process
An executable portion of code run within its own memory space
Thread
Sub-process managed by the parent process
Responsible for executing a portion of the overall process
A process may contain one or more threads
Only runs when the parent process is allocated runtime
Example - OSPF thread which handles hello receipt and
transmission, one per neighbor
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 4
Process Identification
Job ID (JID)
Assigned when process first run
Globally unique identifies the process
No change if process restarts
Process ID (PID)
Assigned when instance of process is created
Globally unique identifies the process
New PID assigned if process restarts
Thread ID (TID)
TID numbering restarts at 1 for each process
Name
Some commands allow process identification by name
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 5
show process command options
RP/0/RP0/CPU0:CRS#show processes ?
Reference process by job id
<0-4294967295> job id
WORD Name of the executable
aborts Show process aborts
all Show process data for all processes
blocked Show detail for reply/send/mutex blocked processes.
boot Show process boot info
cpu Show CPU use per process Display process on other nodes
distribution Show distribution of processes
dynamic Show process data for dynamically created processes
failover Show process failover info
family Show process family information.
files Show file and channel use per process
location location to display
log Show process log
mandatory Show process data for mandatory processes
memory Show memory use per process
pidin Show processes using QNX pidin command
searchpath Show the search path
signal Show signal use for processes.
startup Show process data for processes created at startup
threadname Show thread names.
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 6
show process command output
RP/0/RP0/CPU0:CRS#show process ospf
Job Id: 262 JID and PID
PID: 209102
Executable path: /disk0/hfr-rout-3.3.1/bin/ospf
Instance #: 1
Automatic restart?
Version ID: 00.00.0000
Respawn: ON
Respawn count: 1
Max. spawns per minute: 12
Last started: Thu Jul 20 15:39:20 2006
Process state: Run
Package state: Normal
Started on config: cfg/gl/ipv4-ospf/proc/1/ord_z/config
core: TEXT SHAREDMEM MAINMEM
Max. core: 0
Placement: ON
startup_path: /pkg/startup/ospf.startup
Ready: 13.338s Thread IDs
Available: 17.353s
Process cpu time: 2.702 user, 0.188 kernel, 2.890 total SNMP Process
JID TID Stack pri state HR:MM:SS:MSEC NAME contains 8 threads
which operate under
262 1 60K 10 Receive 0:00:02:0672 ospf JID 288
262 2 60K 10 Receive 0:00:00:0012 ospf
262 3 60K 10 Receive 0:00:00:0012 ospf
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 7
Monitoring Top Processes
Note: Remote execution & auto updating display
RP/0/RP0/CPU0:CRS#monitor processes location 0/2/CPU0
125 processes; 493 threads; 2201 channels, 3365 fds
CPU states: 93.1% idle, 5.8% user, 1.0% kernel
Memory: 2048M total, 1607M avail, page size 4K
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 9
Process Restart Example
RP/0/RP0/CPU0:CRS#show proc qnet
Job Id: 74 Initial respawn count shows
PID: 32795 process hasnt restarted
Executable path: /hfr-os-3.3.1/sbin/qnet
Instance #: 1
Args: transport=enet,conn_est_retries=3
Version ID: 00.00.0000
Respawn: ON Restart a few times
Respawn count: 1
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 10
Process Shutdown
RP/0/RP0/CPU0:CRS#process shut ospf
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 11
XR Processes Mini-lab
Try the process commands on your lab router
show process
process shutdown shut down and do not restart
Graceful termination
process start start a shut down process
process restart restart a process
Works if process is running or shutdown
Graceful termination
process crash simulate a crash
Process will restart automatically if Respawn=ON
Non-graceful termination
monitor process real time list
Sorted by memory or CPU usage
? to adjust parameters
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 12
System Monitoring and Online Help
Monitoring
show tech
show system verify
monitor interface
monitor controller
Online Help
describe
man
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 14
show tech variations
RP/0/RP0/CPU0:CRS#show tech ?
bcdl Output show commands of interest for bcdl debugging
cef Output show commands of interest for CEF debugging
file Specify a valid file name (e.g. disk0:tmp.log)
gsp Output show commands of interest for gsp debugging
lrd Output show commands of interest for lrd debugging
ospfv3 Output show commands for OSPFv3 debugging
password Include password in output
pfi Output show commands of interest for PFI debugging
placement Gather lots of information about process placement
platform show tech-support platform output
rib Show IP RIB related information
routing Routing show tech-support output
terminal Send output to terminal
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 15
Monitor One Interface
monitor interface command
RP/0/RP1/CPU0:CRS1# monitor interface mgmtEth 0/rp1/CPU0/0
CRS1 Monitor Time: 00:00:52 SysUptime: 16:33:16
MgmtEth0/RP1/CPU0/0 is up, line protocol is up Encapsulation ARPA
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 17
Online Help
Requires -doc package
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 18
Details about commands (permissions)
describe command
Component:
installmgr V[main/472] On the box installation program
Monitoring
show tech
show system verify
monitor interface
monitor controller
Online Help
describe
man
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 20
Verifying the System
SUMMARY STEPS
1. admin
9. show context
2. show platform [node-id]
10. show memory summary detail location all
3. show version
4. show running-config 11. show memory heap summary {job-id | all}
5. show logging 12. top processes
6. show environment 13. show running-config
7. show context 14. show system verify start
8. exit show system verify report
15. show {ipv4 | ipv6} interface brief
16. Show install active
XR Training / lwigley 2005 Cisco Systems, Inc. All rights reserved. Cisco Public 21
Presentation_ID
XR Training / lwigley
2004, Cisco Systems,
2005 Cisco Systems, Inc.
Inc. All
All rights
rights reserved.
reserved. Cisco Public 22 22