X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vswitchd%2Fsystem-stats.c;h=a3b4db44341c337cb94e2b65f83ed9726f1b4d79;hb=52a90c29ab472076fb8f20fba4f847350268e01e;hp=9c5a25c5ef482096cd16755a9b8a6e84efa3e858;hpb=b43c6fe279a5630dfbc0273e06bd1e8ca530ba35;p=sliver-openvswitch.git diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c index 9c5a25c5e..a3b4db443 100644 --- a/vswitchd/system-stats.c +++ b/vswitchd/system-stats.c @@ -22,7 +22,6 @@ #if HAVE_MNTENT_H #include #endif -#include #include #include #include @@ -96,7 +95,11 @@ get_memory_stats(struct shash *stats) if (!LINUX) { unsigned int pagesize = get_page_size(); long int phys_pages = sysconf(_SC_PHYS_PAGES); +#ifdef _SC_AVPHYS_PAGES long int avphys_pages = sysconf(_SC_AVPHYS_PAGES); +#else + long int avphys_pages = 0; +#endif int mem_total, mem_used; if (pagesize <= 0 || phys_pages <= 0 || avphys_pages <= 0) { @@ -414,7 +417,7 @@ get_process_stats(struct shash *stats) file_name = xasprintf("%s/%s", ovs_rundir(), de->d_name); pid = read_pidfile(file_name); free(file_name); - if (pid < 0 || kill(pid, 0)) { + if (pid < 0) { continue; }