Compare commits

...

7 Commits

Author SHA1 Message Date
Benoît Dejean
eff32adaa4 Fixed C99 macros. Closes #161994. Patch by Vincent Berger
* include/glibtop/error.h:
	* sysdeps/common/error.c: Fixed C99 macros. Closes #161994.
	Patch by Vincent Berger <vincent.berger@ext.bull.net>.
2004-12-22 18:12:52 +00:00
Benoît Dejean
3aabc5fb13 Ignores unkown file system type.
* mountlist.c: (ignore_mount_entry): Ignores unkown file system type.
2004-12-09 16:00:15 +00:00
Benoît Dejean
12f4129f6d Updated.
* reference.texi: Updated.
2004-12-04 19:21:57 +00:00
Benoît Dejean
29d88e177b Released 2.8.2.
* NEWS:
	* configure.in: Released 2.8.2.
2004-12-04 15:50:46 +00:00
Benoît Dejean
3fe19138de Fixed procstate test.
* proclist.c: (glibtop_get_proclist_s): Fixed procstate test.
2004-11-29 19:47:48 +00:00
Martin Willemoes Hansen
b3b674f7df Updated Danish translation.
* da.po: Updated Danish translation.
2004-11-23 12:36:25 +00:00
Benoît Dejean
3c029f5a28 Added a check for NULL pointer when wlaking though interfaces (though i
* netload.c: (get_ipv6), (glibtop_get_netload_s): Added a check for NULL
	pointer when wlaking though interfaces (though i don't understand why some
	interface don't have an ifa_addr).
	Move all ipv6 code into a separate function. Added a paranoid check on
	getifaddrs.
2004-11-15 15:02:43 +00:00
14 changed files with 149 additions and 79 deletions

View File

@@ -1,3 +1,14 @@
2004-12-22 Benoît Dejean <tazforever@dlfp.org>
* include/glibtop/error.h:
* sysdeps/common/error.c: Fixed C99 macros. Closes #161994.
Patch by Vincent Berger <vincent.berger@ext.bull.net>.
2004-12-04 Benoît Dejean <tazforever@dlfp.org>
* NEWS:
* configure.in: Released 2.8.2.
2004-10-11 Benoît Dejean <tazforever@dlfp.org>
* NEWS: Released 2.8.1.

10
NEWS
View File

@@ -1,3 +1,13 @@
December 4, 2004: Overview of Changes from 2.8.1 to 2.8.2
=========================================================
o linux:
- fixed segfault when polling PPP devices with glibtop_get_proclist.
- fixed process state in glibtop_get_proclist.
o updated translations:
- da (Martin Willemoes Hansen)
October 11, 2004: Overview of Changes from 2.8.0 to 2.8.1
=========================================================
* Improved Solaris and AIX support.

View File

@@ -8,7 +8,7 @@ AC_CANONICAL_SYSTEM
LIBGTOP_MAJOR_VERSION=2
LIBGTOP_MINOR_VERSION=8
LIBGTOP_MICRO_VERSION=1
LIBGTOP_MICRO_VERSION=2
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION)

View File

@@ -1,3 +1,7 @@
2004-12-04 Benoît Dejean <tazforever@dlfp.org>
* reference.texi: Updated.
2004-08-03 Benoît Dejean <tazforever@dlfp.org>
* reference.texi: Updated.

View File

@@ -1533,6 +1533,8 @@ struct _glibtop_fsusage
files,
ffree;
guint32 block_size;
guint64 read,
write;
@};
@end cartouche
@end example
@@ -1550,10 +1552,12 @@ Total file nodes.
Free file nodes.
@item block_size
Block size in bytes.
@item read
Total blocks read.
@item write
Total blocks written.
@end table
Blocks are usually 512 bytes.
@page
@node Library Functions, , Common Functions, Reference Manual
@section Library Functions

View File

@@ -50,11 +50,11 @@ void G_GNUC_UNUSED glibtop_warn_io_r (glibtop *server, char *format, ...);
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define glibtop_error(p1, ...) glibtop_error_r(glibtop_global_server , p1 , __VA_ARGS__)
#define glibtop_warn(p1, ...) glibtop_warn_r(glibtop_global_server , p1 , __VA_ARGS__)
#define glibtop_error(...) glibtop_error_r(glibtop_global_server , __VA_ARGS__)
#define glibtop_warn(...) glibtop_warn_r(glibtop_global_server , __VA_ARGS__)
#define glibtop_error_io(p1, ...) glibtop_error_io_r(glibtop_global_server , p1 , __VA_ARGS__)
#define glibtop_warn_io(p1, ...) glibtop_warn_io_r(glibtop_global_server , p1 , __VA_ARGS__)
#define glibtop_error_io(...) glibtop_error_io_r(glibtop_global_server , __VA_ARGS__)
#define glibtop_warn_io(...) glibtop_warn_io_r(glibtop_global_server , __VA_ARGS__)
#else /* no __GNUC__, no C99*/

