How to get Voltage and Fan speed related details from Cumulus 3.2 ?

  • 12 July 2017
  • 3 replies


I am unable to get Voltage, power consumed and Fan speed information from Cumulus 3.2. I have tried "lssensor" command, which normally returns these details, but not in cumulus. Is there any other command or way to get those details?

We are using Cumulus 3.2 in Celestica Seastone switch.

Thanks in advance!

3 replies

Userlevel 1
Helpful commands
  • Display fans and temp readings using "sensors"
  • Display fans, PSU, temp readings using "smonctl -v", or "smonctl -j -s PSU1"
  • Check LED status using "ledmgrd -d"
sensors cannot set and monitor all limits (eg. some sensors have high but not critical). also sensors cannot take action like shutdown

Voltage readings

This information is dependent on the hardware platform itself, so if there is no information regarding power consumption in the smonctl output, the sensors may not be present or available to Cumulus Linux.

$ sudo smonctl -v -s PSU2
power:8.1 W (voltages = ['11.98', '11.87'] V currents = ['0.68'] A)


search the syslog file

$ sudo grep "smond" /var/log/syslog

Where to find more
Userlevel 4
Just to add to Mark's great comment, the smonctl commands also have JSON output with a -j flag

cumulus@leaf01:mgmt-vrf:~$ sudo smonctl -v -s PSU2 -j  [      {          "psu_pwr2": "installed, ok",          "curr1_input": 1.019,          "driver_hwmon": [              "power1",              "in1",              "in2",              "curr1"          ],          "cpld_path": "/sys/bus/platform/devices/dell_s4000_cpld.0",          "state": "OK",          "prev_state": "OK",          "in2_min_alarm": 0,          "msg": null,          "input": 12.155651,          "type": "power",          "description": "PSU2",          "start_time": 1498756777,          "in2_input": 12.039,          "in1_min_alarm": 0,          "prev_msg": null,          "log_time": 1498756777,          "curr1_max_alarm": 0,          "name": "PSU2",          "in1_input": 11.929,          "in1_max_alarm": 0,          "driver_path": "/sys/bus/i2c/devices/11-0040/hwmon/hwmon4",          "cpld_hwmon": [              "psu_pwr2"          ]      }  ]  
This way you could run a command and register the variable quite easily:

If you register the output above to a variable called OUTPUT
x = OUTPUT[0].state;
print x would be-> OK
x = OUTPUT[0].in_input;
print x would be-> 11.929
x = OUTPUT[0].in2_input;
print x would be-> 12.039

Just in case you were looking at a way to monitor or collect information in a programmatic way.
Thanks a lot Mark and Sean. Really a valuable inputs