Fix numerous bigs in the FreeBSD backend

* Correct calculation of CPU time.
* Fix a bug on newer versions of FreeBSD where computing the process map leads
to a tight error loop.
* Add support for the new procstat API to obtain the list of open files and
cwd.
* Use kvm_openfiles instead of kvm_open to better handle error messages.
* Split some modules out into non-suid modules.
* Properly determine the number of CPUs.

https://bugzilla.gnome.org/show_bug.cgi?id=605431
This commit is contained in:
Joe Marcus Clarke
2011-06-27 16:32:20 +02:00
committed by Jasper Lievisse Adriaanse
parent aa1a6766f2
commit 08fd95d253
10 changed files with 201 additions and 86 deletions

View File

@@ -45,8 +45,8 @@ init_sysinfo (glibtop *server)
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
len = sizeof (ncpus);
sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
ncpus = server->ncpu + 1;
len = 0;
sysctlbyname ("hw.model", NULL, &len, NULL, 0);
model = g_malloc (len);