summaryrefslogtreecommitdiff
path: root/src/daemon/slave.c
Commit message (Collapse)AuthorAgeFilesLines
* Use correct format specifiersAvinash Sonawane2022-03-281-4/+4
|
* Revert "Revert "Code clean up and add example""James Dominic P. Guana2021-04-231-0/+6
| | | | This reverts commit ea08151ae6582a438db76b738293a0194c964b88.
* Revert "Code clean up and add example"Michael Catanzaro2020-11-061-6/+0
| | | | This reverts commit 7396970afe2290488fd072612a650353dd13a16d.
* Code clean up and add exampleJames Dominic P. Guana2020-11-041-0/+6
|
* Renamed procdiskio to procioRobert Roth2017-05-121-4/+4
|
* Add slave proc_diskio handler.Benoit Dejean2017-02-251-0/+8
|
* Convert lots of fprintf(stderr, ...) to glibtop_debug*().Benoit Dejean2015-07-151-7/+3
|
* Fix alignment issue with proclist arguments unpacking.Benoit Dejean2015-07-151-3/+5
|
* Use LIBGTOP_ENABLE_DEBUG instead of undefined SLAVE_DEBUG.Benoit Dejean2015-06-261-2/+2
|
* Update old FSF address.Robert Roth2014-08-201-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=721514
* Removed noisy $Id$.Benoît Dejean2007-02-191-2/+0
| | | | | | | | | | 2007-02-20 Benoît Dejean <benoit@placenet.org> * *: Removed noisy $Id$. svn path=/trunk/; revision=2558
* remove unused file.James Henstridge2005-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-12-12 James Henstridge <james@jamesh.id.au> * doc/auto-macros.texi.in: remove unused file. * doc/libgtop2.texi: don't include auto-macros.texi. * doc/Makefile.am: don't build auto-macros.texi, since none of its macros are used in the documentation any more. * include/glibtop/global.h: don't include <config.h> from headers. * .../*.c: make sure <config.h> is the first thing included. * acinclude.m4: m4_include() libgtop-sysdeps.m4 rather than inlining it. * acinclude.m4, libgtop-sysdeps.m4: use third argument to AC_DEFINE() to set the comment. * configure.in: modernise a bit. * acconfig.h: remove file, since it is deprecated * autogen.sh: require automake 1.9 instead of 1.4.
* Removed some dead files. Don't install private headers.Benoît Dejean2005-02-151-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * backends/server/server.h: * configure.in: * glibtop.h: * include/glibtop/Makefile.am: * include/glibtop/gnuserv.h: * include/glibtop/open.h: * include/glibtop/read.h: * include/glibtop/read_data.h: * include/glibtop/types.h: * include/glibtop/write.h: * lib/close.c: * lib/init.c: * lib/lib.pl: * lib/open.c: * lib/parameter.c: * lib/read.c: * lib/read_data.c: * lib/write.c: * src/daemon/daemon.h: * src/daemon/io.c: * src/daemon/main.c: (handle_parent_connection): * src/daemon/slave.c: (handle_slave_connection), (handle_slave_command): * sysdeps/common/gnuslib.c: * sysdeps/solaris/glibtop_private.h: Removed some dead files. Don't install private headers.
* Misc. cleanups.Benoît Dejean2005-02-151-3/+3
| | | | | | | * daemon.h: * gnuserv.c: (syslog_message), (syslog_io_message): * main.c: (handle_parent_connection): * slave.c: (handle_slave_connection), (handle_slave_command): Misc. cleanups.
* Glibify a bit more. Closes #147618.Benoît Dejean2004-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/reference.texi: * include/glibtop/command.h: * include/glibtop/glib-arrays.h: * include/glibtop/proclist.h: * lib/glib-arrays.c: (glibtop_get_proclist_as_array_l): * lib/lib.pl: * scripts/c_types.pl: * src/daemon/main.c: (handle_parent_connection): * src/daemon/slave.c: (handle_slave_connection): * support/mkstemp.c: * sysdeps/aix/proclist.c: (glibtop_get_proclist_s): * sysdeps/freebsd/cpu.c: (glibtop_get_cpu_p): * sysdeps/freebsd/prockernel.c: (glibtop_get_proc_kernel_p): * sysdeps/freebsd/proclist.c: (glibtop_get_proclist_p): * sysdeps/freebsd/procmem.c: (glibtop_get_proc_mem_p): * sysdeps/kernel/proclist.c: (glibtop_get_proclist_s): * sysdeps/linux/proclist.c: (glibtop_get_proclist_s): * sysdeps/osf1/proclist.c: (glibtop_get_proclist_p): * sysdeps/solaris/proclist.c: (glibtop_get_proclist_s): * sysdeps/stub/proclist.c: (glibtop_get_proclist_s): * sysdeps/stub_suid/proclist.c: (glibtop_get_proclist_p): * sysdeps/sun4/proclist.c: (glibtop_get_proclist_p): Glibify a bit more. Closes #147618.
* whitespace clean up.Benoît Dejean2004-06-091-6/+6
| | | | * *.{c,h} : whitespace clean up.
* - replace all the xmalloc crap by glib memory management functionsBastien Nocera2003-10-201-3/+3
|
* Reverted libgtop changes. It's a common module and I should not modify it.Carlos Perelló Marín2003-10-191-0/+256
| | | | | | | | 2003-10-19 Carlos Perelló Marín <carlos@gnome.org> * support/*: Reverted libgtop changes. It's a common module and I should not modify it. * Added/removed files. Now the move should be done.
* Removed everything in this directory. This has been obsoleted by the newMartin Baulig2000-01-091-296/+0
| | | | | | | 2000-01-10 Martin Baulig <martin@home-of-linux.org> * src/daemon/: Removed everything in this directory. This has been obsoleted by the new server code in backends/server.
* The indentation in LibGTop was done with the following command:Martin Baulig1999-12-261-196/+198
| | | | | | | | find . -name \*.[ch] | xargs -i emacs -batch {} \ -l /gnome/compile/libgtop/misc/format.el -f save-buffer December 26, 1999 Martin
* Removed all remote communication support from LibGTop.Martin Baulig1999-12-231-1/+1
| | | | | | | | | | | | | | | | | 1999-12-23 Martin Baulig <martin@home-of-linux.org> Removed all remote communication support from LibGTop. * include/glibtop/gnuserv.h: Removed. * sysdeps/common/gnuslib.c: Removed. * src/daemon/Makefile.am: Don't build the `libgtop_daemon' binary any longer. * src/daemon/server_config.pl: Removed. * src/daemon/server_config.h.in: Removed. * src/daemon/server_config.h: Removed.
* "It compiles".Martin Baulig1999-12-121-3/+3
|
* Added `transport' and `protocol' argument to specify transport method andMartin Baulig1999-11-281-0/+2
| | | | | | | | | | | 1999-11-28 Martin Baulig <martin@home-of-linux.org> * include/glibtop/netload.h (glibtop_get_netload): Added `transport' and `protocol' argument to specify transport method and protocol. * include/glibtop/netinfo.h (glibtop_get_netinfo): Added `transport' argument to specify the transport method.
* Split netload into netload and netinfo.Martin Baulig1999-11-281-0/+6
| | | | | | | | | | | | | | | | 1999-11-28 Martin Baulig <martin@home-of-linux.org> Split netload into netload and netinfo. * include/glibtop/netinfo.h: New file. * include/glibtop/netload.h (glibtop_netload): Moved `if_flags', `mtu', `subnet' and `address' into the new `glibtop_netinfo'. * include/glibtop/sysdeps.h (GLIBTOP_SYSDEPS_NETINFO): Added. (glibtop_sysdeps): Added `netinfo. * include/glibtop/union.h (glibtop_union): Added `netinfo. * include/glibtop/command.h (GLIBTOP_CMND_NETINFO): Added.
* Added `instance' argument.Martin Baulig1999-11-281-2/+5
| | | | | | | 1999-11-28 Martin Baulig <martin@home-of-linux.org> * include/glibtop/interfaces.h (glibtop_get_interface_names): Added `instance' argument.
* Implement GLIBTOP_CMND_INTERFACE_NAMES.Martin Baulig1999-11-211-0/+20
|
* Added additional `int' parameter for the retval from the sysdepsMartin Baulig1999-10-241-24/+31
| | | | | | | 1999-10-24 Martin Baulig <martin@home-of-linux.org> * io.c (do_output): Added additional `int' parameter for the retval from the sysdeps functions.
* Fixed all warnings.Martin Baulig1999-07-301-7/+7
|
* Remove the `GLIBTOP_SYSDEPS_FEATURES' and `GLIBTOP_SYSDEPS_POINTER_SIZE'Martin Baulig1999-05-281-2/+1
| | | | | | | | 1999-05-28 Martin Baulig <baulig@Stud.Informatik.Uni-Trier.DE> * include/glibtop/sysdeps.h: Remove the `GLIBTOP_SYSDEPS_FEATURES' and `GLIBTOP_SYSDEPS_POINTER_SIZE' constants and let numbering start at zero for `GLIBTOP_SYSDEPS_CPU'.
* Use `(1L << feature)' instead of `(1 << feature)' to avoid problemsMartin Baulig1999-05-061-1/+1
| | | | with integer overflows when we add more fields.
* Added `pointer_size' which is the number of bits of a `void *'.Martin Baulig1999-05-061-0/+1
| | | | | | | 1999-05-06 Martin Baulig <martin@home-of-linux.org> * include/glibtop/sysdeps.h (glibtop_sysdeps): Added `pointer_size' which is the number of bits of a `void *'.
* Set the copyright of LibGTop to the GNU General Public License.Martin Baulig1999-02-231-14/+16
| | | | | | | | | 1999-02-22 Martin Baulig <martin@home-of-linux.org> Set the copyright of LibGTop to the GNU General Public License. * copyright.txt: Set the year to 1998-99 and pretty-format it a little bit. Same in all C source and header files.
* Small fix.Martin Baulig1998-12-091-1/+2
|
* `sysdeps.flags' should be a mask telling which fields are valid,Martin Baulig1998-11-021-0/+2
| | | | so we set it to `(sysdeps.features | (1 << GLIBTOP_SYSDEPS_FEATURES))'.
* Added new features to get network load:Martin Baulig1998-10-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | | typedef struct _glibtop_netload glibtop_netload; struct _glibtop_netload { u_int64_t flags, mtu, /* GLIBTOP_NETLOAD_MTU */ address, /* GLIBTOP_NETLOAD_ADDRESS */ packets_in, /* GLIBTOP_NETLOAD_PACKETS_IN */ packets_out, /* GLIBTOP_NETLOAD_PACKETS_OUT */ bytes_in, /* GLIBTOP_NETLOAD_BYTES_IN */ bytes_out, /* GLIBTOP_NETLOAD_BYTES_OUT */ errors_in, /* GLIBTOP_NETLOAD_ERRORS_IN */ errors_out, /* GLIBTOP_NETLOAD_ERRORS_OUT */ collisions; /* GLIBTOP_NETLOAD_COLLISIONS */ }; Returns network load of the given interface, it is specified as string like `isppp' or `ippp0': extern void glibtop_get_netload_l __P((glibtop *, glibtop_netload *, const char *));
* Added new feature (proc_args) to get command line arguments:Martin Baulig1998-10-261-1/+16
| | | | | | | | | | | | | | | | typedef struct _glibtop_proc_args glibtop_proc_args; struct _glibtop_proc_args { u_int64_t flags, size; /* GLIBTOP_PROC_ARGS_SIZE */ }; Returns a string containing all command line arguments of the process, the `unsigned' parameter is the maximum length of this string; if it is zero then no limit will be set. extern const char *glibtop_get_proc_args_l __P((glibtop *, glibtop_proc_args *, pid_t, unsigned));
* Added new feature to get PPP/ISDN support:Martin Baulig1998-10-251-0/+8
| | | | | | | | | | | | | | | | | | enum { GLIBTOP_PPP_STATE_UNKNOWN = 0, GLIBTOP_PPP_STATE_HANGUP, GLIBTOP_PPP_STATE_ONLINE }; struct _glibtop_ppp { u_int64_t flags, state, /* GLIBTOP_PPP_STATE */ bytes_in, /* GLIBTOP_PPP_BYTES_IN */ bytes_out; /* GLIBTOP_PPP_BYTES_OUT */ }; Currently only implemented in the FreeBSD port with ISDN via I4B. - Martin
* Removed G_GNUC_UNUSED.Martin Baulig1998-10-061-6/+6
|
* More G_GNUC_UNUSED fun.Martin Baulig1998-10-041-6/+7
|
* New file. Added definition of `proc_map'.Martin Baulig1998-08-101-0/+12
| | | | | | | 1998-08-10 Martin Baulig <martin@home-of-linux.org> * include/glibtop/procmap.h (glibtop_proc_map): New file. * features.def: Added definition of `proc_map'.
* Changed format of this file to support multiple arguments to be passed toMartin Baulig1998-08-091-3/+4
| | | | | | | | | | 1998-08-09 Martin Baulig <martin@home-of-linux.org> * features.def: Changed format of this file to support multiple arguments to be passed to a function. * include/glibtop/proclist.h: `glibtop_get_proclist' now takes two more arguments `method' and `param'.
* Minor server/daemon cleanups; reading sysdeps from server now working.Martin Baulig1998-08-081-0/+6
|
* Removed. New files. Added `libgtop_server'; this has been moved here fromMartin Baulig1998-08-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 1998-08-07 Martin Baulig <martin@home-of-linux.org> * src/server: Removed. * src/daemon/{server, version}.c: New files. * src/daemon/Makefile.am: Added `libgtop_server'; this has been moved here from `src/server' since it shares some source code files with the `libgtop_daemon'. * LIBGTOP-VERSION: Added `LIBGTOP_SERVER_VERSION'. * src/daemon/gnuserv.c, lib/open.c: Improved version check between client and server. * include/glibtop/output.h: Removed. * sysdeps/stub_suid: New directory. This is mainly used as example for people porting libgtop to other systems. * sysdeps/common/sysdeps_suid.c: New file. Defines `glibtop_init_hook_p'. * sysdeps/osf1/*.c (glibtop_init_<no-suid-feature>_s): New functions. (glibtop_init_<suid-feature>_p): New functions.
* Summary of this long ChangeLog:Martin Baulig1998-07-221-8/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Splitted `libgtop_sysdeps.la' into `libgtop_sysdeps.la' and `libgtop_sysdeps_suid.la'. Everything that needs to be suid/sgid is in `libgtop_sysdeps_suid.la' and the rest in `libgtop_sysdeps.la'. The functions from `libgtop_sysdeps_suid.la' have the `_p' prefix and the ones from `libgtop_sysdeps.la' the `_s' prefix. The suid library uses `glibtop_open_p' and `glibtop_close_p', the normal one `glibtop_init_s' (found in lib/init.c), `glibtop_open_s' and `glibtop_close_s'. * Added `libgtop_suid_common.la' containing stuff from sysdeps/common that is required from the suid server (currently everything from error.c and xmalloc.c). This means, we can add some more stuff to `libgtop_common.la' without the risk that it may be dangerous in the suid server. * The ``library order'' is much clearer now: -> `libgtop.la' (from lib/) contains user-level stuff; all functions except `glibtop_init_r' have the `_l' suffix. -> `libgtop_common.la' (from sysdeps/common/) contains stuff that is common among the sysdeps directories. use anything from `libgtop_sysdeps.la' and `libgtop_sysdeps_suid.la'. -> `libgtop_sysdeps.la' (from sysdeps/<sysdeps_dir>/) contains everything from the sysdeps directory that doesn't need to be suid/sgid. -> `libgtop_suid_common.la' (from sysdeps/common/) is used from the suid server instead of `libgtop_common.la'. -> `libgtop_sysdeps_suid.la' (from sysdeps/<sysdeps_dir>/) contains everything from the sysdeps directory that needs to be in the suid server. * To summarize: the server is linked only with functions that need to be suid and everything else is linked only with functions that do not need to be suid. Martin 1998-07-22 Martin Baulig <martin@home-of-linux.org> * lib/init.c (glibtop_init_s): Added this init function of the sysdeps directory `libgtop_sysdeps.la'. * lib/open.c (glibtop_open_l): Unconditionally calling `glibtop_init_s' after server initialization. * lib/lib.awk: Removed references to functions from `libgtop_sysdeps_suid.la' to avoid undefined symbols. * sysdeps/stub/open.c (glibtop_open_s): Renamed this function from `glibtop_open_r'. * sysdeps/stub/close.c (glibtop_close_s): Renamed this function from `glibtop_close_l'. * sysdeps/kernel/open.c (glibtop_open_s): Renamed this function from `glibtop_open_r'. * sysdeps/kernel/close.c (glibtop_close_s): Renamed this function from `glibtop_close_l'. * sysdeps/linux/open.c (glibtop_open_s): Renamed this function from `glibtop_open_r'. * sysdeps/linux/close.c (glibtop_close_s): Renamed this function from `glibtop_close_l'. * sysdeps/osf1/Makefile.am (lib_LTLIBRARIES): Added `libgtop_sysdeps_suid.la' for the suid server. * sysdeps/osf1/open_suid.c (glibtop_open_p): New file. Contains all stuff that was formerly in `open.c'. * sysdeps/osf1/open.c: Moved everything from here into the new file `open_suid.c'. * sysdeps/osf1/open.c (glibtop_open_s): New function. * sysdeps/osf1/close_suid.c (glibtop_close_p): New file. * sysdeps/osf1/close.c (glibtop_close_s): New function. * sysdeps/osf1/*.c: Using the new init, open and close functions. * sysdeps/sun4/Makefile.am (lib_LTLIBRARIES): Added `libgtop_sysdeps_suid.la' for the suid server. * sysdeps/sun4/nosuid.c (glibtop_open_s, glibtop_close_s): New file * sysdeps/sun4/*.c: All functions now have the `_p' suffix. * sysdeps/common/Makefile.am (lib_LTLIBRARIES): Added `libgtop_suid_common.la' which only contains stuff that is needed in the suid parts. * sysdeps/common/xmalloc.c: Using `glibtop_error_io_r' instead of `glibtop_error_r'. * sysdeps/{kernel, linux, osf1, sun4, stub}/init.c: Removed. `glibtop_init_s' has been moved into `lib/init.c' since it's the same in all the sysdeps directories. * src/server/main.c: It is now an error to request a feature that does not need the suid server. * src/proxy: Removed.
* New file.Martin Baulig1998-07-131-0/+155
1998-07-14 Martin Baulig <martin@home-of-linux.org> * src/daemon/slave.c: New file. * src/daemon/*.c: Done some more work on the daemon. * sysdeps/common/gnuslib.c: Removed IPC stuff. * include/glibtop/gnuserv.h: Removed IPC stuff. * include/glibtop/command.h (glibtop_response_unit): Added typedef for `struct _glibtop_response_unit'. * lib/Makefile.am: Using `$(top_srcdir)/features.def' instead of `$(top_builddir)/features.def'. * sysdeps/guile/Makefile.am: Using `$(top_srcdir)/features.def' instead of `$(top_builddir)/features.def'. * sysdeps/guile/names/Makefile.am: Dito. * sysdeps/stub/*.c: changed suffix of all functions from '_s' to '_r'; see also ChangeLog entry from Jun 6.