Commit 77b50830 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/wrsw_hal: add temperature thresholds to Kconfig

Added menu "Management configuration" to Kconfig with:
-moved options from "Local Network Configuration":
 --SNMP_TRAPSINK_ADDRESS
 --SNMP_TRAP2SINK_ADDRESS
 --SNMP_RO_COMMUNITY
 --SNMP_RW_COMMUNITY
-added threshold levels:
 --SNMP_TEMP_THOLD_FPGA
 --SNMP_TEMP_THOLD_PLL
 --SNMP_TEMP_THOLD_PSL
 --SNMP_TEMP_THOLD_PSR

Update user manual.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 7169a7b4
......@@ -70,44 +70,6 @@ config REMOTE_SYSLOG_UDP
help
Select UDP to send system logs. If not set, TCP is used.
config SNMP_TRAPSINK_ADDRESS
string "Static IP address or name where to send SNMPv1 traps"
help
If not empty, the address or name is ussed as "trapsink"
destination in the SNMP configuration file for the switch.
It empty, no v1 traps are generated. If both this and
the following TRAP2SINK_ADDRESS are set, snmpd sends two
traps (one per protocol version). Trapcommunity is "public"
(not configurable so far).
config SNMP_TRAP2SINK_ADDRESS
string "Static IP address or name where to send SNMPv2c traps"
help
If not empty, the address or name is ussed as "trap2sink"
destination in the SNMP configuration file for the switch.
It empty, no v2c traps are generated. Trapcommunity is "public"
(not configurable so far).
config SNMP_RO_COMMUNITY
string "Read-only community name for SNMP V1/V2 management"
default "public"
help
If not empty, the 'community' name is a sort of password,
that travels as clear text (we don't support encrypted SNMPv3
yet). The default is good for testing, but should be changed
for production. Please note, however, that the switch processes
SNMP only on the CPU Ethernet port (the copper "management" port).
config SNMP_RW_COMMUNITY
string "Read-write community name for SNMP V1/V2 management"
default "private"
help
If not empty, the 'community' name is a sort of password,
that travels as clear text (we don't support encrypted SNMPv3
yet). The default is good for testing, but should be changed
for production. Please note, however, that the switch processes
SNMP only on the CPU Ethernet port (the copper "management" port).
config WRS_LOG_HAL
string "Logging directions for the WR hal"
default "daemon.info"
......@@ -361,8 +323,76 @@ config PTP_CUSTOM
endchoice
menu "Management configuration"
config SNMP_TRAPSINK_ADDRESS
string "Static IP address or name where to send SNMPv1 traps"
help
If not empty, the address or name is ussed as "trapsink"
destination in the SNMP configuration file for the switch.
It empty, no v1 traps are generated. If both this and
the following TRAP2SINK_ADDRESS are set, snmpd sends two
traps (one per protocol version). Trapcommunity is "public"
(not configurable so far).
config SNMP_TRAP2SINK_ADDRESS
string "Static IP address or name where to send SNMPv2c traps"
help
If not empty, the address or name is ussed as "trap2sink"
destination in the SNMP configuration file for the switch.
It empty, no v2c traps are generated. Trapcommunity is "public"
(not configurable so far).
config SNMP_RO_COMMUNITY
string "Read-only community name for SNMP V1/V2 management"
default "public"
help
If not empty, the 'community' name is a sort of password,
that travels as clear text (we don't support encrypted SNMPv3
yet). The default is good for testing, but should be changed
for production. Please note, however, that the switch processes
SNMP only on the CPU Ethernet port (the copper "management" port).
config SNMP_RW_COMMUNITY
string "Read-write community name for SNMP V1/V2 management"
default "private"
help
If not empty, the 'community' name is a sort of password,
that travels as clear text (we don't support encrypted SNMPv3
yet). The default is good for testing, but should be changed
for production. Please note, however, that the switch processes
SNMP only on the CPU Ethernet port (the copper "management" port).
config SNMP_TEMP_THOLD_FPGA
int "Threshold level for FPGA temperature"
default "0"
help
Threshold level for FPGA temperature, when exceeded warning is
notified by WR-SWITCH-MIB::tempWarning
config SNMP_TEMP_THOLD_PLL
int "Threshold level for PLL temperature"
default "0"
help
Threshold level for PLL temperature, when exceeded warning is
notified by WR-SWITCH-MIB::tempWarning
config SNMP_TEMP_THOLD_PSL
int "Threshold level for Power Supply Left (PSL) temperature"
default "0"
help
Threshold level for Power Supply Left (PSL) temperature, when
exceeded warning is notified by WR-SWITCH-MIB::tempWarning
config SNMP_TEMP_THOLD_PSR
int "Threshold level for Power Supply Right (PSR) temperature"
default "0"
help
Threshold level for Power Supply Right (PSR) temperature, when
exceeded warning is notified by WR-SWITCH-MIB::tempWarning
endmenu
config PTP_CUSTOM_FILENAME
string "Pathname for your custom ppsi.conf"
depends on PTP_CUSTOM
default "/wr/etc/ppsi-custom.conf"
......@@ -464,6 +464,15 @@ value is changed by the web interface, proper action is taken.
default. Community values are strings and they default to
@t{public} and @t{private}.
@item CONFIG_SNMP_TEMP_THOLD_FPGA
@itemx CONFIG_SNMP_TEMP_THOLD_PLL
@itemx CONFIG_SNMP_TEMP_THOLD_PSL
@itemx CONFIG_SNMP_TEMP_THOLD_PSR
Threshold levels for FPGA, PLL, Power Supply Left (PSL) and Power
Supply Right (PSR) temperature sensors. When any temperature exceeds
threshold level SNMP object @t{WR-SWITCH-MIB::tempWarning} will change
accordingly.
@item CONFIG_WRS_LOG_HAL
@itemx CONFIG_WRS_LOG_RTU
@itemx CONFIG_WRS_LOG_PTP
......
......@@ -230,7 +230,11 @@ int hal_port_init_all()
/* We are done, mark things as valid */
hal_shmem->nports = hal_port_nports;
hal_shmem_hdr->version = HAL_SHMEM_VERSION;
hal_shmem->temp.fpga_thold =
atoi(libwr_cfg_get("SNMP_TEMP_THOLD_FPGA"));
hal_shmem->temp.pll_thold = atoi(libwr_cfg_get("SNMP_TEMP_THOLD_PLL"));
hal_shmem->temp.psl_thold = atoi(libwr_cfg_get("SNMP_TEMP_THOLD_PSL"));
hal_shmem->temp.psr_thold = atoi(libwr_cfg_get("SNMP_TEMP_THOLD_PSR"));
/* Release processes waiting for HAL's to fill shm with correct data
When shm is opened successfully data in shm is still not populated!
Read data with wrs_shm_seqbegin and wrs_shm_seqend!
......
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