**** Merged from HEAD ****
This commit is contained in:
@@ -1 +1,2 @@
|
||||
Josh Sled <jsled@scam.XCF.Berkeley.EDU>
|
||||
Martin Baulig (martin@home-of-linux.org)
|
||||
Josh Sled (jsled@scam.XCF.Berkeley.EDU)
|
||||
|
@@ -1,3 +1,15 @@
|
||||
1999-07-29 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* proctime.c (glibtop_get_proc_time_p): Fix bug reported by
|
||||
Takis Psarogiannakopoulos: `start_time' are seconds since the
|
||||
epoch as it is stated in the manual.
|
||||
|
||||
Tue Jun 15 16:04:10 1999 Timur Bakeyev <mc@bat.ru>
|
||||
|
||||
* procuid.c: A fix to a ommitted case, when nor NetBSD, nor
|
||||
LibGTop >= 1.1.0. This should be investigated closely to cover
|
||||
more cases....
|
||||
|
||||
1999-05-26 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
More NetBSD 1.4 fixes.
|
||||
|
@@ -188,7 +188,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
|
||||
buf->cutime = tv2sec (pstats.p_cru.ru_utime);
|
||||
buf->cstime = tv2sec (pstats.p_cru.ru_stime);
|
||||
|
||||
buf->start_time = tv2sec (pstats.p_start);
|
||||
buf->start_time = (u_int64_t) pstats.p_start.tv_sec;
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_proc_time_user;
|
||||
#else
|
||||
|
@@ -38,9 +38,11 @@ static const unsigned long _glibtop_sysdeps_proc_uid_groups =
|
||||
#if LIBGTOP_VERSION_CODE >= 1001000
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
||||
(1L << GLIBTOP_PROC_UID_NGROUPS) + (1L << GLIBTOP_PROC_UID_GROUPS);
|
||||
#endif
|
||||
#else
|
||||
0;
|
||||
0L;
|
||||
#endif
|
||||
#else /* LIBGTOP_VERSION_CODE < 1001000 */
|
||||
0L;
|
||||
#endif
|
||||
|
||||
/* Init function. */
|
||||
|
@@ -113,7 +113,6 @@ sub output {
|
||||
print 'static SCM';
|
||||
print 'glibtop_guile_types_' . $feature . ' (void)';
|
||||
print '{';
|
||||
print "\tint i;";
|
||||
print "\tSCM list;";
|
||||
print '';
|
||||
|
||||
|
@@ -1,3 +1,8 @@
|
||||
1999-07-29 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* proctime.c (glibtop_get_proctime_s): Don't provide `rtime'
|
||||
any longer since we must not use `rtime = utime + stime'.
|
||||
|
||||
1999-02-20 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* netload.c: Don't include <linux/ip_fw.h> for libc5 systems
|
||||
|
@@ -55,6 +55,7 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
{
|
||||
char buffer [BUFSIZ], *p;
|
||||
int fd, len, i;
|
||||
u_int64_t total;
|
||||
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
|
||||
|
||||
@@ -79,7 +80,11 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
buf->sys = strtoul (p, &p, 0);
|
||||
buf->idle = strtoul (p, &p, 0);
|
||||
|
||||
buf->total = buf->user + buf->nice + buf->sys + buf->idle;
|
||||
total = buf->user;
|
||||
total += buf->nice;
|
||||
total += buf->sys;
|
||||
total += buf->idle;
|
||||
buf->total = total;
|
||||
|
||||
buf->frequency = 100;
|
||||
buf->flags = _glibtop_sysdeps_cpu;
|
||||
@@ -94,8 +99,12 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
buf->xcpu_sys [i] = strtoul (p, &p, 0);
|
||||
buf->xcpu_idle [i] = strtoul (p, &p, 0);
|
||||
|
||||
buf->xcpu_total [i] = buf->xcpu_user [i] + buf->xcpu_nice [i] +
|
||||
buf->xcpu_sys [i] + buf->xcpu_idle [i];
|
||||
total = buf->xcpu_user [i];
|
||||
total += buf->xcpu_nice [i];
|
||||
total += buf->xcpu_sys [i];
|
||||
total += buf->xcpu_idle [i];
|
||||
|
||||
buf->xcpu_total [i] = total;
|
||||
}
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_cpu_smp;
|
||||
|
@@ -112,8 +112,6 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
||||
skfd = socket (AF_INET, SOCK_DGRAM, 0);
|
||||
if (skfd) {
|
||||
struct ifreq ifr;
|
||||
struct sockaddr_in addr;
|
||||
char *address;
|
||||
unsigned flags;
|
||||
|
||||
strcpy (ifr.ifr_name, interface);
|
||||
|
@@ -31,6 +31,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_ppp =
|
||||
|
@@ -28,9 +28,8 @@
|
||||
static const unsigned long _glibtop_sysdeps_proc_time =
|
||||
(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_CUTIME) +
|
||||
(1L << GLIBTOP_PROC_TIME_STIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) +
|
||||
(1L << GLIBTOP_PROC_TIME_RTIME) + (1L << GLIBTOP_PROC_TIME_FREQUENCY) +
|
||||
(1L << GLIBTOP_PROC_TIME_TIMEOUT) + (1L << GLIBTOP_PROC_TIME_IT_REAL_VALUE) +
|
||||
(1L << GLIBTOP_PROC_TIME_START_TIME);
|
||||
(1L << GLIBTOP_PROC_TIME_FREQUENCY) + (1L << GLIBTOP_PROC_TIME_TIMEOUT) +
|
||||
(1L << GLIBTOP_PROC_TIME_IT_REAL_VALUE) + (1L << GLIBTOP_PROC_TIME_START_TIME);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_time_smp =
|
||||
(1L << GLIBTOP_PROC_TIME_XCPU_UTIME) + (1L << GLIBTOP_PROC_TIME_XCPU_STIME);
|
||||
@@ -71,8 +70,6 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid)
|
||||
buf->cutime = strtoul (p, &p, 0);
|
||||
buf->cstime = strtoul (p, &p, 0);
|
||||
|
||||
buf->rtime = buf->utime + buf->stime;
|
||||
|
||||
p = skip_multiple_token (p, 2);
|
||||
|
||||
buf->timeout = strtoul (p, &p, 0);
|
||||
|
Reference in New Issue
Block a user