Commit Graph

258 Commits

Author SHA1 Message Date
Martin Baulig
2deb3c30c4 Replaced all awk scripts with perl scripts since it is more likely that
1999-02-18  Martin Baulig  <martin@home-of-linux.org>

	* */*.awk: Replaced all awk scripts with perl scripts since it is
	more likely that people have a working perl interpreter than GNU
	awk on their system.
1999-02-18 09:54:18 +00:00
Martin Baulig
00f0791ebd Define them as G_INLINE_FUNC in <glibtop/errno.h> if possible.
1999-02-18  Martin Baulig  <martin@home-of-linux.org>

	* sysdeps/common/error.c (glibtop_error_r, glibtop_warn_r): Define
	them as G_INLINE_FUNC in <glibtop/errno.h> if possible.
	(glibtop_error_io_r, glibtop_warn_io_r): Likewise.
	(glibtop_error_vr, glibtop_warn_vr): New functions taking a va_list.
	(glibtop_error_io_vr, glibtop_warn_io_vr): New functions taking an
	errno an a va_list.
1999-02-18 08:57:03 +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
ce52ba2dbe Use _' instead of gettext'.
1999-02-04  Martin Baulig  <martin@home-of-linux.org>

	* names/guile-names.awk: Use `_' instead of `gettext'.
1999-02-04 19:24:40 +00:00
Martin Baulig
16da233b6d `glibtop_names_* []' should be the plain name without array dimensions. 1999-01-22 15:36:35 +00:00
Martin Baulig
3f0e166e3f Use a (TYPE . DIMENSION)' pair for array types in glibtop-types-*'.
1999-01-22  Martin Baulig  <martin@home-of-linux.org>

	* names/guile-names.awk: Use a `(TYPE . DIMENSION)' pair for
	array types in `glibtop-types-*'.
1999-01-22 13:50:20 +00:00
Martin Baulig
df20c8534b Don't declare strstr () here, this should be done in gnomesupport if it
is really required on some system.
1999-01-10 13:03:18 +00:00
Martin Baulig
8ba42b25e0 Use `server->os_version_code' instead of GLIBTOP_LINUX_VERSION_CODE.
1999-01-06  Martin Baulig  <martin@home-of-linux.org>

	* netload.c (glibtop_get_netload_s): Use `server->os_version_code'
	instead of GLIBTOP_LINUX_VERSION_CODE.
1999-01-06 19:59:04 +00:00
Martin Baulig
a66b6cc86d Set indent level to 4. 1999-01-06 19:30:55 +00:00
Martin Baulig
e491343151 Unconditionally enable SMP support for linux.
1999-01-06  Martin Baulig  <martin@home-of-linux.org>

	Unconditionally enable SMP support for linux.

	* open.c (_glibtop_open_s): Always determine the number of CPUs
	we have here, not only when SMP support was enabled.

	* cpu.c, proctime.c: Use `server->ncpu' to determine whether to
 	enable SMP support.
1999-01-06 19:26:45 +00:00
Martin Baulig
17962b4548 Minor `make distcheck' fixes. 1999-01-03 19:17:39 +00:00
Martin Baulig
2f12b5aec2 Seems I forgot to check this in some time ago ... 1999-01-02 21:44:18 +00:00
Martin Baulig
be97f1b90a When using glibc, don't include <netinet/ip_fw.h> any longer but all
1998-12-28  Martin Baulig  <martin@home-of-linux.org>

	* netload.c: When using glibc, don't include <netinet/ip_fw.h>
 	any longer but all headers that were included there; we only
 	needed this file to get those headers.
1998-12-28 22:37:37 +00:00
Martin Baulig
48191c7111 Small fix; look for the colon separating key and value. 1998-12-24 21:54:26 +00:00
Martin Baulig
9e41d36684 Small fix. 1998-12-09 17:48:35 +00:00
Martin Baulig
3393adefa7 Added the missing `proc_args' field. 1998-12-09 14:52:05 +00:00
Martin Baulig
5599022989 Added correct (glibtop-get-proc-args) implementation. 1998-12-09 12:06:16 +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
ee9812e9af For arrays, make a gh_list out of it and add this list to the returned
1998-12-09  Martin Baulig  <martin@home-of-linux.org>

	* guile.awk: For arrays, make a gh_list out of it and add this list
	to the returned list instead of adding all array fields there.
1998-12-09 09:41:32 +00:00
Martin Baulig
6ccd22ae04 New guile function.
1998-12-08  Martin Baulig  <martin@home-of-linux.org>

	* guile.awk (glibtop-get-sysdeps): New guile function.
1998-12-08 21:08:23 +00:00
Martin Baulig
f720f21e07 Make a gh_list for each map entry and append all of them to the returned
1998-12-08  Martin Baulig  <martin@home-of-linux.org>

	* guile.awk (glibtop_get_proc_map): Make a gh_list for each map
	entry and append all of them to the returned list.
	(glibtop_get_mountlist): Likewise.
1998-12-08 20:50:02 +00:00
Martin Baulig
25a6834aae Make a gh_list for each map entry and append all of them to the returned
1998-12-08  Martin Baulig  <martin@home-of-linux.org>

	* guile.awk (glibtop_get_proc_map): Make a gh_list for each map
	entry and append all of them to the returned list.
1998-12-08 19:11:36 +00:00
Martin Baulig
2795790ab6 Sync. 1998-12-08 18:52:00 +00:00
Jeff Garzik
4ca23b4e06 GNOME-standard autogen.sh scripts automatically run 'automake -a'. -a
installs any necessary files that are required in a GNU-standard
install, such as COPYING, INSTALL, mkinstalldirs, etc.

So begone, automake-installed files.
1998-12-07 06:05:09 +00:00
Martin Baulig
ceabdfd2dc This works now for FreeBSD and NetBSD. 1998-12-06 17:54:17 +00:00
Martin Baulig
20f3c3eb60 This works on all supported systems (FreeBSD, NetBSD, OpenBSD) now. 1998-12-06 17:02:45 +00:00
Martin Baulig
213fb37f26 Oops, misspelled C preprocessor directive ... (it's #elif not #elsif). 1998-12-06 13:02:02 +00:00
Martin Baulig
50e4bdfc93 Make it work with OpenBSD 2.4.
1998-12-06  Martin Baulig  <martin@home-of-linux.org>

	* Make it work with OpenBSD 2.4.

As with NetBSD: it compiles fine and the executables do not dump core -
but needs a closer look whether the returned data are all valid.
1998-12-06 11:08:12 +00:00
Martin Baulig
b7e5a6da2d *** empty log message *** 1998-12-05 19:56:08 +00:00
Martin Baulig
67a344b9d4 Make it work with NetBSD 1.3.2.
1998-12-05  Martin Baulig  <martin@home-of-linux.org>

	* Make it work with NetBSD 1.3.2.

Well, it compiles without problems but not all features are currently
working; need to look a little bit closer at it.

Ok for now, think I'll install OpenBSD and test it there ...

Martin
1998-12-05 18:52:09 +00:00
Martin Baulig
c90462bc26 No longer include <linux/version.h>, but use GLIBTOP_LINUX_VERSION_CODE
1998-12-03  Martin Baulig  <martin@home-of-linux.org>

	* netload.c: No longer include <linux/version.h>, but use
	GLIBTOP_LINUX_VERSION_CODE which is set by configure instead.
	Define _GLIBTOP_IP_FW_ACCTIN and _GLIBTOP_IP_FW_ACCTOUT here
	and use them instead of IP_FW_F_ACCTIN and IP_FW_F_ACCTOUT.
1998-12-03 16:12:43 +00:00
Martin Baulig
6b736f1f87 I really should include <linux/version.h> here ... 1998-11-30 20:52:54 +00:00
Martin Baulig
5fed8969c6 Use correct header files both for libc5 and glibc. With Linux >= 2.1.114
1998-11-30  Martin Baulig  <martin@home-of-linux.org>

	* netload.c: Use correct header files both for libc5 and glibc.
	With Linux >= 2.1.114 we no longer use IP accounting since it
	already has byte counts in /proc/net/dev.
1998-11-30 20:30:32 +00:00
Martin Baulig
a701fc7aa6 Minor /proc/net/dev parsing updates; has nothing to do with latest
compilation problems.
1998-11-27 10:34:01 +00:00
Martin Baulig
cd7976f3cd #include <net/if.h> #include <netinet/ip_fw.h>
#include <net/if.h>
#include <netinet/ip_fw.h>
1998-11-26 22:37:04 +00:00
Martin Baulig
9c0ec8c69f Added implementation for this function.
1998-11-22  Martin Baulig  <baulig@merkur.uni-trier.de>

	* netload.c (glibtop_get_netload_s): Added implementation
	for this function.

	The code here is smart enough to use /proc/net/ip_acct if
 	IP accounting is enabled in the kernel and activated on the
 	requested device and /proc/net/dev if not.

	To get separate statistics for received and transmitted
	packets you need to use two accounting rules:

	ipfwadm -A in -a -P all -W eth0
	ipfwadm -A out -a -P all -W eth0

	But before you activate IP accounting, please have a look
	at /proc/net/dev - if if already contains byte counters,
	then don't use IP accounting.
1998-11-22 19:24:14 +00:00
Martin Baulig
4ac6972be6 Applied a patch from Kenneth Stailey to make it work on OpenBSD.
1998-11-20  Martin Baulig  <baulig@merkur.uni-trier.de>

	* sysdeps/common/mountlist.c: Applied a patch from Kenneth Stailey to
	make it work on OpenBSD.
1998-11-20 14:35:29 +00:00
Martin Baulig
7a0a779311 Great !!! It's working on my FreeBSD 3.0 machine now ... !!! 1998-11-17 23:15:12 +00:00
Martin Baulig
a637c8b406 Don't define this any longer, we now use the port the daemon is listening
1998-11-11  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/gnuserv.h (MCOOKIE_SCREEN): Don't define this
	any longer, we now use the port the daemon is listening on instead
	of a fixed screen.
1998-11-11 20:56:09 +00:00
Martin Baulig
44b03ba60b Define LIBGTOP_ENABLE_DEBUG if this parameter is given.
1998-11-11  Martin Baulig  <martin@home-of-linux.org>

	* configure.in (--enable-debug): Define LIBGTOP_ENABLE_DEBUG
	if this parameter is given.
	(--enable-fatal-warnings): New parameter to make all warnings
	fatal; define `LIBGTOP_FATAL_WARNINGS' if given.

	* sysdeps/common/error.c (glibtop_error_r): Use abort () instead
	of exit () if LIBGTOP_ENABLE_DEBUG.
	(glibtop_error_io_r): Likewise.
	(glibtop_warn_r): Call abort () if LIBGTOP_FATAL_WARNINGS.
	(glibtop_warn_io_r): Likewise.

	[NOTE: To get a core dump of the libgtop_server, you need to
	remove all suid/sgid bits and invoke it as a priviledged user.]
1998-11-11 16:02:01 +00:00
Martin Baulig
d46c6227fb It does not work to get information about the swapper task on FreeBSD
1998-11-11  Martin Baulig  <martin@home-of-linux.org>

	* *.c: It does not work to get information about the swapper task
	on FreeBSD 2.2.6, so we simple return if pid == 0.
1998-11-11 15:58:22 +00:00
Martin Baulig
213647b203 *** empty log message *** 1998-11-02 19:42:26 +00:00
Martin Baulig
82fdca61c2 Use glibtop_warn_io_r () instead of glibtop_error_io_r ().
1998-10-31  Martin Baulig  <martin@home-of-linux.org>

	* *.c: Use glibtop_warn_io_r () instead of glibtop_error_io_r ().

	* proctime.c, prockernel.c, procargs.c: Don't call kvm_uread () if
	the /proc filesystem is not mounted.
1998-10-30 23:06:56 +00:00
Martin Baulig
0fec2b7fb0 Added code for ISDN here.
1998-10-28  Martin Baulig  <martin@home-of-linux.org>

	* ppp.c: Added code for ISDN here.
1998-10-28 21:08:41 +00:00
Martin Baulig
b70d0570c7 More network load stuff. 1998-10-26 12:21:28 +00:00
Martin Baulig
13d9120f93 Some systems may not distinguish between input and output bytes/pkts/errs
so we add `_total' fields:

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	*/
		packets_total,		/* GLIBTOP_NETLOAD_PACKETS_TOTAL*/
		bytes_in,		/* GLIBTOP_NETLOAD_BYTES_IN	*/
		bytes_out,		/* GLIBTOP_NETLOAD_BYTES_OUT	*/
		bytes_total,		/* GLIBTOP_NETLOAD_BYTES_TOTAL	*/
		errors_in,		/* GLIBTOP_NETLOAD_ERRORS_IN	*/
		errors_out,		/* GLIBTOP_NETLOAD_ERRORS_OUT	*/
		errors_total,		/* GLIBTOP_NETLOAD_ERRORS_TOTAL	*/
		collisions;		/* GLIBTOP_NETLOAD_COLLISIONS	*/
};
1998-10-26 10:44:16 +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