Skip to content

Commit bbcd4c6

Browse files
yozhao101abdosi
authored andcommitted
[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 <[email protected]>
1 parent 2f97faa commit bbcd4c6

File tree

9 files changed

+9
-9
lines changed
  • platform

9 files changed

+9
-9
lines changed

platform/barefoot/docker-syncd-bfn/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
## process list:
44
## syncd
55
###############################################################################
6-
check process syncd matching "/usr/bin/syncd"
6+
check process syncd matching "/usr/bin/syncd\s"
77
if does not exist for 5 times within 5 cycles then alert

platform/broadcom/docker-syncd-brcm/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## syncd
55
## dsserve
66
###############################################################################
7-
check process syncd matching "/usr/bin/syncd"
7+
check process syncd matching "/usr/bin/syncd\s"
88
if does not exist for 5 times within 5 cycles then alert
99

1010
check process dsserve matching "/usr/bin/dsserve /usr/bin/syncd"

platform/cavium/docker-syncd-cavm/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
## process list:
44
## syncd
55
###############################################################################
6-
check process syncd matching "/usr/bin/syncd"
6+
check process syncd matching "/usr/bin/syncd\s"
77
if does not exist for 5 times within 5 cycles then alert

platform/centec/docker-syncd-centec/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
## process list:
44
## syncd
55
###############################################################################
6-
check process syncd matching "/usr/bin/syncd"
6+
check process syncd matching "/usr/bin/syncd\s"
77
if does not exist for 5 times within 5 cycles then alert

platform/marvell-arm64/docker-syncd-mrvl/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
## process list:
44
## syncd
55
###############################################################################
6-
check process syncd matching "/usr/bin/syncd"
6+
check process syncd matching "/usr/bin/syncd\s"
77
if does not exist for 5 times within 5 cycles then alert

platform/marvell-armhf/docker-syncd-mrvl/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
## process list:
44
## syncd
55
###############################################################################
6-
check process syncd matching "/usr/bin/syncd"
6+
check process syncd matching "/usr/bin/syncd\s"
77
if does not exist for 5 times within 5 cycles then alert

platform/marvell/docker-syncd-mrvl/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
## process list:
44
## syncd
55
###############################################################################
6-
check process syncd matching "/usr/bin/syncd"
6+
check process syncd matching "/usr/bin/syncd\s"
77
if does not exist for 5 times within 5 cycles then alert

platform/mellanox/docker-syncd-mlnx/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
## process list:
44
## syncd
55
###############################################################################
6-
check process syncd matching "/usr/bin/syncd"
6+
check process syncd matching "/usr/bin/syncd\s"
77
if does not exist for 5 times within 5 cycles then alert

platform/nephos/docker-syncd-nephos/base_image_files/monit_syncd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## syncd
55
## dsserve
66
###############################################################################
7-
check process syncd matching "/usr/bin/syncd"
7+
check process syncd matching "/usr/bin/syncd\s"
88
if does not exist for 5 times within 5 cycles then alert
99

1010
check process dsserve matching "/usr/bin/dsserve /usr/bin/syncd"

0 commit comments

Comments
 (0)