nicolargo / glances

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
http://nicolargo.github.io/glances/
Other
26.7k stars 1.53k forks source link

hide_zero=True option not working in the WebUI #2987

Open sector1209 opened 5 days ago

sector1209 commented 5 days ago

Check the bug

Before filling this bug report, please search if a similar issue already exists. In this case, just add a comment on this existing issue.

Describe the bug

Setting hide_zero=True option under [network] or [diskio] in glances.conf does not, infact, hide network interfaces with 0 I/O.

To Reproduce

Add hide_zero=True option to network settings (as here: https://github.com/nicolargo/glances/issues/2929#issuecomment-2336759684)

[network] ... hide_zero=True

Restart glances with glances webpage (glances -w --config /etc/glances.conf) with the [network] section

Expected behavior I expected network interfaces with 0 Rx/s and 0 Tx/s to no longer be shown in the list after restarting glances.

Screenshots

Environement

Distributor ID: Ubuntu Description: Ubuntu 24.04.1 LTS Release: 24.04 noble

Additional context This is my first github issue so please let me know if I've made an unforgivable formatting error.

nicolargo commented 4 days ago

Hi @sector1209

your configuration key is ok but are you sure that Glances is ran with the "good" configuration file ?

Force the use of the modified configuration file with:

glances -C /your/path/to/glances.conf -w

Nicolas

sector1209 commented 4 days ago

Hi @sector1209

your configuration key is ok but are you sure that Glances is ran with the "good" configuration file ?

Force the use of the modified configuration file with:

glances -C /your/path/to/glances.conf -w

Nicolas

Tried it, still no luck

sector1209 commented 3 days ago

I've also since tried in an Alpine Linux VM (installed with pipx again) and got the same result

nicolargo commented 2 days ago

Correct @sector1209

also reproduced on my side in the WebUI. TUI works perfectly.

Will have a look as soon as possible.

Thanks for the head up @sector1209 !

nicolargo commented 2 days ago

Should be corrected in the develop branch.

Please can you test it ?

sector1209 commented 1 day ago

Should be corrected in the develop branch.

Please can you test it ?

Like I said this is a new one for me so please bear with me :)

I cloned the develop branch in an ubuntu docker container and ran make run after editing the config file in conf/glances.config to include hide_zero=True for both [network] and [diskio].

There's one network under [networks] that always has 0Rx/s / 0Tx/s, this always seems to show whether hide_zero is T or F Under [diskio] was a similar story:

1) hide_zero=False, #hide_threshold_bytes=0 glances diskio -hzfalse-nominthresh

2) hide_zero=True, #hide_threshold_bytes=0 glances diskio -hztrue-nominthresh

3) hide_zero=True, hide_threshold_bytes=0 glances diskio -hztrue-yesminthresh

It seems to me like maybe hide_zero=True hides disks with 0 r/w initially, but fails to remove them if they do something then go back to zero again.