Commit Graph

69 Commits

Author SHA1 Message Date
Martin Baulig
367e1f047c *** empty log message *** 1999-03-17 18:35:26 +00:00
Martin Baulig
7db1ed695c Fixed a bug that caused a core dump when the sysdeps code does not return
1999-03-17  Martin Baulig  <martin@home-of-linux.org>

	* first.c, second.c: Fixed a bug that caused a core dump when
	the sysdeps code does not return all data.
1999-03-17 18:33:25 +00:00
Martin Baulig
cf611f9157 Set the copyright of LibGTop to the GNU General Public License.
1999-02-22  Martin Baulig  <martin@home-of-linux.org>

	Set the copyright of LibGTop to the GNU General Public License.

	* copyright.txt: Set the year to 1998-99 and pretty-format it a
	little bit. Same in all C source and header files.
1999-02-23 11:47:35 +00:00
Martin Baulig
ce4f660965 Include a copy of the GNU Library General Public License here.
1999-02-22  Martin Baulig  <martin@home-of-linux.org>

	* COPYING.LIB: Include a copy of the GNU Library General
	Public License here.

	* copyright.txt: Set the year to 1998-99 and pretty-format it a
	little bit. Same in all C source and header files.
1999-02-22 16:19:36 +00:00
Martin Baulig
4def53aabb Sometimes @LIBSUPPORT@ references symbols from @INTLLIBS@ so we need
to put @INTLLIBS@ last.
1999-02-19 11:04:10 +00:00
Martin Baulig
1ea58b48ff Initialize INCLUDES to `@INCLUDES@' to make it clear that it is set in
1999-02-16  Martin Baulig  <martin@home-of-linux.org>

	* examples/Makefile.am, lib/Makefile.am, src/daemon/Makefile.am,
	  sysdeps/common/Makefile.am, sysdeps/guile/Makefile.am,
	  sysdeps/guile/names/Makefile.am, sysdeps/kernel/Makefile.am,
	  sysdeps/linux/Makefile.am, sysdeps/names/Makefile.am,
	  sysdeps/osf1/Makefile.am, sysdeps/stub/Makefile.am,
	  sysdeps/stub_suid/Makefile.am, sysdeps/sun4/Makefile.am:
	Initialize INCLUDES to `@INCLUDES@' to make it clear that it is
	set in configure.in. It is ok to add things there, but you must
	not remove the `@INCLUDES@'.
1999-02-16 15:13:26 +00:00
Martin Baulig
f5397c79b0 *** empty log message *** 1999-02-15 23:09:19 +00:00
Martin Baulig
4fbfde4d1c Fix a really bad thing from Jeff Garzik; don't override INCLUDES in
any Makefile.am, but it configure.in.
1999-02-15 23:04:07 +00:00
Jeff Garzik
cd7cd23403 Removed hardcoded gcc arguments. Converted remaining CFLAGS settings to
1999-02-15  Jeff Garzik  <jgarzik@pobox.com>

        * examples/Makefile.am, lib/Makefile.am, src/daemon/Makefile.am,
          sysdeps/common/Makefile.am, sysdeps/guile/Makefile.am,
          sysdeps/guile/names/Makefile.am, sysdeps/kernel/Makefile.am,
          sysdeps/linux/Makefile.am, sysdeps/names/Makefile.am,
          sysdeps/osf1/Makefile.am, sysdeps/stub/Makefile.am,
          sysdeps/stub_suid/Makefile.am, sysdeps/sun4/Makefile.am:
        Removed hardcoded gcc arguments.
        Converted remaining CFLAGS settings to use correct INCLUDES.

        * include/glibtop/error.h:
        Added FIXME comment about varargs macros breaking Sun cc
        compilation.
1999-02-15 21:23:07 +00:00
Martin Baulig
1520ee7083 Make the return value a char *' instead of a const char *'.
1998-12-09  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/procargs.h (glibtop_get_proc_args): Make the
	return value a `char *' instead of a `const char *'.
