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

Optimize Network and DiskIO space by not displaying 0 stats #1787

Open
nicolargo opened this issue Jan 6, 2021 · 5 comments
Open

Optimize Network and DiskIO space by not displaying 0 stats #1787

nicolargo opened this issue Jan 6, 2021 · 5 comments
Assignees
Milestone

Comments

@nicolargo
Copy link
Owner

nicolargo commented Jan 6, 2021

Is your feature request related to a problem? Please describe.

For the moment, Glances display stats even if it is always set to 0.
Example: DiskIO, Network...

Describe the solution you'd like

Only display the stats from the moment where its value is is != 0.

@nicolargo
Copy link
Owner Author

Done in the Curse interface.

Before:
before

After:
after

@notFloran Please can you make the change on the WebUI for Network and DiskIO plugin. A new field called hidden is available in the views dictionnary.

@nicolargo nicolargo changed the title Optimize plugins space by not displaying 0 stats Optimize Network and DiskIO space by not displaying 0 stats Jan 23, 2021
@notFloran notFloran self-assigned this Jan 23, 2021
@fcalvet
Copy link
Contributor

fcalvet commented Feb 5, 2021

Hi,

Using glances 3.1.6.1 (Ubuntu 20.10 64bit / Linux 5.8.0-41-generic), I've got the following issue using the Curse interface:

  • in the DISK I/O section: the whole list becomes empty during a few refresh intervals (and is shown again after); it can also happen that only half the list is shown.
  • in the NETWORK section: the lo interface is rarely shown (but sometimes appears during a refresh interval).

Both issues weren't notice on previously used version 3.1.5

I believe this could be related to the proposed improvement here as it seems that instead of checking if the value as never been different from zero from the start-up of glances (and as such never removing items from network/disk lists), we could be checking whether in the last interval the info to display is 0 (or something else resulting in the transient behaviour).
(if you prefer a separate issue, sorry in advance and I can open one).

As a remark, this issue is also not listed in the changelog for 3.1.6 despite commit c3ef20c being included.

@nicolargo
Copy link
Owner Author

My mistake... The commit c3ef20c should not have been in the develop branch...

I will publish a patch in the 3.1.6.2 version. The optimize behavor will be desabled by default (you can enable it by adding the hide_zero=True option in the network and diskio sections of the Glances logs file).

Second step will be to correct the error... :)

@imdebating
Copy link

Thanks for the update on this -- I was wracking my brain to see what was going on :) Couldn't find anything in the released source or documentation.

Looking forward to this but maybe we could have some "sticky" items we can always keep in the list, i.e. I would never want my main HDD or IF to disappear with 0, but maybe it doesn't matter for my virtual interfaces and can save space.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Mar 8, 2021
Changes since 3.1.6.1:

Version 3.1.6.2
===============

Bugs corrected:

    * Remove bad merge for a non tested feature
      (see nicolargo/glances#1787 (comment))
@valen214
Copy link

valen214 commented Sep 8, 2021

Thanks for the update on this -- I was wracking my brain to see what was going on :) Couldn't find anything in the released source or documentation.

Looking forward to this but maybe we could have some "sticky" items we can always keep in the list, i.e. I would never want my main HDD or IF to disappear with 0, but maybe it doesn't matter for my virtual interfaces and can save space.

does adding config option like
hide_zero_regex=(loop[0-9]) or
hide_zero_regex=/snap/*
look nice to you?

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

No branches or pull requests

5 participants