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:
Drazen Kacar
1999-04-29 20:42:17 +00:00
parent a567adcce5
commit 2868191440
4 changed files with 42 additions and 2 deletions

View File

@@ -29,6 +29,7 @@
#include <fcntl.h>
#include <kstat.h>
#include <kvm.h>
#include <sys/sysinfo.h>
BEGIN_LIBGTOP_DECLS
@@ -40,6 +41,8 @@ struct _glibtop_machine
uid_t uid, euid;
gid_t gid, egid;
kvm_t *kd;
kstat_ctl_t *kc;
kstat_t *vminfo_kstat;