]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_sys_kernel_random_entropy_avail.c
fix typo in the installer help
[netdata.git] / src / proc_sys_kernel_random_entropy_avail.c
index bde74f452196b7f35e2ee3e7c1e28793c56e1303..25dbca839025ed55205aea33208b5fb50dfdbc18 100644 (file)
@@ -1,13 +1,13 @@
 #include "common.h"
 
-int do_proc_sys_kernel_random_entropy_avail(int update_every, unsigned long long dt) {
+int do_proc_sys_kernel_random_entropy_avail(int update_every, usec_t dt) {
     (void)dt;
 
     static procfile *ff = NULL;
 
     if(unlikely(!ff)) {
         char filename[FILENAME_MAX + 1];
-        snprintfz(filename, FILENAME_MAX, "%s%s", global_host_prefix, "/proc/sys/kernel/random/entropy_avail");
+        snprintfz(filename, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/proc/sys/kernel/random/entropy_avail");
         ff = procfile_open(config_get("plugin:proc:/proc/sys/kernel/random/entropy_avail", "filename to monitor", filename), "", PROCFILE_FLAG_DEFAULT);
         if(unlikely(!ff)) return 1;
     }
@@ -15,7 +15,7 @@ int do_proc_sys_kernel_random_entropy_avail(int update_every, unsigned long long
     ff = procfile_readall(ff);
     if(unlikely(!ff)) return 0; // we return 0, so that we will retry to open it next time
 
-    unsigned long long entropy = strtoull(procfile_lineword(ff, 0, 0), NULL, 10);
+    unsigned long long entropy = str2ull(procfile_lineword(ff, 0, 0));
 
     RRDSET *st = rrdset_find_bytype("system", "entropy");
     if(unlikely(!st)) {