]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_softirqs.c
fix for no lines being read in /proc/interrupts and /proc/softirqs #66
[netdata.git] / src / proc_softirqs.c
index 9373baaecae5f33da22a76bc54fab747dd013c4b..a601c7e350afd389bbd594e1ee8958017c6e6046 100755 (executable)
@@ -46,6 +46,11 @@ int do_proc_softirqs(int update_every, unsigned long long dt) {
        uint32_t lines = procfile_lines(ff), l;
        uint32_t words = procfile_linewords(ff, 0), w;
 
+       if(!lines) {
+               error("Cannot read /proc/softirqs, zero lines reported.");
+               return 1;
+       }
+
        // find how many CPUs are there
        if(cpus == -1) {
                cpus = 0;