Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos] How to restart a specific process in Junos?

0

0

Article ID: KB10956 KB Last Updated: 29 Jun 2020Version: 5.0
Summary:

This article covers how a specific process can be restarted in Junos OS without rebooting the router. 

 

Solution:

To restart a specific process, first find out which processes are running by using the CLI command show system process from operational mode.

root@Router> show system processes extensive | match kmd
10020 root       2   0  6008K  4816K select   0:00  0.00%  0.00% kmd
In this example, we will restart the Key Management Daemon (kmd), which is responsible for running IPSec.
root@Router> restart ipsec-key-management immediately
Issue the CLI command show system process from operational mode again.
root@Router> show system processes extensive | match kmd   
10215 root       2   0  6008K  4792K select   0:00 10.15%  1.42% kmd

In the example above, you can see that the Process ID (pid) has changed after the restart from 10020 to 10215. The pid changes to a new one once the process is restarted.

You can also restart a process from shell mode too.

> start shell user root
Password:

Enter the root password. When you are in shell mode, enter the process that you want to restart.

For example, you want to restart the alarmd process.

root@SRX1:~ # ps -aux | grep alarmd
USER    PID  %CPU %MEM    VSZ   RSS TT  STAT STARTED      TIME COMMAND
root   6644  0.0  1.2 739672 11068  -  S    03:47     0:08.78 /usr/sbin/alarmd -N

Kill the process ID (6644 in this example) by using the following command:

root@SRX1:~ # kill -9 6644

Issue the shell mode command "ps -aux | grep alarmd" again.

root@srx1% ps -aux | grep alarmd
root    1161  0.0  0.2  6820  3500  ??  S     4:49AM   0:04.69 /usr/sbin/alarmd -N

In the example above, you can see that the Process ID (pid) has changed after the restart from 6644 to 1161. The pid changes to a new one once the process is restarted.

 

Modification History:

2020-06-30: Article now covers restarting a process from CLI as well as shell mode. This article is complete and accurate. 

 

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search