Closed lasers closed 5 months ago
Patch worked good.
Got an added benefit of getting the GPU fan colored:
The remaining fans in the whole image are also from the NCT6793 sensor (along with MoBo and CPU temp in first image).
I'm guessing that it doesn't particularly care to call the same sensor twice.
Not a show stopper; this actually fixed my original request (getting drives colorized). anything else is probably out-of-scope.
Thanks, @lasers!!!!
You should try putting everything in one config... For starters, go with chips = ["drivetemp-scsi-*", "*-*"]
... this ought to place your drivetemp chips in first before any other chips now...
I might add -i <file>
support to this module in order to simplify troubleshooting with other people's sensor json outputs.
Your issue with fans... I think it may be already fixable by fixing up your sensors.conf https://github.com/lm-sensors/lm-sensors/blob/master/etc/sensors.conf.eg.... You need to add min
values higher than 0.000
.... Otherwise, it just uses default font color.
EDIT: Your issue with fans not being colorized... is due to values. There is nothing to compare against. You can try changing them with color_excl_input = pink
or so.
This fan have min
(over zero) and/or max
.... This get auto colorized.
"fan1":{
"fan1_input": 2055.000,
"fan1_min": 0.000,
"fan1_max": 3600.000
},
This fans doesn't have min
(over zero) and/or max
.... This doesn't get auto colorized.
"CHA_FAN1":{
"fan1_input": 1106.000,
"fan1_min": 0.000,
"fan1_alarm": 0.000,
"fan1_beep": 0.000,
"fan1_pulses": 2.000
},
"CPU_FAN":{
"fan2_input": 1800.000,
"fan2_min": 0.000,
"fan2_alarm": 0.000,
"fan2_beep": 0.000,
"fan2_pulses": 2.000
},
"M_2_FAN":{
"fan3_input": 0.000,
"fan3_min": 0.000,
"fan3_alarm": 0.000,
"fan3_beep": 0.000,
"fan3_pulses": 2.000
},
"AIO_PUMP":{
"fan5_input": 1434.000,
"fan5_min": 0.000,
"fan5_alarm": 0.000,
"fan5_beep": 0.000,
"fan5_pulses": 2.000
},
"CHA_FAN2":{
"fan6_input": 1162.000,
"fan6_min": 0.000,
"fan6_alarm": 0.000,
"fan6_pulses": 2.000
},
EDIT: Try color_excl_input = color_good
(or good
, I don't remember).
Ok. So the machine idled for a couple of hours this afternoon, and no matter what I tried, this is the current output:
Here's my updated config:
lm_sensors {
chips = ["nct6793-*", "*-pci-*", "drivetemp-*"]
format_sensor = '[\?if=name=motherboard MoBo: ]'
format_sensor += '[\?if=name=cpu CPU: ]'
format_sensor += '[\?if=name=edge GPU: ]'
format_sensor += '[\?if=name=composite NVMe: ]'
format_chip = '[\?if=name=drivetemp-scsi-0-0 sda: ]'
format_chip += '[\?if=name=drivetemp-scsi-2-0 sdb: ]'
format_chip += '[\?if=name=drivetemp-scsi-4-0 sdc: ]'
format_chip += '{format_sensor}'
format_sensor += '[\?color=auto.input {input:.0f}°C]'
sensors = ['samsung*', 'hitachi*', 'input', 'composite', 'edge', 'motherboard', 'cpu']
}
lm_sensors {
format_chip = '{format_sensor}'
format_sensor = '[\?if=name=fan1 GPU fan: ]'
format_sensor += '[\?if=name=aio_pump Pump: ]'
format_sensor += '[\?if=name=cpu_fan CPU Fan: ]'
format_sensor += '[\?if=name=cha_fan1 Top Fan: ]'
format_sensor += '[\?if=name=cha_fan2 Rear Fan: ]'
format_sensor += '[\?color=auto.input {input} RPM ]'
sensors = ['aio_pump', 'cpu_fan', 'cha_fan1', 'cha_fan2', 'fan1']
}
If I don't use a chips =
line, everything before the fans is jumbled, but colorized (no fan at all).
I'll try playing some more tomorrow.
Your issue with fans... I think it may be already fixable by fixing up your sensors.conf https://github.com/lm-sensors/lm-sensors/blob/master/etc/sensors.conf.eg.... You need to add
min
values higher than0.000
.... Otherwise, it just uses default font color.
Already have one (both for the nct6793 (eg: the aio_pump is actually a header on my mobo, and is called fan5 normally) and drivetemp. Since I set my fan curves in BIOS, the .conf file has no effect for setting a min speed.
EDIT: Your issue with fans not being colorized... is due to values. There is nothing to compare against. You can try changing them with
color_excl_input = pink
or so.
I'll play around with that tomorrow as well.
Thanks!!!
Ok. So the machine idled for a couple of hours this afternoon, and no matter what I tried, this is the current output:
I see two lm_sensors
in your updated config. You probably got bit by that bug again. Nom, nom.
I'll put together an updated config for you to try later.
I see two
lm_sensors
in your updated config.
Yeah; I can't come up with a way to combine
format_sensor += '[\?color=auto.input {input:.0f}°C]'
and format_sensor += '[\?color=auto.input {input} RPM ]'
so that a temp input would trigger the former, while a fan speed would trigger the latter.
Using the former, I'd get 1191°C, (fan speed) the latter would give me 42 RPM (temp)
I'll put together an updated config for you to try later.
That's cool...
Yeah; I can't come up with a way to combine
To give you an answer right now... Something like this.
...
format_sensor += '[\?if=name=edge GPU: [\?color=auto.input {input:.0f} °C] ]'
format_sensor += '[\?if=name=composite NVMe: [\?color=auto.input {input:.0f} °C] ]'
...
format_sensor += '[\?if=name=aio_pump Pump: [\?color=auto.input {input} RPM] ]'
format_sensor += '[\?if=name=cha_fan1 Top Fan: [\?color=auto.input {input} RPM] ]'
...
Crazy, I know.
EDIT: It will look more clean if you specified sda in format_sensor
instead of format_chip
too.
Untested in the config.
lm_sensors {
format_chip = '{format_sensor}'
format_sensor = ''
format_sensor += '[\?if=name=samsung_860_ssd_(sda) SDA [\?color=auto.input {input:.0f}°C]]'
format_sensor += '[\?if=name=samsung_860_ssd_(sdb) SDB [\?color=auto.input {input:.0f}°C]]'
format_sensor += '[\?if=name=hitachi_hds72302_(sdc) SDC [\?color=auto.input {input:.0f}°C]]'
format_sensor += '[\?if=name=motherboard MB [\?color=auto.input {input:.0f}°C]]'
format_sensor += '[\?if=name=cpu CPU [\?color=auto.input {input:.0f}°C]]'
format_sensor += '[\?if=name=edge GPU [\?color=auto.input {input:.0f}°C]]'
format_sensor += '[\?if=name=composite NVMe [\?color=auto.input {input:.0f}°C]]'
format_sensor += '[\?if=name=fan1 GPU Fan [\?color=auto.input {input} RPM]]'
format_sensor += '[\?if=name=aio_pump Pump [\?color=auto.input {input} RPM]]'
format_sensor += '[\?if=name=cpu_fan CPU Fan [\?color=auto.input {input} RPM]]'
format_sensor += '[\?if=name=cha_fan1 Top Fan [\?color=auto.input {input} RPM]]'
format_sensor += '[\?if=name=cha_fan2 Rear Fan [\?color=auto.input {input} RPM]]'
chips = ["drivetemp-scsi-0-0", "drivetemp-scsi-2-0", "drivetemp-scsi-4-0"]
chips += ["nct6793-*", "*-pci-*"]
sensors = ['samsung*', 'hitachi*']
sensors += ['input', 'composite', 'edge', 'motherboard', 'cpu']
sensors += ['aio_pump', 'cpu_fan', 'cha_fan1', 'cha_fan2', 'fan1']
format_chip_separator = '\?color=lightblue \|'
format_sensor_separator = '\?color=lightpink \|'
color_excl_input = "lightgreen"
}
@lasers, you are the $BEING!!!!!
I changed one thing: color_excl_input = "#1793D1"
(Arch Blue).
Thank you so much!!
Well I'm in after the fight and once again @lasers mastered it all, you'll never cease to impress me as you're far way better than me on this formatting things...
So thanks a lot @lasers and thanks @mlmatlock for your nice gesture which I don't feel I deserve :/
Config
chips
worked perfectly before we switched from-u Raw output
to-j Json output
.The issue is that
sensor -j
does not always output valid json with multiple chips.If you specify multiple chips using wildcard, you get valid json.
If you specify multiple chips individually, you don't get valid json.
This dirty fix is a workaround to deal with invalid json https://github.com/lm-sensors/lm-sensors/issues/372.
Ought to close https://github.com/ultrabug/py3status/issues/2224.