View File

@@ -1,3 +1,7 @@
2004-11-23 Martin Willemoes Hansen <mwh@sysrq.dk>
* da.po: Updated Danish translation.
2004-09-26 Adam Weinberger <adamw@gnome.org>
* en_CA.po: Updated Canadian English translation.

View File

@@ -6,15 +6,13 @@
# Ole Laursen <olau@hardworking.dk>, 2002, 03.
# Martin Willemoes Hansen <mwh@sysrq.dk>, 2004.
#
# BEMÆRK: oversættelsen er overhovedet ikke blevet rettet igennem.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-23 12:21+0200\n"
"PO-Revision-Date: 2004-08-23 12:21+0200\n"
"Last-Translator: Ole Laursen <olau@hardworking.dk>\n"
"POT-Creation-Date: 2004-11-23 13:36+0100\n"
"PO-Revision-Date: 2004-11-23 13:35+0100\n"
"Last-Translator: Martin Willemoes Hansen <mwh@sysrq.dk>\n"
"Language-Team: Danish <dansk@klid.dk>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -102,7 +100,7 @@ msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
msgid "Spin:"
msgstr "Spin:"
#: lib/read.c:65
#: lib/read.c:64
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
@@ -127,39 +125,39 @@ msgid_plural "write %d bytes"
msgstr[0] "skriv %d byte"
msgstr[1] "skriv %d byte"
#: src/daemon/gnuserv.c:456
#: src/daemon/gnuserv.c:461
msgid "Enable debugging"
msgstr "Slå fejlfinding til"
#: src/daemon/gnuserv.c:456
#: src/daemon/gnuserv.c:461
msgid "DEBUG"
msgstr "DEBUG"
msgstr "FEJLFINDING"
#: src/daemon/gnuserv.c:458
#: src/daemon/gnuserv.c:463
msgid "Enable verbose output"
msgstr "Slå meddelsom udskrift til"
#: src/daemon/gnuserv.c:458
#: src/daemon/gnuserv.c:463
msgid "VERBOSE"
msgstr "VERBOSE"
msgstr "MEDDELSOM"
#: src/daemon/gnuserv.c:460
#: src/daemon/gnuserv.c:465
msgid "Don't fork into background"
msgstr "Forgren ikke til baggrund"
#: src/daemon/gnuserv.c:460
#: src/daemon/gnuserv.c:465
msgid "NO-DAEMON"
msgstr "NO-DAEMON"
msgstr "INGEN-SERVER"
#: src/daemon/gnuserv.c:462
#: src/daemon/gnuserv.c:467
msgid "Invoked from inetd"
msgstr "Kaldt fra inetd"
#: src/daemon/gnuserv.c:462
#: src/daemon/gnuserv.c:467
msgid "INETD"
msgstr "INETD"
#: src/daemon/gnuserv.c:496
#: src/daemon/gnuserv.c:501
#, c-format
msgid ""
"Error on option %s: %s.\n"
@@ -1317,7 +1315,7 @@ msgstr "Afbryd"
#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
msgid "EMT error"
msgstr "EMT fejl"
msgstr "EMT-fejl"
#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
msgid "Floating-point exception"
@@ -1325,7 +1323,7 @@ msgstr "Flydende tals-undtagelse"
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
msgid "Kill"
msgstr "Dræb"
msgstr "Afslut"
#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
msgid "Bus error"

View File

@@ -1,3 +1,7 @@
2004-12-09 Benoît Dejean <tazforever@dlfp.org>
* mountlist.c: (ignore_mount_entry): Ignores "unkown" file system type.
2004-09-24 Benoît Dejean <tazforever@dlfp.org>
* fsusage.c: (glibtop_get_fsusage_s): Fixed .block_size on Solaris.

View File

@@ -129,7 +129,7 @@ glibtop_warn_io_r (glibtop *server, char *format, ...)
va_end (args);
}
#ifndef __GNUC__
#if !defined(__GNUC__) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L)
void
glibtop_error (char *format, ...)
@@ -167,4 +167,4 @@ glibtop_warn_io (char *format, ...)
va_end (args);
}
#endif /* __GNUC__ */
#endif /* !defined(__GNUC__) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) */

View File

@@ -547,7 +547,8 @@ static gboolean ignore_mount_entry(const struct mount_entry *me)
"binfmt_misc",
"supermount",
"mntfs",
"openpromfs"
"openpromfs",
"unknown"
};
const char (*i)[12] = &ignored[0];

View File

