summaryrefslogtreecommitdiff
path: root/src/procproperties.cpp
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-04-20 12:01:36 +0200
committerlukefromdc <[email protected]>2019-04-28 22:34:36 -0400
commitfc1f63b1c04cb6101f3a780e104a7f295c4d307a (patch)
tree0c75dd1010650682f6d199e247ec6d1962511c78 /src/procproperties.cpp
parent1f42b9e3ab7f82825f2d0dc83a57163f5c67621c (diff)
downloadmate-system-monitor-fc1f63b1c04cb6101f3a780e104a7f295c4d307a.tar.bz2
mate-system-monitor-fc1f63b1c04cb6101f3a780e104a7f295c4d307a.tar.xz
Add disk IO on process info
Based on GNOME/gnome-system-monitor@60a787b
Diffstat (limited to 'src/procproperties.cpp')
-rw-r--r--src/procproperties.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/procproperties.cpp b/src/procproperties.cpp
index 1570bdb..d07da69 100644
--- a/src/procproperties.cpp
+++ b/src/procproperties.cpp
@@ -101,6 +101,15 @@ format_memsize(guint64 size)
return g_format_size_full(size, G_FORMAT_SIZE_IEC_UNITS);
}
+static gchar*
+format_size(guint64 size)
+{
+ if (size == 0)
+ return g_strdup(_("N/A"));
+ else
+ return g_format_size(size);
+}
+
static void
fill_proc_properties (GtkWidget *tree, ProcInfo *info)
{
@@ -122,6 +131,8 @@ fill_proc_properties (GtkWidget *tree, ProcInfo *info)
{ N_("Writable Memory"), format_memsize(info->memwritable)},
{ N_("Shared Memory"), format_memsize(info->memshared)},
{ N_("X Server Memory"), format_memsize(info->memxserver)},
+ { N_("Disk Read Total"), format_size(info->disk_read_bytes_total)},
+ { N_("Disk Write Total"), format_size(info->disk_write_bytes_total)},
{ N_("CPU"), g_strdup_printf("%d%%", info->pcpu)},
{ N_("CPU Time"), procman::format_duration_for_display(100 * info->cpu_time / ProcData::get_instance()->frequency) },
{ N_("Started"), procman_format_date_for_display(info->start_time) },