sonic-buildimage/platform/cavium
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
..
cavm_platform_modules Remove extra trailing newlines at EOF (#804) 2017-07-12 20:54:37 -07:00
cavm_sdk Added rules to build syncd and orchagent containers for Cavium target (#152) 2016-12-23 15:26:51 -08:00
docker-saiserver-cavm [docker-saiserver]: build docker-saiserver (#2244) 2018-11-14 01:15:31 -08:00
docker-syncd-cavm [Monit] Use the string "/usr/bin/syncd\s" to monitor the syncd process (#4706) 2020-06-28 07:29:59 -07:00
docker-syncd-cavm-rpc [buildsystem] Install debug packages in syncd when INSTALL_DEBUG_TOOLS=y (#2702) 2019-04-18 02:25:51 -07:00
cavm-platform-modules.mk [build]: put stretch debian packages under target/debs/stretch/ (#2519) 2019-02-04 22:06:37 -08:00
cavm-sai.mk [cavm]Update sai revision and packet driver (#914) 2017-08-24 23:46:14 -07:00
cavm-xpnet.mk [build]: put stretch debian packages under target/debs/stretch/ (#2519) 2019-02-04 22:06:37 -08:00
docker-ptf-cavm.mk [docker-ptf-*]: Use buildimage infrastructure to build docker-ptf-* (#638) 2017-05-26 17:18:11 -07:00
docker-syncd-cavm-rpc.mk [syncd-rpc.mk] install ptf dependancy (#4279) 2020-03-19 22:18:49 -07:00
docker-syncd-cavm.mk [Services] Allow monit system tool to monitor the critical processes status running in various SONiC containers. (#3940) 2020-01-21 10:42:47 -08:00
libsaithrift-dev.mk [saithrift]: remove dependency on python-saithrift (#2584) 2019-02-18 02:50:37 -08:00
one-image.mk [build]: Move Systemd service start to systemd generator (#3172) 2019-07-29 15:52:15 -07:00
platform.conf one image implementation (#215) 2017-01-29 11:33:33 -08:00
rules.mk [sairedis.mk] do not build rpc sairedis when not needed (#3109) 2019-07-06 14:55:31 -07:00