summaryrefslogtreecommitdiff
path: root/multiload
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-07-28 20:04:17 +0200
committerraveit65 <[email protected]>2020-08-28 15:27:55 +0200
commitb6c109c51ea331a20a148f9e715efd2463623d42 (patch)
tree714947581a582debf07ee9eb519a6b273ebc940b /multiload
parent97cbce5b71f22c5bd435b249a0e9df07880cda7f (diff)
downloadmate-applets-b6c109c51ea331a20a148f9e715efd2463623d42.tar.bz2
mate-applets-b6c109c51ea331a20a148f9e715efd2463623d42.tar.xz
multiload: Remove dead function - GetPage
Diffstat (limited to 'multiload')
-rw-r--r--multiload/linux-proc.c48
-rw-r--r--multiload/linux-proc.h3
2 files changed, 0 insertions, 51 deletions
diff --git a/multiload/linux-proc.c b/multiload/linux-proc.c
index ea417421..0a011971 100644
--- a/multiload/linux-proc.c
+++ b/multiload/linux-proc.c
@@ -208,54 +208,6 @@ GetDiskLoad (int Maximum,
data [diskload_free] = Maximum - (data [0] + data[1]);
}
-#if 0
-void
-GetPage (int Maximum, int data [3], LoadGraph *g)
-{
- static int max = 100; /* guess at maximum page rate (= in + out) */
- static u_int64_t lastin = 0;
- static u_int64_t lastout = 0;
- int in, out, idle;
-
- glibtop_swap swap;
-
- glibtop_get_swap (&swap);
-
- assert ((swap.flags & needed_page_flags) == needed_page_flags);
-
- if ((lastin > 0) && (lastin < swap.pagein)) {
- in = swap.pagein - lastin;
- }
- else {
- in = 0;
- }
- lastin = swap.pagein;
-
- if ((lastout > 0) && (lastout < swap.pageout)) {
- out = swap.pageout - lastout;
- }
- else {
- out = 0;
- }
- lastout = swap.pageout;
-
- if ((in + out) > max) {
- /* Maximum page rate has increased. Change the scale without
- any indication whatsoever to the user (not a nice thing to
- do). */
- max = in + out;
- }
-
- in = rint (Maximum * ((float)in / max));
- out = rint (Maximum * ((float)out / max));
- idle = Maximum - in - out;
-
- data [0] = in;
- data [1] = out;
- data [2] = idle;
-}
-#endif /* 0 */
-
void
GetMemory (int Maximum,
int data [memload_n],
diff --git a/multiload/linux-proc.h b/multiload/linux-proc.h
index b64a7e8a..0aba1a0e 100644
--- a/multiload/linux-proc.h
+++ b/multiload/linux-proc.h
@@ -5,9 +5,6 @@
G_GNUC_INTERNAL void GetLoad (int Maximum, int data [cpuload_n], LoadGraph *g);
G_GNUC_INTERNAL void GetDiskLoad (int Maximum, int data [diskload_n], LoadGraph *g);
-#if 0
-G_GNUC_INTERNAL void GetPage (int Maximum, int data [3], LoadGraph *g);
-#endif /* 0 */
G_GNUC_INTERNAL void GetMemory (int Maximum, int data [memload_n], LoadGraph *g);
G_GNUC_INTERNAL void GetSwap (int Maximum, int data [swapload_n], LoadGraph *g);
G_GNUC_INTERNAL void GetLoadAvg (int Maximum, int data [2], LoadGraph *g);