**** Merged from HEAD ****
This commit is contained in:
2
AUTHORS
2
AUTHORS
@@ -1,2 +1,2 @@
|
|||||||
Martin Baulig (martin@home-of-linux.org)
|
Martin Baulig (martin@home-of-linux.org)
|
||||||
Josh Sled <jsled@scam.XCF.Berkeley.EDU>
|
Drazen Kacar (dave@srce.hr)
|
||||||
|
@@ -31,6 +31,8 @@ confexecdir = $(libdir)
|
|||||||
confexec_DATA = $(top_builddir)/libgtopConf.sh \
|
confexec_DATA = $(top_builddir)/libgtopConf.sh \
|
||||||
$(top_builddir)/libgtop-features.def
|
$(top_builddir)/libgtop-features.def
|
||||||
|
|
||||||
|
CLEANFILES=libgtopConf.sh
|
||||||
|
|
||||||
bin_SCRIPTS = $(top_builddir)/libgtop-config
|
bin_SCRIPTS = $(top_builddir)/libgtop-config
|
||||||
|
|
||||||
## to automatically rebuild aclocal.m4 if any of the macros in
|
## to automatically rebuild aclocal.m4 if any of the macros in
|
||||||
|
@@ -158,6 +158,9 @@ else
|
|||||||
static_targets=""
|
static_targets=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
|
||||||
|
AM_CONDITIONAL(ENABLE_SHARED, test x$enable_static = xyes)
|
||||||
|
|
||||||
AC_SUBST(static_targets)
|
AC_SUBST(static_targets)
|
||||||
AC_SUBST(smp_examples)
|
AC_SUBST(smp_examples)
|
||||||
AC_SUBST(guile_examples)
|
AC_SUBST(guile_examples)
|
||||||
|
@@ -43,7 +43,7 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_netload netload;
|
glibtop_netload netload;
|
||||||
unsigned method, count, port, i;
|
unsigned method, count, port;
|
||||||
struct in_addr addr, subnet;
|
struct in_addr addr, subnet;
|
||||||
char *address_string, *subnet_string;
|
char *address_string, *subnet_string;
|
||||||
char buffer [BUFSIZ];
|
char buffer [BUFSIZ];
|
||||||
|
@@ -31,8 +31,6 @@
|
|||||||
#include <glibtop/union.h>
|
#include <glibtop/union.h>
|
||||||
#include <glibtop/sysdeps.h>
|
#include <glibtop/sysdeps.h>
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
output (pid_t pid)
|
output (pid_t pid)
|
||||||
{
|
{
|
||||||
|
@@ -27,8 +27,6 @@
|
|||||||
#include <glibtop/cpu.h>
|
#include <glibtop/cpu.h>
|
||||||
#include <glibtop/xmalloc.h>
|
#include <glibtop/xmalloc.h>
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
@@ -67,7 +65,7 @@ main (int argc, char *argv [])
|
|||||||
memset (separator, '-', 91);
|
memset (separator, '-', 91);
|
||||||
separator [92] = '\0';
|
separator [92] = '\0';
|
||||||
|
|
||||||
sprintf (buffer, _("Ticks (%d per second):"), frequency);
|
sprintf (buffer, _("Ticks (%ld per second):"), frequency);
|
||||||
|
|
||||||
printf ("\n\n%-26s %12s %12s %12s %12s %12s\n%s\n", buffer,
|
printf ("\n\n%-26s %12s %12s %12s %12s %12s\n%s\n", buffer,
|
||||||
_("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator);
|
_("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator);
|
||||||
|
@@ -38,7 +38,7 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_sysdeps sysdeps;
|
glibtop_sysdeps sysdeps;
|
||||||
unsigned method, count, port, i;
|
unsigned method, count, port;
|
||||||
char buffer [BUFSIZ];
|
char buffer [BUFSIZ];
|
||||||
|
|
||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
@@ -70,14 +70,11 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_union data;
|
glibtop_union data;
|
||||||
glibtop_sysdeps sysdeps;
|
unsigned c, count, *ptr;
|
||||||
unsigned c, count, port, i, *ptr;
|
|
||||||
struct rusage total_start, total_end;
|
struct rusage total_start, total_end;
|
||||||
struct rusage rusage_start, rusage_end;
|
struct rusage rusage_start, rusage_end;
|
||||||
struct timeval elapsed_utime, elapsed_stime;
|
struct timeval elapsed_utime, elapsed_stime;
|
||||||
char buffer [BUFSIZ];
|
pid_t pid;
|
||||||
pid_t pid, ppid;
|
|
||||||
char *args;
|
|
||||||
|
|
||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
|
||||||
|
@@ -28,13 +28,22 @@
|
|||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
BEGIN_LIBGTOP_DECLS
|
||||||
|
|
||||||
|
#ifndef G_GNUC_UNUSED
|
||||||
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
||||||
|
#define G_GNUC_UNUSED \
|
||||||
|
__attribute__((unused))
|
||||||
|
#else /* !__GNUC__ */
|
||||||
|
#define G_GNUC_UNUSED
|
||||||
|
#endif /* !__GNUC__ */
|
||||||
|
#endif /* defined G_GNUC_UNUSED */
|
||||||
|
|
||||||
void glibtop_error_vr (glibtop *server, char *format, va_list args);
|
void glibtop_error_vr (glibtop *server, char *format, va_list args);
|
||||||
void glibtop_warn_vr (glibtop *server, char *format, va_list args);
|
void glibtop_warn_vr (glibtop *server, char *format, va_list args);
|
||||||
|
|
||||||
void glibtop_error_io_vr (glibtop *server, char *format, int, va_list args);
|
void glibtop_error_io_vr (glibtop *server, char *format, int, va_list args);
|
||||||
void glibtop_warn_io_vr (glibtop *server, char *format, int, va_list args);
|
void glibtop_warn_io_vr (glibtop *server, char *format, int, va_list args);
|
||||||
|
|
||||||
static void
|
static void G_GNUC_UNUSED
|
||||||
glibtop_error_r (glibtop *server, char *format, ...)
|
glibtop_error_r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -44,7 +53,7 @@ glibtop_error_r (glibtop *server, char *format, ...)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void G_GNUC_UNUSED
|
||||||
glibtop_warn_r (glibtop *server, char *format, ...)
|
glibtop_warn_r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -54,7 +63,7 @@ glibtop_warn_r (glibtop *server, char *format, ...)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void G_GNUC_UNUSED
|
||||||
glibtop_error_io_r (glibtop *server, char *format, ...)
|
glibtop_error_io_r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -64,7 +73,7 @@ glibtop_error_io_r (glibtop *server, char *format, ...)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void G_GNUC_UNUSED
|
||||||
glibtop_warn_io_r (glibtop *server, char *format, ...)
|
glibtop_warn_io_r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
# Note that this is NOT a relocatable package
|
# Note that this is NOT a relocatable package
|
||||||
%define ver @VERSION@
|
%define ver @VERSION@
|
||||||
%define rel SNAP
|
%define RELEASE SNAP
|
||||||
|
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
|
||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
|
|
||||||
Summary: LibGTop library
|
Summary: LibGTop library
|
||||||
@@ -118,8 +119,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{prefix}/lib/*.sh
|
%{prefix}/lib/*.sh
|
||||||
%{prefix}/lib/*.def
|
%{prefix}/lib/*.def
|
||||||
%{prefix}/include/*
|
%{prefix}/include/*
|
||||||
|
%{prefix}/lib/libgtop
|
||||||
|
|
||||||
%files examples
|
%files examples
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%{prefix}/libexec/libgtop/*
|
%{prefix}/libexec/libgtop
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
1999-07-29 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* Makefile.am: Link the `libgtop_daemon' and the `libgtop_server'
|
||||||
|
statically if possible.
|
||||||
|
|
||||||
1999-05-07 Martin Baulig <martin@home-of-linux.org>
|
1999-05-07 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* server.c (main): There's some problem with uname () - some systems
|
* server.c (main): There's some problem with uname () - some systems
|
||||||
|
@@ -41,11 +41,19 @@ libgtop_daemon_LDADD = $(top_builddir)/lib/libgtop.la \
|
|||||||
$(GLIB_LIBS)\
|
$(GLIB_LIBS)\
|
||||||
@LIBSUPPORT@ @INTLLIBS@ @libs_xauth@
|
@LIBSUPPORT@ @INTLLIBS@ @libs_xauth@
|
||||||
|
|
||||||
|
if ENABLE_STATIC
|
||||||
|
libgtop_daemon_LDFLAGS = -static
|
||||||
|
endif
|
||||||
|
|
||||||
libgtop_server_SOURCES = server.c slave.c io.c version.c daemon.h
|
libgtop_server_SOURCES = server.c slave.c io.c version.c daemon.h
|
||||||
libgtop_server_LDADD = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid.la \
|
libgtop_server_LDADD = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_suid_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_suid_common.la \
|
||||||
@LIBSUPPORT@
|
@LIBSUPPORT@
|
||||||
|
|
||||||
|
if ENABLE_STATIC
|
||||||
|
libgtop_server_LDFLAGS = -static
|
||||||
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = server_config.h.in server_config.pl
|
EXTRA_DIST = server_config.h.in server_config.pl
|
||||||
|
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
|
@@ -219,7 +219,7 @@ permitted (u_long host_addr, int fd)
|
|||||||
* GNU_SECURE protocol....
|
* GNU_SECURE protocol....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (verbose_output)
|
if (verbose_output) {
|
||||||
if (changed_uid || invoked_from_inetd)
|
if (changed_uid || invoked_from_inetd)
|
||||||
syslog_message (LOG_WARNING,
|
syslog_message (LOG_WARNING,
|
||||||
"Xauth authentication not allowed, "
|
"Xauth authentication not allowed, "
|
||||||
@@ -228,6 +228,7 @@ permitted (u_long host_addr, int fd)
|
|||||||
syslog_message (LOG_WARNING,
|
syslog_message (LOG_WARNING,
|
||||||
"Xauth authentication failed, "
|
"Xauth authentication failed, "
|
||||||
"trying GNU_SECURE auth...");
|
"trying GNU_SECURE auth...");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Other auth protocols go here, and should execute only if
|
/* Other auth protocols go here, and should execute only if
|
||||||
@@ -243,7 +244,7 @@ permitted (u_long host_addr, int fd)
|
|||||||
if (enable_debug)
|
if (enable_debug)
|
||||||
syslog_message (LOG_DEBUG, "Trying %lx - %lx",
|
syslog_message (LOG_DEBUG, "Trying %lx - %lx",
|
||||||
host_addr, permitted_hosts [i]);
|
host_addr, permitted_hosts [i]);
|
||||||
if (permitted_hosts [i] == NULL)
|
if (permitted_hosts [i] == 0L)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
if (host_addr == permitted_hosts [i])
|
if (host_addr == permitted_hosts [i])
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@@ -26,12 +26,12 @@
|
|||||||
void
|
void
|
||||||
handle_slave_connection (int input, int output)
|
handle_slave_connection (int input, int output)
|
||||||
{
|
{
|
||||||
glibtop *server = glibtop_global_server;
|
glibtop *server G_GNUC_UNUSED = glibtop_global_server;
|
||||||
int64_t *param_ptr;
|
int64_t *param_ptr G_GNUC_UNUSED;
|
||||||
const void *ptr;
|
const void *ptr G_GNUC_UNUSED;
|
||||||
|
|
||||||
unsigned short max_len;
|
unsigned short max_len G_GNUC_UNUSED;
|
||||||
pid_t pid;
|
pid_t pid G_GNUC_UNUSED;
|
||||||
|
|
||||||
glibtop_response _resp, *resp = &_resp;
|
glibtop_response _resp, *resp = &_resp;
|
||||||
glibtop_command _cmnd, *cmnd = &_cmnd;
|
glibtop_command _cmnd, *cmnd = &_cmnd;
|
||||||
@@ -119,8 +119,8 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
|
|||||||
const void *parameter)
|
const void *parameter)
|
||||||
{
|
{
|
||||||
glibtop *server = glibtop_global_server;
|
glibtop *server = glibtop_global_server;
|
||||||
unsigned device;
|
unsigned device G_GNUC_UNUSED;
|
||||||
pid_t pid;
|
pid_t pid G_GNUC_UNUSED;
|
||||||
|
|
||||||
switch (cmnd->command) {
|
switch (cmnd->command) {
|
||||||
case GLIBTOP_CMND_SYSDEPS:
|
case GLIBTOP_CMND_SYSDEPS:
|
||||||
|
@@ -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>
|
1999-05-26 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
More NetBSD 1.4 fixes.
|
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->cutime = tv2sec (pstats.p_cru.ru_utime);
|
||||||
buf->cstime = tv2sec (pstats.p_cru.ru_stime);
|
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;
|
buf->flags |= _glibtop_sysdeps_proc_time_user;
|
||||||
#else
|
#else
|
||||||
|
@@ -38,9 +38,11 @@ static const unsigned long _glibtop_sysdeps_proc_uid_groups =
|
|||||||
#if LIBGTOP_VERSION_CODE >= 1001000
|
#if LIBGTOP_VERSION_CODE >= 1001000
|
||||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
||||||
(1L << GLIBTOP_PROC_UID_NGROUPS) + (1L << GLIBTOP_PROC_UID_GROUPS);
|
(1L << GLIBTOP_PROC_UID_NGROUPS) + (1L << GLIBTOP_PROC_UID_GROUPS);
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
0;
|
0L;
|
||||||
|
#endif
|
||||||
|
#else /* LIBGTOP_VERSION_CODE < 1001000 */
|
||||||
|
0L;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Init function. */
|
/* Init function. */
|
||||||
|
@@ -113,7 +113,6 @@ sub output {
|
|||||||
print 'static SCM';
|
print 'static SCM';
|
||||||
print 'glibtop_guile_types_' . $feature . ' (void)';
|
print 'glibtop_guile_types_' . $feature . ' (void)';
|
||||||
print '{';
|
print '{';
|
||||||
print "\tint i;";
|
|
||||||
print "\tSCM list;";
|
print "\tSCM list;";
|
||||||
print '';
|
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>
|
1999-02-20 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* netload.c: Don't include <linux/ip_fw.h> for libc5 systems
|
* 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;
|
char buffer [BUFSIZ], *p;
|
||||||
int fd, len, i;
|
int fd, len, i;
|
||||||
|
u_int64_t total;
|
||||||
|
|
||||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
|
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->sys = strtoul (p, &p, 0);
|
||||||
buf->idle = 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->frequency = 100;
|
||||||
buf->flags = _glibtop_sysdeps_cpu;
|
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_sys [i] = strtoul (p, &p, 0);
|
||||||
buf->xcpu_idle [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] +
|
total = buf->xcpu_user [i];
|
||||||
buf->xcpu_sys [i] + buf->xcpu_idle [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;
|
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);
|
skfd = socket (AF_INET, SOCK_DGRAM, 0);
|
||||||
if (skfd) {
|
if (skfd) {
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
struct sockaddr_in addr;
|
|
||||||
char *address;
|
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
|
|
||||||
strcpy (ifr.ifr_name, interface);
|
strcpy (ifr.ifr_name, interface);
|
||||||
|
@@ -31,6 +31,8 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_ppp =
|
static const unsigned long _glibtop_sysdeps_ppp =
|
||||||
|
@@ -28,9 +28,8 @@
|
|||||||
static const unsigned long _glibtop_sysdeps_proc_time =
|
static const unsigned long _glibtop_sysdeps_proc_time =
|
||||||
(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_CUTIME) +
|
(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_CUTIME) +
|
||||||
(1L << GLIBTOP_PROC_TIME_STIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) +
|
(1L << GLIBTOP_PROC_TIME_STIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) +
|
||||||
(1L << GLIBTOP_PROC_TIME_RTIME) + (1L << GLIBTOP_PROC_TIME_FREQUENCY) +
|
(1L << GLIBTOP_PROC_TIME_FREQUENCY) + (1L << GLIBTOP_PROC_TIME_TIMEOUT) +
|
||||||
(1L << GLIBTOP_PROC_TIME_TIMEOUT) + (1L << GLIBTOP_PROC_TIME_IT_REAL_VALUE) +
|
(1L << GLIBTOP_PROC_TIME_IT_REAL_VALUE) + (1L << GLIBTOP_PROC_TIME_START_TIME);
|
||||||
(1L << GLIBTOP_PROC_TIME_START_TIME);
|
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_proc_time_smp =
|
static const unsigned long _glibtop_sysdeps_proc_time_smp =
|
||||||
(1L << GLIBTOP_PROC_TIME_XCPU_UTIME) + (1L << GLIBTOP_PROC_TIME_XCPU_STIME);
|
(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->cutime = strtoul (p, &p, 0);
|
||||||
buf->cstime = strtoul (p, &p, 0);
|
buf->cstime = strtoul (p, &p, 0);
|
||||||
|
|
||||||
buf->rtime = buf->utime + buf->stime;
|
|
||||||
|
|
||||||
p = skip_multiple_token (p, 2);
|
p = skip_multiple_token (p, 2);
|
||||||
|
|
||||||
buf->timeout = strtoul (p, &p, 0);
|
buf->timeout = strtoul (p, &p, 0);
|
||||||
|
Reference in New Issue
Block a user