]> git.ipfire.org Git - oddments/collecty.git/commitdiff
Drop entropy plugin
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 May 2020 18:41:27 +0000 (19:41 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 May 2020 18:41:27 +0000 (19:41 +0100)
This is no longer useful.

The Linux kernel has changed to only use the its internal PRNG
for /dev/random and /dev/urandom.

Once it is seeded, it will spit out as many random data as you
would like, but would not require an entropy pool being filled
up as much.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/collecty/plugins/__init__.py
src/collecty/plugins/entropy.py [deleted file]

index 62657b5ad513f5748e43467d459a2033ee1d10c8..7db621174f455839f5a73c665cced6505ffec9e3 100644 (file)
@@ -93,7 +93,6 @@ collectyplugins_PYTHON = \
        src/collecty/plugins/cpufreq.py \
        src/collecty/plugins/df.py \
        src/collecty/plugins/disk.py \
-       src/collecty/plugins/entropy.py \
        src/collecty/plugins/__init__.py \
        src/collecty/plugins/interface.py \
        src/collecty/plugins/interrupts.py \
index 9f583a9ee427fbe15b2cb89474ab7f0ef4d310fa..031a6d940660611ddaee543c616eca5b89a323ae 100644 (file)
@@ -27,7 +27,6 @@ from . import conntrack
 from . import cpufreq
 from . import df
 from . import disk
-from . import entropy
 from . import interface
 from . import interrupts
 from . import ipfrag
diff --git a/src/collecty/plugins/entropy.py b/src/collecty/plugins/entropy.py
deleted file mode 100644 (file)
index 352b6a3..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/python3
-###############################################################################
-#                                                                             #
-# collecty - A system statistics collection daemon for IPFire                 #
-# Copyright (C) 2012 IPFire development team                                  #
-#                                                                             #
-# This program is free software: you can redistribute it and/or modify        #
-# it under the terms of the GNU General Public License as published by        #
-# the Free Software Foundation, either version 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program is distributed in the hope that it will be useful,             #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
-# GNU General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-import os
-
-from . import base
-
-from ..colours import *
-from ..i18n import _
-
-ENTROPY_FILE = "/proc/sys/kernel/random/entropy_avail"
-
-class GraphTemplateEntropy(base.GraphTemplate):
-       name = "entropy"
-
-       @property
-       def rrd_graph(self):
-               _ = self.locale.translate
-
-               return [
-                       "LINE2:entropy%s:%-15s" % (PRIMARY, _("Available entropy")),
-                       "GPRINT:entropy_max:%12s\:" % _("Maximum") + " %5.0lf",
-                       "GPRINT:entropy_min:%12s\:" % _("Minimum") + " %5.0lf",
-                       "GPRINT:entropy_avg:%12s\:" % _("Average") + " %5.0lf\\n",
-               ]
-
-       lower_limit = 0
-
-       @property
-       def graph_title(self):
-               _ = self.locale.translate
-               return _("Available entropy")
-
-       @property
-       def graph_vertical_label(self):
-               _ = self.locale.translate
-               return _("Bit")
-
-
-class EntropyObject(base.Object):
-       rrd_schema = [
-               "DS:entropy:GAUGE:0:U",
-       ]
-
-       @property
-       def id(self):
-               return "default"
-
-       def collect(self):
-               with open(ENTROPY_FILE) as f:
-                       return f.readline().strip()
-
-
-class EntropyPlugin(base.Plugin):
-       name = "entropy"
-       description = "Entropy Plugin"
-
-       templates = [GraphTemplateEntropy]
-
-       @property
-       def objects(self):
-               if not os.path.exists(ENTROPY_FILE):
-                       self.log.debug(_("Entropy kernel interface does not exist"))
-                       return []
-
-               return [EntropyObject(self)]