summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rwxr-xr-xcollectors/all.h9
-rw-r--r--[-rwxr-xr-x]collectors/proc.plugin/README.md38
-rw-r--r--collectors/proc.plugin/plugin_proc.c1
-rw-r--r--collectors/proc.plugin/plugin_proc.h1
-rw-r--r--collectors/proc.plugin/proc_mdstat.c454
-rw-r--r--collectors/python.d.plugin/cpufreq/README.md5
-rw-r--r--collectors/python.d.plugin/mdstat/README.md5
-rw-r--r--[-rwxr-xr-x]collectors/python.d.plugin/python.d.plugin.in2
9 files changed, 512 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index efcb3380b3..479c4c0aed 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -237,6 +237,7 @@ PROC_PLUGIN_FILES = \
collectors/proc.plugin/plugin_proc.c \
collectors/proc.plugin/plugin_proc.h \
collectors/proc.plugin/proc_diskstats.c \
+ collectors/proc.plugin/proc_mdstat.c \
collectors/proc.plugin/proc_interrupts.c \
collectors/proc.plugin/proc_softirqs.c \
collectors/proc.plugin/proc_loadavg.c \
diff --git a/collectors/all.h b/collectors/all.h
index 5e226b2a2d..a469c3efe7 100755
--- a/collectors/all.h
+++ b/collectors/all.h
@@ -298,6 +298,15 @@
#define NETDATA_CHART_PRIO_SYNPROXY_CONN_OPEN 8753
#define NETDATA_CHART_PRIO_SYNPROXY_ENTRIES 8754
+// MDSTAT
+
+#define NETDATA_CHART_PRIO_MDSTAT_HEALTH 9000
+#define NETDATA_CHART_PRIO_MDSTAT_DISKS 9001 // 5 charts per raid
+#define NETDATA_CHART_PRIO_MDSTAT_MISMATCH 9002
+#define NETDATA_CHART_PRIO_MDSTAT_OPERATION 9003
+#define NETDATA_CHART_PRIO_MDSTAT_FINISH 9004
+#define NETDATA_CHART_PRIO_MDSTAT_SPEED 9005
+
// CGROUPS
#define NETDATA_CHART_PRIO_CGROUPS_SYSTEMD 19000 // many charts
diff --git a/collectors/proc.plugin/README.md b/collectors/proc.plugin/README.md
index d264c83179..89249891aa 100755..100644
--- a/collectors/proc.plugin/README.md
+++ b/collectors/proc.plugin/README.md
@@ -2,6 +2,7 @@
- `/proc/net/dev` (all network interfaces for all their values)
- `/proc/diskstats` (all disks for all their values)
+ - `/proc/mdstat` (status of RAID arrays)
- `/proc/net/snmp` (total IPv4, TCP and UDP usage)
- `/proc/net/snmp6` (total IPv6 usage)
- `/proc/net/netstat` (more IPv4 usage)
@@ -117,7 +118,7 @@ Then edit `netdata.conf` and find the following section. This is the basic plugi
# path to get h/w sector size = /sys/block/%s/queue/hw_sector_size
# path to get h/w sector size for partitions = /sys/dev/block/%lu:%lu/subsystem/%s/../queue
/hw_sector_size
-
+
```
For each virtual disk, physical disk and partition you will have a section like this:
@@ -160,13 +161,44 @@ But sometimes you need disable performance metrics for all devices with the same
251 2 zram2 27487 0 219896 188 79953 0 639624 1640 0 1828 1828
251 3 zram3 27348 0 218784 152 79952 0 639616 1960 0 2060 2104
```
-All zram devices starts with `251` number and all loop devices starts with `7`.
+All zram devices starts with `251` number and all loop devices starts with `7`.
So, to disable performance metrics for all loop devices you could add `performance metrics for disks with major 7 = no` to `[plugin:proc:/proc/diskstats]` section.
```
[plugin:proc:/proc/diskstats]
performance metrics for disks with major 7 = no
```
+## Monitoring RAID arrays
+
+### Monitored RAID array metrics
+
+1. **Health** Number of failed disks in every array (aggregate chart).
+
+2. **Disks stats**
+ * total (number of devices array ideally would have)
+ * inuse (number of devices currently are in use)
+
+3. **Mismatch count**
+ * unsynchronized blocks
+
+4. **Current status**
+ * resync in percent
+ * recovery in percent
+ * reshape in percent
+ * check in percent
+
+5. **Operation status** (if resync/recovery/reshape/check is active)
+ * finish in minutes
+ * speed in megabytes/s
+
+#### configuration
+
+```
+[plugin:proc:/proc/mdstat]
+ # mismatch_cnt filename to monitor = /sys/block/%s/md/mismatch_cnt
+ # filename to monitor = /proc/mdstat
+```
+
## Monitoring CPUs
The `/proc/stat` module monitors CPU utilization, interrupts, context switches, processes started/running, thermal throttling, frequency, and idle states. It gathers this information from multiple files.
@@ -239,4 +271,4 @@ Example image:
![ddos](https://cloud.githubusercontent.com/assets/2662304/14398891/6016e3fc-fdf0-11e5-942b-55de6a52cb66.gif)
-See Linux Anti-DDoS in action at: **[netdata demo site (with SYNPROXY enabled)](https://registry.my-netdata.io/#menu_netfilter_submenu_synproxy)**
+See Linux Anti-DDoS in action at: **[netdata demo site (with SYNPROXY enabled)](https://registry.my-netdata.io/#menu_netfilter_submenu_synproxy)**
diff --git a/collectors/proc.plugin/plugin_proc.c b/collectors/proc.plugin/plugin_proc.c
index 0c3244d61d..5301702e7a 100644
--- a/collectors/proc.plugin/plugin_proc.c
+++ b/collectors/proc.plugin/plugin_proc.c
@@ -49,6 +49,7 @@ static struct proc_module {
// disk metrics
{ .name = "/proc/diskstats", .dim = "diskstats", .func = do_proc_diskstats },
+ { .name = "/proc/mdstat", .dim = "mdstat", .func = do_proc_mdstat },
// NFS metrics
{ .name = "/proc/net/rpc/nfsd", .dim = "nfsd", .func = do_proc_net_rpc_nfsd },
diff --git a/collectors/proc.plugin/plugin_proc.h b/collectors/proc.plugin/plugin_proc.h
index bfefe1ad4e..ae50a94d6d 100644
--- a/collectors/proc.plugin/plugin_proc.h
+++ b/collectors/proc.plugin/plugin_proc.h
@@ -26,6 +26,7 @@ extern void *proc_main(void *ptr);
extern int do_proc_net_dev(int update_every, usec_t dt);
extern int do_proc_diskstats(int update_every, usec_t dt);
+extern int do_proc_mdstat(int update_every, usec_t dt);
extern int do_proc_net_snmp(int update_every, usec_t dt);
extern int do_proc_net_snmp6(int update_every, usec_t dt);
extern int do_proc_net_netstat(int update_every, usec_t dt);
diff --git a/collectors/proc.plugin/proc_mdstat.c b/collectors/proc.plugin/proc_mdstat.c
new file mode 100644
index 0000000000..8f489371c8
--- /dev/null
+++ b/collectors/proc.plugin/proc_mdstat.c
@@ -0,0 +1,454 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include "plugin_proc.h"
+
+#define PLUGIN_PROC_MODULE_MDSTAT_NAME "/proc/mdstat"
+
+struct raid {
+ int used;
+ char *name;
+ RRDDIM *rd_health;
+ unsigned long long failed_disks;
+
+ RRDSET *st_disks;
+ RRDDIM *rd_total;
+ RRDDIM *rd_inuse;
+ unsigned long long total_disks;
+ unsigned long long inuse_disks;
+
+ RRDSET *st_operation;
+ RRDDIM *rd_check;
+ RRDDIM *rd_resync;
+ RRDDIM *rd_recovery;
+ RRDDIM *rd_reshape;
+ unsigned long long check;
+ unsigned long long resync;
+ unsigned long long recovery;
+ unsigned long long reshape;
+
+ RRDSET *st_finish;
+ RRDDIM *rd_finish_in;
+ unsigned long long finish_in;
+
+ RRDSET *st_speed;
+ RRDDIM *rd_speed;
+ unsigned long long speed;
+
+ char *mismatch_cnt_filename;
+ RRDSET *st_mismatch_cnt;
+ RRDDIM *rd_mismatch_cnt;
+ unsigned long long mismatch_cnt;
+};
+
+static inline char *remove_trailing_chars(char *s, char c) {
+ while(*s) {
+ if(unlikely(*s == c)) {
+ *s = '\0';
+ }
+ s++;
+ }
+ return s;
+}
+
+int do_proc_mdstat(int update_every, usec_t dt) {
+ (void)dt;
+ static procfile *ff = NULL;
+ static char *mdstat_filename = NULL, *mismatch_cnt_filename = NULL;
+ static struct raid *raids = NULL;
+ static size_t raids_num = 0, raids_allocated = 0;
+ size_t raid_idx = 0;
+
+ if(unlikely(!mismatch_cnt_filename)) {
+ char filename[FILENAME_MAX + 1];
+ snprintfz(filename, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/sys/block/%s/md/mismatch_cnt");
+ mismatch_cnt_filename = config_get("plugin:proc:/proc/mdstat", "mismatch_cnt filename to monitor", filename);
+ }
+
+ if(unlikely(!ff)) {
+ char filename[FILENAME_MAX + 1];
+ snprintfz(filename, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/proc/mdstat");
+ mdstat_filename = config_get("plugin:proc:/proc/mdstat", "filename to monitor", filename);
+ ff = procfile_open(mdstat_filename, " \t:", PROCFILE_FLAG_DEFAULT);
+ if(unlikely(!ff)) return 1;
+ }
+
+ ff = procfile_readall(ff);
+ if(unlikely(!ff)) return 0; // we return 0, so that we will retry opening it next time
+
+ size_t lines = procfile_lines(ff);
+ size_t words = 0;
+
+ if(unlikely(lines < 2)) {
+ error("Cannot read /proc/mdstat. Expected 2 or more lines, read %zu.", lines);
+ return 1;
+ }
+
+ // find how many raids are there
+ size_t l;
+ raids_num = 0;
+ for(l = 1; l < lines - 2 ; l++) {
+ if(unlikely(procfile_lineword(ff, l, 1)[0] == 'a')) // check if the raid is active
+ raids_num++;
+ }
+
+ if(unlikely(!raids_num)) return 0; // we return 0, so that we will retry searching for raids next time
+
+ // allocate the memory we need;
+ if(unlikely(raids_num != raids_allocated)) {
+ for(raid_idx = 0; raid_idx < raids_allocated; raid_idx++) {
+ struct raid *raid = &raids[raid_idx];
+ freez(raid->name);
+ freez(raid->mismatch_cnt_filename);
+ }
+ raids = (struct raid *)reallocz(raids, raids_num * sizeof(struct raid));
+ raids_allocated = raids_num;
+ memset(raids, 0, raids_num * sizeof(struct raid));
+ }
+
+ // loop through all lines except the first and the last ones
+ for(l = 1, raid_idx = 0; l < (lines - 2) && raid_idx < raids_num; l++) {
+ struct raid *raid = &raids[raid_idx];
+ raid->used = 0;
+
+ words = procfile_linewords(ff, l);
+ if(unlikely(words < 2)) continue;
+
+ if(unlikely(procfile_lineword(ff, l, 1)[0] != 'a')) continue;
+ if(!raid->name) {
+ raid->name = strdupz(procfile_lineword(ff, l, 0));
+ }
+ else if(strcmp(raid->name, procfile_lineword(ff, l, 0))) {
+ freez(raid->name);
+ freez(raid->mismatch_cnt_filename);
+ memset(raid, 0, sizeof(struct raid));
+ raid->name = strdupz(procfile_lineword(ff, l, 0));
+ }
+ if(unlikely(!raid->name || !raid->name[0])) continue;
+ raid_idx++;
+
+ // check if raid has disk status
+ l++;
+ words = procfile_linewords(ff, l);
+ if(words < 2 || procfile_lineword(ff, l, words - 1)[0] != '[') {
+ continue;
+ }
+
+ // split inuse and total number of disks
+ char *s = NULL, *str_total = NULL, *str_inuse = NULL;
+
+ s = procfile_lineword(ff, l, words - 2);
+ if(unlikely(s[0] != '[')) {
+ error("Cannot read /proc/mdstat raid health status. Unexpected format: missing opening bracket.");
+ continue;
+ }
+ str_total = ++s;
+ while(*s) {
+ if(unlikely(*s == '/')) {
+ *s = '\0';
+ str_inuse = s + 1;
+ }
+ else if(unlikely(*s == ']')) {
+ *s = '\0';
+ break;
+ }
+ s++;
+ }
+ if(unlikely(str_total[0] == '\0' || str_inuse[0] == '\0')) {
+ error("Cannot read /proc/mdstat raid health status. Unexpected format.");
+ continue;
+ }
+
+ raid->inuse_disks = str2ull(str_inuse);
+ raid->total_disks = str2ull(str_total);
+ raid->failed_disks = raid->total_disks - raid->inuse_disks;
+
+ raid->used = 1;
+
+ raid->check = 0;
+ raid->resync = 0;
+ raid->recovery = 0;
+ raid->reshape = 0;
+ raid->finish_in = 0;
+ raid->speed = 0;
+
+ // check if any operation is performed on the raid
+ l++;
+ words = procfile_linewords(ff, l);
+ if(likely(words < 2)) continue;
+ if(unlikely(words < 7)) {
+ error("Cannot read /proc/mdstat line. Expected 7 params, read %zu.", words);
+ continue;
+ }
+ if(unlikely(procfile_lineword(ff, l, 0)[0] != '[')) continue;
+ char *word;
+
+ word = procfile_lineword(ff, l, 3);
+ remove_trailing_chars(word, '%');
+
+ unsigned long long percentage = (unsigned long long)(str2ld(word, NULL) * 100);
+ // possible operations: check, resync, recovery, reshape
+ // 4-th character is unique for each operation so it is checked
+ switch(procfile_lineword(ff, l, 1)[3]) {
+ case 'c': // check
+ raid->check = percentage;
+ break;
+ case 'y': // resync
+ raid->resync = percentage;
+ break;
+ case 'o': // recovery
+ raid->recovery = percentage;
+ break;
+ case 'h': // reshape
+ raid->reshape = percentage;
+ break;
+ }
+
+ word = procfile_lineword(ff, l, 5);
+ s = remove_trailing_chars(word, 'm'); // remove trailing "min"
+
+ word += 7; // skip leading "finish="
+
+ if(likely(s > word))
+ raid->finish_in = (unsigned long long)(str2ld(word, NULL) * 60);
+
+ word = procfile_lineword(ff, l, 6);
+ s = remove_trailing_chars(word, 'K'); // remove trailing "K/sec"
+
+ word += 6; // skip leading "speed="
+
+ if(likely(s > word))
+ raid->speed = str2ull(word);
+ }
+
+ // read mismatch_cnt files
+ for(raid_idx = 0; raid_idx < raids_num ; raid_idx++) {
+ char filename[FILENAME_MAX + 1];
+ struct raid *raid = &raids[raid_idx];
+
+ if(likely(raid->used)) {
+ if(!raid->mismatch_cnt_filename) {
+ snprintfz(filename, FILENAME_MAX, mismatch_cnt_filename, raid->name);
+ raid->mismatch_cnt_filename = strdupz(filename);
+ }
+ if(unlikely(read_single_number_file(raid->mismatch_cnt_filename, &raid->mismatch_cnt))) {
+ error("Cannot read file '%s'", raid->mismatch_cnt_filename);
+ return 1;
+ }
+ }
+ }
+
+ // --------------------------------------------------------------------
+
+ static RRDSET *st_mdstat_health = NULL;
+ if(unlikely(!st_mdstat_health))
+ st_mdstat_health = rrdset_create_localhost(
+ "mdstat"
+ , "mdstat_health"
+ , NULL
+ , "health"
+ , "md.health"
+ , "Faulty Devices In MD"
+ , "failed disks"
+ , PLUGIN_PROC_NAME
+ , PLUGIN_PROC_MODULE_MDSTAT_NAME
+ , NETDATA_CHART_PRIO_MDSTAT_HEALTH
+ , update_every
+ , RRDSET_TYPE_LINE
+ );
+ else
+ rrdset_next(st_mdstat_health);
+
+ for(raid_idx = 0; raid_idx < raids_num; raid_idx++) {
+ struct raid *raid = &raids[raid_idx];
+
+ if(likely(raid->used)) {
+ if(unlikely(!raid->rd_health && !(raid->rd_health = rrddim_find(st_mdstat_health, raid->name))))
+ raid->rd_health = rrddim_add(st_mdstat_health, raid->name, NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+
+ rrddim_set_by_pointer(st_mdstat_health, raid->rd_health, raid->failed_disks);
+ }
+ }
+
+ rrdset_done(st_mdstat_health);
+
+ // --------------------------------------------------------------------
+
+ for(raid_idx = 0; raid_idx < raids_num ; raid_idx++) {
+ struct raid *raid = &raids[raid_idx];
+ char id[50 + 1];
+ char family[50 + 1];
+
+ if(likely(raid->used)) {
+ snprintfz(id, 50, "%s_disks", raid->name);
+
+ if(unlikely(!raid->st_disks && !(raid->st_disks = rrdset_find_byname_localhost(id)))) {
+ snprintfz(family, 50, "%s", raid->name);
+ raid->st_disks = rrdset_create_localhost(
+ "mdstat"
+ , id
+ , NULL
+ , family
+ , "md.disks"
+ , "Disks Stats"
+ , "disks"
+ , PLUGIN_PROC_NAME
+ , PLUGIN_PROC_MODULE_MDSTAT_NAME
+ , NETDATA_CHART_PRIO_MDSTAT_DISKS + raid_idx * 10
+ , update_every
+ , RRDSET_TYPE_STACKED
+ );
+ }
+ else
+ rrdset_next(raid->st_disks);
+
+ if(unlikely(!raid->rd_inuse && !(raid->rd_inuse = rrddim_find(raid->st_disks, "inuse"))))
+ raid->rd_inuse = rrddim_add(raid->st_disks, "inuse", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+ if(unlikely(!raid->rd_total && !(raid->rd_total = rrddim_find(raid->st_disks, "total"))))
+ raid->rd_total = rrddim_add(raid->st_disks, "total", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+
+ rrddim_set_by_pointer(raid->st_disks, raid->rd_inuse, raid->inuse_disks);
+ rrddim_set_by_pointer(raid->st_disks, raid->rd_total, raid->total_disks);
+
+ rrdset_done(raid->st_disks);
+
+ // --------------------------------------------------------------------
+
+ snprintfz(id, 50, "%s_mismatch", raid->name);
+
+ if(unlikely(!raid->st_mismatch_cnt && !(raid->st_mismatch_cnt = rrdset_find_byname_localhost(id)))) {
+ snprintfz(family, 50, "%s", raid->name);
+
+ raid->st_mismatch_cnt = rrdset_create_localhost(
+ "mdstat"
+ , id
+ , NULL
+ , family
+ , "md.mismatch_cnt"
+ , "Mismatch Count"
+ , "unsynchronized blocks"
+ , PLUGIN_PROC_NAME
+ , PLUGIN_PROC_MODULE_MDSTAT_NAME
+ , NETDATA_CHART_PRIO_MDSTAT_MISMATCH + raid_idx * 10
+ , update_every
+ , RRDSET_TYPE_LINE
+ );
+ }
+ else
+ rrdset_next(raid->st_mismatch_cnt);
+
+ if(unlikely(!raid->rd_mismatch_cnt && !(raid->rd_mismatch_cnt = rrddim_find(raid->st_mismatch_cnt, "count"))))
+ raid->rd_mismatch_cnt = rrddim_add(raid->st_mismatch_cnt, "count", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+
+ rrddim_set_by_pointer(raid->st_mismatch_cnt, raid->rd_mismatch_cnt, raid->mismatch_cnt);
+
+ rrdset_done(raid->st_mismatch_cnt);
+
+ // --------------------------------------------------------------------
+
+ snprintfz(id, 50, "%s_operation", raid->name);
+
+ if(unlikely(!raid->st_operation && !(raid->st_operation = rrdset_find_byname_localhost(id)))) {
+ snprintfz(family, 50, "%s", raid->name);
+
+ raid->st_operation = rrdset_create_localhost(
+ "mdstat"
+ , id
+ , NULL
+ , family
+ , "md.status"
+ , "Current Status"
+ , "percent"
+ , PLUGIN_PROC_NAME
+ , PLUGIN_PROC_MODULE_MDSTAT_NAME
+ , NETDATA_CHART_PRIO_MDSTAT_OPERATION + raid_idx * 10
+ , update_every
+ , RRDSET_TYPE_LINE
+ );
+ }
+ else
+ rrdset_next(raid->st_operation);
+
+ if(unlikely(!raid->rd_check && !(raid->rd_check = rrddim_find(raid->st_operation, "check"))))
+ raid->rd_check = rrddim_add(raid->st_operation, "check", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE);
+ if(unlikely(!raid->rd_resync && !(raid->rd_resync = rrddim_find(raid->st_operation, "resync"))))
+ raid->rd_resync = rrddim_add(raid->st_operation, "resync", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE);
+ if(unlikely(!raid->rd_recovery && !(raid->rd_recovery = rrddim_find(raid->st_operation, "recovery"))))
+ raid->rd_recovery = rrddim_add(raid->st_operation, "recovery", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE);
+ if(unlikely(!raid->rd_reshape && !(raid->rd_reshape = rrddim_find(raid->st_operation, "reshape"))))
+ raid->rd_reshape = rrddim_add(raid->st_operation, "reshape", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE);
+
+ rrddim_set_by_pointer(raid->st_operation, raid->rd_check, raid->check);
+ rrddim_set_by_pointer(raid->st_operation, raid->rd_resync, raid->resync);
+ rrddim_set_by_pointer(raid->st_operation, raid->rd_recovery, raid->recovery);
+ rrddim_set_by_pointer(raid->st_operation, raid->rd_reshape, raid->reshape);
+
+ rrdset_done(raid->st_operation);
+
+ // --------------------------------------------------------------------
+
+ snprintfz(id, 50, "%s_finish", raid->name);
+
+ if(unlikely(!raid->st_finish && !(raid->st_finish = rrdset_find_byname_localhost(id)))) {
+ snprintfz(family, 50, "%s", raid->name);
+
+ raid->st_finish = rrdset_create_localhost(
+ "mdstat"
+ , id
+ , NULL
+ , family
+ , "md.rate"
+ , "Approximate Time Unit Finish"
+ , "seconds"
+ , PLUGIN_PROC_NAME
+ , PLUGIN_PROC_MODULE_MDSTAT_NAME
+ , NETDATA_CHART_PRIO_MDSTAT_FINISH + raid_idx * 10
+ , update_every
+ , RRDSET_TYPE_LINE
+ );
+ }
+ else
+ rrdset_next(raid->st_finish);
+
+ if(unlikely(!raid->rd_finish_in && !(raid->rd_finish_in = rrddim_find(raid->st_finish, "finish_in"))))
+ raid->rd_finish_in = rrddim_add(raid->st_finish, "finish_in", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+
+ rrddim_set_by_pointer(raid->st_finish, raid->rd_finish_in, raid->finish_in);
+
+ rrdset_done(raid->st_finish);
+
+ // --------------------------------------------------------------------
+
+ snprintfz(id, 50, "%s_speed", raid->name);
+
+ if(unlikely(!raid->st_speed && !(raid->st_speed = rrdset_find_byname_localhost(id)))) {
+ snprintfz(family, 50, "%s", raid->name);
+
+ raid->st_speed = rrdset_create_localhost(
+ "mdstat"
+ , id
+ , NULL
+ , family
+ , "md.rate"
+ , "Operation Speed"
+ , "KB/s"
+ , PLUGIN_PROC_NAME
+ , PLUGIN_PROC_MODULE_MDSTAT_NAME
+ , NETDATA_CHART_PRIO_MDSTAT_SPEED + raid_idx * 10
+ , update_every
+ , RRDSET_TYPE_LINE
+ );
+ }
+ else
+ rrdset_next(raid->st_speed);
+
+ if(unlikely(!raid->rd_speed && !(raid->rd_speed = rrddim_find(raid->st_speed, "speed"))))
+ raid->rd_speed = rrddim_add(raid->st_speed, "speed", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+
+ rrddim_set_by_pointer(raid->st_speed, raid->rd_speed, raid->speed);
+
+ rrdset_done(raid->st_speed);
+ }
+ }
+
+ return 0;
+}
diff --git a/collectors/python.d.plugin/cpufreq/README.md b/collectors/python.d.plugin/cpufreq/README.md
index 33891d59da..c3a54c1093 100644
--- a/collectors/python.d.plugin/cpufreq/README.md
+++ b/collectors/python.d.plugin/cpufreq/README.md
@@ -1,5 +1,10 @@
# cpufreq
+> THIS MODULE IS OBSOLETE.
+> USE THE [PROC PLUGIN](../../proc.plugin) - IT IS MORE EFFICIENT
+
+---
+
This module shows the current CPU frequency as set by the cpufreq kernel
module.
diff --git a/collectors/python.d.plugin/mdstat/README.md b/collectors/python.d.plugin/mdstat/README.md
index 1ff8f7dabc..704b0b0cf6 100644
--- a/collectors/python.d.plugin/mdstat/README.md
+++ b/collectors/python.d.plugin/mdstat/README.md
@@ -1,5 +1,10 @@
# mdstat
+> THIS MODULE IS OBSOLETE.
+> USE THE [PROC PLUGIN](../../proc.plugin) - IT IS MORE EFFICIENT
+
+---
+
Module monitor /proc/mdstat
It produces:
diff --git a/collectors/python.d.plugin/python.d.plugin.in b/collectors/python.d.plugin/python.d.plugin.in
index dec3daa920..b2cdcb327c 100755..100644
--- a/collectors/python.d.plugin/python.d.plugin.in
+++ b/collectors/python.d.plugin/python.d.plugin.in
@@ -56,7 +56,7 @@ BASE_CONFIG = {'update_every': os.getenv('NETDATA_UPDATE_EVERY', 1),
MODULE_EXTENSION = '.chart.py'
-OBSOLETE_MODULES = ['apache_cache', 'gunicorn_log', 'nginx_log', 'cpufreq', 'cpuidle']
+OBSOLETE_MODULES = ['apache_cache', 'gunicorn_log', 'nginx_log', 'cpufreq', 'cpuidle', 'mdstat']
def module_ok(m):