Compare commits
9 Commits
table_0_01
...
stable_aft
Author | SHA1 | Date | |
---|---|---|---|
|
321f5180f7 | ||
|
d9874dca81 | ||
|
0d744987ff | ||
|
e6b544af80 | ||
|
266d62bc3c | ||
|
4c3fb58e3e | ||
|
223f986205 | ||
|
ec0d751472 | ||
|
005eaa8e95 |
139
ChangeLog
139
ChangeLog
@@ -1,47 +1,9 @@
|
|||||||
1998-06-08 Martin Baulig <martin@home-of-linux.org>
|
1998-06-12 Martin Baulig <baulig@taurus.uni-trier.de>
|
||||||
|
|
||||||
* support: Added again.
|
* sysdeps/guile/proclist.c: Replaced call to
|
||||||
|
`gh_append2 ()' with `gh_append ()'.
|
||||||
|
|
||||||
* Makefile.am (SUBDIRS): Added `support' again.
|
* sysdeps/guile/names/*.c: dito.
|
||||||
|
|
||||||
* configure.in: First, we check for gnome. If it is not
|
|
||||||
found, we run GNOME_SUPPORT_CHECKS; otherwise use
|
|
||||||
`$GNOME_LIBDIR -lgnomesupport'.
|
|
||||||
|
|
||||||
1998-06-07 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* examples/ChangeLog: New file.
|
|
||||||
|
|
||||||
* macros/gnome-libgtop-sysdeps.m4: Include
|
|
||||||
`glibtop_machine.h' for Linux.
|
|
||||||
|
|
||||||
* sysdeps/linux/glibtop_machine.h: New file.
|
|
||||||
|
|
||||||
* sysdeps/linux/*.c: Performance optimizations. We now use
|
|
||||||
`open' and `read' instead of `fopen' and `fscanf'.
|
|
||||||
|
|
||||||
* *.[ch]: Using single underscore instead of two underscores
|
|
||||||
for function prefixes (regexp: ``s,__([rspl])\b,_$1,g'') to
|
|
||||||
avoid ambiguity with mangled C++ names.
|
|
||||||
|
|
||||||
1998-06-06 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* sysdeps/osf1/glibtop_server.h: New file.
|
|
||||||
|
|
||||||
* sysdeps/osf1/*.c: renamed all functions implementing
|
|
||||||
features that don't need to be suid to '__s'.
|
|
||||||
|
|
||||||
* sysdeps/names/procdata.c: Removed that file.
|
|
||||||
|
|
||||||
* include/glibtop/*.h (glibtop_types_*): Changed declaration.
|
|
||||||
|
|
||||||
* glibtop.h: Added `#include <types.h>'.
|
|
||||||
|
|
||||||
* include/glibtop/types.h: New file - numeric constants
|
|
||||||
for `glibtop_types_<feature>'.
|
|
||||||
|
|
||||||
* sysdeps/names/*.c (glibtop_types_*): Using numeric
|
|
||||||
constants from `types.h' instead of string constants.
|
|
||||||
|
|
||||||
1998-06-05 Martin Baulig <baulig@taurus.uni-trier.de>
|
1998-06-05 Martin Baulig <baulig@taurus.uni-trier.de>
|
||||||
|
|
||||||
@@ -74,99 +36,6 @@
|
|||||||
|
|
||||||
* src/server/main.c: #include <locale.h>
|
* src/server/main.c: #include <locale.h>
|
||||||
|
|
||||||
1998-06-02 Martin Baulig <baulig@merkur.uni-trier.de>
|
|
||||||
|
|
||||||
* lib/open.c (glibtop_open): renamed to `glibtop_open__l'.
|
|
||||||
|
|
||||||
* sysdeps/linux/open.c (glibtop_open): renamed to
|
|
||||||
`glibtop_open__r'.
|
|
||||||
|
|
||||||
* include/glibtop/open.h (GLIBTOP_OPEN_NO_OVERRIDE):
|
|
||||||
tells `glibtop_open' to use the default server and not
|
|
||||||
to check the environment variables.
|
|
||||||
|
|
||||||
* include/glibtop/sysdeps.h (_glibtop_sysdeps):
|
|
||||||
renamed 'dummy' member to 'features'.
|
|
||||||
|
|
||||||
* src/proxy/*: new directory - proxy server.
|
|
||||||
|
|
||||||
* include/glibtop/command.h (GLIBTOP_CMND_SYSDEPS):
|
|
||||||
added definition here.
|
|
||||||
|
|
||||||
* src/server/main.c (GLIBTOP_CMND_SYSDEPS): new
|
|
||||||
command to get glibtop_server_features.
|
|
||||||
|
|
||||||
1998-06-01 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* NEWS: added more detailed description of today's and
|
|
||||||
yesterday's changes.
|
|
||||||
|
|
||||||
* include/glibtop/*.h: to use the ChangeLog entry from May 28:
|
|
||||||
'__l' is a function defined in the client part;
|
|
||||||
'__s' is a function defined in the sysdeps part and
|
|
||||||
'__p' is a function that needs special priviledges.
|
|
||||||
'__r' is mapped either on '__p' or on '__s'.
|
|
||||||
the function without suffix is mapped on '__l'.
|
|
||||||
|
|
||||||
* sysdeps/common/sysdeps.c: now using '__r' functions,
|
|
||||||
they are #defined either as the '__p' or the '__s' ones.
|
|
||||||
|
|
||||||
* sysdeps/linux/*.c: changed call of 'glibtop_init__r',
|
|
||||||
it now takes two additional arguments.
|
|
||||||
|
|
||||||
* examples/{first.c, second.c}: now using 'glibtop_init'
|
|
||||||
instead of 'glibtop_init__r'.
|
|
||||||
|
|
||||||
* include/glibtop/sysdeps.h: added 'dummy' member so
|
|
||||||
'GLIBTOP_SYSDEPS_<feature>' now start with 1.
|
|
||||||
|
|
||||||
* include/glibtop/*.h: we now #define 'glibtop_get_<feature>'
|
|
||||||
as 'glibtop_get_<feature>__l' and 'glibtop_get_<feature>__r'
|
|
||||||
either as the '__p' or the '__s' function.
|
|
||||||
|
|
||||||
* lib/*.c: removed #if's - we now decide at runtime
|
|
||||||
whether to use the server or to call the appropriate
|
|
||||||
function for the sysdeps directory.
|
|
||||||
|
|
||||||
1998-05-28 Martin Baulig <baulig@merkur.uni-trier.de>
|
|
||||||
|
|
||||||
* src/server/main.c: we now use the '__p' functions,
|
|
||||||
but only if the appropriate 'GLIBTOP_SUID_<feature>'
|
|
||||||
has a non-zero value.
|
|
||||||
|
|
||||||
* configure.in (@machine_incs@): always use
|
|
||||||
`-I$(top_srcdir)/sysdeps/@sysdeps_dir@'; it's no
|
|
||||||
longer conditional.
|
|
||||||
|
|
||||||
* examples/Makefile.am: removed the '_linux' examples.
|
|
||||||
|
|
||||||
* sysdeps/linux/*.c: renamed all functions implementing
|
|
||||||
features to '__s'.
|
|
||||||
|
|
||||||
* lib/*.c: renamed all functions implementing features
|
|
||||||
to '__l'; we only emit code for those functions if the
|
|
||||||
corresponding 'GLIBTOP_SUID_<feature>' has a positive value.
|
|
||||||
|
|
||||||
* include/glibtop/*.h: added some new function suffixes:
|
|
||||||
'__l' is a function defined in the client part;
|
|
||||||
'__s' is a function defined in the sysdeps part and
|
|
||||||
'__p' is a function that needs special priviledges.
|
|
||||||
'__r' is mapped either on '__l' or on '__s'.
|
|
||||||
|
|
||||||
* sysdeps/linux/glibtop_server.h: New file -
|
|
||||||
defines system dependent constants 'GLIBTOP_SUID_<feature>'
|
|
||||||
being either 'GLIBTOP_SYSDEPS_<feature>'+1 depending upon
|
|
||||||
whether or not this feature requires using the server.
|
|
||||||
|
|
||||||
* lib/sysdeps.c: removed that file; it is no longer
|
|
||||||
needed.
|
|
||||||
|
|
||||||
1998-05-25 Martin Baulig <baulig@merkur.uni-trier.de>
|
|
||||||
|
|
||||||
* src/server/main.c: Fixed `broken pipe' error when server
|
|
||||||
is running SUID; accidentally uses setreuid () instead of
|
|
||||||
setregid ().
|
|
||||||
|
|
||||||
1998-05-24 Martin Baulig <martin@home-of-linux.org>
|
1998-05-24 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* sysdeps/sun4/{open.c, mem.c, glibtop_machine.h}: added
|
* sysdeps/sun4/{open.c, mem.c, glibtop_machine.h}: added
|
||||||
|
@@ -4,9 +4,9 @@ if GLIBTOP_EXAMPLES
|
|||||||
examples_SUBDIRS = examples
|
examples_SUBDIRS = examples
|
||||||
endif
|
endif
|
||||||
|
|
||||||
built_SUBDIRS = include sysdeps lib src
|
built_SUBDIRS = include sysdeps src lib
|
||||||
|
|
||||||
SUBDIRS = po intl support macros $(built_SUBDIRS) $(examples_SUBDIRS)
|
SUBDIRS = po intl macros $(built_SUBDIRS) $(examples_SUBDIRS)
|
||||||
|
|
||||||
DIST_SUBDIRS = po intl macros include sysdeps src lib examples
|
DIST_SUBDIRS = po intl macros include sysdeps src lib examples
|
||||||
|
|
||||||
|
111
NEWS
111
NEWS
@@ -1,116 +1,5 @@
|
|||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
Jun/01/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* We have some new ``suffix rules'':
|
|
||||||
|
|
||||||
'__l' is a function defined in the client part;
|
|
||||||
'__s' is a function defined in the sysdeps part and
|
|
||||||
'__p' is a function that needs special priviledges.
|
|
||||||
'__r' is mapped either on '__p' or on '__s'.
|
|
||||||
the function without suffix is mapped on '__l'.
|
|
||||||
|
|
||||||
* We now decide at runtime whether or not using the server
|
|
||||||
is required for a particular function. All user programs
|
|
||||||
now call the '__l' function defined in '-lgtop' (in the lib
|
|
||||||
subdir). These functions either use 'glibtop_call__l' to
|
|
||||||
call the server or call the '__r' function.
|
|
||||||
|
|
||||||
* A function in the sysdeps directory now has the '__s' suffix
|
|
||||||
if it do not need any priviledges (and thus can be called directly
|
|
||||||
from client code) and the '__p' suffix otherwise (when it has to
|
|
||||||
be called from the server).
|
|
||||||
|
|
||||||
* If you call one of these functions:
|
|
||||||
|
|
||||||
-> use the '__p' suffix to be sure to get the SUID-safe one
|
|
||||||
(used in the server).
|
|
||||||
-> use the '__s' suffix to be sure to get a function that
|
|
||||||
doesn't need any priviledges.
|
|
||||||
-> use the '__r' suffix otherwise (it is mapped either on the
|
|
||||||
'__p' or on the '__s' one).
|
|
||||||
|
|
||||||
Only use the '__p' and '__s' functions in a 'GLIBTOP_SUID_<feature>'
|
|
||||||
conditional, otherwise you'll get undefined symbols !
|
|
||||||
|
|
||||||
* The server is now started from 'glibtop_init__r', but only when
|
|
||||||
it's really needed; for instance on DEC OSF/1 you only need it
|
|
||||||
for the proc* features - if you program only fetches the CPU usage,
|
|
||||||
now server will be started.
|
|
||||||
|
|
||||||
* Sorry, at the moment everything is a little bit unstable, I'm doing
|
|
||||||
heavy changes. I've just some great ideas which still need some work:
|
|
||||||
|
|
||||||
-> I want to have a SUID server that only implements those features
|
|
||||||
that need to be SUID; everything else uses the sysdeps code directly.
|
|
||||||
|
|
||||||
-> If a program only uses stuff that do not need the server, the
|
|
||||||
server will not be started at all.
|
|
||||||
|
|
||||||
-> I'm working on some kind of proxy server that can be used on a remote
|
|
||||||
host; in feature one can then use the MDI stuff from ghex in gtop to
|
|
||||||
have notebook pages displaying processes from different hosts.
|
|
||||||
|
|
||||||
* Well it is as much unstable that it only works under Linux at the moment.
|
|
||||||
|
|
||||||
1998-06-01 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* sysdeps/common/sysdeps.c: now using '__r' functions,
|
|
||||||
they are #defined either as the '__p' or the '__s' ones.
|
|
||||||
|
|
||||||
* sysdeps/linux/*.c: changed call of 'glibtop_init__r',
|
|
||||||
it now takes two additional arguments.
|
|
||||||
|
|
||||||
* examples/{first.c, second.c}: now using 'glibtop_init'
|
|
||||||
instead of 'glibtop_init__r'.
|
|
||||||
|
|
||||||
* include/glibtop/sysdeps.h: added 'dummy' member so
|
|
||||||
'GLIBTOP_SYSDEPS_<feature>' now start with 1.
|
|
||||||
|
|
||||||
* include/glibtop/*.h: we now #define 'glibtop_get_<feature>'
|
|
||||||
as 'glibtop_get_<feature>__l' and 'glibtop_get_<feature>__r'
|
|
||||||
either as the '__p' or the '__s' function.
|
|
||||||
|
|
||||||
* lib/*.c: removed #if's - we now decide at runtime
|
|
||||||
whether to use the server or to call the appropriate
|
|
||||||
function for the sysdeps directory.
|
|
||||||
|
|
||||||
1998-05-28 Martin Baulig <baulig@merkur.uni-trier.de>
|
|
||||||
|
|
||||||
* src/server/main.c: we now use the '__p' functions,
|
|
||||||
but only if the appropriate 'GLIBTOP_SUID_<feature>'
|
|
||||||
has a non-zero value.
|
|
||||||
|
|
||||||
* configure.in (@machine_incs@): always use
|
|
||||||
`-I$(top_srcdir)/sysdeps/@sysdeps_dir@'; it's no
|
|
||||||
longer conditional.
|
|
||||||
|
|
||||||
* examples/Makefile.am: removed the '_linux' examples.
|
|
||||||
|
|
||||||
* sysdeps/linux/*.c: renamed all functions implementing
|
|
||||||
features to '__s'.
|
|
||||||
|
|
||||||
* lib/*.c: renamed all functions implementing features
|
|
||||||
to '__l'; we only emit code for those functions if the
|
|
||||||
corresponding 'GLIBTOP_SUID_<feature>' has a positive value.
|
|
||||||
|
|
||||||
* include/glibtop/*.h: added some new function suffixes:
|
|
||||||
'__l' is a function defined in the client part;
|
|
||||||
'__s' is a function defined in the sysdeps part and
|
|
||||||
'__p' is a function that needs special priviledges.
|
|
||||||
'__r' is mapped either on '__l' or on '__s'.
|
|
||||||
|
|
||||||
* sysdeps/linux/glibtop_server.h: New file -
|
|
||||||
defines system dependent constants 'GLIBTOP_SUID_<feature>'
|
|
||||||
being either 'GLIBTOP_SYSDEPS_<feature>'+1 depending upon
|
|
||||||
whether or not this feature requires using the server.
|
|
||||||
|
|
||||||
* lib/sysdeps.c: removed that file; it is no longer
|
|
||||||
needed.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
May/21/1998
|
May/21/1998
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
76
configure.in
76
configure.in
@@ -4,28 +4,19 @@ dnl
|
|||||||
|
|
||||||
AC_INIT(copyright.txt)
|
AC_INIT(copyright.txt)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
AC_CANONICAL_SYSTEM
|
|
||||||
|
AM_INIT_AUTOMAKE(libgtop, 0.01)
|
||||||
|
|
||||||
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
AM_ACLOCAL_INCLUDE(macros)
|
AM_ACLOCAL_INCLUDE(macros)
|
||||||
|
|
||||||
dnl This is necessary for cross-compiling for programs
|
AC_CANONICAL_HOST
|
||||||
dnl that need to run on the build host.
|
|
||||||
|
|
||||||
AC_CHECK_PROG(build_CC, gcc, gcc)
|
|
||||||
if test -z "$build_CC" ; then
|
|
||||||
AC_CHECK_PROG(build_CC, cc, cc, , , /usr/ucb/cc)
|
|
||||||
test -z "$build_CC" && \
|
|
||||||
AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CHECK_TOOL(CC,gcc)
|
AC_CHECK_TOOL(CC,gcc)
|
||||||
|
AC_CHECK_TOOL(CXX,g++)
|
||||||
AC_ISC_POSIX
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_STDC_HEADERS
|
|
||||||
AC_ARG_PROGRAM
|
|
||||||
|
|
||||||
AC_CHECK_TOOL(RANLIB,ranlib)
|
AC_CHECK_TOOL(RANLIB,ranlib)
|
||||||
|
AC_CHECK_TOOL(LD,ld)
|
||||||
AC_CHECK_TOOL(AS,as)
|
AC_CHECK_TOOL(AS,as)
|
||||||
AC_CHECK_TOOL(AR,ar)
|
AC_CHECK_TOOL(AR,ar)
|
||||||
AC_CHECK_TOOL(NM,nm)
|
AC_CHECK_TOOL(NM,nm)
|
||||||
@@ -33,25 +24,8 @@ AC_CHECK_TOOL(NM,nm)
|
|||||||
NM=`which $NM`
|
NM=`which $NM`
|
||||||
export CC CXX RANLIB LD AS AR NM
|
export CC CXX RANLIB LD AS AR NM
|
||||||
|
|
||||||
AC_PROG_INSTALL
|
|
||||||
AC_PROG_LN_S
|
|
||||||
AC_PROG_MAKE_SET
|
|
||||||
|
|
||||||
export cross_compiling
|
|
||||||
|
|
||||||
AM_PROG_LIBTOOL
|
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE(libgtop, 0.01)
|
|
||||||
|
|
||||||
dnl If you want to use libgtop without gnome, comment the following line out.
|
dnl If you want to use libgtop without gnome, comment the following line out.
|
||||||
GNOME_INIT_HOOK(gnome_found=yes)
|
GNOME_INIT
|
||||||
|
|
||||||
if test "x$gnome_found" != xyes; then
|
|
||||||
GNOME_SUPPORT_CHECKS
|
|
||||||
else
|
|
||||||
AM_CONDITIONAL(BUILD_GNOME_SUPPORT, false)
|
|
||||||
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_LC_SYSDEPS
|
AC_LC_SYSDEPS
|
||||||
|
|
||||||
@@ -61,7 +35,7 @@ if test x$libgtop_want_guile = xyes ; then
|
|||||||
if test x$libgtop_want_names = xyes ; then
|
if test x$libgtop_want_names = xyes ; then
|
||||||
AC_DEFINE(GLIBTOP_GUILE_NAMES)
|
AC_DEFINE(GLIBTOP_GUILE_NAMES)
|
||||||
fi
|
fi
|
||||||
guile_examples='third third_static'
|
guile_examples='third third_static third_linux'
|
||||||
guile_subdirs='guile'
|
guile_subdirs='guile'
|
||||||
else
|
else
|
||||||
guile_examples=
|
guile_examples=
|
||||||
@@ -75,6 +49,18 @@ fi
|
|||||||
AC_SUBST(guile_examples)
|
AC_SUBST(guile_examples)
|
||||||
AC_SUBST(guile_subdirs)
|
AC_SUBST(guile_subdirs)
|
||||||
|
|
||||||
|
AC_ISC_POSIX
|
||||||
|
AC_PROG_CXX
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_CPP
|
||||||
|
AC_STDC_HEADERS
|
||||||
|
AC_ARG_PROGRAM
|
||||||
|
AM_PROG_LEX
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LN_S
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
|
||||||
|
export cross_compiling
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
dnl You need to uncomment the following line if you want to use libgtop without Gnome.
|
dnl You need to uncomment the following line if you want to use libgtop without Gnome.
|
||||||
@@ -108,7 +94,7 @@ AC_TYPE_SIGNAL
|
|||||||
AC_FUNC_STRFTIME
|
AC_FUNC_STRFTIME
|
||||||
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
|
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
|
||||||
|
|
||||||
ALL_LINGUAS="fr"
|
ALL_LINGUAS=""
|
||||||
AM_GNU_GETTEXT
|
AM_GNU_GETTEXT
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -D_IN_LIBGTOP"
|
CFLAGS="$CFLAGS -D_IN_LIBGTOP"
|
||||||
@@ -188,7 +174,9 @@ if test "x$ac_cv_guile_found" = "xyes" ; then
|
|||||||
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS $GUILE_LIBS"
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS $GUILE_LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
machine_incs='-I$(top_srcdir)/sysdeps/@sysdeps_dir@'
|
if test "x$libgtop_use_machine_h" = "xyes" ; then
|
||||||
|
machine_incs='-I$(top_srcdir)/sysdeps/@sysdeps_dir@'
|
||||||
|
fi
|
||||||
|
|
||||||
AC_SUBST(machine_incs)
|
AC_SUBST(machine_incs)
|
||||||
|
|
||||||
@@ -199,18 +187,6 @@ AC_SUBST(LIBGTOP_GUILE_INCS)
|
|||||||
AC_SUBST(LIBGTOP_BINDIR)
|
AC_SUBST(LIBGTOP_BINDIR)
|
||||||
AC_SUBST(LIBGTOP_SERVER)
|
AC_SUBST(LIBGTOP_SERVER)
|
||||||
|
|
||||||
LIBSUPPORT=
|
|
||||||
SUPPORTINCS=
|
|
||||||
if test "$need_gnome_support" = yes; then
|
|
||||||
if test "x$gnome_found" = xyes ; then
|
|
||||||
LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
|
|
||||||
SUPPORTINCS="$GNOME_INCLUDEDIR"
|
|
||||||
else
|
|
||||||
LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la'
|
|
||||||
SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
Makefile
|
Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
@@ -228,8 +204,6 @@ sysdeps/osf1/Makefile
|
|||||||
sysdeps/linux/Makefile
|
sysdeps/linux/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/server/Makefile
|
src/server/Makefile
|
||||||
src/proxy/Makefile
|
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
examples/Makefile
|
examples/Makefile
|
||||||
support/Makefile
|
|
||||||
macros/Makefile],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
|
macros/Makefile],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
1998-06-07 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* Makefile.am (CFLAGS): Disable optimize.
|
|
||||||
|
|
||||||
* first.c (PROFILE_COUNT): Number of times each function
|
|
||||||
should be called. Defaults to 1; to profile the code, you
|
|
||||||
can increase this when compiling.
|
|
@@ -6,35 +6,46 @@ INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
|
|||||||
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
|
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
|
||||||
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
|
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
|
||||||
|
|
||||||
CFLAGS = -Wall -W @CFLAGS@ -O0
|
CFLAGS = -Wall -W @CFLAGS@
|
||||||
|
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
|
|
||||||
bin_PROGRAMS = first first_static second second_static \
|
bin_PROGRAMS = first first_static first_linux \
|
||||||
|
second second_static second_linux \
|
||||||
@guile_examples@
|
@guile_examples@
|
||||||
|
|
||||||
EXTRA_PROGRAMS = third third_static
|
EXTRA_PROGRAMS = third third_static third_linux
|
||||||
|
|
||||||
first_SOURCES = first.c
|
first_SOURCES = first.c
|
||||||
first_LDADD = $(top_builddir)/sysdeps/common/libgtop_common.la \
|
first_LDADD = $(top_builddir)/sysdeps/common/libgtop_common.la \
|
||||||
$(top_builddir)/lib/libgtop.la \
|
$(top_builddir)/lib/libgtop.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
|
||||||
@INTLLIBS@ @LIBSUPPORT@
|
@INTLLIBS@ @LIBSUPPORT@
|
||||||
|
|
||||||
first_static_SOURCES = $(first_SOURCES)
|
first_static_SOURCES = $(first_SOURCES)
|
||||||
first_static_LDADD = $(first_LDADD)
|
first_static_LDADD = $(first_LDADD)
|
||||||
first_static_LDFLAGS = -static
|
first_static_LDFLAGS = -static
|
||||||
|
|
||||||
|
first_linux_SOURCES = $(first_SOURCES)
|
||||||
|
first_linux_LDADD = $(top_builddir)/sysdeps/common/libgtop_common.la \
|
||||||
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
||||||
|
@INTLLIBS@ @LIBSUPPORT@
|
||||||
|
first_linux_LDFLAGS = -static
|
||||||
|
|
||||||
second_SOURCES = second.c
|
second_SOURCES = second.c
|
||||||
second_LDADD = $(top_builddir)/sysdeps/common/libgtop_common.la \
|
second_LDADD = $(top_builddir)/sysdeps/common/libgtop_common.la \
|
||||||
$(top_builddir)/lib/libgtop.la \
|
$(top_builddir)/lib/libgtop.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
|
||||||
@INTLLIBS@ @LIBSUPPORT@
|
@INTLLIBS@ @LIBSUPPORT@
|
||||||
|
|
||||||
second_static_SOURCES = $(second_SOURCES)
|
second_static_SOURCES = $(second_SOURCES)
|
||||||
second_static_LDADD = $(second_LDADD)
|
second_static_LDADD = $(second_LDADD)
|
||||||
second_static_LDFLAGS = -static
|
second_static_LDFLAGS = -static
|
||||||
|
|
||||||
|
second_linux_SOURCES = $(second_SOURCES)
|
||||||
|
second_linux_LDADD = $(top_builddir)/sysdeps/common/libgtop_common.la \
|
||||||
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
||||||
|
@INTLLIBS@ @LIBSUPPORT@
|
||||||
|
second_linux_LDFLAGS = -static
|
||||||
|
|
||||||
if GLIBTOP_NAMES
|
if GLIBTOP_NAMES
|
||||||
third_guile_names_LIBS = $(top_builddir)/sysdeps/guile/names/libgtop_guile_names.la
|
third_guile_names_LIBS = $(top_builddir)/sysdeps/guile/names/libgtop_guile_names.la
|
||||||
third_names_LIBS = $(top_builddir)/sysdeps/names/libgtop_names.la
|
third_names_LIBS = $(top_builddir)/sysdeps/names/libgtop_names.la
|
||||||
@@ -43,11 +54,18 @@ endif
|
|||||||
third_SOURCES = third.c
|
third_SOURCES = third.c
|
||||||
third_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile.la \
|
third_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile.la \
|
||||||
$(third_guile_names_LIBS) $(third_names_LIBS) \
|
$(third_guile_names_LIBS) $(third_names_LIBS) \
|
||||||
$(top_builddir)/lib/libgtop.la \
|
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/lib/libgtop.la \
|
||||||
@GUILE_LIBS@ @INTLLIBS@ @LIBSUPPORT@
|
@GUILE_LIBS@ @INTLLIBS@ @LIBSUPPORT@
|
||||||
|
|
||||||
third_static_SOURCES = $(third_SOURCES)
|
third_static_SOURCES = $(third_SOURCES)
|
||||||
third_static_LDADD = $(third_LDADD)
|
third_static_LDADD = $(third_LDADD)
|
||||||
third_static_LDFLAGS = -static
|
third_static_LDFLAGS = -static
|
||||||
|
|
||||||
|
third_linux_SOURCES = $(third_SOURCES)
|
||||||
|
third_linux_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile.la \
|
||||||
|
$(third_guile_names_LIBS) $(third_names_LIBS) \
|
||||||
|
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
||||||
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
||||||
|
@GUILE_LIBS@ @INTLLIBS@ @LIBSUPPORT@
|
||||||
|
third_linux_LDFLAGS = -static
|
||||||
|
@@ -29,70 +29,57 @@
|
|||||||
#include <glibtop/union.h>
|
#include <glibtop/union.h>
|
||||||
#include <glibtop/sysdeps.h>
|
#include <glibtop/sysdeps.h>
|
||||||
|
|
||||||
#ifndef PROFILE_COUNT
|
|
||||||
#define PROFILE_COUNT 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_union data;
|
glibtop_union data;
|
||||||
glibtop_sysdeps sysdeps;
|
glibtop_sysdeps sysdeps;
|
||||||
unsigned c, count, i, *ptr;
|
unsigned i, *ptr;
|
||||||
pid_t pid, ppid;
|
pid_t pid, ppid;
|
||||||
|
|
||||||
count = PROFILE_COUNT;
|
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (PACKAGE);
|
||||||
|
|
||||||
glibtop_init ();
|
glibtop_init__r (&glibtop_global_server);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_cpu (&data.cpu);
|
||||||
glibtop_get_cpu (&data.cpu);
|
|
||||||
|
|
||||||
fprintf (stderr, "CPU (0x%08lx): %lu, %lu, %lu, %lu, %lu, %lu\n",
|
fprintf (stderr, "CPU (0x%08lx): %lu, %lu, %lu, %lu, %lu, %lu\n",
|
||||||
data.cpu.flags, data.cpu.total, data.cpu.user, data.cpu.nice,
|
data.cpu.flags, data.cpu.total, data.cpu.user, data.cpu.nice,
|
||||||
data.cpu.sys, data.cpu.idle, data.cpu.frequency);
|
data.cpu.sys, data.cpu.idle, data.cpu.frequency);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_mem (&data.mem);
|
||||||
glibtop_get_mem (&data.mem);
|
|
||||||
|
|
||||||
fprintf (stderr, "Memory (0x%08lx): %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu\n",
|
fprintf (stderr, "Memory (0x%08lx): %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu\n",
|
||||||
data.mem.flags, data.mem.total, data.mem.used, data.mem.free,
|
data.mem.flags, data.mem.total, data.mem.used, data.mem.free,
|
||||||
data.mem.shared, data.mem.buffer, data.mem.cached,
|
data.mem.shared, data.mem.buffer, data.mem.cached,
|
||||||
data.mem.user, data.mem.locked);
|
data.mem.user, data.mem.locked);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_swap (&data.swap);
|
||||||
glibtop_get_swap (&data.swap);
|
|
||||||
|
|
||||||
fprintf (stderr, "Swap (0x%08lx): %lu, %lu, %lu\n", data.swap.flags,
|
fprintf (stderr, "Swap (0x%08lx): %lu, %lu, %lu\n", data.swap.flags,
|
||||||
data.swap.total, data.swap.used, data.swap.free);
|
data.swap.total, data.swap.used, data.swap.free);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_uptime (&data.uptime);
|
||||||
glibtop_get_uptime (&data.uptime);
|
|
||||||
|
|
||||||
fprintf (stderr, "Uptime (0x%08lx): %f, %f\n", data.uptime.flags,
|
fprintf (stderr, "Uptime (0x%08lx): %f, %f\n", data.uptime.flags,
|
||||||
data.uptime.uptime, data.uptime.idletime);
|
data.uptime.uptime, data.uptime.idletime);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_loadavg (&data.loadavg);
|
||||||
glibtop_get_loadavg (&data.loadavg);
|
|
||||||
|
|
||||||
fprintf (stderr, "Loadavg (0x%08lx): %f, %f, %f\n", data.loadavg.flags,
|
fprintf (stderr, "Loadavg (0x%08lx): %f, %f, %f\n", data.loadavg.flags,
|
||||||
data.loadavg.loadavg [0], data.loadavg.loadavg [1],
|
data.loadavg.loadavg [0], data.loadavg.loadavg [1],
|
||||||
data.loadavg.loadavg [2]);
|
data.loadavg.loadavg [2]);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_shm_limits (&data.shm_limits);
|
||||||
glibtop_get_shm_limits (&data.shm_limits);
|
|
||||||
|
|
||||||
fprintf (stderr, "Shm Limits (0x%08lx): %ld, %ld, %ld, %ld, %ld\n",
|
fprintf (stderr, "Shm Limits (0x%08lx): %ld, %ld, %ld, %ld, %ld\n",
|
||||||
data.shm_limits.flags, data.shm_limits.shmmax,
|
data.shm_limits.flags, data.shm_limits.shmmax,
|
||||||
data.shm_limits.shmmin, data.shm_limits.shmmni,
|
data.shm_limits.shmmin, data.shm_limits.shmmni,
|
||||||
data.shm_limits.shmseg, data.shm_limits.shmall);
|
data.shm_limits.shmseg, data.shm_limits.shmall);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_msg_limits (&data.msg_limits);
|
||||||
glibtop_get_msg_limits (&data.msg_limits);
|
|
||||||
|
|
||||||
fprintf (stderr, "Msg Limits (0x%08lx): %ld, %ld, %ld, %ld, %ld, %ld, %ld\n",
|
fprintf (stderr, "Msg Limits (0x%08lx): %ld, %ld, %ld, %ld, %ld, %ld, %ld\n",
|
||||||
data.msg_limits.flags, data.msg_limits.msgpool,
|
data.msg_limits.flags, data.msg_limits.msgpool,
|
||||||
@@ -100,8 +87,7 @@ main (int argc, char *argv [])
|
|||||||
data.msg_limits.msgmnb, data.msg_limits.msgmni,
|
data.msg_limits.msgmnb, data.msg_limits.msgmni,
|
||||||
data.msg_limits.msgssz, data.msg_limits.msgtql);
|
data.msg_limits.msgssz, data.msg_limits.msgtql);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_sem_limits (&data.sem_limits);
|
||||||
glibtop_get_sem_limits (&data.sem_limits);
|
|
||||||
|
|
||||||
fprintf (stderr, "Sem Limits (0x%08lx): "
|
fprintf (stderr, "Sem Limits (0x%08lx): "
|
||||||
"%ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld\n",
|
"%ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld\n",
|
||||||
@@ -148,16 +134,14 @@ main (int argc, char *argv [])
|
|||||||
|
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_state (&data.proc_state, pid);
|
||||||
glibtop_get_proc_state (&data.proc_state, pid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_State PID %5u (0x%08lx): '%s', %c, %u, %u\n",
|
fprintf (stderr, "Proc_State PID %5u (0x%08lx): '%s', %c, %u, %u\n",
|
||||||
pid, data.proc_state.flags, data.proc_state.cmd,
|
pid, data.proc_state.flags, data.proc_state.cmd,
|
||||||
data.proc_state.state, data.proc_state.uid,
|
data.proc_state.state, data.proc_state.uid,
|
||||||
data.proc_state.gid);
|
data.proc_state.gid);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_uid (&data.proc_uid, pid);
|
||||||
glibtop_get_proc_uid (&data.proc_uid, pid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Uid PID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Uid PID %5u (0x%08lx): "
|
||||||
"%d %d %d %d %d %d %d %d %d %d %d %d\n",
|
"%d %d %d %d %d %d %d %d %d %d %d %d\n",
|
||||||
@@ -169,8 +153,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_uid.tpgid, data.proc_uid.priority,
|
data.proc_uid.tpgid, data.proc_uid.priority,
|
||||||
data.proc_uid.nice);
|
data.proc_uid.nice);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_mem (&data.proc_mem, pid);
|
||||||
glibtop_get_proc_mem (&data.proc_mem, pid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Mem PID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Mem PID %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %ld %ld\n", pid, data.proc_mem.flags,
|
"%ld %ld %ld %ld %ld %ld\n", pid, data.proc_mem.flags,
|
||||||
@@ -178,8 +161,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_mem.resident, data.proc_mem.share,
|
data.proc_mem.resident, data.proc_mem.share,
|
||||||
data.proc_mem.rss, data.proc_mem.rss_rlim);
|
data.proc_mem.rss, data.proc_mem.rss_rlim);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_time (&data.proc_time, pid);
|
||||||
glibtop_get_proc_time (&data.proc_time, pid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Time PID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Time PID %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %ld %ld %ld\n", pid, data.proc_time.flags,
|
"%ld %ld %ld %ld %ld %ld %ld\n", pid, data.proc_time.flags,
|
||||||
@@ -188,16 +170,14 @@ main (int argc, char *argv [])
|
|||||||
data.proc_time.cstime, data.proc_time.timeout,
|
data.proc_time.cstime, data.proc_time.timeout,
|
||||||
data.proc_time.it_real_value);
|
data.proc_time.it_real_value);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_signal (&data.proc_signal, pid);
|
||||||
glibtop_get_proc_signal (&data.proc_signal, pid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Signal PID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Signal PID %5u (0x%08lx): "
|
||||||
"%d %d %d %d\n", pid, data.proc_signal.flags,
|
"%d %d %d %d\n", pid, data.proc_signal.flags,
|
||||||
data.proc_signal.signal, data.proc_signal.blocked,
|
data.proc_signal.signal, data.proc_signal.blocked,
|
||||||
data.proc_signal.sigignore, data.proc_signal.sigcatch);
|
data.proc_signal.sigignore, data.proc_signal.sigcatch);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_kernel (&data.proc_kernel, pid);
|
||||||
glibtop_get_proc_kernel (&data.proc_kernel, pid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Kernel PID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Kernel PID %5u (0x%08lx): "
|
||||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", pid,
|
"%lu %lu %lu %lu %lu %lu %lu %lu\n", pid,
|
||||||
@@ -207,8 +187,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_kernel.kstk_esp, data.proc_kernel.kstk_eip,
|
data.proc_kernel.kstk_esp, data.proc_kernel.kstk_eip,
|
||||||
data.proc_kernel.wchan);
|
data.proc_kernel.wchan);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_segment (&data.proc_segment, pid);
|
||||||
glibtop_get_proc_segment (&data.proc_segment, pid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Segment PID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Segment PID %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %lu %lu %lu\n", pid, data.proc_segment.flags,
|
"%ld %ld %ld %ld %lu %lu %lu\n", pid, data.proc_segment.flags,
|
||||||
@@ -219,16 +198,14 @@ main (int argc, char *argv [])
|
|||||||
|
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_state (&data.proc_state, ppid);
|
||||||
glibtop_get_proc_state (&data.proc_state, ppid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_State PPID %5u (0x%08lx): '%s', %c, %u, %u\n",
|
fprintf (stderr, "Proc_State PPID %5u (0x%08lx): '%s', %c, %u, %u\n",
|
||||||
ppid, data.proc_state.flags, data.proc_state.cmd,
|
ppid, data.proc_state.flags, data.proc_state.cmd,
|
||||||
data.proc_state.state, data.proc_state.uid,
|
data.proc_state.state, data.proc_state.uid,
|
||||||
data.proc_state.gid);
|
data.proc_state.gid);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_uid (&data.proc_uid, ppid);
|
||||||
glibtop_get_proc_uid (&data.proc_uid, ppid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Uid PPID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Uid PPID %5u (0x%08lx): "
|
||||||
"%d %d %d %d %d %d %d %d %d %d %d %d\n",
|
"%d %d %d %d %d %d %d %d %d %d %d %d\n",
|
||||||
@@ -240,8 +217,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_uid.tpgid, data.proc_uid.priority,
|
data.proc_uid.tpgid, data.proc_uid.priority,
|
||||||
data.proc_uid.nice);
|
data.proc_uid.nice);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_mem (&data.proc_mem, ppid);
|
||||||
glibtop_get_proc_mem (&data.proc_mem, ppid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Mem PPID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Mem PPID %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %ld %ld\n", ppid, data.proc_mem.flags,
|
"%ld %ld %ld %ld %ld %ld\n", ppid, data.proc_mem.flags,
|
||||||
@@ -249,8 +225,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_mem.resident, data.proc_mem.share,
|
data.proc_mem.resident, data.proc_mem.share,
|
||||||
data.proc_mem.rss, data.proc_mem.rss_rlim);
|
data.proc_mem.rss, data.proc_mem.rss_rlim);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_time (&data.proc_time, ppid);
|
||||||
glibtop_get_proc_time (&data.proc_time, ppid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Time PPID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Time PPID %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %ld %ld %ld\n", ppid, data.proc_time.flags,
|
"%ld %ld %ld %ld %ld %ld %ld\n", ppid, data.proc_time.flags,
|
||||||
@@ -259,16 +234,14 @@ main (int argc, char *argv [])
|
|||||||
data.proc_time.cstime, data.proc_time.timeout,
|
data.proc_time.cstime, data.proc_time.timeout,
|
||||||
data.proc_time.it_real_value);
|
data.proc_time.it_real_value);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_signal (&data.proc_signal, ppid);
|
||||||
glibtop_get_proc_signal (&data.proc_signal, ppid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Signal PPID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Signal PPID %5u (0x%08lx): "
|
||||||
"%d %d %d %d\n", ppid, data.proc_signal.flags,
|
"%d %d %d %d\n", ppid, data.proc_signal.flags,
|
||||||
data.proc_signal.signal, data.proc_signal.blocked,
|
data.proc_signal.signal, data.proc_signal.blocked,
|
||||||
data.proc_signal.sigignore, data.proc_signal.sigcatch);
|
data.proc_signal.sigignore, data.proc_signal.sigcatch);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_kernel (&data.proc_kernel, ppid);
|
||||||
glibtop_get_proc_kernel (&data.proc_kernel, ppid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Kernel PPID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Kernel PPID %5u (0x%08lx): "
|
||||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", ppid,
|
"%lu %lu %lu %lu %lu %lu %lu %lu\n", ppid,
|
||||||
@@ -278,8 +251,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_kernel.kstk_esp, data.proc_kernel.kstk_eip,
|
data.proc_kernel.kstk_esp, data.proc_kernel.kstk_eip,
|
||||||
data.proc_kernel.wchan);
|
data.proc_kernel.wchan);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_segment (&data.proc_segment, ppid);
|
||||||
glibtop_get_proc_segment (&data.proc_segment, ppid);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Segment PPID %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Segment PPID %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %lu %lu %lu\n", ppid, data.proc_segment.flags,
|
"%ld %ld %ld %ld %lu %lu %lu\n", ppid, data.proc_segment.flags,
|
||||||
@@ -290,16 +262,14 @@ main (int argc, char *argv [])
|
|||||||
|
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_state (&data.proc_state, 1);
|
||||||
glibtop_get_proc_state (&data.proc_state, 1);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_State INIT %5u (0x%08lx): '%s', %c, %u, %u\n",
|
fprintf (stderr, "Proc_State INIT %5u (0x%08lx): '%s', %c, %u, %u\n",
|
||||||
1, data.proc_state.flags, data.proc_state.cmd,
|
1, data.proc_state.flags, data.proc_state.cmd,
|
||||||
data.proc_state.state, data.proc_state.uid,
|
data.proc_state.state, data.proc_state.uid,
|
||||||
data.proc_state.gid);
|
data.proc_state.gid);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_uid (&data.proc_uid, 1);
|
||||||
glibtop_get_proc_uid (&data.proc_uid, 1);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Uid INIT %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Uid INIT %5u (0x%08lx): "
|
||||||
"%d %d %d %d %d %d %d %d %d %d %d %d\n",
|
"%d %d %d %d %d %d %d %d %d %d %d %d\n",
|
||||||
@@ -311,8 +281,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_uid.tpgid, data.proc_uid.priority,
|
data.proc_uid.tpgid, data.proc_uid.priority,
|
||||||
data.proc_uid.nice);
|
data.proc_uid.nice);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_mem (&data.proc_mem, 1);
|
||||||
glibtop_get_proc_mem (&data.proc_mem, 1);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Mem INIT %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Mem INIT %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %ld %ld\n", 1, data.proc_mem.flags,
|
"%ld %ld %ld %ld %ld %ld\n", 1, data.proc_mem.flags,
|
||||||
@@ -320,8 +289,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_mem.resident, data.proc_mem.share,
|
data.proc_mem.resident, data.proc_mem.share,
|
||||||
data.proc_mem.rss, data.proc_mem.rss_rlim);
|
data.proc_mem.rss, data.proc_mem.rss_rlim);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_time (&data.proc_time, 1);
|
||||||
glibtop_get_proc_time (&data.proc_time, 1);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Time INIT %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Time INIT %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %ld %ld %ld\n", 1, data.proc_time.flags,
|
"%ld %ld %ld %ld %ld %ld %ld\n", 1, data.proc_time.flags,
|
||||||
@@ -330,16 +298,14 @@ main (int argc, char *argv [])
|
|||||||
data.proc_time.cstime, data.proc_time.timeout,
|
data.proc_time.cstime, data.proc_time.timeout,
|
||||||
data.proc_time.it_real_value);
|
data.proc_time.it_real_value);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_signal (&data.proc_signal, 1);
|
||||||
glibtop_get_proc_signal (&data.proc_signal, 1);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Signal INIT %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Signal INIT %5u (0x%08lx): "
|
||||||
"%d %d %d %d\n", 1, data.proc_signal.flags,
|
"%d %d %d %d\n", 1, data.proc_signal.flags,
|
||||||
data.proc_signal.signal, data.proc_signal.blocked,
|
data.proc_signal.signal, data.proc_signal.blocked,
|
||||||
data.proc_signal.sigignore, data.proc_signal.sigcatch);
|
data.proc_signal.sigignore, data.proc_signal.sigcatch);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_kernel (&data.proc_kernel, 1);
|
||||||
glibtop_get_proc_kernel (&data.proc_kernel, 1);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Kernel INIT %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Kernel INIT %5u (0x%08lx): "
|
||||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", 1,
|
"%lu %lu %lu %lu %lu %lu %lu %lu\n", 1,
|
||||||
@@ -349,8 +315,7 @@ main (int argc, char *argv [])
|
|||||||
data.proc_kernel.kstk_esp, data.proc_kernel.kstk_eip,
|
data.proc_kernel.kstk_esp, data.proc_kernel.kstk_eip,
|
||||||
data.proc_kernel.wchan);
|
data.proc_kernel.wchan);
|
||||||
|
|
||||||
for (c = 0; c < count; c++)
|
glibtop_get_proc_segment (&data.proc_segment, 1);
|
||||||
glibtop_get_proc_segment (&data.proc_segment, 1);
|
|
||||||
|
|
||||||
fprintf (stderr, "Proc_Segment INIT %5u (0x%08lx): "
|
fprintf (stderr, "Proc_Segment INIT %5u (0x%08lx): "
|
||||||
"%ld %ld %ld %ld %lu %lu %lu\n", 1, data.proc_segment.flags,
|
"%ld %ld %ld %ld %lu %lu %lu\n", 1, data.proc_segment.flags,
|
||||||
|
@@ -41,7 +41,7 @@ main (int argc, char *argv [])
|
|||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (PACKAGE);
|
||||||
|
|
||||||
glibtop_init ();
|
glibtop_init__r (&glibtop_global_server);
|
||||||
|
|
||||||
glibtop_get_sysdeps (&sysdeps);
|
glibtop_get_sysdeps (&sysdeps);
|
||||||
|
|
||||||
|
16
glibtop.h
16
glibtop.h
@@ -24,9 +24,6 @@
|
|||||||
|
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
#include <glibtop_server.h>
|
|
||||||
#include <glibtop/types.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_GLIBTOP_MACHINE_H
|
#ifdef HAVE_GLIBTOP_MACHINE_H
|
||||||
#include <glibtop_machine.h>
|
#include <glibtop_machine.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -43,23 +40,14 @@ struct _glibtop
|
|||||||
int output [2]; /* Pipe client -> server */
|
int output [2]; /* Pipe client -> server */
|
||||||
unsigned long os_version_code; /* Version code of the operating system */
|
unsigned long os_version_code; /* Version code of the operating system */
|
||||||
const char *name; /* Program name for error messages */
|
const char *name; /* Program name for error messages */
|
||||||
const char *server_command; /* Command used to invoke server */
|
|
||||||
const char *server_host; /* Host the server should run on */
|
|
||||||
const char *server_user; /* Name of the user on the target host */
|
|
||||||
const char *server_rsh; /* Command used to connect to the target host */
|
|
||||||
unsigned long features; /* Server is required for this features */
|
|
||||||
pid_t pid; /* PID of the server */
|
pid_t pid; /* PID of the server */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern glibtop *glibtop_global_server;
|
extern glibtop *glibtop_global_server;
|
||||||
|
|
||||||
extern const unsigned long glibtop_server_features;
|
#define glibtop_init() glibtop_init__r(&glibtop_global_server);
|
||||||
|
|
||||||
#define glibtop_init() glibtop_init_r(&glibtop_global_server, 0, 0);
|
extern glibtop *glibtop_init__r __P((glibtop **));
|
||||||
|
|
||||||
#define glibtop_close() glibtop_close_r(&glibtop_global_server);
|
|
||||||
|
|
||||||
extern glibtop *glibtop_init_r __P((glibtop **, const unsigned long, const unsigned));
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
extern void glibtop_close_r __P((glibtop *));
|
extern void glibtop_close __P((glibtop *));
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -29,7 +29,6 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
#define GLIBTOP_CMND_QUIT 0
|
#define GLIBTOP_CMND_QUIT 0
|
||||||
#define GLIBTOP_CMND_SYSDEPS 1
|
#define GLIBTOP_CMND_SYSDEPS 1
|
||||||
|
|
||||||
#define GLIBTOP_CMND_CPU 2
|
#define GLIBTOP_CMND_CPU 2
|
||||||
#define GLIBTOP_CMND_MEM 3
|
#define GLIBTOP_CMND_MEM 3
|
||||||
#define GLIBTOP_CMND_SWAP 4
|
#define GLIBTOP_CMND_SWAP 4
|
||||||
@@ -59,10 +58,9 @@ struct _glibtop_command
|
|||||||
size_t size;
|
size_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_call(p1, p2, p3, p4) glibtop_call_r(glibtop_global_server, p1, p2, p3, p4)
|
#define glibtop_call(p1, p2, p3, p4) glibtop_call__r(glibtop_global_server, p1, p2, p3, p4)
|
||||||
|
|
||||||
extern void *glibtop_call_l __P((glibtop *, unsigned, size_t, void *, size_t, void *));
|
extern void *glibtop_call__r __P((glibtop *, unsigned, size_t, void *, size_t, void *));
|
||||||
extern void *glibtop_call_s __P((glibtop *, unsigned, size_t, void *, size_t, void *));
|
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -49,21 +49,9 @@ struct _glibtop_cpu
|
|||||||
frequency; /* GLIBTOP_CPU_FREQUENCY */
|
frequency; /* GLIBTOP_CPU_FREQUENCY */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_cpu(cpu) glibtop_get_cpu_l(glibtop_global_server, cpu)
|
#define glibtop_get_cpu(cpu) glibtop_get_cpu__r(glibtop_global_server, cpu)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_CPU
|
extern void glibtop_get_cpu__r __P((glibtop *, glibtop_cpu *));
|
||||||
#define glibtop_get_cpu_r glibtop_get_cpu_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_cpu_r glibtop_get_cpu_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_cpu_l __P((glibtop *, glibtop_cpu *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_CPU
|
|
||||||
extern void glibtop_get_cpu_p __P((glibtop *, glibtop_cpu *));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_cpu_s __P((glibtop *, glibtop_cpu *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -89,7 +77,7 @@ extern SCM glibtop_guile_descriptions_cpu __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_cpu [];
|
extern const char *glibtop_names_cpu [];
|
||||||
extern const unsigned glibtop_types_cpu [];
|
extern const char *glibtop_types_cpu [];
|
||||||
extern const char *glibtop_labels_cpu [];
|
extern const char *glibtop_labels_cpu [];
|
||||||
extern const char *glibtop_descriptions_cpu [];
|
extern const char *glibtop_descriptions_cpu [];
|
||||||
|
|
||||||
|
@@ -26,9 +26,9 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
#define glibtop_error(p1, args...) glibtop_error_r(glibtop_global_server , p1 , ## args)
|
#define glibtop_error(p1, args...) glibtop_error__r(glibtop_global_server , p1 , ## args)
|
||||||
|
|
||||||
extern void glibtop_error_r __P((glibtop *, char *, ...));
|
extern void glibtop_error__r __P((glibtop *, char *, ...));
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -39,21 +39,9 @@ struct _glibtop_loadavg
|
|||||||
double loadavg [3]; /* GLIBTOP_LOADAVG_LOADAVG */
|
double loadavg [3]; /* GLIBTOP_LOADAVG_LOADAVG */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg_l(glibtop_global_server, loadavg)
|
#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg__r(glibtop_global_server, loadavg)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_LOADAVG
|
extern void glibtop_get_loadavg__r __P((glibtop *, glibtop_loadavg *));
|
||||||
#define glibtop_get_loadavg_r glibtop_get_loadavg_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_loadavg_r glibtop_get_loadavg_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_loadavg_l __P((glibtop *, glibtop_loadavg *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_LOADAVG
|
|
||||||
extern void glibtop_get_loadavg_p __P((glibtop *, glibtop_loadavg *));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_loadavg_s __P((glibtop *, glibtop_loadavg *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
|
@@ -53,21 +53,9 @@ struct _glibtop_mem
|
|||||||
locked; /* GLIBTOP_MEM_LOCKED */
|
locked; /* GLIBTOP_MEM_LOCKED */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_mem(mem) glibtop_get_mem_l(glibtop_global_server, mem)
|
#define glibtop_get_mem(mem) glibtop_get_mem__r(glibtop_global_server, mem)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_MEM
|
extern void glibtop_get_mem__r __P((glibtop *, glibtop_mem *));
|
||||||
#define glibtop_get_mem_r glibtop_get_mem_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_mem_r glibtop_get_mem_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_mem_l __P((glibtop *, glibtop_mem *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_MEM
|
|
||||||
extern void glibtop_get_mem_p __P((glibtop *, glibtop_mem *));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_mem_s __P((glibtop *, glibtop_mem *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -93,7 +81,7 @@ extern SCM glibtop_guile_descriptions_mem __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_mem [];
|
extern const char *glibtop_names_mem [];
|
||||||
extern const unsigned glibtop_types_mem [];
|
extern const char *glibtop_types_mem [];
|
||||||
extern const char *glibtop_labels_mem [];
|
extern const char *glibtop_labels_mem [];
|
||||||
extern const char *glibtop_descriptions_mem [];
|
extern const char *glibtop_descriptions_mem [];
|
||||||
|
|
||||||
|
@@ -51,21 +51,9 @@ struct _glibtop_msg_limits
|
|||||||
msgtql; /* GLIBTOP_IPC_MSGTQL */
|
msgtql; /* GLIBTOP_IPC_MSGTQL */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits_l(glibtop_global_server, msg)
|
#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits__r(glibtop_global_server, msg)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_MSG_LIMITS
|
extern void glibtop_get_msg_limits__r __P((glibtop *, glibtop_msg_limits *));
|
||||||
#define glibtop_get_msg_limits_r glibtop_get_msg_limits_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_msg_limits_r glibtop_get_msg_limits_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_msg_limits_l __P((glibtop *, glibtop_msg_limits *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_MSG_LIMITS
|
|
||||||
extern void glibtop_get_msg_limits_p __P((glibtop *, glibtop_msg_limits *));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_msg_limits_s __P((glibtop *, glibtop_msg_limits *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -91,7 +79,7 @@ extern SCM glibtop_guile_descriptions_msg_limits __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_msg_limits [];
|
extern const char *glibtop_names_msg_limits [];
|
||||||
extern const unsigned glibtop_types_msg_limits [];
|
extern const char *glibtop_types_msg_limits [];
|
||||||
extern const char *glibtop_labels_msg_limits [];
|
extern const char *glibtop_labels_msg_limits [];
|
||||||
extern const char *glibtop_descriptions_msg_limits [];
|
extern const char *glibtop_descriptions_msg_limits [];
|
||||||
|
|
||||||
|
@@ -26,11 +26,7 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_OPEN_NO_OVERRIDE 1
|
extern void glibtop_open __P((glibtop *, const char *));
|
||||||
|
|
||||||
extern void glibtop_open_l __P((glibtop *, const char *, const unsigned long, const unsigned));
|
|
||||||
|
|
||||||
extern void glibtop_open_r __P((glibtop *, const char *, const unsigned long, const unsigned));
|
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -60,21 +60,9 @@ struct _glibtop_proc_kernel
|
|||||||
* proc is sleeping in */
|
* proc is sleeping in */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel__r(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_KERNEL
|
extern void glibtop_get_proc_kernel__r __P((glibtop *, glibtop_proc_kernel *, pid_t));
|
||||||
#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_proc_kernel_l __P((glibtop *, glibtop_proc_kernel *, pid_t));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_KERNEL
|
|
||||||
extern void glibtop_get_proc_kernel_p __P((glibtop *, glibtop_proc_kernel *, pid_t));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_proc_kernel_s __P((glibtop *, glibtop_proc_kernel *, pid_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -99,8 +87,8 @@ extern SCM glibtop_guile_descriptions_proc_kernel __P((void));
|
|||||||
|
|
||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
|
extern const char *glibtop_types_proc_kernel [];
|
||||||
extern const char *glibtop_names_proc_kernel [];
|
extern const char *glibtop_names_proc_kernel [];
|
||||||
extern const unsigned glibtop_types_proc_kernel [];
|
|
||||||
extern const char *glibtop_labels_proc_kernel [];
|
extern const char *glibtop_labels_proc_kernel [];
|
||||||
extern const char *glibtop_descriptions_proc_kernel [];
|
extern const char *glibtop_descriptions_proc_kernel [];
|
||||||
|
|
||||||
|
@@ -43,21 +43,9 @@ struct _glibtop_proclist
|
|||||||
size; /* GLIBTOP_PROCLIST_SIZE */
|
size; /* GLIBTOP_PROCLIST_SIZE */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proclist(proclist) glibtop_get_proclist_l(glibtop_global_server, proclist)
|
#define glibtop_get_proclist(proclist) glibtop_get_proclist__r(glibtop_global_server, proclist)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROCLIST
|
extern unsigned *glibtop_get_proclist__r __P((glibtop *, glibtop_proclist *));
|
||||||
#define glibtop_get_proclist_r glibtop_get_proclist_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proclist_r glibtop_get_proclist_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern unsigned *glibtop_get_proclist_l __P((glibtop *, glibtop_proclist *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROCLIST
|
|
||||||
extern unsigned *glibtop_get_proclist_p __P((glibtop *, glibtop_proclist *));
|
|
||||||
#else
|
|
||||||
extern unsigned *glibtop_get_proclist_s __P((glibtop *, glibtop_proclist *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -83,7 +71,7 @@ extern SCM glibtop_guile_descriptions_proclist __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_proclist [];
|
extern const char *glibtop_names_proclist [];
|
||||||
extern const unsigned glibtop_types_proclist [];
|
extern const char *glibtop_types_proclist [];
|
||||||
extern const char *glibtop_labels_proclist [];
|
extern const char *glibtop_labels_proclist [];
|
||||||
extern const char *glibtop_descriptions_proclist [];
|
extern const char *glibtop_descriptions_proclist [];
|
||||||
|
|
||||||
|
@@ -53,21 +53,9 @@ struct _glibtop_proc_mem
|
|||||||
* of the process; usually 2,147,483,647 */
|
* of the process; usually 2,147,483,647 */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem__r(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_MEM
|
extern void glibtop_get_proc_mem__r __P((glibtop *, glibtop_proc_mem *, pid_t));
|
||||||
#define glibtop_get_proc_mem_r glibtop_get_proc_mem_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proc_mem_r glibtop_get_proc_mem_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_proc_mem_l __P((glibtop *, glibtop_proc_mem *, pid_t));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_MEM
|
|
||||||
extern void glibtop_get_proc_mem_p __P((glibtop *, glibtop_proc_mem *, pid_t));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_proc_mem_s __P((glibtop *, glibtop_proc_mem *, pid_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -93,7 +81,7 @@ extern SCM glibtop_guile_descriptions_proc_mem __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_proc_mem [];
|
extern const char *glibtop_names_proc_mem [];
|
||||||
extern const unsigned glibtop_types_proc_mem [];
|
extern const char *glibtop_types_proc_mem [];
|
||||||
extern const char *glibtop_labels_proc_mem [];
|
extern const char *glibtop_labels_proc_mem [];
|
||||||
extern const char *glibtop_descriptions_proc_mem [];
|
extern const char *glibtop_descriptions_proc_mem [];
|
||||||
|
|
||||||
|
@@ -54,21 +54,9 @@ struct _glibtop_proc_segment
|
|||||||
start_stack; /* address of the bottom of stack segment */
|
start_stack; /* address of the bottom of stack segment */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment__r(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_SEGMENT
|
extern void glibtop_get_proc_segment__r __P((glibtop *, glibtop_proc_segment *, pid_t));
|
||||||
#define glibtop_get_proc_segment_r glibtop_get_proc_segment_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proc_segment_r glibtop_get_proc_segment_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_proc_segment_l __P((glibtop *, glibtop_proc_segment *, pid_t));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_SEGMENT
|
|
||||||
extern void glibtop_get_proc_segment_p __P((glibtop *, glibtop_proc_segment *, pid_t));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_proc_segment_s __P((glibtop *, glibtop_proc_segment *, pid_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -93,8 +81,8 @@ extern SCM glibtop_guile_descriptions_proc_segment __P((void));
|
|||||||
|
|
||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
|
extern const char *glibtop_types_proc_segment [];
|
||||||
extern const char *glibtop_names_proc_segment [];
|
extern const char *glibtop_names_proc_segment [];
|
||||||
extern const unsigned glibtop_types_proc_segment [];
|
|
||||||
extern const char *glibtop_labels_proc_segment [];
|
extern const char *glibtop_labels_proc_segment [];
|
||||||
extern const char *glibtop_descriptions_proc_segment [];
|
extern const char *glibtop_descriptions_proc_segment [];
|
||||||
|
|
||||||
|
@@ -47,21 +47,9 @@ struct _glibtop_proc_signal
|
|||||||
sigcatch; /* mask of caught signals */
|
sigcatch; /* mask of caught signals */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal__r(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_SIGNAL
|
extern void glibtop_get_proc_signal__r __P((glibtop *, glibtop_proc_signal *, pid_t));
|
||||||
#define glibtop_get_proc_signal_r glibtop_get_proc_signal_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proc_signal_r glibtop_get_proc_signal_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_proc_signal_l __P((glibtop *, glibtop_proc_signal *, pid_t));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_SIGNAL
|
|
||||||
extern void glibtop_get_proc_signal_p __P((glibtop *, glibtop_proc_signal *, pid_t));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_proc_signal_s __P((glibtop *, glibtop_proc_signal *, pid_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -87,7 +75,7 @@ extern SCM glibtop_guile_descriptions_proc_signal __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_proc_signal [];
|
extern const char *glibtop_names_proc_signal [];
|
||||||
extern const unsigned glibtop_types_proc_signal [];
|
extern const char *glibtop_types_proc_signal [];
|
||||||
extern const char *glibtop_labels_proc_signal [];
|
extern const char *glibtop_labels_proc_signal [];
|
||||||
extern const char *glibtop_descriptions_proc_signal [];
|
extern const char *glibtop_descriptions_proc_signal [];
|
||||||
|
|
||||||
|
@@ -54,21 +54,9 @@ struct _glibtop_proc_state
|
|||||||
gid; /* GID of process */
|
gid; /* GID of process */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state__r(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_STATE
|
extern void glibtop_get_proc_state__r __P((glibtop *, glibtop_proc_state *, pid_t));
|
||||||
#define glibtop_get_proc_state_r glibtop_get_proc_state_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proc_state_r glibtop_get_proc_state_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_proc_state_l __P((glibtop *, glibtop_proc_state *, pid_t));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_STATE
|
|
||||||
extern void glibtop_get_proc_state_p __P((glibtop *, glibtop_proc_state *, pid_t));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_proc_state_s __P((glibtop *, glibtop_proc_state *, pid_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -94,7 +82,7 @@ extern SCM glibtop_guile_descriptions_proc_state __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_proc_state [];
|
extern const char *glibtop_names_proc_state [];
|
||||||
extern const unsigned glibtop_types_proc_state [];
|
extern const char *glibtop_types_proc_state [];
|
||||||
extern const char *glibtop_labels_proc_state [];
|
extern const char *glibtop_labels_proc_state [];
|
||||||
extern const char *glibtop_descriptions_proc_state [];
|
extern const char *glibtop_descriptions_proc_state [];
|
||||||
|
|
||||||
|
@@ -59,21 +59,9 @@ struct _glibtop_proc_time
|
|||||||
* due to an interval timer. */
|
* due to an interval timer. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time__r(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_TIME
|
extern void glibtop_get_proc_time__r __P((glibtop *, glibtop_proc_time *, pid_t));
|
||||||
#define glibtop_get_proc_time_r glibtop_get_proc_time_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proc_time_r glibtop_get_proc_time_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_proc_time_l __P((glibtop *, glibtop_proc_time *, pid_t));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_TIME
|
|
||||||
extern void glibtop_get_proc_time_p __P((glibtop *, glibtop_proc_time *, pid_t));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_proc_time_s __P((glibtop *, glibtop_proc_time *, pid_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -99,7 +87,7 @@ extern SCM glibtop_guile_descriptions_proc_time __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_proc_time [];
|
extern const char *glibtop_names_proc_time [];
|
||||||
extern const unsigned glibtop_types_proc_time [];
|
extern const char *glibtop_types_proc_time [];
|
||||||
extern const char *glibtop_labels_proc_time [];
|
extern const char *glibtop_labels_proc_time [];
|
||||||
extern const char *glibtop_descriptions_proc_time [];
|
extern const char *glibtop_descriptions_proc_time [];
|
||||||
|
|
||||||
|
@@ -63,21 +63,9 @@ struct _glibtop_proc_uid
|
|||||||
nice; /* standard unix nice level of process */
|
nice; /* standard unix nice level of process */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid__r(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_UID
|
extern void glibtop_get_proc_uid__r __P((glibtop *, glibtop_proc_uid *, pid_t));
|
||||||
#define glibtop_get_proc_uid_r glibtop_get_proc_uid_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_proc_uid_r glibtop_get_proc_uid_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_proc_uid_l __P((glibtop *, glibtop_proc_uid *, pid_t));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_UID
|
|
||||||
extern void glibtop_get_proc_uid_p __P((glibtop *, glibtop_proc_uid *, pid_t));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_proc_uid_s __P((glibtop *, glibtop_proc_uid *, pid_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -103,7 +91,7 @@ extern SCM glibtop_guile_descriptions_proc_uid __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_proc_uid [];
|
extern const char *glibtop_names_proc_uid [];
|
||||||
extern const unsigned glibtop_types_proc_uid [];
|
extern const char *glibtop_types_proc_uid [];
|
||||||
extern const char *glibtop_labels_proc_uid [];
|
extern const char *glibtop_labels_proc_uid [];
|
||||||
extern const char *glibtop_descriptions_proc_uid [];
|
extern const char *glibtop_descriptions_proc_uid [];
|
||||||
|
|
||||||
|
@@ -29,8 +29,7 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
#define glibtop_read(p1, p2) glibtop_read(glibtop_global_server, p1, p2)
|
#define glibtop_read(p1, p2) glibtop_read(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
extern void glibtop_read_l __P((glibtop *, size_t, void *));
|
extern void glibtop_read__r __P((glibtop *, size_t, void *));
|
||||||
extern void glibtop_read_s __P((glibtop *, size_t, void *));
|
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -27,10 +27,9 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
#define glibtop_read_data() glibtop_read_data_r(glibtop_global_server)
|
#define glibtop_read_data() glibtop_read_data__r(glibtop_global_server)
|
||||||
|
|
||||||
extern void *glibtop_read_data_l __P((glibtop *));
|
extern void *glibtop_read_data__r __P((glibtop *));
|
||||||
extern void *glibtop_read_data_s __P((glibtop *));
|
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -57,21 +57,9 @@ struct _glibtop_sem_limits
|
|||||||
semaem; /* GLIBTOP_IPC_SEMAEM */
|
semaem; /* GLIBTOP_IPC_SEMAEM */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits_l(glibtop_global_server, sem)
|
#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits__r(glibtop_global_server, sem)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SEM_LIMITS
|
extern void glibtop_get_sem_limits__r __P((glibtop *, glibtop_sem_limits *));
|
||||||
#define glibtop_get_sem_limits_r glibtop_get_sem_limits_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_sem_limits_r glibtop_get_sem_limits_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_sem_limits_l __P((glibtop *, glibtop_sem_limits *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SEM_LIMITS
|
|
||||||
extern void glibtop_get_sem_limits_p __P((glibtop *, glibtop_sem_limits *));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_sem_limits_s __P((glibtop *, glibtop_sem_limits *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -97,7 +85,7 @@ extern SCM glibtop_guile_descriptions_sem_limits __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_sem_limits [];
|
extern const char *glibtop_names_sem_limits [];
|
||||||
extern const unsigned glibtop_types_sem_limits [];
|
extern const char *glibtop_types_sem_limits [];
|
||||||
extern const char *glibtop_labels_sem_limits [];
|
extern const char *glibtop_labels_sem_limits [];
|
||||||
extern const char *glibtop_descriptions_sem_limits [];
|
extern const char *glibtop_descriptions_sem_limits [];
|
||||||
|
|
||||||
|
@@ -47,21 +47,9 @@ struct _glibtop_shm_limits
|
|||||||
shmall; /* GLIBTOP_IPC_SHMALL */
|
shmall; /* GLIBTOP_IPC_SHMALL */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits_l(glibtop_global_server, shm)
|
#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits__r(glibtop_global_server, shm)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SHM_LIMITS
|
extern void glibtop_get_shm_limits__r __P((glibtop *, glibtop_shm_limits *));
|
||||||
#define glibtop_get_shm_limits_r glibtop_get_shm_limits_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_shm_limits_r glibtop_get_shm_limits_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_shm_limits_l __P((glibtop *, glibtop_shm_limits *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SHM_LIMITS
|
|
||||||
extern void glibtop_get_shm_limits_p __P((glibtop *, glibtop_shm_limits *));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_shm_limits_s __P((glibtop *, glibtop_shm_limits *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -87,7 +75,7 @@ extern SCM glibtop_guile_descriptions_shm_limits __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_shm_limits [];
|
extern const char *glibtop_names_shm_limits [];
|
||||||
extern const unsigned glibtop_types_shm_limits [];
|
extern const char *glibtop_types_shm_limits [];
|
||||||
extern const char *glibtop_labels_shm_limits [];
|
extern const char *glibtop_labels_shm_limits [];
|
||||||
extern const char *glibtop_descriptions_shm_limits [];
|
extern const char *glibtop_descriptions_shm_limits [];
|
||||||
|
|
||||||
|
@@ -43,21 +43,9 @@ struct _glibtop_swap
|
|||||||
free; /* GLIBTOP_SWAP_FREE */
|
free; /* GLIBTOP_SWAP_FREE */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_swap(swap) glibtop_get_swap_l(glibtop_global_server, swap)
|
#define glibtop_get_swap(swap) glibtop_get_swap__r(glibtop_global_server, swap)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SWAP
|
extern void glibtop_get_swap__r __P((glibtop *, glibtop_swap *));
|
||||||
#define glibtop_get_swap_r glibtop_get_swap_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_swap_r glibtop_get_swap_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_swap_l __P((glibtop *, glibtop_swap *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SWAP
|
|
||||||
extern void glibtop_get_swap_p __P((glibtop *, glibtop_swap *));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_swap_s __P((glibtop *, glibtop_swap *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -83,7 +71,7 @@ extern SCM glibtop_guile_descriptions_swap __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_swap [];
|
extern const char *glibtop_names_swap [];
|
||||||
extern const unsigned glibtop_types_swap [];
|
extern const char *glibtop_types_swap [];
|
||||||
extern const char *glibtop_labels_swap [];
|
extern const char *glibtop_labels_swap [];
|
||||||
extern const char *glibtop_descriptions_swap [];
|
extern const char *glibtop_descriptions_swap [];
|
||||||
|
|
||||||
|
@@ -27,34 +27,30 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_SYSDEPS_DUMMY 0
|
#define GLIBTOP_SYSDEPS_CPU 0
|
||||||
#define GLIBTOP_SYSDEPS_CPU 1
|
#define GLIBTOP_SYSDEPS_MEM 1
|
||||||
#define GLIBTOP_SYSDEPS_MEM 2
|
#define GLIBTOP_SYSDEPS_SWAP 2
|
||||||
#define GLIBTOP_SYSDEPS_SWAP 3
|
#define GLIBTOP_SYSDEPS_UPTIME 3
|
||||||
#define GLIBTOP_SYSDEPS_UPTIME 4
|
#define GLIBTOP_SYSDEPS_LOADAVG 4
|
||||||
#define GLIBTOP_SYSDEPS_LOADAVG 5
|
#define GLIBTOP_SYSDEPS_SHM_LIMITS 5
|
||||||
#define GLIBTOP_SYSDEPS_SHM_LIMITS 6
|
#define GLIBTOP_SYSDEPS_MSG_LIMITS 6
|
||||||
#define GLIBTOP_SYSDEPS_MSG_LIMITS 7
|
#define GLIBTOP_SYSDEPS_SEM_LIMITS 7
|
||||||
#define GLIBTOP_SYSDEPS_SEM_LIMITS 8
|
#define GLIBTOP_SYSDEPS_PROCLIST 8
|
||||||
#define GLIBTOP_SYSDEPS_PROCLIST 9
|
#define GLIBTOP_SYSDEPS_PROC_STATE 9
|
||||||
#define GLIBTOP_SYSDEPS_PROC_STATE 10
|
#define GLIBTOP_SYSDEPS_PROC_UID 10
|
||||||
#define GLIBTOP_SYSDEPS_PROC_UID 11
|
#define GLIBTOP_SYSDEPS_PROC_MEM 11
|
||||||
#define GLIBTOP_SYSDEPS_PROC_MEM 12
|
#define GLIBTOP_SYSDEPS_PROC_TIME 12
|
||||||
#define GLIBTOP_SYSDEPS_PROC_TIME 13
|
#define GLIBTOP_SYSDEPS_PROC_SIGNAL 13
|
||||||
#define GLIBTOP_SYSDEPS_PROC_SIGNAL 14
|
#define GLIBTOP_SYSDEPS_PROC_KERNEL 14
|
||||||
#define GLIBTOP_SYSDEPS_PROC_KERNEL 15
|
#define GLIBTOP_SYSDEPS_PROC_SEGMENT 15
|
||||||
#define GLIBTOP_SYSDEPS_PROC_SEGMENT 16
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_SYSDEPS 17
|
#define GLIBTOP_MAX_SYSDEPS 16
|
||||||
|
|
||||||
#define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1)
|
|
||||||
|
|
||||||
typedef struct _glibtop_sysdeps glibtop_sysdeps;
|
typedef struct _glibtop_sysdeps glibtop_sysdeps;
|
||||||
|
|
||||||
struct _glibtop_sysdeps
|
struct _glibtop_sysdeps
|
||||||
{
|
{
|
||||||
unsigned long flags,
|
unsigned long flags,
|
||||||
features, /* server features */
|
|
||||||
cpu, /* glibtop_cpu */
|
cpu, /* glibtop_cpu */
|
||||||
mem, /* glibtop_mem */
|
mem, /* glibtop_mem */
|
||||||
swap, /* glibtop_swap */
|
swap, /* glibtop_swap */
|
||||||
@@ -73,9 +69,9 @@ struct _glibtop_sysdeps
|
|||||||
proc_segment; /* glibtop_proc_segment */
|
proc_segment; /* glibtop_proc_segment */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_sysdeps(sysdeps) glibtop_get_sysdeps_r(glibtop_global_server,sysdeps)
|
#define glibtop_get_sysdeps(sysdeps) glibtop_get_sysdeps__r(glibtop_global_server,sysdeps)
|
||||||
|
|
||||||
extern void glibtop_get_sysdeps_r __P((glibtop *, glibtop_sysdeps *));
|
extern void glibtop_get_sysdeps__r __P((glibtop *, glibtop_sysdeps *));
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
|
@@ -1,36 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
|
||||||
This file is part of the Gnome Top Library.
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
|
||||||
|
|
||||||
The Gnome Top Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public License as
|
|
||||||
published by the Free Software Foundation; either version 2 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#ifndef __GLIBTOP_TYPES_H__
|
|
||||||
#define __GLIBTOP_TYPES_H__
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GLIBTOP_TYPE_LONG 1
|
|
||||||
#define GLIBTOP_TYPE_ULONG 2
|
|
||||||
#define GLIBTOP_TYPE_DOUBLE 3
|
|
||||||
#define GLIBTOP_TYPE_INT 4
|
|
||||||
#define GLIBTOP_TYPE_CHAR 5
|
|
||||||
#define GLIBTOP_TYPE_STRING 6
|
|
||||||
|
|
||||||
__END_DECLS
|
|
||||||
|
|
||||||
#endif
|
|
@@ -41,21 +41,9 @@ struct _glibtop_uptime
|
|||||||
idletime; /* GLIBTOP_UPTIME_IDLETIME */
|
idletime; /* GLIBTOP_UPTIME_IDLETIME */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_uptime(uptime) glibtop_get_uptime_l(glibtop_global_server, uptime)
|
#define glibtop_get_uptime(uptime) glibtop_get_uptime__r(glibtop_global_server, uptime)
|
||||||
|
|
||||||
#if GLIBTOP_SUID_UPTIME
|
extern void glibtop_get_uptime__r __P((glibtop *, glibtop_uptime *));
|
||||||
#define glibtop_get_uptime_r glibtop_get_uptime_p
|
|
||||||
#else
|
|
||||||
#define glibtop_get_uptime_r glibtop_get_uptime_s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void glibtop_get_uptime_l __P((glibtop *, glibtop_uptime *));
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_UPTIME
|
|
||||||
extern void glibtop_get_uptime_p __P((glibtop *, glibtop_uptime *));
|
|
||||||
#else
|
|
||||||
extern void glibtop_get_uptime_s __P((glibtop *, glibtop_uptime *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GUILE
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
@@ -81,7 +69,7 @@ extern SCM glibtop_guile_descriptions_uptime __P((void));
|
|||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
extern const char *glibtop_names_uptime [];
|
extern const char *glibtop_names_uptime [];
|
||||||
extern const unsigned glibtop_types_uptime [];
|
extern const char *glibtop_types_uptime [];
|
||||||
extern const char *glibtop_labels_uptime [];
|
extern const char *glibtop_labels_uptime [];
|
||||||
extern const char *glibtop_descriptions_uptime [];
|
extern const char *glibtop_descriptions_uptime [];
|
||||||
|
|
||||||
|
@@ -29,8 +29,7 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
#define glibtop_write(p1, p2) glibtop_write(glibtop_global_server, p1, p2)
|
#define glibtop_write(p1, p2) glibtop_write(glibtop_global_server, p1, p2)
|
||||||
|
|
||||||
extern void glibtop_write_l __P((glibtop *, size_t, void *));
|
extern void glibtop_write__r __P((glibtop *, size_t, void *));
|
||||||
extern void glibtop_write_s __P((glibtop *, size_t, void *));
|
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -27,15 +27,15 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
#define glibtop_malloc(p1) glibtop_malloc_r(glibtop_global_server, p1)
|
#define glibtop_malloc(p1) glibtop_malloc__r(glibtop_global_server, p1)
|
||||||
#define glibtop_calloc(p1, p2) glibtop_calloc_r(glibtop_global_server, p1, p2)
|
#define glibtop_calloc(p1, p2) glibtop_calloc__r(glibtop_global_server, p1, p2)
|
||||||
#define glibtop_realloc(p1, p2) glibtop_realloc_r(glibtop_global_server, p1, p2)
|
#define glibtop_realloc(p1, p2) glibtop_realloc__r(glibtop_global_server, p1, p2)
|
||||||
#define glibtop_free(p1) glibtop_free_r(glibtop_global_server, p1)
|
#define glibtop_free(p1) glibtop_free__r(glibtop_global_server, p1)
|
||||||
|
|
||||||
extern void *glibtop_malloc_r __P((glibtop *, size_t));
|
extern void *glibtop_malloc__r __P((glibtop *, size_t));
|
||||||
extern void *glibtop_calloc_r __P((glibtop *, size_t, size_t));
|
extern void *glibtop_calloc__r __P((glibtop *, size_t, size_t));
|
||||||
extern void *glibtop_realloc_r __P((glibtop *, void *, size_t));
|
extern void *glibtop_realloc__r __P((glibtop *, void *, size_t));
|
||||||
extern void glibtop_free_r __P((glibtop *, void *));
|
extern void glibtop_free__r __P((glibtop *, void *));
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile for the linux system information tables.
|
|
||||||
#
|
|
||||||
# Note! Dependencies are done automagically by 'make dep', which also
|
|
||||||
# removes any old dependencies. DON'T put your own dependencies here
|
|
||||||
# unless it's something special (ie not a .c file).
|
|
||||||
#
|
|
||||||
# Note 2! The CFLAGS definition is now in the main makefile...
|
|
||||||
|
|
||||||
O_TARGET := table.o
|
|
||||||
O_OBJS := main.o
|
|
||||||
|
|
||||||
include $(TOPDIR)/Rules.make
|
|
@@ -1,90 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/table/table_impl.c
|
|
||||||
* Copyright (C) 1998 Martin Baulig
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/errno.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/kernel_stat.h>
|
|
||||||
#include <linux/tty.h>
|
|
||||||
#include <linux/user.h>
|
|
||||||
#include <linux/a.out.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/mman.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/ioport.h>
|
|
||||||
#include <linux/config.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/pagemap.h>
|
|
||||||
#include <linux/swap.h>
|
|
||||||
|
|
||||||
#include <asm/segment.h>
|
|
||||||
#include <asm/pgtable.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
|
|
||||||
#include <linux/table.h>
|
|
||||||
|
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
asmlinkage int
|
|
||||||
sys_table (int type, union table *buf)
|
|
||||||
{
|
|
||||||
union table tbl;
|
|
||||||
struct sysinfo i;
|
|
||||||
int err;
|
|
||||||
|
|
||||||
if (type == TABLE_VERSION)
|
|
||||||
return _TABLE_VERSION;
|
|
||||||
|
|
||||||
if (!buf)
|
|
||||||
return -EFAULT;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case TABLE_CPU:
|
|
||||||
tbl.cpu.total = jiffies;
|
|
||||||
tbl.cpu.user = kstat.cpu_user;
|
|
||||||
tbl.cpu.nice = kstat.cpu_nice;
|
|
||||||
tbl.cpu.sys = kstat.cpu_system;
|
|
||||||
tbl.cpu.idle = tbl.cpu.total - (tbl.cpu.user + tbl.cpu.nice + tbl.cpu.sys);
|
|
||||||
tbl.cpu.frequency = HZ;
|
|
||||||
break;
|
|
||||||
case TABLE_MEM:
|
|
||||||
si_meminfo (&i);
|
|
||||||
tbl.mem.total = i.totalram;
|
|
||||||
tbl.mem.used = i.totalram - i.freeram;
|
|
||||||
tbl.mem.free = i.freeram;
|
|
||||||
tbl.mem.shared = i.sharedram;
|
|
||||||
tbl.mem.buffer = i.bufferram;
|
|
||||||
tbl.mem.cached = page_cache_size << PAGE_SHIFT;
|
|
||||||
break;
|
|
||||||
case TABLE_SWAP:
|
|
||||||
si_swapinfo (&i);
|
|
||||||
tbl.swap.total = i.totalswap;
|
|
||||||
tbl.swap.used = i.totalswap - i.freeswap;
|
|
||||||
tbl.swap.free = i.freeswap;
|
|
||||||
break;
|
|
||||||
case TABLE_LOADAVG:
|
|
||||||
tbl.loadavg.loadavg [0] = avenrun [0];
|
|
||||||
tbl.loadavg.loadavg [1] = avenrun [1];
|
|
||||||
tbl.loadavg.loadavg [2] = avenrun [2];
|
|
||||||
tbl.loadavg.nr_running = nr_running;
|
|
||||||
tbl.loadavg.nr_tasks = nr_tasks;
|
|
||||||
tbl.loadavg.last_pid = last_pid;
|
|
||||||
break;
|
|
||||||
case TABLE_UPTIME:
|
|
||||||
tbl.uptime.uptime = jiffies;
|
|
||||||
tbl.uptime.idle = task[0]->utime + task[0]->stime;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = verify_area (VERIFY_WRITE, buf, sizeof (struct table));
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
memcpy_tofs (buf, &tbl, sizeof (union table));
|
|
||||||
return 0;
|
|
||||||
}
|
|
@@ -1,80 +0,0 @@
|
|||||||
#ifndef _LINUX_TABLE_H
|
|
||||||
#define _LINUX_TABLE_H
|
|
||||||
#include <linux/types.h>
|
|
||||||
|
|
||||||
#define TABLE_VERSION 0
|
|
||||||
#define TABLE_CPU 1
|
|
||||||
#define TABLE_MEM 2
|
|
||||||
#define TABLE_SWAP 3
|
|
||||||
#define TABLE_LOADAVG 4
|
|
||||||
#define TABLE_UPTIME 5
|
|
||||||
|
|
||||||
/* CPU Usage (in jiffies = 1/100th seconds) */
|
|
||||||
|
|
||||||
struct table_cpu
|
|
||||||
{
|
|
||||||
unsigned long total; /* Total CPU Time */
|
|
||||||
unsigned long user; /* CPU Time in User Mode */
|
|
||||||
unsigned long nice; /* CPU Time in User Mode (nice) */
|
|
||||||
unsigned long sys; /* CPU Time in System Mode */
|
|
||||||
unsigned long idle; /* CPU Time in the Idle Task */
|
|
||||||
unsigned long frequency; /* Tick frequency */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Memory Usage (in bytes) */
|
|
||||||
|
|
||||||
struct table_mem
|
|
||||||
{
|
|
||||||
unsigned long total; /* Total physical memory */
|
|
||||||
unsigned long used; /* Used memory size */
|
|
||||||
unsigned long free; /* Free memory size */
|
|
||||||
unsigned long shared; /* Shared memory size */
|
|
||||||
unsigned long buffer; /* Size of buffers */
|
|
||||||
unsigned long cached; /* Size of cached memory */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Swap Space (in bytes) */
|
|
||||||
|
|
||||||
struct table_swap
|
|
||||||
{
|
|
||||||
unsigned long total; /* Total swap space */
|
|
||||||
unsigned long used; /* Used swap space */
|
|
||||||
unsigned long free; /* Free swap space */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Load average */
|
|
||||||
|
|
||||||
struct table_loadavg
|
|
||||||
{
|
|
||||||
unsigned long loadavg [3];
|
|
||||||
unsigned nr_running;
|
|
||||||
unsigned nr_tasks;
|
|
||||||
unsigned last_pid;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Uptime */
|
|
||||||
|
|
||||||
struct table_uptime
|
|
||||||
{
|
|
||||||
unsigned long uptime;
|
|
||||||
unsigned long idle;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Union */
|
|
||||||
|
|
||||||
union table
|
|
||||||
{
|
|
||||||
struct table_cpu cpu;
|
|
||||||
struct table_mem mem;
|
|
||||||
struct table_swap swap;
|
|
||||||
struct table_loadavg loadavg;
|
|
||||||
struct table_uptime uptime;
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
|
||||||
|
|
||||||
#endif /* _LINUX_IPC_H */
|
|
||||||
|
|
||||||
|
|
@@ -1,82 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <linux/unistd.h>
|
|
||||||
#include <linux/table.h>
|
|
||||||
|
|
||||||
#include <syscall.h>
|
|
||||||
|
|
||||||
static inline _syscall2 (int, table, int, type, union table *, tbl);
|
|
||||||
|
|
||||||
int
|
|
||||||
main (void)
|
|
||||||
{
|
|
||||||
union table tbl;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = table (TABLE_VERSION, NULL);
|
|
||||||
|
|
||||||
if (ret == -1) {
|
|
||||||
fprintf (stderr, "table(%u): %s\n", TABLE_VERSION, sys_errlist [errno]);
|
|
||||||
exit (-errno);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "Table (%u) = %u\n", TABLE_VERSION, ret);
|
|
||||||
|
|
||||||
ret = table (TABLE_CPU, &tbl);
|
|
||||||
|
|
||||||
if (ret == -1) {
|
|
||||||
fprintf (stderr, "table(%u): %s\n", TABLE_CPU, sys_errlist [errno]);
|
|
||||||
exit (-errno);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "Table (%u) = %lu, %lu, %lu, %lu, %lu, %lu\n",
|
|
||||||
TABLE_CPU, tbl.cpu.total, tbl.cpu.user, tbl.cpu.nice,
|
|
||||||
tbl.cpu.sys, tbl.cpu.idle, tbl.cpu.frequency);
|
|
||||||
|
|
||||||
ret = table (TABLE_MEM, &tbl);
|
|
||||||
|
|
||||||
if (ret == -1) {
|
|
||||||
fprintf (stderr, "table(%u): %s\n", TABLE_MEM, sys_errlist [errno]);
|
|
||||||
exit (-errno);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "Table (%u) = %lu, %lu, %lu, %lu, %lu, %lu\n",
|
|
||||||
TABLE_MEM, tbl.mem.total, tbl.mem.used, tbl.mem.free,
|
|
||||||
tbl.mem.shared, tbl.mem.buffer, tbl.mem.cached);
|
|
||||||
|
|
||||||
ret = table (TABLE_SWAP, &tbl);
|
|
||||||
|
|
||||||
if (ret == -1) {
|
|
||||||
fprintf (stderr, "table(%u): %s\n", TABLE_SWAP, sys_errlist [errno]);
|
|
||||||
exit (-errno);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "Table (%u) = %lu, %lu, %lu\n",
|
|
||||||
TABLE_SWAP, tbl.swap.total, tbl.swap.used, tbl.swap.free);
|
|
||||||
|
|
||||||
ret = table (TABLE_LOADAVG, &tbl);
|
|
||||||
|
|
||||||
if (ret == -1) {
|
|
||||||
fprintf (stderr, "table(%u): %s\n", TABLE_LOADAVG, sys_errlist [errno]);
|
|
||||||
exit (-errno);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "Table (%u) = (%lu, %lu, %lu) - %u, %u, %u\n",
|
|
||||||
TABLE_LOADAVG, tbl.loadavg.loadavg [0], tbl.loadavg.loadavg [1],
|
|
||||||
tbl.loadavg.loadavg [2], tbl.loadavg.nr_running,
|
|
||||||
tbl.loadavg.nr_tasks, tbl.loadavg.last_pid);
|
|
||||||
|
|
||||||
ret = table (TABLE_UPTIME, &tbl);
|
|
||||||
|
|
||||||
if (ret == -1) {
|
|
||||||
fprintf (stderr, "table(%u): %s\n", TABLE_UPTIME, sys_errlist [errno]);
|
|
||||||
exit (-errno);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "Table (%u) = %lu, %lu\n",
|
|
||||||
TABLE_UPTIME, tbl.uptime.uptime, tbl.uptime.idle);
|
|
||||||
|
|
||||||
exit (0);
|
|
||||||
}
|
|
@@ -1 +0,0 @@
|
|||||||
#define _TABLE_VERSION 1
|
|
@@ -24,7 +24,7 @@
|
|||||||
/* Closes pipe to gtop server. */
|
/* Closes pipe to gtop server. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_close_r (glibtop *server)
|
glibtop_close (glibtop *server)
|
||||||
{
|
{
|
||||||
kill (server->pid, SIGKILL);
|
kill (server->pid, SIGKILL);
|
||||||
close (server->input [0]);
|
close (server->input [0]);
|
||||||
|
@@ -27,28 +27,28 @@
|
|||||||
#include <glibtop/xmalloc.h>
|
#include <glibtop/xmalloc.h>
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_call_l (glibtop *server, unsigned command, size_t send_size, void *send_buf,
|
glibtop_call__r (glibtop *server, unsigned command, size_t send_size, void *send_buf,
|
||||||
size_t recv_size, void *recv_buf)
|
size_t recv_size, void *recv_buf)
|
||||||
{
|
{
|
||||||
glibtop_command *cmnd;
|
glibtop_command *cmnd;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
glibtop_init_r (&server, 0, 0);
|
glibtop_init__r (&server);
|
||||||
|
|
||||||
cmnd = glibtop_calloc_r (server, 1, sizeof (glibtop_command));
|
cmnd = glibtop_calloc__r (server, 1, sizeof (glibtop_command));
|
||||||
|
|
||||||
memcpy (&cmnd->server, server, sizeof (glibtop));
|
memcpy (&cmnd->server, server, sizeof (glibtop));
|
||||||
|
|
||||||
cmnd->command = command;
|
cmnd->command = command;
|
||||||
cmnd->size = send_size;
|
cmnd->size = send_size;
|
||||||
|
|
||||||
glibtop_write_l (server, sizeof (glibtop_command), cmnd);
|
glibtop_write__r (server, sizeof (glibtop_command), cmnd);
|
||||||
glibtop_write_l (server, send_size, send_buf);
|
glibtop_write__r (server, send_size, send_buf);
|
||||||
glibtop_read_l (server, recv_size, recv_buf);
|
glibtop_read__r (server, recv_size, recv_buf);
|
||||||
|
|
||||||
ptr = glibtop_read_data_l (server);
|
ptr = glibtop_read_data__r (server);
|
||||||
|
|
||||||
glibtop_free_r (server, cmnd);
|
glibtop_free__r (server, cmnd);
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
13
lib/cpu.c
13
lib/cpu.c
@@ -19,21 +19,14 @@
|
|||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <glibtop.h>
|
|
||||||
#include <glibtop/cpu.h>
|
#include <glibtop/cpu.h>
|
||||||
#include <glibtop/command.h>
|
#include <glibtop/command.h>
|
||||||
|
|
||||||
/* Provides information about cpu usage. */
|
/* Provides information about cpu usage. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf)
|
glibtop_get_cpu__r (glibtop *server, glibtop_cpu *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_CPU, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_CPU, 0, NULL, sizeof (glibtop_cpu), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_CPU) {
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_CPU, 0, NULL,
|
|
||||||
sizeof (glibtop_cpu), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_cpu_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -26,16 +26,14 @@ static glibtop _glibtop_global_server;
|
|||||||
glibtop *glibtop_global_server = NULL;
|
glibtop *glibtop_global_server = NULL;
|
||||||
|
|
||||||
glibtop *
|
glibtop *
|
||||||
glibtop_init_r (glibtop **server, const unsigned long features,
|
glibtop_init__r (glibtop **server)
|
||||||
const unsigned flags)
|
|
||||||
{
|
{
|
||||||
if (*server != NULL)
|
if (*server != NULL)
|
||||||
return *server;
|
return *server;
|
||||||
|
|
||||||
if (glibtop_global_server == NULL) {
|
if (glibtop_global_server == NULL) {
|
||||||
glibtop_global_server = &_glibtop_global_server;
|
glibtop_global_server = &_glibtop_global_server;
|
||||||
glibtop_open_l (glibtop_global_server, "glibtop",
|
glibtop_open (glibtop_global_server, "glibtop");
|
||||||
features, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return *server = glibtop_global_server;
|
return *server = glibtop_global_server;
|
||||||
|
@@ -26,14 +26,8 @@
|
|||||||
/* Provides load averange. */
|
/* Provides load averange. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_loadavg_l (glibtop *server, glibtop_loadavg *buf)
|
glibtop_get_loadavg__r (glibtop *server, glibtop_loadavg *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_LOADAVG, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_LOADAVG, 0, NULL, sizeof (glibtop_loadavg), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_LOADAVG) {
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_LOADAVG, 0, NULL,
|
|
||||||
sizeof (glibtop_loadavg), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_loadavg_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
12
lib/mem.c
12
lib/mem.c
@@ -25,14 +25,8 @@
|
|||||||
/* Provides information about memory usage. */
|
/* Provides information about memory usage. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_mem_l (glibtop *server, glibtop_mem *buf)
|
glibtop_get_mem__r (glibtop *server, glibtop_mem *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_MEM, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_MEM, 0, NULL, sizeof (glibtop_mem), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_MEM) {
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_MEM, 0, NULL,
|
|
||||||
sizeof (glibtop_mem), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_mem_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -25,14 +25,8 @@
|
|||||||
/* Provides information about sysv ipc limits. */
|
/* Provides information about sysv ipc limits. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_msg_limits_l (glibtop *server, glibtop_msg_limits *buf)
|
glibtop_get_msg_limits__r (glibtop *server, glibtop_msg_limits *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_MSG_LIMITS, 0, NULL, sizeof (glibtop_msg_limits), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_MSG_LIMITS) {
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_MSG_LIMITS, 0, NULL,
|
|
||||||
sizeof (glibtop_msg_limits), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_msg_limits_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
108
lib/open.c
108
lib/open.c
@@ -19,138 +19,42 @@
|
|||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <glibtop.h>
|
|
||||||
#include <glibtop/open.h>
|
#include <glibtop/open.h>
|
||||||
#include <glibtop/sysdeps.h>
|
|
||||||
#include <glibtop/command.h>
|
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
|
|
||||||
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
|
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_open_l (glibtop *server, const char *program_name,
|
glibtop_open (glibtop *server, const char *program_name)
|
||||||
const unsigned long features, const unsigned flags)
|
|
||||||
{
|
{
|
||||||
char version [BUFSIZ], buffer [BUFSIZ];
|
char version [BUFSIZ], buffer [BUFSIZ];
|
||||||
char *server_command, *server_rsh, *temp;
|
|
||||||
char *server_host, *server_user;
|
|
||||||
glibtop_sysdeps sysdeps;
|
|
||||||
|
|
||||||
memset (server, 0, sizeof (glibtop));
|
memset (server, 0, sizeof (glibtop));
|
||||||
|
|
||||||
server->name = program_name;
|
server->name = program_name;
|
||||||
|
|
||||||
/* Is the user allowed to override the server ? */
|
|
||||||
|
|
||||||
if ((flags & GLIBTOP_OPEN_NO_OVERRIDE) == 0) {
|
|
||||||
|
|
||||||
/* Try to get data from environment. */
|
|
||||||
|
|
||||||
temp = getenv ("LIBGTOP_SERVER") ?
|
|
||||||
getenv ("LIBGTOP_SERVER") : GTOP_SERVER;
|
|
||||||
|
|
||||||
server_command = glibtop_malloc_r (server, strlen (temp) + 1);
|
|
||||||
|
|
||||||
strcpy (server_command, temp);
|
|
||||||
|
|
||||||
temp = getenv ("LIBGTOP_RSH") ?
|
|
||||||
getenv ("LIBGTOP_RSH") : "rsh";
|
|
||||||
|
|
||||||
server_rsh = glibtop_malloc_r (server, strlen (temp) + 1);
|
|
||||||
|
|
||||||
strcpy (server_rsh, temp);
|
|
||||||
|
|
||||||
/* Extract host and user information. */
|
|
||||||
|
|
||||||
temp = strstr (server_command, ":");
|
|
||||||
|
|
||||||
if (temp) {
|
|
||||||
*temp = 0;
|
|
||||||
server_host = server_command;
|
|
||||||
server_command = temp+1;
|
|
||||||
|
|
||||||
temp = strstr (server_host, "@");
|
|
||||||
|
|
||||||
if (temp) {
|
|
||||||
*temp = 0;
|
|
||||||
server_user = server_host;
|
|
||||||
server_host = temp+1;
|
|
||||||
} else {
|
|
||||||
server_user = NULL;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
server_host = NULL;
|
|
||||||
server_user = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Store everything in `server'. */
|
|
||||||
|
|
||||||
server->server_command = server_command;
|
|
||||||
server->server_host = server_host;
|
|
||||||
server->server_user = server_user;
|
|
||||||
server->server_rsh = server_rsh;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get server features. */
|
|
||||||
|
|
||||||
if (server->server_host == NULL) {
|
|
||||||
server->features = glibtop_server_features;
|
|
||||||
|
|
||||||
if (server->features == 0)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fork and exec server. */
|
|
||||||
|
|
||||||
if (pipe (server->input) || pipe (server->output))
|
if (pipe (server->input) || pipe (server->output))
|
||||||
glibtop_error_r (server, _("cannot make a pipe: %s\n"),
|
glibtop_error__r (server, _("cannot make a pipe: %s\n"), strerror (errno));
|
||||||
strerror (errno));
|
|
||||||
|
|
||||||
server->pid = fork ();
|
server->pid = fork ();
|
||||||
|
|
||||||
if (server->pid < 0) {
|
if (server->pid < 0) {
|
||||||
glibtop_error_r (server, _("%s: fork failed: %s\n"),
|
glibtop_error__r (server, _("%s: fork failed: %s\n"), strerror (errno));
|
||||||
strerror (errno));
|
|
||||||
} else if (server->pid == 0) {
|
} else if (server->pid == 0) {
|
||||||
close (0); close (1); /* close (2); */
|
close (0); close (1); /* close (2); */
|
||||||
close (server->input [0]); close (server->output [1]);
|
close (server->input [0]); close (server->output [1]);
|
||||||
dup2 (server->input [1], 1); /* dup2 (server->input [1], 2); */
|
dup2 (server->input [1], 1); /* dup2 (server->input [1], 2); */
|
||||||
dup2 (server->output [0], 0);
|
dup2 (server->output [0], 0);
|
||||||
|
execl (GTOP_SERVER, NULL);
|
||||||
if (server_host) {
|
|
||||||
if (server_user) {
|
|
||||||
execl (server->server_rsh, "-l",
|
|
||||||
server->server_user, server->server_host,
|
|
||||||
server->server_command, NULL);
|
|
||||||
} else {
|
|
||||||
execl (server->server_rsh,
|
|
||||||
server->server_host, server_command, NULL);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
execl (server->server_command, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
_exit (2);
|
_exit (2);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (stderr, "PID: %d\n", server->pid);
|
|
||||||
|
|
||||||
close (server->input [1]);
|
close (server->input [1]);
|
||||||
close (server->output [0]);
|
close (server->output [0]);
|
||||||
|
|
||||||
sprintf (version, "%s server %s ready.\n", PACKAGE, VERSION);
|
sprintf (version, "%s server %s ready.\n", PACKAGE, VERSION);
|
||||||
|
|
||||||
glibtop_read_l (server, strlen (version), buffer);
|
glibtop_read__r (server, strlen (version), buffer);
|
||||||
|
|
||||||
if (memcmp (version, buffer, strlen (version)))
|
if (memcmp (version, buffer, strlen (version)))
|
||||||
glibtop_error_r (server, _("server version is not %s"), VERSION);
|
glibtop_error__r (server, _("server version is not %s"), VERSION);
|
||||||
|
|
||||||
fprintf (stderr, "Calling GLITOP_CMND_SYSDEPS ...\n");
|
|
||||||
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_SYSDEPS, 0, NULL,
|
|
||||||
sizeof (glibtop_sysdeps), &sysdeps);
|
|
||||||
|
|
||||||
server->features = sysdeps.features;
|
|
||||||
|
|
||||||
fprintf (stderr, "Features: %lu\n", server->features);
|
|
||||||
}
|
}
|
||||||
|
@@ -26,15 +26,10 @@
|
|||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_proc_kernel_l (glibtop *server, glibtop_proc_kernel *buf,
|
glibtop_get_proc_kernel__r (glibtop *server, glibtop_proc_kernel *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_PROC_KERNEL, sizeof (pid_t),
|
||||||
if (server->features & GLIBTOP_SYSDEPS_PROC_KERNEL) {
|
&pid, sizeof (glibtop_proc_kernel), buf);
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_PROC_KERNEL, sizeof (pid_t),
|
|
||||||
&pid, sizeof (glibtop_proc_kernel), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_proc_kernel_r (server, buf, pid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -25,14 +25,8 @@
|
|||||||
/* Fetch list of currently running processes. */
|
/* Fetch list of currently running processes. */
|
||||||
|
|
||||||
unsigned *
|
unsigned *
|
||||||
glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf)
|
glibtop_get_proclist__r (glibtop *server, glibtop_proclist *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROCLIST, 0);
|
glibtop_init__r (&server);
|
||||||
|
return glibtop_call__r (server, GLIBTOP_CMND_PROCLIST, 0, NULL, sizeof (glibtop_proclist), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_PROCLIST) {
|
|
||||||
return glibtop_call_l (server, GLIBTOP_CMND_PROCLIST, 0, NULL,
|
|
||||||
sizeof (glibtop_proclist), buf);
|
|
||||||
} else {
|
|
||||||
return glibtop_get_proclist_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -26,15 +26,10 @@
|
|||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_proc_mem_l (glibtop *server, glibtop_proc_mem *buf,
|
glibtop_get_proc_mem__r (glibtop *server, glibtop_proc_mem *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_MEM, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_PROC_MEM, sizeof (pid_t),
|
||||||
if (server->features & GLIBTOP_SYSDEPS_PROC_MEM) {
|
&pid, sizeof (glibtop_proc_mem), buf);
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_PROC_MEM, sizeof (pid_t),
|
|
||||||
&pid, sizeof (glibtop_proc_mem), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_proc_mem_r (server, buf, pid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -26,15 +26,10 @@
|
|||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_proc_segment_l (glibtop *server, glibtop_proc_segment *buf,
|
glibtop_get_proc_segment__r (glibtop *server, glibtop_proc_segment *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_PROC_SEGMENT, sizeof (pid_t),
|
||||||
if (server->features & GLIBTOP_SYSDEPS_PROC_SEGMENT) {
|
&pid, sizeof (glibtop_proc_segment), buf);
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_PROC_SEGMENT, sizeof (pid_t),
|
|
||||||
&pid, sizeof (glibtop_proc_segment), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_proc_segment_r (server, buf, pid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -26,15 +26,10 @@
|
|||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_proc_signal_l (glibtop *server, glibtop_proc_signal *buf,
|
glibtop_get_proc_signal__r (glibtop *server, glibtop_proc_signal *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_PROC_SIGNAL, sizeof (pid_t),
|
||||||
if (server->features & GLIBTOP_SYSDEPS_PROC_SIGNAL) {
|
&pid, sizeof (glibtop_proc_signal), buf);
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_PROC_SIGNAL, sizeof (pid_t),
|
|
||||||
&pid, sizeof (glibtop_proc_signal), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_proc_signal_r (server, buf, pid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -26,15 +26,10 @@
|
|||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_proc_state_l (glibtop *server, glibtop_proc_state *buf,
|
glibtop_get_proc_state__r (glibtop *server, glibtop_proc_state *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_STATE, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_PROC_STATE, sizeof (pid_t),
|
||||||
if (server->features & GLIBTOP_SYSDEPS_PROC_STATE) {
|
&pid, sizeof (glibtop_proc_state), buf);
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_PROC_STATE, sizeof (pid_t),
|
|
||||||
&pid, sizeof (glibtop_proc_state), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_proc_state_r (server, buf, pid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -26,15 +26,10 @@
|
|||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_proc_time_l (glibtop *server, glibtop_proc_time *buf,
|
glibtop_get_proc_time__r (glibtop *server, glibtop_proc_time *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_TIME, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_PROC_TIME, sizeof (pid_t),
|
||||||
if (server->features & GLIBTOP_SYSDEPS_PROC_TIME) {
|
&pid, sizeof (glibtop_proc_time), buf);
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_PROC_TIME, sizeof (pid_t),
|
|
||||||
&pid, sizeof (glibtop_proc_time), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_proc_time_r (server, buf, pid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -26,15 +26,10 @@
|
|||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_proc_uid_l (glibtop *server, glibtop_proc_uid *buf,
|
glibtop_get_proc_uid__r (glibtop *server, glibtop_proc_uid *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_UID, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_PROC_UID, sizeof (pid_t),
|
||||||
if (server->features & GLIBTOP_SYSDEPS_PROC_UID) {
|
&pid, sizeof (glibtop_proc_uid), buf);
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_PROC_UID, sizeof (pid_t),
|
|
||||||
&pid, sizeof (glibtop_proc_uid), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_proc_uid_r (server, buf, pid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
10
lib/read.c
10
lib/read.c
@@ -24,18 +24,18 @@
|
|||||||
/* Reads some data from server. */
|
/* Reads some data from server. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_read_l (glibtop *server, size_t size, void *buf)
|
glibtop_read__r (glibtop *server, size_t size, void *buf)
|
||||||
{
|
{
|
||||||
size_t ssize;
|
size_t ssize;
|
||||||
|
|
||||||
glibtop_init_r (&server, 0, 0);
|
glibtop_init__r (&server);
|
||||||
|
|
||||||
if (read (server->input [0], &ssize, sizeof (size_t)) < 0)
|
if (read (server->input [0], &ssize, sizeof (size_t)) < 0)
|
||||||
glibtop_error_r (server, _("read size: %s"), strerror (errno));
|
glibtop_error__r (server, _("read size: %s"), strerror (errno));
|
||||||
|
|
||||||
if (size != ssize)
|
if (size != ssize)
|
||||||
glibtop_error_r (server, _("got %d bytes but requested %d"), ssize, size);
|
glibtop_error__r (server, _("got %d bytes but requested %d"), ssize, size);
|
||||||
|
|
||||||
if (read (server->input [0], buf, size) < 0)
|
if (read (server->input [0], buf, size) < 0)
|
||||||
glibtop_error_r (server, _("read %d bytes: %s"), size, strerror (errno));
|
glibtop_error__r (server, _("read %d bytes: %s"), size, strerror (errno));
|
||||||
}
|
}
|
||||||
|
@@ -25,24 +25,24 @@
|
|||||||
/* Reads some data from server. */
|
/* Reads some data from server. */
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_read_data_l (glibtop *server)
|
glibtop_read_data__r (glibtop *server)
|
||||||
{
|
{
|
||||||
size_t size;
|
size_t size;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
glibtop_init_r (&server, 0, 0);
|
glibtop_init__r (&server);
|
||||||
|
|
||||||
if (read (server->input [0], &size, sizeof (size_t)) < 0)
|
if (read (server->input [0], &size, sizeof (size_t)) < 0)
|
||||||
glibtop_error_r (server, _("read data size: %s"),
|
glibtop_error__r (server, _("read data size: %s"), strerror (errno));
|
||||||
strerror (errno));
|
|
||||||
|
|
||||||
if (!size) return NULL;
|
if (!size) return NULL;
|
||||||
|
|
||||||
ptr = glibtop_malloc_r (server, size);
|
fprintf (stderr, "Server has %d bytes of data.\n", size);
|
||||||
|
|
||||||
|
ptr = glibtop_malloc__r (server, size);
|
||||||
|
|
||||||
if (read (server->input [0], ptr, size) < 0)
|
if (read (server->input [0], ptr, size) < 0)
|
||||||
glibtop_error_r (server, _("read data %d bytes: %s"),
|
glibtop_error__r (server, _("read data %d bytes: %s"), size, strerror (errno));
|
||||||
size, strerror (errno));
|
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
@@ -25,14 +25,8 @@
|
|||||||
/* Provides information about sysv ipc limits. */
|
/* Provides information about sysv ipc limits. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_sem_limits_l (glibtop *server, glibtop_sem_limits *buf)
|
glibtop_get_sem_limits__r (glibtop *server, glibtop_sem_limits *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_SEM_LIMITS, 0, NULL, sizeof (glibtop_sem_limits), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_SEM_LIMITS) {
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_SEM_LIMITS, 0, NULL,
|
|
||||||
sizeof (glibtop_sem_limits), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_sem_limits_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -25,14 +25,8 @@
|
|||||||
/* Provides information about sysv ipc limits. */
|
/* Provides information about sysv ipc limits. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_shm_limits_l (glibtop *server, glibtop_shm_limits *buf)
|
glibtop_get_shm_limits__r (glibtop *server, glibtop_shm_limits *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_SHM_LIMITS, 0, NULL, sizeof (glibtop_shm_limits), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_SHM_LIMITS) {
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_SHM_LIMITS, 0, NULL,
|
|
||||||
sizeof (glibtop_shm_limits), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_shm_limits_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
12
lib/swap.c
12
lib/swap.c
@@ -25,14 +25,8 @@
|
|||||||
/* Provides information about swap usage. */
|
/* Provides information about swap usage. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_swap_l (glibtop *server, glibtop_swap *buf)
|
glibtop_get_swap__r (glibtop *server, glibtop_swap *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_SWAP, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_SWAP, 0, NULL, sizeof (glibtop_swap), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_SWAP) {
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_SWAP, 0, NULL,
|
|
||||||
sizeof (glibtop_swap), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_swap_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
12
lib/uptime.c
12
lib/uptime.c
@@ -26,14 +26,8 @@
|
|||||||
/* Provides uptime and idle time. */
|
/* Provides uptime and idle time. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf)
|
glibtop_get_uptime__r (glibtop *server, glibtop_uptime *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, GLIBTOP_SYSDEPS_UPTIME, 0);
|
glibtop_init__r (&server);
|
||||||
|
glibtop_call__r (server, GLIBTOP_CMND_UPTIME, 0, NULL, sizeof (glibtop_uptime), buf);
|
||||||
if (server->features & GLIBTOP_SYSDEPS_UPTIME) {
|
|
||||||
glibtop_call_l (server, GLIBTOP_CMND_UPTIME, 0, NULL,
|
|
||||||
sizeof (glibtop_uptime), buf);
|
|
||||||
} else {
|
|
||||||
glibtop_get_uptime_r (server, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -24,15 +24,15 @@
|
|||||||
/* Writes some data to server. */
|
/* Writes some data to server. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_write_l (glibtop *server, size_t size, void *buf)
|
glibtop_write__r (glibtop *server, size_t size, void *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_r (&server, 0, 0);
|
glibtop_init__r (&server);
|
||||||
|
|
||||||
if (write (server->output [1], &size, sizeof (size_t)) < 0)
|
if (write (server->output [1], &size, sizeof (size_t)) < 0)
|
||||||
glibtop_error_r (server, _("write size: %s"), strerror (errno));
|
glibtop_error__r (server, _("write size: %s"), strerror (errno));
|
||||||
|
|
||||||
if (!size) return;
|
if (!size) return;
|
||||||
|
|
||||||
if (write (server->output [1], buf, size) < 0)
|
if (write (server->output [1], buf, size) < 0)
|
||||||
glibtop_error_r (server, _("write %d bytes: %s"), size, strerror (errno));
|
glibtop_error__r (server, _("write %d bytes: %s"), size, strerror (errno));
|
||||||
}
|
}
|
||||||
|
70
libgtop.spec
70
libgtop.spec
@@ -3,32 +3,39 @@
|
|||||||
%define rel SNAP
|
%define rel SNAP
|
||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
|
|
||||||
Summary: libgtop library
|
Summary: GNOME Top Library
|
||||||
Name: libgtop
|
Name: libgtop
|
||||||
Version: %ver
|
Version: %ver
|
||||||
Release: %rel
|
Release: %rel
|
||||||
Copyright: LGPL
|
Copyright: LGPL
|
||||||
Group: X11/Libraries
|
Group: X11/gnome
|
||||||
Source: ftp://ftp.gnome.org/pub/libgtop-%{ver}.tar.gz
|
Source: ftp://ftp.gnome.org/pub/libgtop-%{ver}.tar.gz
|
||||||
BuildRoot: /tmp/libgtop-root
|
BuildRoot: /tmp/libgtop-root
|
||||||
Packager: Michael Fulbright <msf@redhat.com>
|
Obsoletes: gnome
|
||||||
URL: http://www.gnome.org
|
Packager: Marc Ewing <marc@redhat.com>
|
||||||
Prereq: /sbin/install-info
|
URL: http://www.gnome.org/
|
||||||
Docdir: %{prefix}/doc
|
Docdir: %{prefix}/doc
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
Library that fetches information about the running system such as cpu
|
||||||
|
and memory usage, active processes etc. On Linux systems, these information
|
||||||
|
are taken directly from the /proc filesystem. For other systems such as
|
||||||
|
Solaris, where such programs need to be suid root (or only setgid kmem/mem
|
||||||
|
on some systems), it provides a suid/setgid server that fetches those
|
||||||
|
information and a client-side library that talks to this server.
|
||||||
|
|
||||||
A library that fetches
|
Main idea was to have the same interface for all operating systems,
|
||||||
information about the running system such as cpu and memory usage,
|
thus all system dependent details are hidden in the implementation
|
||||||
active processes etc. On Linux systems, these information are taken
|
of that server.
|
||||||
directly from the /proc filesystem.
|
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Libraries, includes, etc to use libgtop in GNOME applications
|
||||||
|
Group: X11/gnome
|
||||||
|
Requires: libgtop
|
||||||
|
Obsoletes: gnome
|
||||||
|
|
||||||
%changelog
|
%description devel
|
||||||
|
Libraries, include files, etc you need to use libgtop in GNOME applications.
|
||||||
* Tue Jun 2 1998 Michael Fulbright <msf@redhat.com>
|
|
||||||
|
|
||||||
- first version of the RPM
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup
|
||||||
@@ -36,9 +43,9 @@ directly from the /proc filesystem.
|
|||||||
%build
|
%build
|
||||||
# Needed for snapshot releases.
|
# Needed for snapshot releases.
|
||||||
if [ ! -f configure ]; then
|
if [ ! -f configure ]; then
|
||||||
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --disable-libgtop-examples
|
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix
|
||||||
else
|
else
|
||||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --disable-libgtop-examples
|
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$SMP" != "" ]; then
|
if [ "$SMP" != "" ]; then
|
||||||
@@ -53,29 +60,30 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
make prefix=$RPM_BUILD_ROOT%{prefix} install
|
make prefix=$RPM_BUILD_ROOT%{prefix} install
|
||||||
|
|
||||||
#
|
|
||||||
# msf - remove these as they are really supposed to come from gnome-libs
|
|
||||||
#
|
|
||||||
rm -f $RPM_BUILD_ROOT/%{prefix}/lib/libgnomesupport.a
|
|
||||||
rm -f $RPM_BUILD_ROOT/%{prefix}/lib/libgnomesupport.la
|
|
||||||
rm -f $RPM_BUILD_ROOT/%{prefix}/lib/libgnomesupport.so.0
|
|
||||||
rm -f $RPM_BUILD_ROOT/%{prefix}/lib/libgnomesupport.so.0.0.0
|
|
||||||
|
|
||||||
rm -fr $RPM_BUILD_ROOT/%{prefix}/include/libgtop
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
#rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post
|
||||||
|
if ! grep %{prefix}/lib /etc/ld.so.conf > /dev/null ; then
|
||||||
|
echo "%{prefix}/lib" >> /etc/ld.so.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
|
|
||||||
%doc ANNOUNCE AUTHORS ChangeLog NEWS README README.LATEST copyright.txt doc
|
%doc AUTHORS COPYING ChangeLog NEWS README
|
||||||
%{prefix}/bin/*
|
|
||||||
%{prefix}/lib/lib*.so.*
|
%{prefix}/lib/lib*.so.*
|
||||||
%{prefix}/lib/libgtopConf.sh
|
%{prefix}/bin/*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-, root, root)
|
||||||
|
|
||||||
|
%{prefix}/lib/lib*.so
|
||||||
%{prefix}/lib/*a
|
%{prefix}/lib/*a
|
||||||
|
%{prefix}/lib/*.sh
|
||||||
|
%{prefix}/lib/libgtop
|
||||||
%{prefix}/include/*
|
%{prefix}/include/*
|
||||||
|
@@ -2,5 +2,4 @@ Makefile
|
|||||||
Makefile.in
|
Makefile.in
|
||||||
POTFILES
|
POTFILES
|
||||||
cat-id-tbl.c
|
cat-id-tbl.c
|
||||||
fr.gmo
|
|
||||||
libgtop.pot
|
libgtop.pot
|
||||||
|
@@ -1,7 +1,3 @@
|
|||||||
Sun, 31 May 1998 22:38:59 +0200 Vincent Renardias <vincent@waw.com>
|
|
||||||
|
|
||||||
* fr.po: new file - ChangeLog isn't empty anymore _(;
|
|
||||||
|
|
||||||
1998-05-21 Martin Baulig <martin@home-of-linux.org>
|
1998-05-21 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* ChangeLog: new file - currently empty
|
* ChangeLog: new file - currently empty
|
||||||
|
402
po/fr.po
402
po/fr.po
@@ -1,402 +0,0 @@
|
|||||||
# libgtop fr.po
|
|
||||||
# Copyright (C) 1998 Free Software Foundation, Inc.
|
|
||||||
# Vincent Renardias <vincent@waw.com>, 1998.
|
|
||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: libgtop VERSION\n"
|
|
||||||
"POT-Creation-Date: 1998-05-31 22:31+0200\n"
|
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
||||||
"Last-Translator: Vincent Renardias <vincent@waw.com>\n"
|
|
||||||
"Language-Team: Vincent Renardias <vincent@waw.com>\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=iso-8859-1\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: lib/open.c:36
|
|
||||||
#, c-format
|
|
||||||
msgid "cannot make a pipe: %s\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/open.c:41
|
|
||||||
#, c-format
|
|
||||||
msgid "%s: fork failed: %s\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/open.c:59
|
|
||||||
#, c-format
|
|
||||||
msgid "server version is not %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/read.c:34
|
|
||||||
#, c-format
|
|
||||||
msgid "read size: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/read.c:37
|
|
||||||
#, c-format
|
|
||||||
msgid "got %d bytes but requested %d"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/read.c:40
|
|
||||||
#, c-format
|
|
||||||
msgid "read %d bytes: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/write.c:32
|
|
||||||
#, c-format
|
|
||||||
msgid "write size: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/write.c:37
|
|
||||||
#, c-format
|
|
||||||
msgid "write %d bytes: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/read_data.c:36
|
|
||||||
#, c-format
|
|
||||||
msgid "read data size: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/read_data.c:46
|
|
||||||
#, c-format
|
|
||||||
msgid "read data %d bytes: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/common/xmalloc.c:32
|
|
||||||
#, c-format
|
|
||||||
msgid "malloc %d bytes: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/common/xmalloc.c:44
|
|
||||||
#, c-format
|
|
||||||
msgid "calloc %d block (%d bytes each): %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/common/xmalloc.c:56
|
|
||||||
#, c-format
|
|
||||||
msgid "realloc %d bytes: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:42 sysdeps/names/sysdeps.c:62
|
|
||||||
msgid "CPU Usage"
|
|
||||||
msgstr "Utilisation CPU"
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:43 sysdeps/names/sysdeps.c:63
|
|
||||||
msgid "Memory Usage"
|
|
||||||
msgstr "Utilisation M<>moire"
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:44 sysdeps/names/sysdeps.c:64
|
|
||||||
msgid "Swap Usage"
|
|
||||||
msgstr "Utilisation du Swap"
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:45 sysdeps/names/sysdeps.c:65
|
|
||||||
msgid "System Uptime"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:46 sysdeps/names/sysdeps.c:66
|
|
||||||
msgid "Load Averange"
|
|
||||||
msgstr "Charge moyenne"
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:47 sysdeps/names/sysdeps.c:67
|
|
||||||
msgid "Shared Memory Limits"
|
|
||||||
msgstr "Limites de la m<>moire partag<61>e"
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:48 sysdeps/names/sysdeps.c:68
|
|
||||||
msgid "Message Queue Limits"
|
|
||||||
msgstr "Limites de la queue de messages"
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:69
|
|
||||||
msgid "Semaphore Set Limits"
|
|
||||||
msgstr "Limites de l'ensemble de s<>maphores"
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:70
|
|
||||||
msgid "List of running Processes"
|
|
||||||
msgstr "Liste des taches en cours d'<27>x<EFBFBD>cution"
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:71
|
|
||||||
msgid "Process Status information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:72
|
|
||||||
msgid "Process UID and TTY information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:73
|
|
||||||
msgid "Process Memory information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:74
|
|
||||||
msgid "Process Time information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:75
|
|
||||||
msgid "Process Signal information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:76
|
|
||||||
msgid "Process Kernel Data information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:77
|
|
||||||
msgid "Process Segment information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:37
|
|
||||||
msgid "Total CPU Time"
|
|
||||||
msgstr "Temps CPU Total"
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:38
|
|
||||||
msgid "CPU Time in User Mode"
|
|
||||||
msgstr "Temps CPU en mode utilisateur"
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:39
|
|
||||||
msgid "CPU Time in User Mode (nice)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:40
|
|
||||||
msgid "CPU Time in System Mode"
|
|
||||||
msgstr "Temps CPU en mode syst<73>me"
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:41
|
|
||||||
msgid "CPU Time in the Idle Task"
|
|
||||||
msgstr "Temps CPU pour la tache inactive"
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:42
|
|
||||||
msgid "Tick Frequency"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:47
|
|
||||||
msgid "The number of jiffies (1/100ths of a second) since system boot"
|
|
||||||
msgstr "Nombre de jiffies (1/100e de seconde) depuis le boot du syst<73>me"
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:49
|
|
||||||
msgid ""
|
|
||||||
"The number of jiffies (1/100ths of a second) that the system spent in user "
|
|
||||||
"mode"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:51
|
|
||||||
msgid ""
|
|
||||||
"The number of jiffies (1/100ths of a second) that the system spent in user "
|
|
||||||
"mode with low priority (nice)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:53
|
|
||||||
msgid ""
|
|
||||||
"The number of jiffies (1/100ths of a second) that the system spent in system "
|
|
||||||
"mode"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:55
|
|
||||||
msgid ""
|
|
||||||
"The number of jiffies (1/100ths of a second) that the system spend in the "
|
|
||||||
"idle task"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/cpu.c:57
|
|
||||||
msgid ""
|
|
||||||
"All of the above values are in jiffies (1/100ths of a second) unless "
|
|
||||||
"otherwise stated in this field (i.e. 'frequency != 100')"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/loadavg.c:36
|
|
||||||
msgid "Load Average"
|
|
||||||
msgstr "Charge Moyenne"
|
|
||||||
|
|
||||||
#: sysdeps/names/loadavg.c:41
|
|
||||||
msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:39
|
|
||||||
msgid "Total Memory"
|
|
||||||
msgstr "M<>moire Totale"
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:40
|
|
||||||
msgid "Used Memory"
|
|
||||||
msgstr "M<>moire Utilis<69>e"
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:41
|
|
||||||
msgid "Free Memory"
|
|
||||||
msgstr "M<>moire Libre"
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:42
|
|
||||||
msgid "Shared Memory"
|
|
||||||
msgstr "M<>moire Partag<61>e"
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:43
|
|
||||||
msgid "Buffers"
|
|
||||||
msgstr "Tampons"
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:44
|
|
||||||
msgid "Cached"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:45
|
|
||||||
msgid "User"
|
|
||||||
msgstr "Utilisateur"
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:46
|
|
||||||
msgid "Locked"
|
|
||||||
msgstr "V<>rouill<6C>"
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:51
|
|
||||||
msgid "Total physical memory in kB"
|
|
||||||
msgstr "M<>moire physique totalle en Ko"
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:52
|
|
||||||
msgid "Used memory size in kB"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:53
|
|
||||||
msgid "Free memory size in kB"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:54
|
|
||||||
msgid "Shared memory size in kB"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:55
|
|
||||||
msgid "Size of buffers kB"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:56
|
|
||||||
msgid "Size of cached memory in kB"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:57
|
|
||||||
msgid "Memory used from user processes in kB"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/mem.c:58
|
|
||||||
msgid "Memory in locked pages in kB"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/swap.c:36 sysdeps/names/swap.c:43
|
|
||||||
msgid "Total Swap Space"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/swap.c:37 sysdeps/names/swap.c:44
|
|
||||||
msgid "Used Swap Space"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/swap.c:38 sysdeps/names/swap.c:45
|
|
||||||
msgid "Free Swap Space"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/uptime.c:36
|
|
||||||
msgid "Uptime"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/uptime.c:37
|
|
||||||
msgid "Idletime"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/uptime.c:42
|
|
||||||
msgid "Time in seconds since system boot"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/uptime.c:43
|
|
||||||
msgid "Time in seconds the system spent in the idle task since system boot"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/shm_limits.c:37 sysdeps/names/shm_limits.c:46
|
|
||||||
msgid "Max segment size"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/shm_limits.c:38 sysdeps/names/shm_limits.c:47
|
|
||||||
msgid "Min segment size"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
|
|
||||||
msgid "Max number of segments"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
|
|
||||||
msgid "Max shared segments per process"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
|
|
||||||
msgid "Max total shared memory"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/msg_limits.c:37 sysdeps/names/msg_limits.c:48
|
|
||||||
msgid "Size in kilobytes of message pool"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/msg_limits.c:38 sysdeps/names/msg_limits.c:49
|
|
||||||
msgid "Number of entries in message map"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/msg_limits.c:39 sysdeps/names/msg_limits.c:50
|
|
||||||
msgid "Max size of message"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51
|
|
||||||
msgid "Default max size of queue"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
|
|
||||||
msgid "Max queues system wide"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
|
|
||||||
msgid "Message segment size"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
|
|
||||||
msgid "Number of system message headers"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:39 sysdeps/names/sem_limits.c:53
|
|
||||||
msgid "Number of entries in semaphore map"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:40 sysdeps/names/sem_limits.c:54
|
|
||||||
msgid "Max number of arrays"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:41 sysdeps/names/sem_limits.c:55
|
|
||||||
msgid "Max semaphores system wide"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
|
|
||||||
msgid "Number of undo structures system wide"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
|
|
||||||
msgid "Max semaphores per array"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
|
|
||||||
msgid "Max ops per semop call"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
|
|
||||||
msgid "Max number of undo entries per process"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
|
|
||||||
msgid "sizeof struct sem_undo"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
|
|
||||||
msgid "Semaphore max value"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
|
|
||||||
msgid "Adjust on exit max value"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/proclist.c:36 sysdeps/names/proclist.c:43
|
|
||||||
msgid "Number of list elements"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: sysdeps/names/proclist.c:37 sysdeps/names/proclist.c:44
|
|
||||||
msgid "Total size of list"
|
|
||||||
msgstr "Taille totalle de la liste"
|
|
||||||
|
|
||||||
#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45
|
|
||||||
msgid "Size of a single list element"
|
|
||||||
msgstr ""
|
|
@@ -1 +1 @@
|
|||||||
SUBDIRS = server proxy
|
SUBDIRS = server
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
.deps
|
|
||||||
.libs
|
|
||||||
Makefile
|
|
||||||
Makefile.in
|
|
||||||
gtop_proxy
|
|
@@ -1,16 +0,0 @@
|
|||||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
|
||||||
|
|
||||||
INCLUDES = -I$(top_builddir) -I$(top_srcdir) @machine_incs@ \
|
|
||||||
-I$(top_srcdir)/include -I$(top_srcdir)/intl @GUILE_INCS@ \
|
|
||||||
-DGTOPLOCALEDIR=\"$(datadir)/locale\" -D_GNU_SOURCE
|
|
||||||
|
|
||||||
CFLAGS = -Wall -W @CFLAGS@ -DGTOP_SERVER=\""@LIBGTOP_SERVER@"\"
|
|
||||||
|
|
||||||
bin_PROGRAMS = gtop_proxy
|
|
||||||
|
|
||||||
gtop_proxy_SOURCES = main.c output.c version.c
|
|
||||||
gtop_proxy_LDADD = $(top_builddir)/lib/libgtop.la \
|
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
|
||||||
@INTLLIBS@ @LIBSUPPORT@
|
|
||||||
gtop_proxy_LDFLAGS = -static
|
|
234
src/proxy/main.c
234
src/proxy/main.c
@@ -1,234 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
|
||||||
This file is part of the Gnome Top Library.
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
|
||||||
|
|
||||||
The Gnome Top Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public License as
|
|
||||||
published by the Free Software Foundation; either version 2 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include <glibtop/command.h>
|
|
||||||
#include <glibtop/version.h>
|
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
#include <glibtop/union.h>
|
|
||||||
#include <glibtop/open.h>
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
#if defined(HAVE_GETDTABLESIZE)
|
|
||||||
#define GET_MAX_FDS() getdtablesize()
|
|
||||||
#else
|
|
||||||
/* Fallthrough case - please add other #elif cases above
|
|
||||||
for different OS's as necessary */
|
|
||||||
#define GET_MAX_FDS() 256
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
pid_t pid;
|
|
||||||
int fd, max_fd, nread;
|
|
||||||
size_t size, dsize;
|
|
||||||
char parameter [BUFSIZ];
|
|
||||||
glibtop_union data;
|
|
||||||
glibtop_command cmnd;
|
|
||||||
glibtop_sysdeps sysdeps;
|
|
||||||
glibtop server;
|
|
||||||
void *ptr;
|
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
|
||||||
textdomain (PACKAGE);
|
|
||||||
|
|
||||||
glibtop_version ();
|
|
||||||
|
|
||||||
glibtop_open_l (&server, argv [0], 0, GLIBTOP_OPEN_NO_OVERRIDE);
|
|
||||||
|
|
||||||
/* close all file descriptors except ones used by the pipes (0 and 1). */
|
|
||||||
max_fd = GET_MAX_FDS();
|
|
||||||
for(fd = 3 /* The first fd after the pipes */; fd < max_fd; fd++)
|
|
||||||
close(fd);
|
|
||||||
|
|
||||||
while(1) {
|
|
||||||
/* block on read from client */
|
|
||||||
/* fprintf (stderr, "waiting for input ...\n"); */
|
|
||||||
nread = read (0, &size, sizeof (size_t));
|
|
||||||
|
|
||||||
/* will return 0 if parent exits. */
|
|
||||||
|
|
||||||
if (nread == 0)
|
|
||||||
_exit(0);
|
|
||||||
|
|
||||||
if (nread != sizeof (size_t))
|
|
||||||
_exit(1);
|
|
||||||
|
|
||||||
if (size != sizeof (glibtop_command))
|
|
||||||
_exit(2);
|
|
||||||
|
|
||||||
nread = read (0, &cmnd, size);
|
|
||||||
|
|
||||||
/* will return 0 if parent exits. */
|
|
||||||
|
|
||||||
if (nread == 0)
|
|
||||||
_exit(0);
|
|
||||||
|
|
||||||
if (nread < 0)
|
|
||||||
_exit(1);
|
|
||||||
|
|
||||||
nread = read (0, &dsize, sizeof (size_t));
|
|
||||||
|
|
||||||
/* will return 0 if parent exits. */
|
|
||||||
|
|
||||||
if (nread == 0)
|
|
||||||
_exit(0);
|
|
||||||
|
|
||||||
if (nread < 0)
|
|
||||||
_exit(1);
|
|
||||||
|
|
||||||
if (dsize >= BUFSIZ)
|
|
||||||
_exit(3);
|
|
||||||
|
|
||||||
memset (parameter, 0, sizeof (parameter));
|
|
||||||
|
|
||||||
if (dsize) {
|
|
||||||
nread = read (0, parameter, dsize);
|
|
||||||
|
|
||||||
/* will return 0 if parent exits. */
|
|
||||||
|
|
||||||
if (nread == 0)
|
|
||||||
_exit(0);
|
|
||||||
|
|
||||||
if (nread < 0)
|
|
||||||
_exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (cmnd.command) {
|
|
||||||
case GLIBTOP_CMND_SYSDEPS:
|
|
||||||
sysdeps.features = GLIBTOP_SYSDEPS_ALL;
|
|
||||||
glibtop_output (sizeof (glibtop_sysdeps), &sysdeps);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_CPU:
|
|
||||||
glibtop_get_cpu_l (&server, &data.cpu);
|
|
||||||
glibtop_output (sizeof (glibtop_cpu), &data.cpu);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_MEM:
|
|
||||||
glibtop_get_mem_l (&server, &data.mem);
|
|
||||||
glibtop_output (sizeof (glibtop_mem), &data.mem);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_SWAP:
|
|
||||||
glibtop_get_swap_l (&server, &data.swap);
|
|
||||||
glibtop_output (sizeof (glibtop_swap), &data.swap);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_UPTIME:
|
|
||||||
glibtop_get_uptime_l (&server, &data.uptime);
|
|
||||||
glibtop_output (sizeof (glibtop_uptime), &data.uptime);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_LOADAVG:
|
|
||||||
glibtop_get_loadavg_l (&server, &data.loadavg);
|
|
||||||
glibtop_output (sizeof (glibtop_loadavg), &data.loadavg);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_SHM_LIMITS:
|
|
||||||
glibtop_get_shm_limits_l (&server, &data.shm_limits);
|
|
||||||
glibtop_output (sizeof (glibtop_shm_limits),
|
|
||||||
&data.shm_limits);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_MSG_LIMITS:
|
|
||||||
glibtop_get_msg_limits_l (&server, &data.msg_limits);
|
|
||||||
glibtop_output (sizeof (glibtop_msg_limits),
|
|
||||||
&data.msg_limits);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_SEM_LIMITS:
|
|
||||||
glibtop_get_sem_limits_l (&server, &data.sem_limits);
|
|
||||||
glibtop_output (sizeof (glibtop_sem_limits),
|
|
||||||
&data.sem_limits);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PROCLIST:
|
|
||||||
ptr = glibtop_get_proclist_l (&server, &data.proclist);
|
|
||||||
glibtop_output (sizeof (glibtop_proclist),
|
|
||||||
&data.proclist);
|
|
||||||
glibtop_output (data.proclist.total, ptr);
|
|
||||||
glibtop_free_r (&server, ptr);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PROC_STATE:
|
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
|
||||||
glibtop_get_proc_state_l
|
|
||||||
(&server, &data.proc_state, pid);
|
|
||||||
glibtop_output (sizeof (glibtop_proc_state),
|
|
||||||
&data.proc_state);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PROC_UID:
|
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
|
||||||
glibtop_get_proc_uid_l
|
|
||||||
(&server, &data.proc_uid, pid);
|
|
||||||
glibtop_output (sizeof (glibtop_proc_uid),
|
|
||||||
&data.proc_uid);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PROC_MEM:
|
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
|
||||||
glibtop_get_proc_mem_l
|
|
||||||
(&server, &data.proc_mem, pid);
|
|
||||||
glibtop_output (sizeof (glibtop_proc_mem),
|
|
||||||
&data.proc_mem);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PROC_TIME:
|
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
|
||||||
glibtop_get_proc_time_l
|
|
||||||
(&server, &data.proc_time, pid);
|
|
||||||
glibtop_output (sizeof (glibtop_proc_time),
|
|
||||||
&data.proc_time);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PROC_SIGNAL:
|
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
|
||||||
glibtop_get_proc_signal_l
|
|
||||||
(&server, &data.proc_signal, pid);
|
|
||||||
glibtop_output (sizeof (glibtop_proc_signal),
|
|
||||||
&data.proc_signal);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PROC_KERNEL:
|
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
|
||||||
glibtop_get_proc_kernel_l
|
|
||||||
(&server, &data.proc_kernel, pid);
|
|
||||||
glibtop_output (sizeof (glibtop_proc_kernel),
|
|
||||||
&data.proc_kernel);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
case GLIBTOP_CMND_PROC_SEGMENT:
|
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
|
||||||
glibtop_get_proc_segment_l
|
|
||||||
(&server, &data.proc_segment, pid);
|
|
||||||
glibtop_output (sizeof (glibtop_proc_segment),
|
|
||||||
&data.proc_segment);
|
|
||||||
glibtop_output (0, NULL);
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_exit(0);
|
|
||||||
}
|
|
@@ -1,31 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
|
||||||
This file is part of the Gnome Top Library.
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
|
||||||
|
|
||||||
The Gnome Top Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public License as
|
|
||||||
published by the Free Software Foundation; either version 2 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include <glibtop/output.h>
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_output (size_t size, const void *buf)
|
|
||||||
{
|
|
||||||
if (write (1, &size, sizeof (size_t)) < 0)
|
|
||||||
_exit (2);
|
|
||||||
if (write (1, buf, size) < 0)
|
|
||||||
_exit (2);
|
|
||||||
}
|
|
@@ -1,31 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
|
||||||
This file is part of the Gnome Top Library.
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
|
||||||
|
|
||||||
The Gnome Top Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public License as
|
|
||||||
published by the Free Software Foundation; either version 2 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include <glibtop/version.h>
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_version (void)
|
|
||||||
{
|
|
||||||
char buffer [BUFSIZ];
|
|
||||||
|
|
||||||
sprintf (buffer, "%s server %s ready.\n", PACKAGE, VERSION);
|
|
||||||
glibtop_output (strlen (buffer), buffer);
|
|
||||||
}
|
|
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
setreuid (uid, euid); setregid (gid, egid);
|
setreuid (uid, euid); setregid (gid, egid);
|
||||||
|
|
||||||
glibtop_open_r (&server, argv [0], 0, 0);
|
glibtop_open (&server, argv [0]);
|
||||||
|
|
||||||
if (setreuid (euid, uid)) _exit (1);
|
if (setreuid (euid, uid)) _exit (1);
|
||||||
|
|
||||||
@@ -142,146 +142,112 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
switch (cmnd.command) {
|
switch (cmnd.command) {
|
||||||
case GLIBTOP_CMND_SYSDEPS:
|
case GLIBTOP_CMND_SYSDEPS:
|
||||||
sysdeps.features = GLIBTOP_SYSDEPS_ALL;
|
glibtop_get_sysdeps__r (&server, &sysdeps);
|
||||||
glibtop_output (sizeof (glibtop_sysdeps), &sysdeps);
|
glibtop_output (sizeof (glibtop_sysdeps), &sysdeps);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_CPU:
|
case GLIBTOP_CMND_CPU:
|
||||||
#if GLIBTOP_SUID_CPU
|
glibtop_get_cpu__r (&server, &data.cpu);
|
||||||
glibtop_get_cpu_p (&server, &data.cpu);
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_cpu), &data.cpu);
|
glibtop_output (sizeof (glibtop_cpu), &data.cpu);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_MEM:
|
case GLIBTOP_CMND_MEM:
|
||||||
#if GLIBTOP_SUID_MEM
|
glibtop_get_mem__r (&server, &data.mem);
|
||||||
glibtop_get_mem_p (&server, &data.mem);
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_mem), &data.mem);
|
glibtop_output (sizeof (glibtop_mem), &data.mem);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_SWAP:
|
case GLIBTOP_CMND_SWAP:
|
||||||
#if GLIBTOP_SUID_SWAP
|
glibtop_get_swap__r (&server, &data.swap);
|
||||||
glibtop_get_swap_p (&server, &data.swap);
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_swap), &data.swap);
|
glibtop_output (sizeof (glibtop_swap), &data.swap);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_UPTIME:
|
case GLIBTOP_CMND_UPTIME:
|
||||||
#if GLIBTOP_SUID_UPTIME
|
glibtop_get_uptime__r (&server, &data.uptime);
|
||||||
glibtop_get_uptime_p (&server, &data.uptime);
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_uptime), &data.uptime);
|
glibtop_output (sizeof (glibtop_uptime), &data.uptime);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_LOADAVG:
|
case GLIBTOP_CMND_LOADAVG:
|
||||||
#if GLIBTOP_SUID_LOADAVG
|
glibtop_get_loadavg__r (&server, &data.loadavg);
|
||||||
glibtop_get_loadavg_p (&server, &data.loadavg);
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_loadavg), &data.loadavg);
|
glibtop_output (sizeof (glibtop_loadavg), &data.loadavg);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_SHM_LIMITS:
|
case GLIBTOP_CMND_SHM_LIMITS:
|
||||||
#if GLIBTOP_SUID_SHM_LIMITS
|
glibtop_get_shm_limits__r (&server, &data.shm_limits);
|
||||||
glibtop_get_shm_limits_p (&server, &data.shm_limits);
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_shm_limits),
|
glibtop_output (sizeof (glibtop_shm_limits),
|
||||||
&data.shm_limits);
|
&data.shm_limits);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_MSG_LIMITS:
|
case GLIBTOP_CMND_MSG_LIMITS:
|
||||||
#if GLIBTOP_SUID_MSG_LIMITS
|
glibtop_get_msg_limits__r (&server, &data.msg_limits);
|
||||||
glibtop_get_msg_limits_p (&server, &data.msg_limits);
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_msg_limits),
|
glibtop_output (sizeof (glibtop_msg_limits),
|
||||||
&data.msg_limits);
|
&data.msg_limits);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_SEM_LIMITS:
|
case GLIBTOP_CMND_SEM_LIMITS:
|
||||||
#if GLIBTOP_SUID_SEM_LIMITS
|
glibtop_get_sem_limits__r (&server, &data.sem_limits);
|
||||||
glibtop_get_sem_limits_p (&server, &data.sem_limits);
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_sem_limits),
|
glibtop_output (sizeof (glibtop_sem_limits),
|
||||||
&data.sem_limits);
|
&data.sem_limits);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROCLIST:
|
case GLIBTOP_CMND_PROCLIST:
|
||||||
#if GLIBTOP_SUID_PROCLIST
|
ptr = glibtop_get_proclist__r (&server, &data.proclist);
|
||||||
ptr = glibtop_get_proclist_p (&server, &data.proclist);
|
|
||||||
#else
|
|
||||||
ptr = NULL;
|
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_proclist),
|
glibtop_output (sizeof (glibtop_proclist),
|
||||||
&data.proclist);
|
&data.proclist);
|
||||||
glibtop_output (data.proclist.total, ptr);
|
glibtop_output (data.proclist.total, ptr);
|
||||||
glibtop_free_r (&server, ptr);
|
glibtop_free__r (&server, ptr);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROC_STATE:
|
case GLIBTOP_CMND_PROC_STATE:
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
memcpy (&pid, parameter, sizeof (pid_t));
|
||||||
#if GLIBTOP_SUID_PROC_STATE
|
glibtop_get_proc_state__r
|
||||||
glibtop_get_proc_state_p
|
|
||||||
(&server, &data.proc_state, pid);
|
(&server, &data.proc_state, pid);
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_proc_state),
|
glibtop_output (sizeof (glibtop_proc_state),
|
||||||
&data.proc_state);
|
&data.proc_state);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROC_UID:
|
case GLIBTOP_CMND_PROC_UID:
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
memcpy (&pid, parameter, sizeof (pid_t));
|
||||||
#if GLIBTOP_SUID_PROC_UID
|
glibtop_get_proc_uid__r
|
||||||
glibtop_get_proc_uid_p
|
|
||||||
(&server, &data.proc_uid, pid);
|
(&server, &data.proc_uid, pid);
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_proc_uid),
|
glibtop_output (sizeof (glibtop_proc_uid),
|
||||||
&data.proc_uid);
|
&data.proc_uid);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROC_MEM:
|
case GLIBTOP_CMND_PROC_MEM:
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
memcpy (&pid, parameter, sizeof (pid_t));
|
||||||
#if GLIBTOP_SUID_PROC_MEM
|
glibtop_get_proc_mem__r
|
||||||
glibtop_get_proc_mem_p
|
|
||||||
(&server, &data.proc_mem, pid);
|
(&server, &data.proc_mem, pid);
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_proc_mem),
|
glibtop_output (sizeof (glibtop_proc_mem),
|
||||||
&data.proc_mem);
|
&data.proc_mem);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROC_TIME:
|
case GLIBTOP_CMND_PROC_TIME:
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
memcpy (&pid, parameter, sizeof (pid_t));
|
||||||
#if GLIBTOP_SUID_PROC_TIME
|
glibtop_get_proc_time__r
|
||||||
glibtop_get_proc_time_p
|
|
||||||
(&server, &data.proc_time, pid);
|
(&server, &data.proc_time, pid);
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_proc_time),
|
glibtop_output (sizeof (glibtop_proc_time),
|
||||||
&data.proc_time);
|
&data.proc_time);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROC_SIGNAL:
|
case GLIBTOP_CMND_PROC_SIGNAL:
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
memcpy (&pid, parameter, sizeof (pid_t));
|
||||||
#if GLIBTOP_SUID_PROC_SIGNAL
|
glibtop_get_proc_signal__r
|
||||||
glibtop_get_proc_signal_p
|
|
||||||
(&server, &data.proc_signal, pid);
|
(&server, &data.proc_signal, pid);
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_proc_signal),
|
glibtop_output (sizeof (glibtop_proc_signal),
|
||||||
&data.proc_signal);
|
&data.proc_signal);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROC_KERNEL:
|
case GLIBTOP_CMND_PROC_KERNEL:
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
memcpy (&pid, parameter, sizeof (pid_t));
|
||||||
#if GLIBTOP_SUID_PROC_KERNEL
|
glibtop_get_proc_kernel__r
|
||||||
glibtop_get_proc_kernel_p
|
|
||||||
(&server, &data.proc_kernel, pid);
|
(&server, &data.proc_kernel, pid);
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_proc_kernel),
|
glibtop_output (sizeof (glibtop_proc_kernel),
|
||||||
&data.proc_kernel);
|
&data.proc_kernel);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
break;
|
break;
|
||||||
case GLIBTOP_CMND_PROC_SEGMENT:
|
case GLIBTOP_CMND_PROC_SEGMENT:
|
||||||
memcpy (&pid, parameter, sizeof (pid_t));
|
memcpy (&pid, parameter, sizeof (pid_t));
|
||||||
#if GLIBTOP_SUID_PROC_SEGMENT
|
glibtop_get_proc_segment__r
|
||||||
glibtop_get_proc_segment_p
|
|
||||||
(&server, &data.proc_segment, pid);
|
(&server, &data.proc_segment, pid);
|
||||||
#endif
|
|
||||||
glibtop_output (sizeof (glibtop_proc_segment),
|
glibtop_output (sizeof (glibtop_proc_segment),
|
||||||
&data.proc_segment);
|
&data.proc_segment);
|
||||||
glibtop_output (0, NULL);
|
glibtop_output (0, NULL);
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
/* Prints error message and exits. */
|
/* Prints error message and exits. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_error_r (glibtop *server, char *format, ...)
|
glibtop_error__r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
|
@@ -21,80 +21,60 @@
|
|||||||
#include <glibtop/union.h>
|
#include <glibtop/union.h>
|
||||||
#include <glibtop/sysdeps.h>
|
#include <glibtop/sysdeps.h>
|
||||||
|
|
||||||
const unsigned long glibtop_server_features =
|
|
||||||
GLIBTOP_SUID_CPU +
|
|
||||||
GLIBTOP_SUID_MEM +
|
|
||||||
GLIBTOP_SUID_SWAP +
|
|
||||||
GLIBTOP_SUID_UPTIME +
|
|
||||||
GLIBTOP_SUID_LOADAVG +
|
|
||||||
GLIBTOP_SUID_SHM_LIMITS +
|
|
||||||
GLIBTOP_SUID_MSG_LIMITS +
|
|
||||||
GLIBTOP_SUID_SEM_LIMITS +
|
|
||||||
GLIBTOP_SUID_PROCLIST +
|
|
||||||
GLIBTOP_SUID_PROC_STATE +
|
|
||||||
GLIBTOP_SUID_PROC_UID +
|
|
||||||
GLIBTOP_SUID_PROC_MEM +
|
|
||||||
GLIBTOP_SUID_PROC_TIME +
|
|
||||||
GLIBTOP_SUID_PROC_SIGNAL +
|
|
||||||
GLIBTOP_SUID_PROC_KERNEL +
|
|
||||||
GLIBTOP_SUID_PROC_SEGMENT;
|
|
||||||
|
|
||||||
/* Checks which features are implemented. */
|
/* Checks which features are implemented. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_sysdeps_r (glibtop *server, glibtop_sysdeps *buf)
|
glibtop_get_sysdeps__r (glibtop *server, glibtop_sysdeps *buf)
|
||||||
{
|
{
|
||||||
glibtop_union data;
|
glibtop_union data;
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_sysdeps));
|
memset (buf, 0, sizeof (glibtop_sysdeps));
|
||||||
|
|
||||||
buf->features = glibtop_server_features;
|
|
||||||
|
|
||||||
/* Call all system dependent functions to check which values
|
/* Call all system dependent functions to check which values
|
||||||
* they return. */
|
* they return. */
|
||||||
|
|
||||||
glibtop_get_cpu_r (server, &data.cpu);
|
glibtop_get_cpu__r (server, &data.cpu);
|
||||||
buf->cpu = data.cpu.flags;
|
buf->cpu = data.cpu.flags;
|
||||||
|
|
||||||
glibtop_get_mem_r (server, &data.mem);
|
glibtop_get_mem__r (server, &data.mem);
|
||||||
buf->mem = data.mem.flags;
|
buf->mem = data.mem.flags;
|
||||||
|
|
||||||
glibtop_get_swap_r (server, &data.swap);
|
glibtop_get_swap__r (server, &data.swap);
|
||||||
buf->swap = data.swap.flags;
|
buf->swap = data.swap.flags;
|
||||||
|
|
||||||
glibtop_get_uptime_r (server, &data.uptime);
|
glibtop_get_uptime__r (server, &data.uptime);
|
||||||
buf->uptime = data.uptime.flags;
|
buf->uptime = data.uptime.flags;
|
||||||
|
|
||||||
glibtop_get_loadavg_r (server, &data.loadavg);
|
glibtop_get_loadavg__r (server, &data.loadavg);
|
||||||
buf->loadavg = data.loadavg.flags;
|
buf->loadavg = data.loadavg.flags;
|
||||||
|
|
||||||
glibtop_get_shm_limits_r (server, &data.shm_limits);
|
glibtop_get_shm_limits__r (server, &data.shm_limits);
|
||||||
buf->shm_limits = data.shm_limits.flags;
|
buf->shm_limits = data.shm_limits.flags;
|
||||||
|
|
||||||
glibtop_get_msg_limits_r (server, &data.msg_limits);
|
glibtop_get_msg_limits__r (server, &data.msg_limits);
|
||||||
buf->msg_limits = data.msg_limits.flags;
|
buf->msg_limits = data.msg_limits.flags;
|
||||||
|
|
||||||
glibtop_get_sem_limits_r (server, &data.sem_limits);
|
glibtop_get_sem_limits__r (server, &data.sem_limits);
|
||||||
buf->sem_limits = data.sem_limits.flags;
|
buf->sem_limits = data.sem_limits.flags;
|
||||||
|
|
||||||
glibtop_get_proclist_r (server, &data.proclist);
|
glibtop_get_proclist__r (server, &data.proclist);
|
||||||
buf->proclist = data.proclist.flags;
|
buf->proclist = data.proclist.flags;
|
||||||
|
|
||||||
glibtop_get_proc_state_r (server, &data.proc_state, 0);
|
glibtop_get_proc_state__r (server, &data.proc_state, 0);
|
||||||
buf->proc_state = data.proc_state.flags;
|
buf->proc_state = data.proc_state.flags;
|
||||||
|
|
||||||
glibtop_get_proc_uid_r (server, &data.proc_uid, 0);
|
glibtop_get_proc_uid__r (server, &data.proc_uid, 0);
|
||||||
buf->proc_uid = data.proc_uid.flags;
|
buf->proc_uid = data.proc_uid.flags;
|
||||||
|
|
||||||
glibtop_get_proc_mem_r (server, &data.proc_mem, 0);
|
glibtop_get_proc_mem__r (server, &data.proc_mem, 0);
|
||||||
buf->proc_mem = data.proc_mem.flags;
|
buf->proc_mem = data.proc_mem.flags;
|
||||||
|
|
||||||
glibtop_get_proc_time_r (server, &data.proc_time, 0);
|
glibtop_get_proc_time__r (server, &data.proc_time, 0);
|
||||||
buf->proc_time = data.proc_time.flags;
|
buf->proc_time = data.proc_time.flags;
|
||||||
|
|
||||||
glibtop_get_proc_kernel_r (server, &data.proc_kernel, 0);
|
glibtop_get_proc_kernel__r (server, &data.proc_kernel, 0);
|
||||||
buf->proc_kernel = data.proc_kernel.flags;
|
buf->proc_kernel = data.proc_kernel.flags;
|
||||||
|
|
||||||
glibtop_get_proc_segment_r (server, &data.proc_segment, 0);
|
glibtop_get_proc_segment__r (server, &data.proc_segment, 0);
|
||||||
buf->proc_segment = data.proc_segment.flags;
|
buf->proc_segment = data.proc_segment.flags;
|
||||||
}
|
}
|
||||||
|
@@ -24,43 +24,43 @@
|
|||||||
/* Wrappers to malloc, calloc, realloc ... */
|
/* Wrappers to malloc, calloc, realloc ... */
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_malloc_r (glibtop *server, size_t size)
|
glibtop_malloc__r (glibtop *server, size_t size)
|
||||||
{
|
{
|
||||||
void *buf = malloc (size);
|
void *buf = malloc (size);
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
glibtop_error_r (server, _("malloc %d bytes: %s"),
|
glibtop_error__r (server, _("malloc %d bytes: %s"),
|
||||||
size, strerror (errno));
|
size, strerror (errno));
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_calloc_r (glibtop *server, size_t nmemb, size_t size)
|
glibtop_calloc__r (glibtop *server, size_t nmemb, size_t size)
|
||||||
{
|
{
|
||||||
void *buf = calloc (nmemb, size);
|
void *buf = calloc (nmemb, size);
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
glibtop_error_r (server, _("calloc %d block (%d bytes each): %s"),
|
glibtop_error__r (server, _("calloc %d block (%d bytes each): %s"),
|
||||||
nmemb, size, strerror (errno));
|
nmemb, size, strerror (errno));
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_realloc_r (glibtop *server, void *ptr, size_t size)
|
glibtop_realloc__r (glibtop *server, void *ptr, size_t size)
|
||||||
{
|
{
|
||||||
void *buf = realloc (ptr, size);
|
void *buf = realloc (ptr, size);
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
glibtop_error_r (server, _("realloc %d bytes: %s"),
|
glibtop_error__r (server, _("realloc %d bytes: %s"),
|
||||||
size, strerror (errno));
|
size, strerror (errno));
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_free_r (glibtop *server, void *ptr)
|
glibtop_free__r (glibtop *server, void *ptr)
|
||||||
{
|
{
|
||||||
if (ptr) free (ptr);
|
if (ptr) free (ptr);
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_cpu (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_CPU; i++)
|
for (i = 0; i < GLIBTOP_MAX_CPU; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_cpu [i]),
|
gh_list (gh_str02scm (glibtop_names_cpu [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_cpu (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_CPU; i++)
|
for (i = 0; i < GLIBTOP_MAX_CPU; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_cpu [i]),
|
gh_list (gh_str02scm (glibtop_types_cpu [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_cpu (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_CPU; i++)
|
for (i = 0; i < GLIBTOP_MAX_CPU; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_cpu [i])),
|
(glibtop_labels_cpu [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_cpu (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_CPU; i++)
|
for (i = 0; i < GLIBTOP_MAX_CPU; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_cpu [i])),
|
(glibtop_descriptions_cpu [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_loadavg (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_LOADAVG; i++)
|
for (i = 0; i < GLIBTOP_MAX_LOADAVG; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_loadavg [i]),
|
gh_list (gh_str02scm (glibtop_names_loadavg [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_loadavg (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_LOADAVG; i++)
|
for (i = 0; i < GLIBTOP_MAX_LOADAVG; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_loadavg [i]),
|
gh_list (gh_str02scm (glibtop_types_loadavg [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_loadavg (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_LOADAVG; i++)
|
for (i = 0; i < GLIBTOP_MAX_LOADAVG; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_loadavg [i])),
|
(glibtop_labels_loadavg [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_loadavg (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_LOADAVG; i++)
|
for (i = 0; i < GLIBTOP_MAX_LOADAVG; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_loadavg [i])),
|
(glibtop_descriptions_loadavg [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_mem (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_MEM; i++)
|
for (i = 0; i < GLIBTOP_MAX_MEM; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_mem [i]),
|
gh_list (gh_str02scm (glibtop_names_mem [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_mem (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_MEM; i++)
|
for (i = 0; i < GLIBTOP_MAX_MEM; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_mem [i]),
|
gh_list (gh_str02scm (glibtop_types_mem [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_mem (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_MEM; i++)
|
for (i = 0; i < GLIBTOP_MAX_MEM; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_mem [i])),
|
(glibtop_labels_mem [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_mem (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_MEM; i++)
|
for (i = 0; i < GLIBTOP_MAX_MEM; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_mem [i])),
|
(glibtop_descriptions_mem [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_msg_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_MSG_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_MSG_LIMITS; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_msg_limits [i]),
|
gh_list (gh_str02scm (glibtop_names_msg_limits [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_msg_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_MSG_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_MSG_LIMITS; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_msg_limits [i]),
|
gh_list (gh_str02scm (glibtop_types_msg_limits [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_msg_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_MSG_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_MSG_LIMITS; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_msg_limits [i])),
|
(glibtop_labels_msg_limits [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_msg_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_MSG_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_MSG_LIMITS; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_msg_limits [i])),
|
(glibtop_descriptions_msg_limits [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_proc_kernel (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_KERNEL; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_KERNEL; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_proc_kernel [i]),
|
gh_list (gh_str02scm (glibtop_names_proc_kernel [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_proc_kernel (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_KERNEL; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_KERNEL; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_proc_kernel [i]),
|
gh_list (gh_str02scm (glibtop_types_proc_kernel [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_proc_kernel (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_KERNEL; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_KERNEL; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_proc_kernel [i])),
|
(glibtop_labels_proc_kernel [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_proc_kernel (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_KERNEL; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_KERNEL; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_proc_kernel [i])),
|
(glibtop_descriptions_proc_kernel [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -34,10 +34,10 @@ glibtop_guile_names_proclist (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROCLIST; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROCLIST; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_proclist [i]),
|
gh_list (gh_str02scm (glibtop_names_proclist [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -51,10 +51,10 @@ glibtop_guile_types_proclist (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROCLIST; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROCLIST; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_proclist [i]),
|
gh_list (gh_str02scm (glibtop_types_proclist [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -68,11 +68,11 @@ glibtop_guile_labels_proclist (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROCLIST; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROCLIST; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_proclist [i])),
|
(glibtop_labels_proclist [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -86,11 +86,11 @@ glibtop_guile_descriptions_proclist (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROCLIST; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROCLIST; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_proclist [i])),
|
(glibtop_descriptions_proclist [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_proc_mem (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_MEM; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_MEM; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_proc_mem [i]),
|
gh_list (gh_str02scm (glibtop_names_proc_mem [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_proc_mem (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_MEM; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_MEM; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_proc_mem [i]),
|
gh_list (gh_str02scm (glibtop_types_proc_mem [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_proc_mem (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_MEM; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_MEM; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_proc_mem [i])),
|
(glibtop_labels_proc_mem [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_proc_mem (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_MEM; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_MEM; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_proc_mem [i])),
|
(glibtop_descriptions_proc_mem [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_proc_segment (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_SEGMENT; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_SEGMENT; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_proc_segment [i]),
|
gh_list (gh_str02scm (glibtop_names_proc_segment [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_proc_segment (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_SEGMENT; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_SEGMENT; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_proc_segment [i]),
|
gh_list (gh_str02scm (glibtop_types_proc_segment [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_proc_segment (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_SEGMENT; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_SEGMENT; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_proc_segment [i])),
|
(glibtop_labels_proc_segment [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_proc_segment (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_SEGMENT; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_SEGMENT; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_proc_segment [i])),
|
(glibtop_descriptions_proc_segment [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_proc_signal (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_SIGNAL; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_SIGNAL; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_proc_signal [i]),
|
gh_list (gh_str02scm (glibtop_names_proc_signal [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_proc_signal (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_SIGNAL; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_SIGNAL; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_proc_signal [i]),
|
gh_list (gh_str02scm (glibtop_types_proc_signal [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_proc_signal (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_SIGNAL; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_SIGNAL; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_proc_signal [i])),
|
(glibtop_labels_proc_signal [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_proc_signal (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_SIGNAL; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_SIGNAL; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_proc_signal [i])),
|
(glibtop_descriptions_proc_signal [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_proc_state (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_STATE; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_STATE; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_proc_state [i]),
|
gh_list (gh_str02scm (glibtop_names_proc_state [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_proc_state (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_STATE; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_STATE; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_proc_state [i]),
|
gh_list (gh_str02scm (glibtop_types_proc_state [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_proc_state (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_STATE; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_STATE; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_proc_state [i])),
|
(glibtop_labels_proc_state [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_proc_state (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_STATE; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_STATE; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_proc_state [i])),
|
(glibtop_descriptions_proc_state [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_proc_time (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_TIME; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_TIME; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_proc_time [i]),
|
gh_list (gh_str02scm (glibtop_names_proc_time [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_proc_time (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_TIME; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_TIME; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_proc_time [i]),
|
gh_list (gh_str02scm (glibtop_types_proc_time [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_proc_time (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_TIME; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_TIME; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_proc_time [i])),
|
(glibtop_labels_proc_time [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_proc_time (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_TIME; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_TIME; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_proc_time [i])),
|
(glibtop_descriptions_proc_time [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,10 +33,10 @@ glibtop_guile_names_proc_uid (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_UID; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_UID; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_names_proc_uid [i]),
|
gh_list (gh_str02scm (glibtop_names_proc_uid [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,10 @@ glibtop_guile_types_proc_uid (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_UID; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_UID; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (glibtop_types_proc_uid [i]),
|
gh_list (gh_str02scm (glibtop_types_proc_uid [i])),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -67,11 +67,11 @@ glibtop_guile_labels_proc_uid (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_UID; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_UID; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_labels_proc_uid [i])),
|
(glibtop_labels_proc_uid [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -85,11 +85,11 @@ glibtop_guile_descriptions_proc_uid (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_PROC_UID; i++)
|
for (i = 0; i < GLIBTOP_MAX_PROC_UID; i++)
|
||||||
list = gh_append2
|
list = gh_append
|
||||||
(list, gh_list
|
(gh_list (list,
|
||||||
(gh_str02scm (gettext
|
gh_list (gh_str02scm (gettext
|
||||||
(glibtop_descriptions_proc_uid [i])),
|
(glibtop_descriptions_proc_uid [i]))),
|
||||||
SCM_UNDEFINED));
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,8 +33,9 @@ glibtop_guile_names_sem_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SEM_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SEM_LIMITS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (glibtop_names_sem_limits [i]),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (glibtop_names_sem_limits [i])),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -48,8 +49,9 @@ glibtop_guile_types_sem_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SEM_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SEM_LIMITS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_types_sem_limits [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_types_sem_limits [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -63,8 +65,9 @@ glibtop_guile_labels_sem_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SEM_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SEM_LIMITS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_labels_sem_limits [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_labels_sem_limits [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -78,8 +81,9 @@ glibtop_guile_descriptions_sem_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SEM_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SEM_LIMITS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_descriptions_sem_limits [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_descriptions_sem_limits [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,8 +33,9 @@ glibtop_guile_names_shm_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SHM_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SHM_LIMITS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (glibtop_names_shm_limits [i]),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (glibtop_names_shm_limits [i])),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -48,8 +49,9 @@ glibtop_guile_types_shm_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SHM_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SHM_LIMITS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_types_shm_limits [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_types_shm_limits [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -63,8 +65,9 @@ glibtop_guile_labels_shm_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SHM_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SHM_LIMITS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_labels_shm_limits [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_labels_shm_limits [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -78,8 +81,9 @@ glibtop_guile_descriptions_shm_limits (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SHM_LIMITS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SHM_LIMITS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_descriptions_shm_limits [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_descriptions_shm_limits [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,9 @@ glibtop_guile_names_swap (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SWAP; i++)
|
for (i = 0; i < GLIBTOP_MAX_SWAP; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (glibtop_names_swap [i]), SCM_UNDEFINED));
|
list = gh_append (gh_list (list,
|
||||||
|
gh_list (gh_str02scm (glibtop_names_swap [i])),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -47,8 +49,9 @@ glibtop_guile_types_swap (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SWAP; i++)
|
for (i = 0; i < GLIBTOP_MAX_SWAP; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_types_swap [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_types_swap [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -62,8 +65,9 @@ glibtop_guile_labels_swap (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SWAP; i++)
|
for (i = 0; i < GLIBTOP_MAX_SWAP; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_labels_swap [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_labels_swap [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -77,8 +81,9 @@ glibtop_guile_descriptions_swap (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SWAP; i++)
|
for (i = 0; i < GLIBTOP_MAX_SWAP; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_descriptions_swap [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_descriptions_swap [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,8 +33,9 @@ glibtop_guile_names_sysdeps (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SYSDEPS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SYSDEPS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (glibtop_names_sysdeps [i]),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (glibtop_names_sysdeps [i])),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -48,8 +49,9 @@ glibtop_guile_types_sysdeps (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SYSDEPS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SYSDEPS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_types_sysdeps [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_types_sysdeps [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -63,8 +65,9 @@ glibtop_guile_labels_sysdeps (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SYSDEPS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SYSDEPS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_labels_sysdeps [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_labels_sysdeps [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -78,8 +81,9 @@ glibtop_guile_descriptions_sysdeps (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_SYSDEPS; i++)
|
for (i = 0; i < GLIBTOP_MAX_SYSDEPS; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_descriptions_sysdeps [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_descriptions_sysdeps [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,9 @@ glibtop_guile_names_uptime (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_UPTIME; i++)
|
for (i = 0; i < GLIBTOP_MAX_UPTIME; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (glibtop_names_uptime [i]), SCM_UNDEFINED));
|
list = gh_append (gh_list (list,
|
||||||
|
gh_list (gh_str02scm (glibtop_names_uptime [i])),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -47,8 +49,9 @@ glibtop_guile_types_uptime (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_UPTIME; i++)
|
for (i = 0; i < GLIBTOP_MAX_UPTIME; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_types_uptime [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_types_uptime [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -62,8 +65,9 @@ glibtop_guile_labels_uptime (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_UPTIME; i++)
|
for (i = 0; i < GLIBTOP_MAX_UPTIME; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_labels_uptime [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_labels_uptime [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -77,8 +81,9 @@ glibtop_guile_descriptions_uptime (void)
|
|||||||
list = gh_list (SCM_UNDEFINED);
|
list = gh_list (SCM_UNDEFINED);
|
||||||
|
|
||||||
for (i = 0; i < GLIBTOP_MAX_UPTIME; i++)
|
for (i = 0; i < GLIBTOP_MAX_UPTIME; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_str02scm (gettext (glibtop_descriptions_uptime [i])),
|
list = gh_append (gh_list (list,
|
||||||
SCM_UNDEFINED));
|
gh_list (gh_str02scm (gettext (glibtop_descriptions_uptime [i]))),
|
||||||
|
SCM_UNDEFINED));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -43,7 +43,10 @@ glibtop_guile_get_proclist (void)
|
|||||||
|
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
for (i = 0; i < proclist.number; i++)
|
for (i = 0; i < proclist.number; i++)
|
||||||
list = gh_append2 (list, gh_list (gh_ulong2scm ((unsigned long) ptr [i]), SCM_UNDEFINED));
|
list = gh_append
|
||||||
|
(gh_list (list,
|
||||||
|
gh_list (gh_ulong2scm ((unsigned long) ptr [i])),
|
||||||
|
SCM_UNDEFINED));
|
||||||
}
|
}
|
||||||
|
|
||||||
glibtop_free (ptr);
|
glibtop_free (ptr);
|
||||||
|
@@ -13,5 +13,3 @@ libgtop_sysdeps_la_SOURCES = init.c open.c close.c cpu.c mem.c swap.c \
|
|||||||
sem_limits.c proclist.c procstate.c procuid.c \
|
sem_limits.c proclist.c procstate.c procuid.c \
|
||||||
proctime.c procmem.c procsignal.c prockernel.c \
|
proctime.c procmem.c procsignal.c prockernel.c \
|
||||||
procsegment.c
|
procsegment.c
|
||||||
|
|
||||||
include_HEADERS = glibtop_server.h
|
|
||||||
|
@@ -24,5 +24,5 @@
|
|||||||
/* Closes pipe to gtop server. */
|
/* Closes pipe to gtop server. */
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_close_l (glibtop *server)
|
glibtop_close (glibtop *server)
|
||||||
{ }
|
{ }
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <glibtop/error.h>
|
|
||||||
#include <glibtop/cpu.h>
|
#include <glibtop/cpu.h>
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_cpu =
|
static const unsigned long _glibtop_sysdeps_cpu =
|
||||||
@@ -30,51 +29,26 @@ static const unsigned long _glibtop_sysdeps_cpu =
|
|||||||
|
|
||||||
/* Provides information about cpu usage. */
|
/* Provides information about cpu usage. */
|
||||||
|
|
||||||
#define FILENAME "/proc/stat"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
glibtop_get_cpu__r (glibtop *server, glibtop_cpu *buf)
|
||||||
{
|
{
|
||||||
char buffer [BUFSIZ], *tmp;
|
FILE *f;
|
||||||
int fd = 0, ret;
|
|
||||||
|
|
||||||
glibtop_init_r (&server, 0, 0);
|
glibtop_init__r (&server);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_cpu));
|
memset (buf, 0, sizeof (glibtop_cpu));
|
||||||
|
|
||||||
buf->flags = _glibtop_sysdeps_cpu;
|
buf->flags = _glibtop_sysdeps_cpu;
|
||||||
|
|
||||||
#ifdef GLIBTOP_CACHE_OPEN
|
f = fopen ("/proc/stat", "r");
|
||||||
fd = server->machine.fd_stat;
|
if (!f) return;
|
||||||
#endif
|
|
||||||
if (fd == 0) {
|
|
||||||
fd = open (FILENAME, O_RDONLY);
|
|
||||||
if (fd == -1)
|
|
||||||
glibtop_error_r (server, "open (%s): %s",
|
|
||||||
FILENAME, strerror (errno));
|
|
||||||
} else {
|
|
||||||
lseek (fd, 0, SEEK_SET);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = read (fd, buffer, BUFSIZ);
|
fscanf (f, "cpu %lu %lu %lu %lu\n",
|
||||||
if (ret == -1)
|
&buf->user, &buf->nice, &buf->sys, &buf->idle);
|
||||||
glibtop_error_r (server, "read (%s): %s",
|
|
||||||
FILENAME, strerror (errno));
|
|
||||||
|
|
||||||
tmp = strchr (buffer, '\n');
|
|
||||||
tmp = skip_token (tmp); /* "cpu" */
|
|
||||||
buf->user = strtoul (tmp, &tmp, 10);
|
|
||||||
buf->nice = strtoul (tmp, &tmp, 10);
|
|
||||||
buf->sys = strtoul (tmp, &tmp, 10);
|
|
||||||
buf->idle = strtoul (tmp, &tmp, 10);
|
|
||||||
|
|
||||||
buf->total = buf->user + buf->nice + buf->sys + buf->idle;
|
buf->total = buf->user + buf->nice + buf->sys + buf->idle;
|
||||||
|
|
||||||
buf->frequency = 100;
|
buf->frequency = 100;
|
||||||
|
|
||||||
#ifdef GLIBTOP_CACHE_OPEN
|
fclose (f);
|
||||||
server->machine.fd_stat = fd;
|
|
||||||
#else
|
|
||||||
close (fd);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@@ -1,56 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
|
||||||
This file is part of the Gnome Top Library.
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
|
||||||
|
|
||||||
The Gnome Top Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public License as
|
|
||||||
published by the Free Software Foundation; either version 2 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#ifndef __GLIBTOP_MACHINE_H__
|
|
||||||
#define __GLIBTOP_MACHINE_H__
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
|
||||||
|
|
||||||
#if _IN_LIBGTOP
|
|
||||||
|
|
||||||
static inline char *
|
|
||||||
skip_token(const char *p)
|
|
||||||
{
|
|
||||||
while (isspace(*p)) p++;
|
|
||||||
while (*p && !isspace(*p)) p++;
|
|
||||||
return (char *)p;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct _glibtop_machine glibtop_machine;
|
|
||||||
|
|
||||||
struct _glibtop_machine
|
|
||||||
{
|
|
||||||
pid_t last_pid;
|
|
||||||
int no_update;
|
|
||||||
int fd_stat, fd_meminfo, fd_loadavg;
|
|
||||||
char proc_stat [BUFSIZ], proc_statm [BUFSIZ];
|
|
||||||
char proc_status [BUFSIZ];
|
|
||||||
};
|
|
||||||
|
|
||||||
__END_DECLS
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,46 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
|
||||||
This file is part of the Gnome Top Library.
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
|
||||||
|
|
||||||
The Gnome Top Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Library General Public License as
|
|
||||||
published by the Free Software Foundation; either version 2 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The Gnome Top Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#ifndef __GLIBTOP_SERVER_H__
|
|
||||||
#define __GLIBTOP_SERVER_H__
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GLIBTOP_SUID_CPU 0
|
|
||||||
#define GLIBTOP_SUID_MEM 0
|
|
||||||
#define GLIBTOP_SUID_SWAP 0
|
|
||||||
#define GLIBTOP_SUID_UPTIME 0
|
|
||||||
#define GLIBTOP_SUID_LOADAVG 0
|
|
||||||
#define GLIBTOP_SUID_SHM_LIMITS 0
|
|
||||||
#define GLIBTOP_SUID_MSG_LIMITS 0
|
|
||||||
#define GLIBTOP_SUID_SEM_LIMITS 0
|
|
||||||
#define GLIBTOP_SUID_PROCLIST 0
|
|
||||||
#define GLIBTOP_SUID_PROC_STATE 0
|
|
||||||
#define GLIBTOP_SUID_PROC_UID 0
|
|
||||||
#define GLIBTOP_SUID_PROC_MEM 0
|
|
||||||
#define GLIBTOP_SUID_PROC_TIME 0
|
|
||||||
#define GLIBTOP_SUID_PROC_SIGNAL 0
|
|
||||||
#define GLIBTOP_SUID_PROC_KERNEL 0
|
|
||||||
#define GLIBTOP_SUID_PROC_SEGMENT 0
|
|
||||||
|
|
||||||
__END_DECLS
|
|
||||||
|
|
||||||
#endif
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user