glances
glances copied to clipboard
Hide function in sensors section
New feature: Add hide function of some sensors. In the same way that can be done with the hard drive partitions. For example, in glances.conf in Sensors section: hide=name_sensor01,name_sensor02...
- Glances v3.1.3 with psutil v5.6.7
- LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic
3.1.4.1 still can't hide unneeded sensors.
I support this request! I already renamed a couple of sensors with the *_alias function:
[sensors]
Tctl_alias=CPU Temp2
Tdie_alias=CPU Temp1
nct6797 2_alias=Fan CPU
nct6797 3_alias=Fan hinten
nct6797 4_alias=Fan unten
nct6797 5_alias=Fan oben
nct6797 7_alias=Fan sys
But I am seeing to many sensors which are not useful to me and are just confusing:
Composite 39C
Sensor 1 39C
Sensor 2 40C
Composite 42C
Sensor 1 42C
Sensor 2 41C
CPU Temp2 54C
CPU Temp1 54C
Tccd1 41C
SYSTIN 39C
PCH_MCH_TEM 0C
CPUTIN 36C
AUXTIN0 42C
AUXTIN1 -128C
AUXTIN2 61C
AUXTIN3 -2C
PCH_CHIP_CP 0C
PCH_CHIP_TE 0C
PCH_CPU_TEM 0C
nct6797 1 0R
Fan CPU 608R
Fan hinten 598R
Fan unten 213R
Fan oben 193R
nct6797 6 0R
Fan sys 802R
@mabod have you tried using an aliases? Just wondering if you have been able to alias AUXTIN0 - 3. I cant seem to get an alias to apply to them.
Also, if you use the web gui, the ones that are 0 are hidden. glances -w -p
@distributorofpain: What do you mean? I do not want to alias AUXTIN0 - 3. I want to hide them and the others.
hiding is fine too, just wanted to know if you had tried to alias it since i cant seem to alias it.
Aliases work fine for me:
AUXTIN0_alias=aaaa
AUXTIN1_alias=bbbb
But no hiding.
Aliases work fine for me:
AUXTIN0_alias=aaaa AUXTIN1_alias=bbbb
But no hiding.
Thanks! I see where i made my mistake.
I was discussing this in the 1596 pull request mentioned above. just add "hide=AUXTIN0,AUXTIN1" in the sensors section of the glances config.
Update: i guess its not working... could of sworn i saw them go away...
I tested with Glances v3.1.6_b1 with PsUtil v5.7.2 and it is working. I used your hide example but AUXTIN0 and 1 still show up.
Pull request #1596 will fix this issue, it just got closed for some reason without being applied.
I also want the hide function implemented, and I confirm pull request #1596 fix this. Just apply the suggested patch to glances_sensors.py
if you want it now.
I also confirm pull request #1596 fix this but this patch is not applied at version 3.1.6.1
Manual #1596 fix has been applied in version 3.1.6.2 but do not work.
Re-apply in the develop branch => See commit https://github.com/nicolargo/glances/commit/871b4c32b22581242c326b67459c2a86f97c6c4a
Sorry for that !
[EDIT]Hiding DOES work when the sensor name is in lower case [/EDIT] Hiding sensors still not working for me. (pop_os 22.04) (Alias IS working)
It works (tested on the latest Glances 3.2.6.4 version).
Without hide:
Whit hide=ambiant
cc: @gauvins2
Hi @nicolargo, Your example doesn't hide the sensor in the upper case, as pointed out by @gauvins2 above. And I can observe that it doesn't really work.
drivetemp 1_alias=WD 8TB
drivetemp 2_alias=WD 12TB
hide=AUXTIN
Result:
Glances v3.2.7 with PsUtil v5.9.1
Hi, It works for me if I add lowercase aliases.
No configuration changes:
Adding this:
SYSTIN_alias=systin
AUXTIN1_alias=auxtin1
AUXTIN2_alias=auxtin2
AUXTIN3_alias=auxtin3
hide=systin,auxtin1,auxtin2,auxtin3
Glances version 3.2.7
Hi, Thank you very much for the solution. Is it assumed that it will be resolved in the future and the direct way also will be available?
@kanyck Yes, it will be corrected in the next release.
Done on the develop branch (see commit 1bed69bc).
To be tested !
Perhaps late to the party (just back home).
The latest Glances 3.2.7 fixes display for *the first jc42 entry. *(see attached screen capture)
On Sat, Aug 27, 2022 at 5:23 AM Nicolas Hennion @.***> wrote:
Done on the develop branch (see commit 1bed69b https://github.com/nicolargo/glances/commit/1bed69bc8a26463ee837382b7deeee328e6d3718 ).
To be tested !
— Reply to this email directly, view it on GitHub https://github.com/nicolargo/glances/issues/1590#issuecomment-1229157960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMC44MU4SLGFTSAV4BYNBB3V3HNCXANCNFSM4KNL5DSA . You are receiving this because you were mentioned.Message ID: @.***>