MRTG-SENSORS(1)

πŸ“¦
version 0.8.4 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

mrtg-sensors β€” returns data from lm-sensors, bestie ✨


✨ SYNOPSIS ✨

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

🌸 DESCRIPTION 🌸

okay so picture this: mrtg-sensors uses the lm-sensors library to go query all the various system sensors for tea β€” temperature, fan speed, that whole vibe 🫢 β€” and then it writes the output out in a form that's literally made to be fed straight into the MRTG utility. iconic behavior honestly.

You can hand it up to two pairs of chips and labels. The first pair is what gets used for the incoming data value in MRTG, and the second pair is what gets used for the outgoing data value. and no, they don't actually have to be incoming or outgoing data β€” that's just what MRTG expects, so that's the slot they go in. lowkey arbitrary but we move πŸ’…

  • chip is the name of the chip you wanna query.
  • label is the label of the exact piece of info you want pulled out of that chip.

and if you need to go look up every chip and label that exists on your system? that's what sensors(1) is for, bestie, go peek πŸ‘€

Wildcards are allowed in chip names πŸŽ€ β€” but heads up, only the first matching chip will be queried. just the one. don't get greedy.

There's also a special name: if you use dummy as a chip name, nothing gets queried at all and a value of zero gets sent to MRTG. sometimes you just want a zero, y'know? no cap.

πŸ’… -m multiplier πŸ’…

Sets the multiplier used in the output. So for example β€” say the temperature is 59.2 and you use a multiplier of 100, the output would be 592. math ate that fr fr πŸ”₯

The option order matters, okay, this is the part everyone gets wrong: the first -m modifies the first value, and the second -m modifies the second value. periodt.

ngl you might find it more useful to just use sensors.conf(5) to set global multipliers for sensors instead. If it's defined once, it affects both output values πŸ‘‘

The default multiplier is 1. so if you say nothing, nothing gets multiplied, she's just vibing at 1.


πŸŽ€ EXAMPLES πŸŽ€

okay these are the ones you're gonna actually use, so pay attention bestie:

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). πŸ¦‹


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

mrtg-sensors was written by Joey 'no pseudo-code' Hess <joeyh@debian.org>. absolute legend, we stan πŸ’œ


and that's the whole page, bestie β€” this one's from mrtgutils version 0.8.4, dated 2022-04-01. go forth and monitor those sensors πŸŒˆβœ¨πŸ’–

πŸ“¦ where this page comes from