From 81ab2f1bbbf7c7757bcc39fa2229e8a7eea295cc Mon Sep 17 00:00:00 2001 From: Aravind Mani <53524901+aravindmani-1@users.noreply.github.com> Date: Wed, 4 Aug 2021 14:32:02 -0700 Subject: [PATCH] Dell S6100: Monitor serial-getty service (#8304) Why I did it serial-getty service exited in Dell S6100 device randomly. How I did it Added serial-getty to monit services. How to verify it Stop serial-getty in ssh session and check whether the service restarts or not. --- .../debian/platform-modules-s6100.install | 1 + .../s6100/scripts/s6100_platform.sh | 1 + .../s6100/scripts/s6100_serial_getty_monitor | 4 ++++ 3 files changed, 6 insertions(+) create mode 100644 platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_serial_getty_monitor diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install index ae73bf82f5..0823b7c86d 100644 --- a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install +++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install @@ -25,5 +25,6 @@ s6100/systemd/platform-modules-s6100.service etc/systemd/system s6100/systemd/s6100-lpc-monitor.service etc/systemd/system s6100/systemd/s6100-reboot-cause.service etc/systemd/system s6100/systemd/s6100-i2c-enumerate.service etc/systemd/system +s6100/scripts/s6100_serial_getty_monitor etc/monit/conf.d common/fw-updater usr/local/bin common/onie_mode_set usr/local/bin diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh index 62a8c1a281..5c7c2308c1 100755 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh @@ -52,6 +52,7 @@ if [[ "$1" == "init" ]]; then fi install_python_api_package + monit reload elif [[ "$1" == "deinit" ]]; then /usr/local/bin/s6100_i2c_enumeration.sh deinit diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_serial_getty_monitor b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_serial_getty_monitor new file mode 100644 index 0000000000..1b5d0c90db --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_serial_getty_monitor @@ -0,0 +1,4 @@ +#Dell S6100 serial getty monitor +check process serial-getty matching "ttyS" +start program = "/bin/systemctl start serial-getty@ttyS1.service" +stop program = "/bin/systemctl stop serial-getty@ttyS1.service"