summaryrefslogtreecommitdiff
path: root/src/procdialogs.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-18 20:58:16 +0100
committerinfirit <[email protected]>2014-12-18 21:04:53 +0100
commit76eff089e1ba541cece59f6d2f5847f349448f89 (patch)
treea45acda13ac9ff08b898a9f98638a1ee4edcaf45 /src/procdialogs.cpp
parent396b01dc3e3a704c0015874002b76a5ccda0678a (diff)
downloadmate-system-monitor-76eff089e1ba541cece59f6d2f5847f349448f89.tar.bz2
mate-system-monitor-76eff089e1ba541cece59f6d2f5847f349448f89.tar.xz
Add cgroup support in the process view
Add a new 'Control Group' column to the process view tab. The format for the column is: <path name> (controller name), <path name> (controller name)... Processes that share the same path name across controllers are colesced. For example if a process is in the /foo cgroup for both the memory and cpu controllers, it would display as: /foo (memory,cpu), ... Taken from GSM commits: 2d33adcbc4347c112d57082956b4e199ff7132db Add cgroup support in the process view 645d38a218fedcbf9c7b674740bf213e02933820 Optimize cgroup updating From: Jason Baron <[email protected]>
Diffstat (limited to 'src/procdialogs.cpp')
-rw-r--r--src/procdialogs.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index 449679d..d129bd9 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -34,6 +34,7 @@
#include "settings-keys.h"
#include "procman_matesu.h"
#include "procman_gksu.h"
+#include "cgroups.h"
static GtkWidget *renice_dialog = NULL;
static GtkWidget *prefs_dialog = NULL;
@@ -470,11 +471,16 @@ create_field_page(GtkWidget *tree, const char* text)
GtkTreeIter iter;
const gchar *title;
gboolean visible;
+ gint column_id;
title = gtk_tree_view_column_get_title (column);
if (!title)
title = _("Icon");
+ column_id = gtk_tree_view_column_get_sort_column_id(column);
+ if ((column_id == COL_CGROUP) && (!cgroups_enabled()))
+ continue;
+
visible = gtk_tree_view_column_get_visible (column);
gtk_list_store_append (model, &iter);