@@ -1,3 +1,15 @@
2004-11-29 Benoît Dejean <tazforever@dlfp.org>
* proclist.c: (glibtop_get_proclist_s): Fixed procstate test.
2004-11-15 Benoît Dejean <tazforever@dlfp.org>
* netload.c: (get_ipv6), (glibtop_get_netload_s): Added a check for NULL
pointer when wlaking though interfaces (though i don't understand why some
interface don't have an ifa_addr).
Move all ipv6 code into a separate function. Added a paranoid check on
getifaddrs.
2004-10-26 Benoît Dejean <tazforever@dlfp.org>
* proctime.c: (glibtop_get_proc_time_s): Set .rtime. At last !

View File

@@ -25,6 +25,9 @@
#include <glibtop/error.h>
#include <glibtop/netload.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
@@ -116,6 +119,69 @@ glibtop_init_netload_s (glibtop *server)
_glibtop_sysdeps_netload_packets;
}
#ifdef HAVE_IFADDRS_H
static void get_ipv6(glibtop *server, glibtop_netload *buf,
const char *interface)
{
struct ifaddrs *ifa0, *ifr6;
if(getifaddrs (&ifa0) != 0)
{
glibtop_warn_r(server, "getifaddrs failed : %s", strerror(errno));
return;
}
for (ifr6 = ifa0; ifr6; ifr6 = ifr6->ifa_next) {
if (strcmp (ifr6->ifa_name, interface) == 0
&& ifr6->ifa_addr != NULL
&& ifr6->ifa_addr->sa_family == AF_INET6)
break;
}
if(!ifr6) goto free_ipv6;
memcpy(buf->address6,
&((struct sockaddr_in6 *) ifr6->ifa_addr)->sin6_addr,
16);
memcpy(buf->prefix6,
&((struct sockaddr_in6 *) ifr6->ifa_netmask)->sin6_addr,
16);
if (IN6_IS_ADDR_LINKLOCAL (buf->address6))
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_LINK;
else if (IN6_IS_ADDR_SITELOCAL (buf->address6))
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_SITE;
else if (IN6_IS_ADDR_GLOBAL (buf->address6)
|| IN6_IS_ADDR_MC_ORGLOCAL (buf->address6)
|| IN6_IS_ADDR_V4COMPAT (buf->address6)
|| IN6_IS_ADDR_MULTICAST (buf->address6)
|| IN6_IS_ADDR_UNSPECIFIED (buf->address6)
)
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_GLOBAL;
else if (IN6_IS_ADDR_LOOPBACK (buf->address6))
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_HOST;
else
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_UNKNOWN;
buf->flags |= _glibtop_sysdeps_netload_6;
free_ipv6:
freeifaddrs(ifa0);
}
#endif /* HAVE_IFADDRS_H */
/* Provides network statistics. */
void
@@ -376,54 +442,10 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
fclose (f);
#ifdef HAVE_IFADDRS_H
/* IPv6 */
{
struct ifaddrs *ifa0, *ifr6;
getifaddrs (&ifa0);
for (ifr6 = ifa0; ifr6; ifr6 = ifr6->ifa_next) {
if (strcmp (ifr6->ifa_name, interface) == 0
&& ifr6->ifa_addr->sa_family == AF_INET6)
break;
}
if(!ifr6) goto free_ipv6;
memcpy(buf->address6,
&((struct sockaddr_in6 *) ifr6->ifa_addr)->sin6_addr,
16);
memcpy(buf->prefix6,
&((struct sockaddr_in6 *) ifr6->ifa_netmask)->sin6_addr,
16);
if (IN6_IS_ADDR_LINKLOCAL (buf->address6))
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_LINK;
else if (IN6_IS_ADDR_SITELOCAL (buf->address6))
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_SITE;
else if (IN6_IS_ADDR_GLOBAL (buf->address6)
|| IN6_IS_ADDR_MC_ORGLOCAL (buf->address6)
|| IN6_IS_ADDR_V4COMPAT (buf->address6)
|| IN6_IS_ADDR_MULTICAST (buf->address6)
|| IN6_IS_ADDR_UNSPECIFIED (buf->address6)
)
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_GLOBAL;
else if (IN6_IS_ADDR_LOOPBACK (buf->address6))
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_HOST;
else
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_UNKNOWN;
buf->flags |= _glibtop_sysdeps_netload_6;
free_ipv6:
freeifaddrs(ifa0);
} /* IPV6 */
get_ipv6(server, buf, interface);
#endif /* HAVE_IFADDRS_H */
}

View File

@@ -157,7 +157,7 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
if (which & GLIBTOP_EXCLUDE_IDLE) {
glibtop_get_proc_state_s (server, &procstate, pid);
if (procstate.flags & (1L << GLIBTOP_PROC_STATE_STATE))
if (procstate.state != 'R') continue;
if (procstate.state != GLIBTOP_PROCESS_RUNNING) continue;
}
if (which & GLIBTOP_EXCLUDE_SYSTEM) {