* proclist.c: Added process selection mechanism. It's not
included in Solaris 2.5 build, since we first have to decide
what will be dispatched to daemon.
* glibtop_machine.h, procdata.c, proclist.c, procmap.c, procmem.c,
procsignal.c, procstate.c, procuid.c, open.c, mem.c: Initial
Solaris 2.5 port. It's far from being complete and hasn't been
tested properly. We'll need setuid root daemon, which is
currently not implemented. #ifdef symbols to check are
HAVE_PROCFS_H and KSTAT_DATA_UINT32. These will be defined on
Solaris 2.6 and later, but not on earlier releases.
1999-05-08 Martin Baulig <martin@home-of-linux.org>
* shm_limits.c, msg_limits.c, sem_limits.c: Moved them into the
setgid server since they need to access kvm data.
* open_suid.c, close_suid.c: New file. We do the initialization and cleanup
for the setgid server here.
* glibtop_suid.h: New file. We include this in the setgid files.
* open.c: Moved kvm opening code into open_suid.c.
* glibtop_machine.h: Changed boot time to unsigned long long.
* open.c: Added proper type checking for boot value. There's
no point in saving a few nanoseconds in init function. And
one day it will become 64-bit value.
In glibtop_get_kstats(): Don't reread vminfo_snaptime when
reinitializing kstats.
* glibtop_private.h: Fixed typoo.
* procmap.c (glibtop_get_proc_map_s): Implemented start, end,
offset and perm for mapped segments. File name and inode
should be accessible from bunyip kstat data. The only
obstacle is that the data format is undocumented and
possibly not the same accross releases.
* glibtop_private.h, procdata.c (glibtop_get_proc_signal_s):
Read pstatus info from /proc
* procsignal.c (glibtop_get_proc_signal_s): Implemented
set of pending and blocked signals. The rest should probably
be read from /proc/<pid>/sigact, but I'm not sure it's
worth implementing before thread API comes into place.
* siglist.c: Added Solaris 7 signals. Someone will gettextize
it eventually. Besides, signal list should become a pointer
instead of being fixed field. We need some run time initializations.
The code is written, but commented out.
* open.c (glibtop_get_kstats): Yet another kstat_chain_update
check. Added machine.cpu_stat_kstat[x] = NULL when processor
x is not configured.
* procdata.c (glibtop_get_proc_credentials_s): Read prcred
structure from /proc.
* procstate.c (glibtop_get_proc_state_s): Added ruid, rgid,
has_cpu, processor and last_processor.
* procuid.c (glibtop_get_proc_uid_s): Added priority, nice,
suid, sgid, ngroups and groups. The last four will be
filled only if our process has the authority to read prcred
structure of another process.
It's a bit untested for now. :-)
* glibtop_machine.h: added fields for page size, clock ticks and
boot time. These are constants. Also added three new kstats.
* open.c (glibtop_get_kstats): Initialize kstats in *server.
We need to call this at init time (obviously) and each time
kstat_chain_update() says that kstat chain has changed. In this
case all kstat pointers and data are invalid, so we need to
reinitialize everything.
(glibtop_open_s): Made it call glibtop_get_kstats(). Added
initialization for run time constants in struct machine.
* cpu.c (glibtop_get_cpu_s): Call kstat_chain_update().
See if processor is on-line and set bits in xcpu_flags.
Added frequency (bad name, should have been ticks).
* swap.c (glibtop_get_swap_s): Call kstat_chain_update().
I probably broke vminfo_snaptime consistency. Fix later.
* uptime.c (glibtop_get_uptime_s): Implemented uptime and boot_time.
Still looking for a sane way to get idletime.
* mem.c (glibtop_get_mem_s): Implemented. Will use bunyip
module if it's loaded. Or when it gets loaded. kstat_chain_update()
is our friend. And with a friends like that...
* loadavg.c (glibtop_get_loadavg_s): Solaris 2.6 code brought
into sync with everything else.
* msg_limits.c (glibtop_init_msg_limits_s): Implemented.
* sem_limits.c (glibtop_get_sem_limits_s): Implemented.
Solaris takes kernel modularity too seriously. We can't get
IPC configuration data if the kernel module is not loaded and
it won't be loaded until some process actually asks for a
particular IPC resource. There's no way to tell our applications
about this. Possible API additions?
All three IPC functions should go into daemon, but I'm keeping
them in the normal library because I can't build daemon yet. All
praise 64 bits!
* 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.
1999-03-19 Martin Baulig <martin@home-of-linux.org>
Added first kstat based implementation for Solaris 7.
* open.c (glibtop_open_s): Walk kstat list and save interesting
kstats in the `server->machine'.
* cpu.c: This can already provide `idle', `user' and `sys' with
full SMP support.
* swap.c: This can already provide `total', `used' and `free'.