2004-09-23 Benoît Dejean * glibtop_server.c: * glibtop_server.h: * procmem.c: (glibtop_get_proc_mem_s): * procsegment.c: (glibtop_get_proc_segment_s): Removed get_pageshift(). Every one can affort a * instead of a >>, no need for this kind of non-reentrant optimization. Saved 144B (obviously perfect cleanup ;) 2004-09-22 Benoît Dejean * glibtop_server.c: Removed #warning, my gcc is not buggy anymore. 2004-09-21 Benoît Dejean * fsusage.c: (linux_2_6_0), (linux_2_4_0), (_glibtop_linux_get_fsusage_read_write): Back to previous version. Now set .flags correctly. 2004-09-19 Benoît Dejean * fsusage.c: (linux_2_6_0), (linux_2_4_0), (_glibtop_linux_get_fsusage_read_write): Updated to match new prototype. 2004-09-19 Benoît Dejean * mem.c: (glibtop_get_mem_s): Added missing memset( , 0, ). 2004-08-03 Benoît Dejean * glibtop_server.h: Added next_token(). Changed skip_token(), i hope it won't break any bad code. * procstate.c: (glibtop_get_proc_state_s): Used next_token. * proctime.c: (glibtop_get_proc_time_s): Implemented .start_time the way it ought to be. Clean ups 2004-07-22 Benoît Dejean * netload.c: (glibtop_get_netload_s): Fixed leak. * proctime.c: (glibtop_get_proc_time_s): Don't set .timeout anymore. 2004-07-17 Benoît Dejean * Makefile.am: * fsusage.c: (linux_2_6_0), (linux_2_4_0), (_glibtop_linux_get_fsusage_read_write): Added to repository. WIP. * glibtop_server.h: LINUX_VERSION -> LINUX_VERSION_CODE * netload.c: (glibtop_get_netload_s): Cleanups. Added support for hardware address. s/LINUX_VERSION/LINUX_VERSION_CODE/ * open.c: (get_linux_version): s/LINUX_VERSION/LINUX_VERSION_CODE/ * procmap.c: (glibtop_get_proc_map_s): glibify: used GArray * procuid.c: (glibtop_get_proc_uid_s): s/LINUX_VERSION/LINUX_VERSION_CODE/. Used Linux MKDEV. 2004-07-15 Benoît Dejean * procstate.c: (glibtop_get_proc_state_s): Wake, we're libgtop2.7.x, lets get rid of old buf->state format. Now using bitfield instead letters. 2004-07-07 Benoît Dejean * procargs.c: (glibtop_get_proc_args_s): Fixed. error is now correctly set to NULL before is's used. Fixed max_len behaviour. 2004-07-03 Benoît Dejean * sysinfo.c: (init_sysinfo): Removed useless memset. 2004-07-03 Benoît Dejean * glibtop_server.h: * glibtop_server.c: (try_file_to_buffer), (file_to_buffer): Added. These functions are commonly used. Misc cleanups. * cpu.c: (glibtop_get_cpu_s): * loadavg.c: (glibtop_get_loadavg_s): * mem.c: (glibtop_get_mem_s): * open.c: (glibtop_open_s): * swap.c: (glibtop_get_swap_s): * sysinfo.c: (init_sysinfo): * uptime.c: (glibtop_get_uptime_s): Replaced open/read/close by file_to_buffer(). 2004-06-18 Benoît Dejean * 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 Benoît Dejean * netload.c: (glibtop_get_netload_s): Implemented new IPv6 feature. 2004-06-13 Benoît Dejean * procargs.c: (glibtop_get_proc_args_s): Replaced by g_file_get_contents. 2004-06-13 Benoît Dejean * glibtop_server.h: * glibtop_server.c: (get_scaled): Cleaned. (proc_file_to_buffer): Uninlined. * sysinfo.c: (init_sysinfo): Re-implemented. Fixed segfault on SMP. Stores keys in cpuinfo->labels. 2004-06-12 Benoît Dejean * 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-08 Benoît Dejean * procuid.c: (glibtop_get_proc_uid_s): Whitespace clean up. 2004-06-08 Benoît Dejean * glibtop_server.h: Small clean up. 2004-06-07 Benoît Dejean * 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-05-26 Benoît Dejean * cpu.c: (glibtop_get_cpu_s): Cleaned whitespaces. * open.c: (get_linux_version), (glibtop_open_s): Removed get_linux_version() Cleaned. Remove static struct utsname. 2004-05-26 Benoît Dejean * glibtop_server.h: * open.c: * procuid.c: Moved LINUX_VERSION macro to glibtop_server.h. * Changelog: Converted to UTF-8. 2004-05-19 Benoît Dejean * 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-03-09 Bastien Nocera * cpu.c: (glibtop_get_cpu_s): fixup CPU usage calculation on 2.6 kernels (patch by Benoît Dejean ) (Closes: #134252) 2004-03-04 Bastien Nocera * ppp.c: use a config.h define instead of copying the values in the file (Closes: #126504) 2004-02-02 Sebastien Bacher * sysdeps/linux/mem.c: (glibtop_get_mem_s): patch from Benoît Dejean to fix libtop_mem.used and glibtop_mem.shared values (Closes: #129863). 2003-12-23 Bastien Nocera * 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 to fix overflow issues using strtol (Closes: #129881) 2003-12-23 Bastien Nocera * mem.c: (glibtop_get_mem_s): Fix calculation of used memory, patch by Benoît Dejean, (Closes: #129863) 2003-12-07 Jon K Hellan * ppp.c: Copy needed defines from linux/isdn.h instead of including it, unbreaking build with linux 2.6 kernel headers. 2003-10-21 Bastien Nocera * Makefile.am: install only one library, libgtop-2.0 Fix build-time warnings due to the redefinition of guint64 2003-10-20 Bastien Nocera * glibtop_server.h: * mem.c: (glibtop_get_mem_s): * swap.c: (glibtop_get_swap_s): committing patch from Sebastien Bacher for Linux 2.6 support (Closes: #104747) 2003-10-20 Bastien Nocera * cpu.c: (glibtop_get_cpu_s): * procmap.c: (glibtop_get_proc_map_s): s/u_int64_t/guint64/ 2003-10-20 Bastien Nocera * glibtop_machine.h: * glibtop_server.h: * ppp.c: * procargs.c: (glibtop_get_proc_args_s): * proclist.c: * procmap.c: fixed compilation 2003-10-20 Bastien Nocera * ppp.c: (get_ISDN_stats): * procargs.c: (glibtop_get_proc_args_s): * proclist.c: (glibtop_get_proclist_s): * procmap.c: (glibtop_get_proc_map_s): replace all the xmalloc crap by glib memory management functions 2001-10-17 Abel Cheung * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop. 2001-02-13 Martin Baulig Fix bug #14076. * open.c (glibtop_open_s): Check whether /proc/1/cpu exists to detect SMP support rather than reading /proc/stat; on Linux 2.4.x, /proc/stat has "cpu" and "cpu0" entries even for non-SMP systems. 2000-01-22 Martin Baulig * procargs.c (glibtop_get_proc_args_s): Set correct `buf->size' and `buf->flags' fields when `max_length' was given. Fixes #5183. 1999-11-28 Martin Baulig * procstate.c (glibtop_get_procstate_s): Stat "/proc/" instead of "/proc//state" to get `uid' and `gid'. Thanks to Jason Becker for pointing out that GTop reported wrong uid's. 1999-10-19 Martin Baulig * uptime.c (glibtop_get_uptime_s): Don't cast uptime and idletime to float as suggested by John Kodis. 1999-07-29 Martin Baulig * proctime.c (glibtop_get_proctime_s): Don't provide `rtime' any longer since we must not use `rtime = utime + stime'. 1999-02-20 Martin Baulig * netload.c: Don't include for libc5 systems since it is no longer required and makes trouble on Slakware. 1999-01-06 Martin Baulig * netload.c (glibtop_get_netload_s): Use `server->os_version_code' instead of GLIBTOP_LINUX_VERSION_CODE. 1999-01-06 Martin Baulig Unconditionally enable SMP support for linux. * open.c (_glibtop_open_s): Always determine the number of CPUs we have here, not only when SMP support was enabled. * cpu.c, proctime.c: Use `server->ncpu' to determine whether to enable SMP support. 1998-12-28 Martin Baulig * netload.c: When using glibc, don't include any longer but all headers that were included there; we only needed this file to get those headers. 1998-12-09 Martin Baulig * procargs.c (glibtop_get_proc_args_s): Added implementation for this function. 1998-12-03 Martin Baulig * netload.c: No longer include , but use GLIBTOP_LINUX_VERSION_CODE which is set by configure instead. Define _GLIBTOP_IP_FW_ACCTIN and _GLIBTOP_IP_FW_ACCTOUT here and use them instead of IP_FW_F_ACCTIN and IP_FW_F_ACCTOUT. 1998-11-30 Martin Baulig * netload.c: Use correct header files both for libc5 and glibc. With Linux >= 2.1.114 we no longer use IP accounting since it already has byte counts in /proc/net/dev. 1998-11-22 Martin Baulig * netload.c (glibtop_get_netload_s): Added implementation for this function. The code here is smart enough to use /proc/net/ip_acct if IP accounting is enabled in the kernel and activated on the requested device and /proc/net/dev if not. To get separate statistics for received and transmitted packets you need to use two accounting rules: ipfwadm -A in -a -P all -W eth0 ipfwadm -A out -a -P all -W eth0 But before you activate IP accounting, please have a look at /proc/net/dev - if if already contains byte counters, then don't use IP accounting. 1998-10-28 Martin Baulig * ppp.c: Added code for ISDN here. 1998-10-26 Martin Baulig * netload.c: New file. Currently empty. 1998-10-26 Martin Baulig * procargs.c: New file. Currently empty. 1998-10-25 Martin Baulig * ppp.c: New file. Currently empty. 1998-10-11 Martin Baulig * procdata.c: Removed this obsolete file. 1998-10-02 Martin Baulig * proclist.c (glibtop_init_proclist_s): You can now also use the `GLIBTOP_EXCLUDE_*' flags for the `which' parameter. 1998-10-01 Martin Baulig * proclist.c (glibtop_init_proclist_s): Honor the `which' parameter to select which processes to fetch. 1998-09-12 Martin Baulig * sysinfo.c: New file. 1998-09-09 Martin Baulig * proctime.c (glibtop_get_proc_time_s): Added SMP support. * open.c (glibtop_init_s): Initialize `ncpu' on SMP systems. * cpu.c (glibtop_get_cpu_s): Added SMP support. * ChangeLog: New file.