Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Restart a Junos OS Process

    Purpose

    Restart a Junos OS process when you need to recover from an error condition

    Note: Never restart any of the software processes unless instructed to do so by a customer support engineer.

    To restart a Junos OS process, follow these steps:

    1. Display Information About Software Processes
    2. Restart a Junos OS Process
    3. Check That the Process Has Restarted

    Display Information About Software Processes

    Purpose

    Display information about software processes to begin diagnosing an error condition.

    Action

    To display information about the software processes that are running on the router, use the following Junos OS CLI operational mode command:

    user@host> show system processes extensive

    Sample Output

    user@host>show system processes extensive
    last pid: 750; load averages: 0.00, 0.00, 0.00 up 0+00:58:50 18:34:17
    52 processes: 1 running, 51 sleeping
    Mem: 50M Active, 19M Inact, 38M Wired, 264K Cache, 86M Buf, 642M Free
    Swap: 768M Total, 768M Free 
    
    PID USERNAME PRI NICE  SIZE    RES STATE  TIME WCPU    CPU COMMAND
    546 root     10   0   9096K  1720K nanslp 0:21 0.00% 0.00% chassisd
    685 root      2   0   12716K 3840K kqread 0:01 0.00% 0.00% rpd
    553 root      2   0   8792K  1544K select 0:01 0.00% 0.00% mib2d
    552 root      2   0   8632K  1556K select 0:01 0.00% 0.00% snmpd
    563 root      2   0   9316K  1564K select 0:00 0.00% 0.00% kmd
    564 root      2   0   7736K   948K select 0:00 0.00% 0.00% fud
    131 root     10   0    770M 25568K mfsidl 0:00 0.00% 0.00% newfs
    547 root      2   0   7732K   888K select 0:00 0.00% 0.00% alarmd
    545 root      2   0  10292K  2268K select 0:00 0.00% 0.00% dcd
    550 root      2 -12   1308K   692K select 0:00 0.00% 0.00% ntpd
      1 root     10   0    816K   520K wait   0:00 0.00% 0.00% init
    750 root     32   0  21716K   828K RUN    0:00 0.00% 0.00% top
    560 root      2   0   8208K  1088K select 0:00 0.00% 0.00% rmopd
    561 root      2   0   8188K  1156K select 0:00 0.00% 0.00% cosd
    559 root      2   0   1632K   840K select 0:00 0.00% 0.00% ilmid 
    

    Meaning

    The sample output shows the central processing unit (CPU) utilization and lists the processes in order of CPU utilization.

    Table 1 lists and describes the output fields included in the sample output for the show processes extensive command. The fields are listed in alphabetical order.

    Table 1: Show System Processes Extensive Output Fields

    Field

    Description

    COMMAND

    Command that is running.

    CPU

    Raw (unweighted) CPU usage. The value of this field is used to sort the processes in the output.

    last pid

    Last process identifier assigned to the process.

    load averages

    Three load averages, followed by the current time.

    Mem

    Information about physical and virtual memory allocation.

    NICE

    UNIX “nice” value. The nice value allows a process to change it’s final scheduling priority.

    PID

    Process identifier.

    PRI

    Current kernel scheduling priority of the process. A lower number indicates a higher priority.

    processes

    Number of existing processes and the number of processes in each state (sleeping, running, starting, zombies, and stopped).

    RES

    Current amount of resident memory, in KB.

    SIZE

    Total size of the process (text, data, and stack), in KB.

    STATE

    Current state of the process (sleep, wait, run, idle, zombi, or stop).

    Swap

    Information about physical and virtual memory allocation.

    USERNAME

    Owner of the process.

    WCPU

    Weighted CPU usage.

    For more details, see Checklist for Verifying the Routing Engine CPU Memory, and the Junos System Basics Configuration Guide.


    Restart a Junos OS Process

    Action

    To restart a Junos OS process, use the following Junos OS CLI operational mode command and include the process you wish to restart. For example:

    user@host> restart routing

    Sample Output

    user@host> restart routing 
    Routing protocol daemon started, pid 751

    Meaning

    The sample output shows that the routing protocol daemon was restarted and the process identification (PID) was changed from 685 in the previous sample output to 751.

    Table 2 lists and describes the options available for the restart command.

    Table 2: Options to Restart a Junos OS Process

    Option

    Description

    class-of-service

    Restart the class-of-service process, which controls the router’s class-of-service configuration.

    gracefully

    Restart the software process by sending the equivalent of a UNIX SIGTERM signal.

    immediately

    Immediately restart the process by sending the equivalent of a UNIX SIGKILL signal.

    interface-control

    Restart the interface process, which controls the router’s physical interface devices and logical interfaces.

    mib-process

    Restart the Management Information Base (MIB) II process, which provides the router’s MIB II agent.

    network-access-service

    Restart the network access process, which provides the router’s Challenge Handshake Authentication Process (CHAP) authentication service.

    remote-operations

    Restart the remote operations process, which provides the ping and traceroute MIBs.

    routing

    Restart the routing protocol process, which controls the routing protocols that run on the router and maintains the routing tables.

    sampling

    Restart the sampling process, which performs packet sampling and cflowd export.

    snmp

    Restart the Simple Network Management Process (SNMP) process, which provides the router’s SNMP master agent.

    soft

    Reread and reactivate the configuration without completely restarting the software processes. For example, Border Gateway Protocol (BGP) peers stay up and the routing table stays constant. This option is the equivalent of a UNIX SIGHUP signal; omitting this option is the equivalent of a UNIX SIGTERM (kill) operation.


    Check That the Process Has Restarted

    Purpose

    After you have entered the restart command to restart a process, make sure that the process is up and running.

    Action

    To check that a process has restarted, use the following Junos OS CLI operational mode command:

    user@host> show system processes extensive

    Sample Output 1

    user@host> show system processes extensive
    last pid: 750; load averages: 0.00, 0.00, 0.00 up 0+00:58:50 18:34:17
    52 processes: 1 running, 51 sleeping
    
    Mem: 50M Active, 19M Inact, 38M Wired, 264K Cache, 86M Buf, 642M Free
    Swap: 768M Total, 768M Free 
    
    PID USERNAME PRI NICE  SIZE    RES STATE  TIME WCPU    CPU COMMAND
    546 root     10   0   9096K  1720K nanslp 0:21 0.00% 0.00% chassisd
    685 root      2   0   12716K 3840K kqread 0:01 0.00% 0.00% rpd
    553 root      2   0   8792K  1544K select 0:01 0.00% 0.00% mib2d
    552 root      2   0   8632K  1556K select 0:01 0.00% 0.00% snmpd
    63 root      2   0   9316K  1564K select 0:00 0.00% 0.00% kmd
    64 root      2   0   7736K   948K select 0:00 0.00% 0.00% fud
    31 root     10   0    770M 25568K mfsidl 0:00 0.00% 0.00% newfs
    47 root      2   0   7732K   888K select 0:00 0.00% 0.00% alarmd
    45 root      2   0  10292K  2268K select 0:00 0.00% 0.00% dcd
    50 root      2 -12   1308K   692K select 0:00 0.00% 0.00% ntpd
     1 root     10   0    816K   520K wait   0:00 0.00% 0.00% init
    50 root     32   0  21716K   828K RUN    0:00 0.00% 0.00% top
    60 root      2   0   8208K  1088K select 0:00 0.00% 0.00% rmopd
    61 root      2   0   8188K  1156K select 0:00 0.00% 0.00% cosd
    59 root      2   0   1632K   840K select 0:00 0.00% 0.00% ilmid 
    

    Sample Output 2

    user@host> show system processes extensive
    last pid: 758; load averages: 0.00, 0.00, 0.00 up 0+01:01:48 18:37:15
    52 processes: 1 running, 51 sleeping
    Mem: 51M Active, 19M Inact, 38M Wired, 156K Cache, 86M Buf, 642M Free
    Swap: 768M Total, 768M Free
    
    PID USERNAME PRI NICE  SIZE    RES STATE  TIME WCPU    CPU COMMAND
    546 root     10   0   9096K  1720K nanslp 0:22 0.05% 0.05% chassisd
    553 root      2   0   8792K  1544K select 0:01 0.00% 0.00% mib2d
    552 root      2   0   8632K  1556K select 0:01 0.00% 0.00% snmpd
    563 root      2   0   9316K  1564K select 0:00 0.00% 0.00% kmd
    564 root      2   0   7736K   948K select 0:00 0.00% 0.00% fud
    131 root     10   0    770M 25568K mfsidl 0:00 0.00% 0.00% newfs
    547 root      2   0   7732K   888K select 0:00 0.00% 0.00% alarmd
    545 root      2   0  10292K  2268K select 0:00 0.00% 0.00% dcd
      1 root     10   0    816K   520K wait   0:00 0.00% 0.00% init
    550 root      2 -12   1308K   692K select 0:00 0.00% 0.00% ntpd
    758 root     32   0  21716K   832K RUN    0:00 0.00% 0.00% top
    560 root      2   0   8208K  1088K select 0:00 0.00% 0.00% rmopd
    561 root      2   0   8188K  1156K select 0:00 0.00% 0.00% cosd
    559 root      2   0   1632K   840K select 0:00 0.00% 0.00% ilmid
    573 lab       2   0   7480K  2580K select 0:00 0.00% 0.00% cli
    751 root      2   0  12716K  3944K kqread 0:00 0.00% 0.00% rpd
    558 root      2  20   8708K  1880K select 0:00 0.00% 0.00% sampled
    555 root      2   0   1856K   932K select 0:00 0.00% 0.00% vrrpd
    686 root      2   0    7808K   940K select 0:00 0.00% 0.00% apsd
    

    Meaning

    The sample output shows that the routing protocol process (rpd) was restarted because the process identifier (PID) of the process was renamed from 685, as shown in the Sample Output 1, to 751 as shown in Sample Output 2.

    Published: 2012-06-27