* 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-04-18 Martin Baulig <martin@home-of-linux.org>
Thanks to Drazen Kacar for pointing out that not all processors must
be running all the time under Solaris, so we need to have some flag
to find out which processors are running.
* (glibtop_cpu): Added `xcpu_flags' bitmask of running processors.
* (glibtop_proc_time): Added `xcpu_flags'.
Thu Apr 8 23:47:29 1999 Timur Bakeyev <timur@gnu.org>
* cpu.c, mem.c, netload.c, procargs.c, procstate.c, proctime.c,
sem_limits.c, shm_limits.c, swap.c: Added initial port for BSD/OS
(aka BSDI) 2.x and 3.x. 4.x should also(?) work.
Still, this port require more close look and extended check.
1999-03-30 Martin Baulig <martin@home-of-linux.org>
Added some new features.
* (glibtop_uptime): Added `boot_time', boot time in seconds
since the epoch.
* (glibtop_proc_state): Changed `state' from char to unsigned.
`uid' and `gid' are effective uid and gid; added comment.
Added `ruid' and `rgid' for guaranteed-to-be-correct real uid/gid.
For SMP systems: added `has_cpu', `processor' and `last_processor'.
* (glibtop_proc_uid): Added suid, sgid, fsuid, fsgid, ngroups, groups.
* (glibtop_proc_segment): Added start_data, end_data, start_brk,
end_brk, start_mmap, arg_start, arg_end, env_start, env_end.
* include/glibtop/procstate.h: Define some constants for the `state'
field of glibtop_proc_state.
* include/glibtop/prockernel.h: Define some constands for the
`k_flags' field of glibtop_proc_kernel.