Hello. Didn't find, how to use spoilers here, so posted just a piece of "sensors" output. I have two of the "fan1" lines, and i need to show second one in conky. Can't figure, how to do it. Can someone explain, please?
amdgpu-pci-2800
Adapter: PCI adapter
fan1: 1137 RPM (min = 0 RPM, max = 3500 RPM)
nct6797-isa-0a20
Adapter: ISA adapter
fan1: 828 RPM (min = 0 RPM)
fan2: 834 RPM (min = 0 RPM)
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Solved] Showing CPU fan speed in conky
-
- Posts: 11
- Joined: 2023-11-17 15:56
- Has thanked: 5 times
[Solved] Showing CPU fan speed in conky
Last edited by TrixieTest on 2023-12-30 11:37, edited 1 time in total.
- FreewheelinFrank
- Global Moderator
- Posts: 2117
- Joined: 2010-06-07 16:59
- Has thanked: 38 times
- Been thanked: 232 times
- FreewheelinFrank
- Global Moderator
- Posts: 2117
- Joined: 2010-06-07 16:59
- Has thanked: 38 times
- Been thanked: 232 times
Re: Showing CPU fan speed in conky
Conky can print the output of a command with execi, piped through awk to search for specific lines and print only specific strings from the selected line.
Compare for example output of
and
I can add that to Conky thus:
You can also select by line and element with awk:
https://stackoverflow.com/questions/150 ... ent-in-awk
Compare for example output of
Code: Select all
$ xset -q
Code: Select all
$ xset -q | awk '/Caps/{print $2 $3 $4, $6 $7 $8}'
Code: Select all
${execi 1800 xset -q | awk '/Caps/{print $2 $3 $4, $6 $7 $8}'}
You can also select by line and element with awk:
https://stackoverflow.com/questions/150 ... ent-in-awk
-
- Posts: 11
- Joined: 2023-11-17 15:56
- Has thanked: 5 times
Re: Showing CPU fan speed in conky
Thanks! That's such a nice way. Much better then using "grep" and "cut" to show the needed values.FreewheelinFrank wrote: ↑2023-12-30 10:25 Conky can print the output of a command with execi, piped through awk to search for specific lines and print only specific strings from the selected line.
Compare for example output of
andCode: Select all
$ xset -q
I can add that to Conky thus:Code: Select all
$ xset -q | awk '/Caps/{print $2 $3 $4, $6 $7 $8}'
Code: Select all
${execi 1800 xset -q | awk '/Caps/{print $2 $3 $4, $6 $7 $8}'}
You can also select by line and element with awk:
https://stackoverflow.com/questions/150 ... ent-in-awk
Code: Select all
sensors | awk 'FNR == 35 {print $2, $3}'
Will update the whole config in this new way.
Last edited by TrixieTest on 2023-12-30 11:30, edited 1 time in total.
-
- Posts: 1101
- Joined: 2016-01-07 12:25
- Has thanked: 7 times
- Been thanked: 16 times
Re: [Solved] Showing CPU fan speed in conky
You could try these for easier implementation (IMO)
${hwmon amdgpu fan 1}
${hwmon nct6797 fan 1}
${hwmon nct6797 fan 2}
${hwmon amdgpu fan 1}
${hwmon nct6797 fan 1}
${hwmon nct6797 fan 2}