Module: check_mk
Branch: master
Commit: 8a8a130bd60cf4b4b156b5924444032e9cb8d7d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8a8a130bd60cf4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 08:43:07 2016 +0100
Removed unused function
---
checks/ps | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/checks/ps b/checks/ps
index 12d821f..ac8c386 100644
--- a/checks/ps
+++ b/checks/ps
@@ -125,32 +125,6 @@ def ps_get_current_pids(parsed):
return pids
-# Makes sure, that no counter with a give prefix is kept longer
-# than min_keep_seconds * 2. Counter is kept at least min_keep_seconds.
-def clear_counters(counter_name_prefix, min_keep_seconds):
- global g_item_state
-
- counters_to_delete = []
-
- for name, state in g_item_state.iteritems():
- if type(name) == tuple:
- counter_name = name[0] # never needed, since only called by ps currently
- else:
- counter_name = name
-
- if type(state) == tuple:
- timestamp, value = state
- else:
- continue # unable to cleanup values without timestamp info, skip
-
- if counter_name.startswith(counter_name_prefix):
- if timestamp < remove_if_min_keep_seconds:
- counters_to_delete.append(name)
-
- for name in counters_to_delete:
- del g_item_state[name]
-
-
# FIXME: Refactor this function for better readability
def ps_merge_wmic_info(info):
ps_result = []
Module: check_mk
Branch: master
Commit: 51ef7175ae504484253ba3e9012867e50e7e9cd9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=51ef7175ae5044…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 15 16:50:22 2016 +0100
Fixed duplicate definition of function fix_if_64_highspeed()
---
checks/if.include | 7 +++++++
checks/if_brocade | 5 -----
checks/if_lancom | 5 -----
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/checks/if.include b/checks/if.include
index 26c19d4..89d8a26 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -59,6 +59,13 @@ if_disable_if64_hosts = [] # Binary host list for disabling if64 on some broken
def if64_disabled(hostname):
return in_binary_hostlist(hostname, if_disable_if64_hosts)
+
+def fix_if_64_highspeed(info):
+ for line in info:
+ if type(line[3]) in [ str, unicode ]: # not yet converted
+ line[3] = saveint(line[3]) * 1000000
+
+
# Remove 0 bytes from strings. They lead to problems e.g. here:
# On windows hosts the labels of network interfaces in oid
# iso.3.6.1.2.1.2.2.1.2.1 are given as hex strings with tailing
diff --git a/checks/if_brocade b/checks/if_brocade
index 37b50e2..c6cc193 100644
--- a/checks/if_brocade
+++ b/checks/if_brocade
@@ -24,11 +24,6 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-def fix_if_64_highspeed(info):
- for line in info:
- if type(line[3]) in [ str, unicode ]: # not yet converted
- line[3] = saveint(line[3]) * 1000000
-
def if_brocade_convert(info):
iftab, ssidtab = info
ssid_dict = dict(ssidtab)
diff --git a/checks/if_lancom b/checks/if_lancom
index 9c9b035..15f3c4b 100644
--- a/checks/if_lancom
+++ b/checks/if_lancom
@@ -24,11 +24,6 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-def fix_if_64_highspeed(info):
- for line in info:
- if type(line[3]) in [ str, unicode ]: # not yet converted
- line[3] = saveint(line[3]) * 1000000
-
def if_lancom_convert(info):
iftab, ssidtab = info
ssid_dict = dict(ssidtab)