From eb7d3d28c2bf5538e5d2b8db223b072d05fc3b36 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 17 Feb 2024 16:59:35 +0100 Subject: Improve DiskIO launch --- glances/plugins/diskio/__init__.py | 4 ++++ glances/plugins/network/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/glances/plugins/diskio/__init__.py b/glances/plugins/diskio/__init__.py index f7113e85..9e9bcc7c 100644 --- a/glances/plugins/diskio/__init__.py +++ b/glances/plugins/diskio/__init__.py @@ -89,6 +89,10 @@ class PluginModel(GlancesPluginModel): self.hide_zero = False self.hide_zero_fields = ['read_bytes', 'write_bytes'] + # Force a first update because we need two updates to have the first stat + self.update() + self.refresh_timer.set(0) + def get_key(self): """Return the key of the list.""" return 'disk_name' diff --git a/glances/plugins/network/__init__.py b/glances/plugins/network/__init__.py index 97dff671..be354355 100644 --- a/glances/plugins/network/__init__.py +++ b/glances/plugins/network/__init__.py @@ -105,7 +105,7 @@ class PluginModel(GlancesPluginModel): self.hide_zero = False self.hide_zero_fields = ['bytes_recv', 'bytes_sent'] - # Force a first update because we need two update to have the first stat + # Force a first update because we need two updates to have the first stat self.update() self.refresh_timer.set(0) -- cgit v1.2.3