sonic-buildimage/platform
yozhao101 bbcd4c6235 [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706)
**- Why I did it**
After discussed with Joe, we use the string "/usr/bin/syncd\s" in Monit configuration file to monitor 
syncd process on Broadcom and Mellanox. Due to my careless, I did not find this bug during the 
previous testing. If we use the string "/usr/bin/syncd" in Monit configuration file to monitor the 
syncd process, Monit will not detect whether syncd process is running or not. 

If we ran the command  `sudo monit procmactch “/usr/bin/syncd”` on Broadcom, there will be three 
processes in syncd container which matched this "/usr/bin/syncd": `/bin/bash /usr/bin/syncd.sh
wait`, `/usr/bin/dsserve /usr/bin/syncd –diag -u -p /etc/sai.d/sai.profile` and `/usr/bin/syncd –diag -
u -p /etc/sai.d/said.profile`. Monit will select the processes with the highest uptime (at there 
`/bin/bash /usr/bin/syncd.sh wait`) to match and did not select `/usr/bin/syncd –diag -u -p
/etc/sai.d/said.profile` to match. 

Similarly, On Mellanox Monit will also select the process with the highest uptime (at there 
`/bin/bash /usr/bin/syncd.sh wait`) to match and did not select `/usr/bin/syncd –diag -u -p
/etc/sai.d/said.profile` to match.

That is why Monit is unable to detect whether syncd process is running or not if we use the string “/usr/bin/syncd” in Monit configuration file. If we use the string "/usr/bin/syncd\s" in Monit configuration file, Monit can filter out the process `/bin/bash /usr/bin/syncd.sh wait` and thus can correctly monitor the syncd process.

**- How I did it**

**- How to verify it**

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
2020-06-28 07:29:59 -07:00
..
barefoot [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
broadcom [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
cavium [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
centec [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
generic [build]: Move Systemd service start to systemd generator (#3172) 2019-07-29 15:52:15 -07:00
innovium [syncd-rpc.mk] install ptf dependancy (#4279) 2020-03-19 22:18:49 -07:00
marvell [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
marvell-arm64 [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
marvell-armhf [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
mellanox [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
nephos [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
p4 [sonic-cfggen] Loading the configuration from init_cfg.json and then from config_db.json (#4148) 2020-03-15 08:54:05 -07:00
template [baseimage]: support building multi-asic component (#3856) 2020-02-03 15:32:21 -08:00
vs [201911][dockers] Update critical_processes file syntax (#4854) 2020-06-26 11:37:05 -07:00