This article provides information about restarting the management process or daemon (MGD) without having to restart the entire routing engine.
Which commands should be used to restart the MGD process?
There are two ways to restart the mgd process:
-
Using command "restart management". This can also be combine with several knobs:
switch
> restart management ?
Possible completions:
<[Enter]> Execute this command
gracefully Gracefully restart the process
immediately Immediately restart (SIGKILL) the process
soft Soft reset (SIGHUP) the process
| Pipe through a command
In some platforms, this option may be hidden so you need to manually enter the full command:
switch
>restart m
Possible completions:
> mc-ae-config-check-service MC-LAG Configuration Consistency Check daemon
member Restart software process on specific virtual chassis member (0..9)
> mgd-api Management Daemon GRPC server
> mib-process Management Information Base II process
> mosquitto Mosquitto Broker for notification
> multicast-snooping Multicast Snooping process
switch> restart management
Management process started, pid 30895
-
The process could be restarted from shell using root access. There may be several mgd processes running at the same time. Therefore, you need to kill them individually:
switch>start shell user root
root@switch% ps -auwx| grep mgd
root 4550 0.0 0.4 280500 7284 - I Sat07 0:00.08 /usr/sbin/mgd-api -N
root 30895 0.0 1.6 300196 32136 - S 17:31 0:01.24 /usr/sbin/mgd -N
root 30927 0.0 1.6 300196 32340 - Ss 17:31 0:00.05 mgd: (mgd) (root)/dev/pts/0 (mgd)
root 31039 0.0 0.1 8512 2192 0 S+ 17:32 0:00.01 grep mgd
root@switch:RE:0% kill 4550
root@switch:RE:0% kill 30895
root@switch:RE:0% kill 30927
root@switch:RE:0% exit
Note: Either method could close any existing session on the device as well as cancelling pending commits. The following message may display when you login back:
WARNING: cli has been replaced by an updated version:
CLI release 18.1R3.3 built by builder on 2018-08-30 05:29:08 UTC
Restart cli using the new version ? [yes,no] (yes) yes
2020-02-08: Updated solution to include two methods to restart the mgd process.
2018-10-31: Article updated to include information about switching products; EX and QFX product categories added