mrtg-sensors(1) Returns data from lm-sensors


mrtg-sensors ([-m multiplier])*2 chip label [chip label]


mrtg-sensors uses the lm-sensors library to query various system sensors for information such as temperature, fan speed, etc. The output is written in a form useful as input for the MRTG utility.

Up to two pairs of chips and labels may be specified. The first is used for the incoming data value in MRTG, while the second is used for the outgoing data value. Of course, they need not correspond to incoming or outgoing data, that is merely what MRTG expects.

``chip'' is the name of the chip to query, and ``label'' is the label of the piece of information that should be queried from the given chip. sensors(1) can be used to look up all available chips and labels on your system.

Wildcards may be used in chip names, but only the first matching chip will be queried.

If you use the special name ``dummy'' as a chip name, nothing will be queried, and a value of zero will be sent to MRTG.

-m multiplier
Sets the multiplier to be used in the output. For example, if the temperature is 59.2 and a multiplier of 100, the output would be 592. The option order is important, the first -m will modify the first value and the second -m, the second. Note that you may find it more useful to use sensors.conf(5) to set global multipliers for sensors. If it is defined once, affect both output values. The default multiplier is 1.


mrtg-sensors dummy dummy adm9240-\* fan2
Get the speed of fan #2 from the adm9240 chip.
mrtg-sensors -m 0.5 adm9240-\* fan1 adm9240-\* fan2
Get the speeds of both fan #1 and fan #2, halfing both.
mrtg-sensors -m 2 dummy dummy adm9240-\* temp
Get the cpu temperature, and double it.
mrtg-sensors -m 0.5 adm9240-\* fan1 -m 10 adm9240-\* temp
Get the fan #1 speed and halfing it, and the cpu temperature with one decimal (e.i multipled by 10).


mrtg-sensors was written by Joey 'no pseudo-code' Hess <[email protected]>.