1998-12-09 11:38:49 +00:00
Martin Baulig
12b9e30f1c *** empty log message *** 1998-11-22 19:30:45 +00:00
Martin Baulig
ef36d36060 Print address first and then the subnet. 1998-11-22 19:29:17 +00:00
Martin Baulig
11c7fad8d4 Call inet_ntoa () to get address and subnet in quatted dot notation (like
1998-11-22  Martin Baulig  <baulig@taurus.uni-trier.de>

	* netload.c: Call inet_ntoa () to get address and subnet
	in quatted dot notation (like 136.199.14.201) and not just
	as a number (like 0xc90ec788).
1998-11-22 19:26:43 +00:00
Martin Baulig
0882a71244 New example.
1998-11-02  Martin Baulig  <martin@home-of-linux.org>

	* sysdeps.c: New example.
1998-11-02 20:50:47 +00:00
Martin Baulig
b70d0570c7 More network load stuff. 1998-10-26 12:21:28 +00:00
Martin Baulig
1289b92d06 Added new features to get network load:
typedef struct _glibtop_netload	glibtop_netload;

struct _glibtop_netload
{
	u_int64_t	flags,
		mtu,			/* GLIBTOP_NETLOAD_MTU		*/
		address,		/* GLIBTOP_NETLOAD_ADDRESS	*/
		packets_in,		/* GLIBTOP_NETLOAD_PACKETS_IN	*/
		packets_out,		/* GLIBTOP_NETLOAD_PACKETS_OUT	*/
		bytes_in,		/* GLIBTOP_NETLOAD_BYTES_IN	*/
		bytes_out,		/* GLIBTOP_NETLOAD_BYTES_OUT	*/
		errors_in,		/* GLIBTOP_NETLOAD_ERRORS_IN	*/
		errors_out,		/* GLIBTOP_NETLOAD_ERRORS_OUT	*/
		collisions;		/* GLIBTOP_NETLOAD_COLLISIONS	*/
};

Returns network load of the given interface, it is specified as string
like `isppp' or `ippp0':

extern void glibtop_get_netload_l __P((glibtop *, glibtop_netload *, const char *));
1998-10-26 10:39:14 +00:00
Martin Baulig
bdc4e08454 Added new feature (proc_args) to get command line arguments:
typedef struct _glibtop_proc_args	glibtop_proc_args;

struct _glibtop_proc_args
{
	u_int64_t	flags,
		size;			/* GLIBTOP_PROC_ARGS_SIZE	*/
};

Returns a string containing all command line arguments of the process,
the `unsigned' parameter is the maximum length of this string; if it
is zero then no limit will be set.

extern const char  *glibtop_get_proc_args_l __P((glibtop *, glibtop_proc_args *, pid_t, unsigned));
1998-10-26 09:53:08 +00:00
Martin Baulig
9114af9fdf Added new feature to get PPP/ISDN support:
enum {
	GLIBTOP_PPP_STATE_UNKNOWN = 0,
	GLIBTOP_PPP_STATE_HANGUP,
	GLIBTOP_PPP_STATE_ONLINE
};

struct _glibtop_ppp
{
	u_int64_t	flags,
		state,			/* GLIBTOP_PPP_STATE		*/
		bytes_in,		/* GLIBTOP_PPP_BYTES_IN		*/
		bytes_out;		/* GLIBTOP_PPP_BYTES_OUT	*/
};

Currently only implemented in the FreeBSD port with ISDN via I4B. - Martin
1998-10-25 17:07:16 +00:00
Martin Baulig
754a69a79a Removed @libs_xauth@ and -lgdbm from the _LDADD variables since libtool
1998-10-11  Martin Baulig  <martin@home-of-linux.org>

	* src/inodedb/Makefile.am: Removed @libs_xauth@ and -lgdbm
	from the _LDADD variables since libtool automatically gets
	the dependencies.
	* src/daemon/Makefile.am: Likewise.
	* examples/Makefile.am: Likewise.
1998-10-10 23:18:40 +00:00
Martin Baulig
cf0e724f7d Removed G_GNUC_UNUSED. 1998-10-06 09:04:27 +00:00
Martin Baulig
afb07a1f8b More G_GNUC_UNUSED fun. 1998-10-04 13:27:51 +00:00
Martin Baulig
b5c90ca5a4 Install everything in $(libexecdir)/libgtop.
1998-09-28  Martin Baulig  <martin@home-of-linux.org>

	* Makefile.am: Install everything in $(libexecdir)/libgtop.
1998-09-28 19:29:56 +00:00
Martin Baulig
f4cde0843d Applied patch from Alexander Jolk to make it work with --disable-static. 1998-09-28 17:22:41 +00:00
Martin Baulig
507da6f040 Added SMP support. 1998-09-09 17:29:35 +00:00
Martin Baulig
8279241591 New file. Nice tool to show CPU statistics on SMP systems.
1998-09-09  Martin Baulig <baulig@Stud.Informatik.uni-trier.de>

	* smp.c: New file. Nice tool to show CPU statistics on SMP systems.
1998-09-09 16:22:13 +00:00
Martin Baulig
f353017948 Fixed some compiler warnings.
1998-08-25  Martin Baulig  <martin@home-of-linux.org>

	* first.c, second.c, procmap.c: Fixed some compiler warnings.
1998-08-25 08:32:45 +00:00
Martin Baulig
40ac07d0e0 Installing examples in `$(libexecdir)'. 1998-08-19 08:45:47 +00:00
Martin Baulig
c6944b0ac8 Correctly using `(1 << GLIBTOP_MAP_ENTRY_FILENAME)' now. 1998-08-18 16:35:13 +00:00
Martin Baulig
97902ce2dd Set version number to 0.25.0. There is now really a feature freeze until
1998-08-18  Martin Baulig  <martin@home-of-linux.org>

	* LIBGTOP-VERSION: Set version number to 0.25.0. There is now really
	a feature freeze until it's released, bug fixes only ...

	* include/glibtop/procmap (glibtop_map_entry): Added `flags' and
	`filename' fields.
1998-08-18 13:42:16 +00:00
Martin Baulig
302b785893 Added `LIBGTOP_MICRO_VERSION'. Likewise.
1998-08-18  Martin Baulig  <martin@home-of-linux.org>

	* LIBGTOP-VERSION: Added `LIBGTOP_MICRO_VERSION'.
	* libgtopConf.sh.in: Likewise.

	* libgtopConf.sh.in: Added `LIBGTOP_EXTRA_LIBS'.
1998-08-18 12:15:07 +00:00
Martin Baulig
fd6b79d33d We now display filenames when compiled `--with-libgtop-inodedb'.
1998-08-18  Martin Baulig  <martin@home-of-linux.org>

	* procmap.c: We now display filenames when compiled
	`--with-libgtop-inodedb'.
1998-08-17 23:18:11 +00:00
Martin Baulig
b40e08fb74 Added new fields nr_running', nr_tasks', `last_pid'. Added new fields
1998-08-16  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/loadavg.h (glibtop_loadavg): Added new
	fields `nr_running', `nr_tasks', `last_pid'.
	* features.def (loadavg): Added new fields `nr_running',
	`nr_tasks', `last_pid'.
1998-08-16 13:40:01 +00:00
Martin Baulig
2e670cc0d8 Works a little bit more like `ps' - you can give an optional command line
1998-08-12  Martin Baulig  <martin@home-of-linux.org>

	* second.c: Works a little bit more like `ps' - you can
	give an optional command line argument to get information
	about a single process.
1998-08-12 22:37:50 +00:00
Martin Baulig
9248d72018 Using text_rss', shlib_rss', data_rss' and dirty_size' instead of
1998-08-12  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/procsegment.h (glibtop_proc_segment): Using
	`text_rss', `shlib_rss', `data_rss' and `dirty_size' instead of
	`tsr', `lrs', `drs' and `dt'. New field `stack_rss'.

	* sysdeps/linux/procmem.c: Memory sizes now correctly in bytes.
	* sysdeps/linux/procsegment.c: Dito.

	* sysdeps/kernel/procsegment.c: Stack pages are reported via
	`stack_rss' and no longer count towards `data_rss'
	* kernel/table.h (table_proc_segment): Added `srs' field.
	* kernel/table21/module.c (TBL_PROC_SEGMENT): Added kernel support
	for this.

	* sysdeps/{linux, kernel, stub}/procmap.c: New files.
1998-08-12 20:16:24 +00:00
Martin Baulig
da622f70c7 Reverted changed made in last revision (1.21) of this file. 1998-08-12 16:42:57 +00:00
Martin Baulig
d9361d388c New file. Added definition of `proc_map'.
1998-08-10  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/procmap.h (glibtop_proc_map): New file.
	* features.def: Added definition of `proc_map'.
1998-08-10 16:57:44 +00:00
Martin Baulig
8b8ceec1bf Added new fields rtime' and frequency'.
1998-08-10  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/proctime.h (glibtop_proc_time): Added new
	fields `rtime' and `frequency'.
1998-08-10 08:08:51 +00:00
Martin Baulig
32c0ced22a Renamed wchan' field to nwchan'; added wchan' which is of type char
1998-08-09  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/prockernel.h (glibtop_proc_kernel): Renamed
	`wchan' field to `nwchan'; added `wchan' which is of type `char [40]'.
1998-08-09 21:11:18 +00:00
Martin Baulig
fd95ab60a4 Changed format of this file to support multiple arguments to be passed to
1998-08-09  Martin Baulig  <martin@home-of-linux.org>

	* features.def: Changed format of this file to support multiple
	arguments to be passed to a function.

	* include/glibtop/proclist.h: `glibtop_get_proclist' now takes two
	more arguments `method' and `param'.
1998-08-09 17:08:59 +00:00
Martin Baulig
e329617831 On FreeBSD, printf () doesn't like '%Lx', '%Ld' and '%Lu', so we use
an expilcit cast to `unsigned long' and types `%lx' and `%ld'.
1998-08-08 16:32:26 +00:00
Martin Baulig
2e454140f1 Added pagein' and pageout'.
1998-08-01  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/swap.h (glibtop_swap): Added `pagein' and `pageout'.

	* kernel/table20/table.h: Removed.
	* kernel/table21/table.h: Removed.
	* kernel/table.h: Added. Things are now binary compatible between
	both kernel versions.
1998-08-01 22:03:11 +00:00
Martin Baulig
902b6a8f16 Using u_int64_t' instead of unsigned long' and `long' to avoid problems
1998-07-30  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/*.h: Using `u_int64_t' instead of `unsigned long'
	and `long' to avoid problems when client is on a 32bit system and
	the server on a 64bit system.
1998-07-30 14:24:19 +00:00
Martin Baulig
f07551a43d New file.
1998-07-29  Martin Baulig  <martin@home-of-linux.org>

	* guile/ChangeLog: New file.

	* features.def: New format - now includes type of return value
	and parameters.

	* lib/lib.awk: Changed to use new `features.def'.
	* sysdeps/guile/guile.awk: Dito;
	* sysdeps/guile/names/guile-names.awk: Dito.

	* libgtopConf.sh.in: Added
	`LIBGTOP_NAMES_LIBS', `LIBGTOP_NAMES_INCS',
	`LIBGTOP_GUILE_NAMES_LIBS', `LIBGTOP_GUILE_NAMES_INCS',
	`LIBGTOP_MAJOR_VERSION', `LIBGTOP_MINOR_VERSION'
	`LIBGTOP_VERSION', `libgtop_sysdeps_dir'.

	* acinclude.m4 (AC_LC_SYSDEPS): Removed since this has been
	replaced with `GNOME_LIBGTOP_SYSDEPS' long ago.

	* LIBGTOP-VERSION: New file.

	* */Makefile.am (INCLUDES): Removed; now defined in `configure.in'.

	* sysdeps/names/mountlist.c: New file.

	* lib/{init, open}.c (GTOP_SERVER): Renamed to `LIBGTOP_SERVER'.

	* configure.in (INCLUDES): Added definition.
	(libgtop_want_names): Always true; `libgtop_names.la' is now
	always created since some other programs rely upon it - but
	have to use `LIBGTOP_NAMES_LIBS' and `LIBGTOP_NAMES_INCS' to
	use it in your application.
	(libgtop_want_guile_names): Always true; but you have to use
	`LIBGTOP_GUILE_NAMES_LIBS' and `LIBGTOP_GUILE_NAMES_INCS' to
	use it in your application.
	(LIBGTOP_LIBS): Removed `-lgtop_names' and `-lgtop_guile_names'.
	(LIBGTOP_NAMES_LIBS): New variable. Use it to link your
	application with the names interface.
	(LIBGTOP_NAMES_INCS): New variable. Also #defines `GLIBTOP_NAMES'
	which is now required if your application wants to use the names
	interface.
	(LIBGTOP_GUILE_NAMES_LIBS): New variable. Use it to link your
	application with the guile names interface.
	(LIBGTOP_GUILE_NAMES_INCS): New variable. Also #defines
	`GLIBTOP_NAMES' and `GLIBTOP_GUILE_NAMES' which are now required
	if your application wants to use the guile names interface.
1998-07-29 22:01:31 +00:00
Martin Baulig
aa6d16e47b Added `all_fs' parameter.
1998-07-24  Martin Baulig  <martin@home-of-linux.org>

	* sysdeps/common/mountlist.c (glibtop_get_mountlist_s):
	Added `all_fs' parameter.
1998-07-24 14:43:16 +00:00
Martin Baulig
61c262dd7e Changed type for signal', blocked', sigignore' and sigcatch' to
1998-07-23  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/procsignal.h (glibtop_proc_signal):
	Changed type for `signal', `blocked', `sigignore' and
	`sigcatch' to `unsigned long long'.
1998-07-23 18:12:04 +00:00
Martin Baulig
954a78f200 New file.
1998-07-22  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/fsusage.h: New file.

	* features.def: Added new feature `fsusage'.

	* sysdeps/common/fsusage.c (glibtop_get_fsusage_s): New function.
	(get_fs_usage): Declared as `static'.

	* sysdeps/names/fsusage.c: New file.
1998-07-22 22:56:09 +00:00
Martin Baulig
dd5c4a716b New file.
1998-07-22  Martin Baulig  <martin@home-of-linux.org>

	* mountlist.c: New file.
1998-07-22 20:47:17 +00:00
Martin Baulig
5e97af535f Summary of this long ChangeLog:
* Splitted `libgtop_sysdeps.la' into `libgtop_sysdeps.la' and
   `libgtop_sysdeps_suid.la'.

   Everything that needs to be suid/sgid is in `libgtop_sysdeps_suid.la'
   and the rest in `libgtop_sysdeps.la'.

   The functions from `libgtop_sysdeps_suid.la' have the `_p' prefix and
   the ones from `libgtop_sysdeps.la' the `_s' prefix.

   The suid library uses `glibtop_open_p' and `glibtop_close_p', the
   normal one `glibtop_init_s' (found in lib/init.c), `glibtop_open_s'
   and `glibtop_close_s'.

 * Added `libgtop_suid_common.la' containing stuff from sysdeps/common
   that is required from the suid server (currently everything from
   error.c and xmalloc.c).

   This means, we can add some more stuff to `libgtop_common.la' without
   the risk that it may be dangerous in the suid server.

 * The ``library order'' is much clearer now:

   -> `libgtop.la' (from lib/) contains user-level stuff;
      all functions except `glibtop_init_r' have the `_l'
      suffix.

   -> `libgtop_common.la' (from sysdeps/common/) contains stuff
      that is common among the sysdeps directories.
      use anything from `libgtop_sysdeps.la' and
      `libgtop_sysdeps_suid.la'.

   -> `libgtop_sysdeps.la' (from sysdeps/<sysdeps_dir>/) contains
      everything from the sysdeps directory that doesn't need to
      be suid/sgid.

   -> `libgtop_suid_common.la' (from sysdeps/common/) is used from
      the suid server instead of `libgtop_common.la'.

   -> `libgtop_sysdeps_suid.la' (from sysdeps/<sysdeps_dir>/) contains
      everything from the sysdeps directory that needs to be in the
      suid server.

 * To summarize: the server is linked only with functions that need
   to be suid and everything else is linked only with functions that
   do not need to be suid.

Martin

1998-07-22  Martin Baulig  <martin@home-of-linux.org>

	* lib/init.c (glibtop_init_s): Added this init function of
	the sysdeps directory `libgtop_sysdeps.la'.

	* lib/open.c (glibtop_open_l): Unconditionally calling
	`glibtop_init_s' after server initialization.

	* lib/lib.awk: Removed references to functions from
	`libgtop_sysdeps_suid.la' to avoid undefined symbols.

	* sysdeps/stub/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/stub/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/kernel/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/kernel/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/linux/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/linux/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/osf1/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_sysdeps_suid.la' for the suid server.

	* sysdeps/osf1/open_suid.c (glibtop_open_p): New file.
	Contains all stuff that was formerly in `open.c'.

	* sysdeps/osf1/open.c: Moved everything from here into
	the new file `open_suid.c'.

	* sysdeps/osf1/open.c (glibtop_open_s): New function.

	* sysdeps/osf1/close_suid.c (glibtop_close_p): New file.

	* sysdeps/osf1/close.c (glibtop_close_s): New function.

	* sysdeps/osf1/*.c: Using the new init, open and close
	functions.

	* sysdeps/sun4/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_sysdeps_suid.la' for the suid server.

	* sysdeps/sun4/nosuid.c (glibtop_open_s, glibtop_close_s): New file

	* sysdeps/sun4/*.c: All functions now have the `_p' suffix.

	* sysdeps/common/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_suid_common.la' which only contains stuff that is
	needed in the suid parts.

	* sysdeps/common/xmalloc.c: Using `glibtop_error_io_r' instead
	of `glibtop_error_r'.

	* sysdeps/{kernel, linux, osf1, sun4, stub}/init.c: Removed.
	`glibtop_init_s' has been moved into `lib/init.c' since it's the
	same in all the sysdeps directories.

	* src/server/main.c: It is now an error to request a feature that
	does not need the suid server.

	* src/proxy: Removed.
1998-07-22 09:26:43 +00:00
Martin Baulig
c41d6e5a77 Added implementation of that feature.
1998-07-17  Martin Baulig  <baulig@Stud.Informatik.uni-trier.de>

	* sysdeps/sun4/proclist.c (glibtop_get_proclist_p): Added
	implementation of that feature.

	* sysdeps/sun4/proc_{uid,state}.c: Now working quite well.

	* sysdeps/sun4/proc_{mem,time,signal,kernel,segment}.c: Added
	some basic implementation; this isn't really working yet.
1998-07-17 16:40:02 +00:00
Martin Baulig
3477d30dc5 Basically did some work on the new daemon. Things are still unstable.
1998-07-13  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h: Fixed invocation of `glibtop_close_r'.

	* sysdeps/linux/procstate.c: Added missing `fclose'.

	* include/glibtop/gnuserv.h (UNIX_DOMAIN_SOCKETS): Defining.

	* include/glibtop/open.h (GLIBTOP_METHOD_UNIX): Added.

	* lib/init.c: Added new method `GLIBTOP_METHOD_UNIX'.

	* lib/open.c: Added support for Unix Domain Sockets.

	* lib/close.c: Now closing inet and unix connections.

	* lib/parameter.c (glibtop_set_parameter_l): You can now
	set the `method' and `features' fields.

	* src/daemon/server_config.h: New file.

	* src/daemon/{gnuserv.c, main.c}: More work on the server.
1998-07-13 00:39:46 +00:00