Commit fc6c420e authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: check if lldpd is running

Support disabling of the lldpd in dot-config.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 3a7c4737
...@@ -735,6 +735,7 @@ list of faults leading to a data error. ...@@ -735,6 +735,7 @@ list of faults leading to a data error.
\item \emph{rsyslogd} \item \emph{rsyslogd}
\item \emph{snmpd} \item \emph{snmpd}
\item \emph{lighttpd} \item \emph{lighttpd}
\item \emph{lldpd}
\item \emph{TRUd/eRSTPd} -- not yet implemented \item \emph{TRUd/eRSTPd} -- not yet implemented
\end{itemize} \end{itemize}
......
...@@ -95,6 +95,7 @@ struct wrs_usd_item { ...@@ -95,6 +95,7 @@ struct wrs_usd_item {
#define UDI_HTTP 4 /* index of web server in userspace_daemons array */ #define UDI_HTTP 4 /* index of web server in userspace_daemons array */
#define UDI_MONIT 5 /* index of MONIT in userspace_daemons array */ #define UDI_MONIT 5 /* index of MONIT in userspace_daemons array */
#define UDI_LLDP 8 /* index of LLDP in userspace_daemons array */
/* user space daemon list */ /* user space daemon list */
/* - key contain process name reported by ps command /* - key contain process name reported by ps command
* - positive exp describe exact number of expected processes * - positive exp describe exact number of expected processes
...@@ -114,6 +115,8 @@ static struct wrs_usd_item userspace_daemons[] = { ...@@ -114,6 +115,8 @@ static struct wrs_usd_item userspace_daemons[] = {
* dot-config */ * dot-config */
[6] = {"/usr/sbin/snmpd", 1}, [6] = {"/usr/sbin/snmpd", 1},
[7] = {"/wr/bin/wrs_watchdog", 1}, [7] = {"/wr/bin/wrs_watchdog", 1},
[UDI_LLDP] = {"/usr/sbin/lldpd", 1}, /* LLDP can be disabled in
dot-config */
}; };
struct wrs_bc_item { struct wrs_bc_item {
...@@ -485,6 +488,14 @@ static void update_daemon_expectancy(struct wrs_usd_item *daemon_array) ...@@ -485,6 +488,14 @@ static void update_daemon_expectancy(struct wrs_usd_item *daemon_array)
snmp_log(LOG_INFO, "SNMP: Info wrsBootUserspaceDaemonsMissing:" snmp_log(LOG_INFO, "SNMP: Info wrsBootUserspaceDaemonsMissing:"
" CONFIG_HTTPD_DISABLE=y in dot-config\n"); " CONFIG_HTTPD_DISABLE=y in dot-config\n");
} }
tmp = libwr_cfg_get("LLDPD_DISABLE");
if (tmp && !strcmp(tmp, "y")) {
/* SNMP should not expect lldpd to be running */
daemon_array[UDI_LLDP].exp = 0;
snmp_log(LOG_INFO, "SNMP: Info wrsBootUserspaceDaemonsMissing:"
" CONFIG_LLDPD_DISABLE=y in dot-config\n");
}
} }
/* check if daemons from userspace_daemons array are running */ /* check if daemons from userspace_daemons array are running */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment