Benoît Dejean
e12ac5f40c
Whitespace cleanup.
...
* loadavg.c: (glibtop_get_loadavg_s): Whitespace cleanup.
* ppp.c: (get_ISDN_stats), (is_ISDN_on): Replace g_malloc by an
array.
* glibtop_server.c: (get_pageshift):
* glibtop_server.h:
* procmem.c: (glibtop_init_proc_mem_s), (glibtop_get_proc_mem_s):
* procsegment.c: (glibtop_init_proc_segment_s),
(glibtop_get_proc_segment_s): Moved the pageshift calculation to
glibtop_server.[ch]
* procstate.c: (glibtop_get_proc_state_s):
* procuid.c: (glibtop_get_proc_uid_s):
* sysinfo.c: (init_sysinfo): Minor cleanups.
2004-06-18 07:24:58 +00:00
Benoît Dejean
09febbf67d
Cleaned. (proc_file_to_buffer): Uninlined.
...
* glibtop_server.h:
* glibtop_server.c: (get_scaled): Cleaned.
(proc_file_to_buffer): Uninlined.
* sysinfo.c: (init_sysinfo): Re-implemented.
2004-06-12 22:37:35 +00:00
Benoît Dejean
10d56bd5fc
Added to repository.
...
* Makefile.am:
* glibtop_server.c: Added to repository.
* glibtop_server.h: (get_scaled): Uninlined and moved it to glibtop_server.c.
(skip_token) : Fixed indentation.
* procmap.c: (glibtop_get_proc_map_s): Big cleanup. Better allocation
algorithm.
* procmem.c:
* procsegment.c: Added missing initializations.
* sem_limits.c:
* shm_limits.c: (glibtop_get_shm_limits_s):
* swap.c:
* uptime.c: Added missing const qualifiers.
* sysinfo.c: (init_sysinfo): Added missing 0 initialization.
Saved 1 gboolean :D.
2004-06-12 12:05:49 +00:00
Benoît Dejean
4fe066a430
Small clean up.
...
* glibtop_server.h: Small clean up.
2004-06-08 08:41:53 +00:00
Benoît Dejean
54fb1482ba
Removed. Cleaned. Replaced unsafe strcpy by g_strlcpy.
...
* glibtop_machine.h (skip_token): Removed.
* glibtop_server.h (skip_multiple_token): Cleaned.
* netload.c: (glibtop_get_netload_s): Replaced unsafe strcpy by g_strlcpy.
* procmap.c: (glibtop_get_proc_map_s): s/strncpy/g_strlcpy/.
* procstate.c: (glibtop_get_proc_state_s): Likewise.
* sysinfo.c: (init_sysinfo): Cleaned.
2004-06-06 22:07:44 +00:00
Benoît Dejean
0cdaaf1f62
Moved LINUX_VERSION macro to glibtop_server.h.
...
* glibtop_server.h:
* open.c:
* procuid.c: Moved LINUX_VERSION macro to glibtop_server.h.
* Changelog: Converted to UTF-8.
2004-05-26 11:51:09 +00:00
Benoît Dejean
0de7c96d2a
Added test for end of string. (get_scaled): Cleaned.
...
* glibtop_server.h (skip_line): Added test for end of string.
(get_scaled): Cleaned.
* cpu.c (glibtop_get_cpu_s):
* open.c (glibtop_open_s): Fixed SMP detection. Closes #142597 .
* uptime.c (glibtop_get_uptime_s): Added boot_time.
2004-05-25 14:33:46 +00:00
Bastien Nocera
79fdd6cd3b
Apply patch from Benoît Dejean <bnet@ifrance.com> to fix overflow issues
...
2003-12-23 Bastien Nocera <hadess@hadess.net >
* cpu.c: (glibtop_get_cpu_s):
* glibtop_server.h:
* loadavg.c: (glibtop_get_loadavg_s):
* mem.c: (glibtop_get_mem_s):
* netload.c: (glibtop_get_netload_s):
* prockernel.c: (glibtop_get_proc_kernel_s):
* procmem.c: (glibtop_get_proc_mem_s):
* procsegment.c: (glibtop_get_proc_segment_s):
* procsignal.c: (glibtop_get_proc_signal_s):
* proctime.c: (glibtop_get_proc_time_s):
* procuid.c: (glibtop_get_proc_uid_s):
* swap.c: (glibtop_get_swap_s): Apply patch from Benoît Dejean
<bnet@ifrance.com > to fix overflow issues using strtol
(Closes : #129881 )
2003-12-23 10:44:33 +00:00
Bastien Nocera
33fb22edd3
committing patch from Sebastien Bacher <seb128@debian.org> for Linux 2.6
...
2003-10-20 Bastien Nocera <hadess@hadess.net >
* glibtop_server.h:
* mem.c: (glibtop_get_mem_s):
* swap.c: (glibtop_get_swap_s): committing patch from Sebastien
Bacher <seb128@debian.org > for Linux 2.6 support (Closes : #104747 )
2003-10-20 20:41:16 +00:00
Bastien Nocera
b67e4c7f7d
- fixed compilation
2003-10-20 15:20:16 +00:00
Carlos Perelló Marín
4c8ae9e25c
Reverted libgtop changes. It's a common module and I should not modify it.
...
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.
2003-10-19 16:55:56 +00:00
Martin Baulig
7a7c6baf55
Moved all sysdeps code to the new libgtop-backends module.
...
2001-04-20 Martin Baulig <baulig@suse.de >
Moved all sysdeps code to the new libgtop-backends module.
* sysdeps/freesd/*: Removed.
* sysdeps/kernel/*: Removed.
* sysdeps/linux/*: Removed.
* sysdeps/osf1/*: Removed.
* sysdeps/solaris/*: Removed.
* sysdeps/stub/*: Removed.
* sysdeps/stub_suid/*: Removed.
* sysdeps/sun4/*: Removed.
2001-04-20 21:06:35 +00:00
Martin Baulig
00a32c887c
Make sure we close all open files.
2000-02-14 14:25:34 +00:00
Martin Baulig
f1a6e1ead8
The indentation in LibGTop was done with the following command:
...
find . -name \*.[ch] | xargs -i emacs -batch {} \
-l /gnome/compile/libgtop/misc/format.el -f save-buffer
December 26, 1999
Martin
1999-12-26 14:05:32 +00:00
Martin Baulig
4a01752467
Split netload into netload and netinfo.
...
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.
1999-11-28 18:17:21 +00:00
Martin Baulig
e5a7a5b0e5
New file. (glibtop_init_interface_names_s): New function.
...
1999-11-21 Martin Baulig <martin@home-of-linux.org >
* interfaces.c: New file.
(glibtop_init_interface_names_s): New function.
(glibtop_get_interface_names_s): New function.
1999-11-21 18:35:10 +00:00
Martin Baulig
cf611f9157
Set the copyright of LibGTop to the GNU General Public License.
...
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.
1999-02-23 11:47:35 +00:00
Martin Baulig
ce4f660965
Include a copy of the GNU Library General Public License here.
...
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.
1999-02-22 16:19:36 +00:00
Martin Baulig
1272d38f72
Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all __END_DECLS
...
1999-02-19 Martin Baulig <martin@home-of-linux.org >
* Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all
__END_DECLS with LIBGTOP_END_DECLS; remove all __P macros and
use real function prototypes.
1999-02-19 09:54:18 +00:00
Martin Baulig
1289b92d06
Added new features to get network load:
...
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 *));
1998-10-26 10:39:14 +00:00
Martin Baulig
616f4f4eaf
Small bug fixes.
1998-08-17 15:11:57 +00:00
Martin Baulig
59bb8d0ced
Major code cleanups. We now use open () and read ().
1998-08-16 18:46:53 +00:00
Martin Baulig
36657db940
Major code cleanups, we now use open () and read ().
1998-08-16 13:37:14 +00:00
Martin Baulig
9248d72018
Using text_rss',
shlib_rss', data_rss' and
dirty_size' instead of
...
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.
1998-08-12 20:16:24 +00:00
Martin Baulig
95b9d824ea
renamed all functions implementing features to '__s'.
...
* sysdeps/linux/*.c: renamed all functions implementing
features to '__s'.
1998-05-28 19:24:24 +00:00