add field for kvm descriptor.
* glibtop_machine.h: add field for kvm descriptor. * open.c: add code for opening kernel name space. * shm_limits.c: implemented. The real implementation will have this code in the daemon, since process needs to be setgid sys to be able to read kernel symbols.
This commit is contained in:
@@ -60,6 +60,10 @@ glibtop_open_s (glibtop *server, const char *program_name,
|
||||
if (!server->machine.kc)
|
||||
glibtop_error_io_r (server, "kstat_open ()");
|
||||
|
||||
server->machine.kd = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
|
||||
if(!server->machine.kd)
|
||||
glibtop_warn_io_r(server, "kvm_open()");
|
||||
|
||||
fprintf (stderr, "Sleeping 2 seconds, please wait ...\n");
|
||||
sleep (2);
|
||||
}
|
||||
|
Reference in New Issue
Block a user