summaryrefslogtreecommitdiff
path: root/examples/first.c
Commit message (Collapse)AuthorAgeFilesLines
* Update old FSF address.Robert Roth2014-08-201-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=721514
* Fixed warnings about proclist returning pid_t.Benoît Dejean2008-04-031-2/+2
| | | | svn path=/trunk/; revision=2728
* 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/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* whitespace clean up.Benoît Dejean2004-06-091-5/+5
| | | | * *.{c,h} : whitespace clean up.
* Added missing #include. Converted to UTF-8.Benoît Dejean2004-05-281-0/+2
| | | | | * examples/*: Added missing #include. * ChangeLog: Converted to UTF-8.
* - fixed compilationBastien Nocera2003-10-201-1/+0
|
* - replace all the xmalloc crap by glib memory management functionsBastien Nocera2003-10-201-4/+4
|
* Reverted libgtop changes. It's a common module and I should not modify it.Carlos Perelló Marín2003-10-191-0/+575
| | | | | | | | 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.
* The LibGTop examples have been moved into their own top-level moduleMartin Baulig1999-10-241-813/+0
| | | | | | | | | | | | 1999-10-24 Martin Baulig <martin@home-of-linux.org> The LibGTop examples have been moved into their own top-level module libgtop-examples. * examples/*: Removed. * configure.in: Removed all checks for the examples. * libgtop-sysdeps.m4: Removed --with-libgtop-examples parameter. * Makefile.am: Removed examples from the subdir list.
* Use LibGTop version conditionals so we can more easily merge the code intoMartin Baulig1999-05-271-0/+137
| | | | | | | 1999-05-28 Martin Baulig <martin@home-of-linux.org> * first.c, second.c: Use LibGTop version conditionals so we can more easily merge the code into LIBGTOP_STABLE_1_0.
* *** empty log message ***Martin Baulig1999-03-311-1/+1
|
* Added some new features.Martin Baulig1999-03-311-27/+115
| | | | | | | | | | | | | | | | | | | | | | | | | 1999-03-30 Martin Baulig <martin@home-of-linux.org> Added some new features. * (glibtop_uptime): Added `boot_time', boot time in seconds since the epoch. * (glibtop_proc_state): Changed `state' from char to unsigned. `uid' and `gid' are effective uid and gid; added comment. Added `ruid' and `rgid' for guaranteed-to-be-correct real uid/gid. For SMP systems: added `has_cpu', `processor' and `last_processor'. * (glibtop_proc_uid): Added suid, sgid, fsuid, fsgid, ngroups, groups. * (glibtop_proc_segment): Added start_data, end_data, start_brk, end_brk, start_mmap, arg_start, arg_end, env_start, env_end. * include/glibtop/procstate.h: Define some constants for the `state' field of glibtop_proc_state. * include/glibtop/prockernel.h: Define some constands for the `k_flags' field of glibtop_proc_kernel.
* *** empty log message ***Martin Baulig1999-03-301-3/+3
|
* *** empty log message ***Martin Baulig1999-03-241-15/+28
|
* *** empty log message ***Martin Baulig1999-03-231-3/+3
|
* Fixed a bug that caused a core dump when the sysdeps code does not returnMartin Baulig1999-03-171-3/+3
| | | | | | | 1999-03-17 Martin Baulig <martin@home-of-linux.org> * first.c, second.c: Fixed a bug that caused a core dump when the sysdeps code does not return all data.
* Set the copyright of LibGTop to the GNU General Public License.Martin Baulig1999-02-231-7/+7
| | | | | | | | | 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.
* Include a copy of the GNU Library General Public License here.Martin Baulig1999-02-221-13/+15
| | | | | | | | | | 1999-02-22 Martin Baulig <martin@home-of-linux.org> * COPYING.LIB: Include a copy of the GNU Library General Public License here. * copyright.txt: Set the year to 1998-99 and pretty-format it a little bit. Same in all C source and header files.
* Make the return value a `char *' instead of a `const char *'.Martin Baulig1998-12-091-1/+16
| | | | | | | 1998-12-09 Martin Baulig <martin@home-of-linux.org> * include/glibtop/procargs.h (glibtop_get_proc_args): Make the return value a `char *' instead of a `const char *'.
* New example.Martin Baulig1998-11-021-3/+11
| | | | | | 1998-11-02 Martin Baulig <martin@home-of-linux.org> * sysdeps.c: New example.
* Added new feature (proc_args) to get command line arguments:Martin Baulig1998-10-261-1/+34
| | | | | | | | | | | | | | | | 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/+11
| | | | | | | | | | | | | | | | | | 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-1/+1
|
* More G_GNUC_UNUSED fun.Martin Baulig1998-10-041-1/+1
|
* Fixed some compiler warnings.Martin Baulig1998-08-251-53/+41
| | | | | | 1998-08-25 Martin Baulig <martin@home-of-linux.org> * first.c, second.c, procmap.c: Fixed some compiler warnings.
* Added new fields `nr_running', `nr_tasks', `last_pid'. Added new fieldsMartin Baulig1998-08-161-3/+7
| | | | | | | | | 1998-08-16 Martin Baulig <martin@home-of-linux.org> * include/glibtop/loadavg.h (glibtop_loadavg): Added new fields `nr_running', `nr_tasks', `last_pid'. * features.def (loadavg): Added new fields `nr_running', `nr_tasks', `last_pid'.
* Using `text_rss', `shlib_rss', `data_rss' and `dirty_size' instead ofMartin Baulig1998-08-121-42/+45
| | | | | | | | | | | | | | | | | | | 1998-08-12 Martin Baulig <martin@home-of-linux.org> * include/glibtop/procsegment.h (glibtop_proc_segment): Using `text_rss', `shlib_rss', `data_rss' and `dirty_size' instead of `tsr', `lrs', `drs' and `dt'. New field `stack_rss'. * sysdeps/linux/procmem.c: Memory sizes now correctly in bytes. * sysdeps/linux/procsegment.c: Dito. * sysdeps/kernel/procsegment.c: Stack pages are reported via `stack_rss' and no longer count towards `data_rss' * kernel/table.h (table_proc_segment): Added `srs' field. * kernel/table21/module.c (TBL_PROC_SEGMENT): Added kernel support for this. * sysdeps/{linux, kernel, stub}/procmap.c: New files.
* Reverted changed made in last revision (1.21) of this file.Martin Baulig1998-08-121-30/+1
|
* New file. Added definition of `proc_map'.Martin Baulig1998-08-101-1/+30
| | | | | | | 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'.
* Added new fields `rtime' and `frequency'.Martin Baulig1998-08-101-6/+29
| | | | | | | 1998-08-10 Martin Baulig <martin@home-of-linux.org> * include/glibtop/proctime.h (glibtop_proc_time): Added new fields `rtime' and `frequency'.
* Renamed `wchan' field to `nwchan'; added `wchan' which is of type `charMartin Baulig1998-08-091-6/+9
| | | | | | | 1998-08-09 Martin Baulig <martin@home-of-linux.org> * include/glibtop/prockernel.h (glibtop_proc_kernel): Renamed `wchan' field to `nwchan'; added `wchan' which is of type `char [40]'.
* Changed format of this file to support multiple arguments to be passed toMartin Baulig1998-08-091-1/+1
| | | | | | | | | | 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'.
* On FreeBSD, printf () doesn't like '%Lx', '%Ld' and '%Lu', so we useMartin Baulig1998-08-081-164/+264
| | | | an expilcit cast to `unsigned long' and types `%lx' and `%ld'.
* Added `pagein' and `pageout'.Martin Baulig1998-08-011-2/+3
| | | | | | | | | | | 1998-08-01 Martin Baulig <martin@home-of-linux.org> * include/glibtop/swap.h (glibtop_swap): Added `pagein' and `pageout'. * kernel/table20/table.h: Removed. * kernel/table21/table.h: Removed. * kernel/table.h: Added. Things are now binary compatible between both kernel versions.
* Using `u_int64_t' instead of `unsigned long' and `long' to avoid problemsMartin Baulig1998-07-301-45/+45
| | | | | | | | 1998-07-30 Martin Baulig <martin@home-of-linux.org> * include/glibtop/*.h: Using `u_int64_t' instead of `unsigned long' and `long' to avoid problems when client is on a 32bit system and the server on a 64bit system.
* Changed type for `signal', `blocked', `sigignore' and `sigcatch' toMartin Baulig1998-07-231-3/+3
| | | | | | | | 1998-07-23 Martin Baulig <martin@home-of-linux.org> * include/glibtop/procsignal.h (glibtop_proc_signal): Changed type for `signal', `blocked', `sigignore' and `sigcatch' to `unsigned long long'.
* Summary of this long ChangeLog:Martin Baulig1998-07-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Added implementation of that feature.Martin Baulig1998-07-171-1/+1
| | | | | | | | | | | | 1998-07-17 Martin Baulig <baulig@Stud.Informatik.uni-trier.de> * sysdeps/sun4/proclist.c (glibtop_get_proclist_p): Added implementation of that feature. * sysdeps/sun4/proc_{uid,state}.c: Now working quite well. * sysdeps/sun4/proc_{mem,time,signal,kernel,segment}.c: Added some basic implementation; this isn't really working yet.
* Basically did some work on the new daemon. Things are still unstable.Martin Baulig1998-07-131-30/+32
| | | | | | | | | | | | | | | | | | | | | | | | | 1998-07-13 Martin Baulig <martin@home-of-linux.org> * glibtop.h: Fixed invocation of `glibtop_close_r'. * sysdeps/linux/procstate.c: Added missing `fclose'. * include/glibtop/gnuserv.h (UNIX_DOMAIN_SOCKETS): Defining. * include/glibtop/open.h (GLIBTOP_METHOD_UNIX): Added. * lib/init.c: Added new method `GLIBTOP_METHOD_UNIX'. * lib/open.c: Added support for Unix Domain Sockets. * lib/close.c: Now closing inet and unix connections. * lib/parameter.c (glibtop_set_parameter_l): You can now set the `method' and `features' fields. * src/daemon/server_config.h: New file. * src/daemon/{gnuserv.c, main.c}: More work on the server.
* No longer use `glibtop_machine.h' for Linux.Martin baulig1998-07-031-2/+21
| | | | | | | | | | | | | | | | | | | | | | | 1998-07-03 Martin baulig <martin@home-of-linux.org> * macros/gnome-libgtop-sysdeps.m4: No longer use `glibtop_machine.h' for Linux. * sysdeps/linux/glibtop_machine.h: Removed. * sysdeps/guile/guile.awk: Using `scm_append' instead of `gh_append'. * sysdeps/guile/names/guile-names.awk: dito. * sysdeps/linux/*.c: Using code from stable branch again. * include/glibtop/parameter.h: New file. * lib/parameter.c: New file. * lib/{open, init}.c: Done some more work on server initialization
* Some more daemon stuff.Martin Baulig1998-06-181-175/+175
|
* Removed declararion of table () function again.Martin Baulig1998-06-141-10/+0
|
* *** empty log message ***Martin Baulig1998-06-141-0/+2
|
* New directory. Contains some kernel code to implement a new system callMartin Baulig1998-06-131-0/+8
| | | | | | | | | | | | | | | | 1998-06-13 Martin Baulig <martin@home-of-linux.org> * kernel: New directory. Contains some kernel code to implement a new system call table () to fetch information directly from the Linux kernel. * sysdeps/kernel: New directory. Uses the table () function from the `kernel' directory to fetch things directly from the Linux kernel. * sysdeps/Makefile.am (DIST_SUBDIRS): Added `kernel'. * configure.in: Removed `build_CC' again.
* Minor fixes for SunOS.Martin Baulig1998-06-081-2/+0
|
* Disable optimize.Martin Baulig1998-06-071-30/+67
| | | | | | | | | | 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.
* #include <locale.h> for several files - FedericoArturo Espinosa1998-06-031-0/+2
|
* now using 'glibtop_init' instead of 'glibtop_init__r'.Martin Baulig1998-06-011-1/+1
| | | | | * examples/{first.c, second.c}: now using 'glibtop_init' instead of 'glibtop_init__r'.
* added `locked' member to this structure for SunOS.Martin Baulig1998-05-241-2/+2
| | | | | * include/glibtop/mem.h (_glibtop_mem): added `locked' member to this structure for SunOS.