Commit Graph

7 Commits

Author SHA1 Message Date
Martin Baulig
bbb539ef56 Indent everything to 4 spaces to make it consistant with the other LibGTop
code.
1999-12-25 19:01:13 +00:00
Martin Baulig
dbb5f9b636 Reflect latest interface changes; especially all functions now return
appropriate error return values on error.
1999-12-25 18:54:52 +00:00
Martin Baulig
42cbc7cf0c perl -pni -e 's,server->machine,server->_priv->machine,g' *.c
perl -pni -e 's,server->machine,server->_priv->machine,g' *.h
1999-12-25 18:30:26 +00:00
Martin Baulig
a5dd7e9063 This is a very big an possibly breaking commit.
It changes the return values of all sysdeps functions which were
previosly returning void to int.

This is the first step to implement better error handling in LibGTop.

Martin

1999-10-24  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/*.h (glibtop_get_*, glibtop_init*): Changed
	the return value of all `glibtop_get_<feature>_* ()' and all
 	`glibtop_init_<feature>_* ()' functions from void to int.

	* features.def: Reflect changes of the return values.
	* sysdeps/*/*.c: Reflect changes of the return values.
1999-10-24 19:09:32 +00:00
Drazen Kacar
bdc1579a9c added fields for page size, clock ticks and boot time. These are
* 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!
1999-05-02 03:18:32 +00:00
Drazen Kacar
3a7f02352a make it work with Solaris 2.6 and older. A part of it should be moved to
1999-03-31  Drazen Kacar  <dave@srce.hr>

        * loadavg.c: make it work with Solaris 2.6 and older. A part
        of it should be moved to open.c.
1999-03-31 07:48:37 +00:00
Martin Baulig
c4ccf53aad Initial revision 1999-03-17 18:29:40 +00:00