Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide function in sensors section #1590

Closed
dtalens opened this issue Jan 29, 2020 · 22 comments
Closed

Hide function in sensors section #1590

dtalens opened this issue Jan 29, 2020 · 22 comments

Comments

@dtalens
Copy link

dtalens commented Jan 29, 2020

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
@dtalens dtalens changed the title Hide function in sensor section Hide function in sensors section Jan 29, 2020
@nicolargo nicolargo modified the milestones: Next releases, Glances 3.1.4 Feb 5, 2020
@nicolargo nicolargo linked a pull request Feb 16, 2020 that will close this issue
@kanyck
Copy link

kanyck commented May 22, 2020

3.1.4.1 still can't hide unneeded sensors.

@mabod
Copy link

mabod commented Jun 27, 2020

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

@distributorofpain
Copy link

@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

@mabod
Copy link

mabod commented Sep 7, 2020

@distributorofpain: What do you mean? I do not want to alias AUXTIN0 - 3. I want to hide them and the others.

@distributorofpain
Copy link

hiding is fine too, just wanted to know if you had tried to alias it since i cant seem to alias it.

@mabod
Copy link

mabod commented Sep 8, 2020

Aliases work fine for me:

AUXTIN0_alias=aaaa
AUXTIN1_alias=bbbb

But no hiding.

@distributorofpain
Copy link

Aliases work fine for me:

AUXTIN0_alias=aaaa
AUXTIN1_alias=bbbb

But no hiding.

Thanks! I see where i made my mistake.

@distributorofpain
Copy link

distributorofpain commented Sep 8, 2020

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...

@mabod
Copy link

mabod commented Sep 8, 2020

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.

@nicolargo nicolargo modified the milestones: Next releases, Glances 3.1.6 Sep 8, 2020
@modelrockettier
Copy link

Pull request #1596 will fix this issue, it just got closed for some reason without being applied.

@wolfallein
Copy link

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.

@dtalens
Copy link
Author

dtalens commented Jan 24, 2021

I also confirm pull request #1596 fix this but this patch is not applied at version 3.1.6.1

@dtalens
Copy link
Author

dtalens commented Mar 10, 2021

Manual #1596 fix has been applied in version 3.1.6.2 but do not work.
image

@nicolargo
Copy link
Owner

Re-apply in the develop branch => See commit 871b4c3

Sorry for that !

@gauvins2
Copy link

gauvins2 commented May 29, 2022

[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)

@nicolargo
Copy link
Owner

nicolargo commented May 29, 2022

It works (tested on the latest Glances 3.2.6.4 version).

Without hide:

sensors1

Whit hide=ambiant

sensors2

cc: @gauvins2

@hrandib
Copy link

hrandib commented Aug 18, 2022

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:
image

Glances v3.2.7 with PsUtil v5.9.1

@nicolargo nicolargo reopened this Aug 19, 2022
@nicolargo nicolargo added the bug label Aug 19, 2022
@dtalens
Copy link
Author

dtalens commented Aug 25, 2022

Hi, It works for me if I add lowercase aliases.
No configuration changes:
image

Adding this:

SYSTIN_alias=systin
AUXTIN1_alias=auxtin1
AUXTIN2_alias=auxtin2
AUXTIN3_alias=auxtin3
hide=systin,auxtin1,auxtin2,auxtin3

image

Glances version 3.2.7

@hrandib
Copy link

hrandib commented Aug 25, 2022

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?

@nicolargo
Copy link
Owner

@kanyck Yes, it will be corrected in the next release.

@nicolargo
Copy link
Owner

Done on the develop branch (see commit 1bed69b).

To be tested !

@gauvins2
Copy link

gauvins2 commented Aug 27, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants