Benoît Dejean
e156172e7c
Fixed stack overflow in proc_map. Switched to Glibc getline because fgets
...
2007-01-14 Benoît Dejean <benoit@placenet.org >
* procmap.c: (glibtop_get_proc_map_s):
* procopenfiles.c: (parse_file):
Fixed stack overflow in proc_map.
Switched to Glibc getline because fgets gets fooled by long
lines.
Closes #396477 .
svn path=/trunk/; revision=2546
2007-01-14 18:09:56 +00:00
Benoît Dejean
c9385972bd
Bumped version number to 2.14.6.
...
2007-01-11 Benoît Dejean <benoit@placenet.org >
* configure.in:
Bumped version number to 2.14.6.
* *:
Got rid of CVS admin files.
svn path=/trunk/; revision=2545
2007-01-11 20:35:33 +00:00
Benoît Dejean
b411ee115f
Replaced two strstr by a hand-written loop in this critical code.
...
2007-01-11 Benoît Dejean <benoit@placenet.org >
* glibtop_private.c: (get_scaled):
Replaced two strstr by a hand-written loop in this critical code.
svn path=/trunk/; revision=2544
2007-01-11 20:28:02 +00:00
Benoît Dejean
5982287f48
Fixed parsing s?maps on 64bit kernel. Closes #355290 . Removed useless
...
2006-09-11 Benoît Dejean <benoit@placenet.org >
* procmap.c: (glibtop_get_proc_map_s):
Fixed parsing s?maps on 64bit kernel.
Closes #355290 .
Removed useless casts.
2006-09-11 17:47:51 +00:00
Benoît Dejean
610c0071cc
Only print the warning if (number of real cpu's) != (number of cpu's
...
2006-08-10 Benoît Dejean <benoit@placenet.org >
* open.c: (glibtop_open_s):
Only print the warning if
(number of real cpu's) != (number of cpu's monitored).
Patch by Wouter Bolsterlee (uws) <uws+gnome@xs4all.nl >.
Closes #350705 .
2006-08-10 11:21:39 +00:00
Benoît Dejean
a7a9e7e9f8
Updated implementation.
...
2006-07-27 Benoît Dejean <benoit@placenet.org >
* netload.c: (glibtop_get_netload_s):
Updated implementation.
2006-07-27 18:26:38 +00:00
Benoît Dejean
d497c25081
New has_sysfs function to avoid stating over and over '/sys' on each
...
2006-07-27 Benoît Dejean <benoit@placenet.org >
* glibtop_private.c: (has_sysfs):
* glibtop_private.h:
* netload.c: (glibtop_get_netload_s):
* open.c: (set_linux_version):
New has_sysfs function to avoid stating
over and over '/sys' on each netload call.
2006-07-27 09:23:32 +00:00
Benoît Dejean
2083db6c34
Fixed a bunch of warnings.
...
* msg_limits.c: (glibtop_get_msg_limits_s):
* sem_limits.c: (glibtop_get_sem_limits_s):
* shm_limits.c: (glibtop_get_shm_limits_s):
Fixed a bunch of warnings.
2006-04-02 09:16:20 +00:00
Benoît Dejean
23ca9669ae
I can't believe i've been so stupid :) Uses smaps if linux > 2.6.14.
...
* procmap.c: (glibtop_get_proc_map_s):
I can't believe i've been so stupid :)
Uses smaps if linux > 2.6.14.
2006-01-23 16:41:10 +00:00
Benoît Dejean
3afe2bf629
Fixed when which == GLIBTOP_KERN_PROC_UID. Closes #324055 .
...
* proclist.c: (glibtop_get_proclist_s):
Fixed when which == GLIBTOP_KERN_PROC_UID.
Closes #324055 .
2005-12-15 13:04:04 +00:00
Benoît Dejean
e296c3a37a
Implemented server->real_ncpu. Add a warning to display ncpu and real_ncpu
...
* open.c: (glibtop_open_s):
Implemented server->real_ncpu.
Add a warning to display ncpu and real_ncpu on open.
2005-12-14 10:53:53 +00:00
Benoît Dejean
806a816026
Fixed server->ncpu usage (SMP handling). Need more testing.
...
* cpu.c: (glibtop_get_cpu_s):
* glibtop_private.c: (get_scaled), (check_cpu_line):
* glibtop_private.h:
* open.c: (glibtop_open_s):
* proctime.c: (glibtop_get_proc_time_s):
Fixed server->ncpu usage (SMP handling). Need more testing.
2005-12-13 09:15:49 +00:00
Benoît Dejean
ba7355df9e
Implemented smap support. Closes #320710 .
...
* procmap.c: (add_smaps), (glibtop_get_proc_map_s):
Implemented smap support.
Closes #320710 .
2005-12-12 13:37:15 +00:00
Benoît Dejean
451f9f9d6c
Improved so that it doesn't stat(2) every /proc/<PID>/.
...
* proclist.c: (glibtop_get_proclist_s):
Improved so that it doesn't stat(2) every /proc/<PID>/.
2005-12-12 13:32:06 +00:00
James Henstridge
aa5ac8fc10
remove unused file.
...
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.
2005-12-12 09:38:15 +00:00
Benoît Dejean
79fc0e70c0
Small improvements. Use g_array_sized_new instead of g_array_new with
...
* procmap.c: (glibtop_get_proc_map_s):
Small improvements.
Use g_array_sized_new instead of g_array_new with
reserved_size = 100.
Don't use g_array_append_val to avoid copying
glibtop_map_entries. Use g_array_set_size(size + 1) instead.
I've run a little python benchmark and this shows a little
speedup. I hope this would be more sensible in
gnome-system-monitor (glibtop_get_procmap is intensively used for
the 'Writable Memory' column).
2005-12-07 09:35:50 +00:00
Benoît Dejean
ac3ad6d2aa
Removed 1 g_return_*.
...
* glibtop_private.c: (read_boot_time):
Removed 1 g_return_*.
2005-10-29 19:23:50 +00:00
Benoît Dejean
3e77f3cf13
Do not add irq, softirq and iowait to idle.
...
* cpu.c: (glibtop_get_cpu_s):
Do not add irq, softirq and iowait to idle.
2005-08-15 00:09:47 +00:00
Benoît Dejean
708285f0d2
Reworked a bit. Warn on 2.6 without /sys.
...
* open.c: (set_linux_version), (glibtop_open_s):
Reworked a bit.
Warn on 2.6 without /sys.
2005-08-03 22:39:17 +00:00
Benoît Dejean
a0493a0ff1
Fixed for people running 2.6 without /sys.
...
* netload.c: (glibtop_get_netload_s):
Fixed for people running 2.6 without /sys.
2005-08-03 13:26:06 +00:00
Benoît Dejean
b3979e6942
Added GLIBTOP_SUID_NETLIST.
...
* glibtop_server.h:
Added GLIBTOP_SUID_NETLIST.
2005-08-02 05:04:35 +00:00
Benoît Dejean
1645027004
Fixed .flags.
...
* uptime.c:
Fixed .flags.
2005-07-23 00:01:11 +00:00
Benoît Dejean
4efcfb2cb3
Cached getpagesize().
...
* glibtop_private.c: (get_page_size):
* glibtop_private.h:
* procmem.c: (glibtop_get_proc_mem_s):
* procsegment.c: (glibtop_get_proc_segment_s):
Cached getpagesize().
2005-07-22 19:20:39 +00:00
Benoît Dejean
96fe554afd
Split implementations. New (simpler) implementation for 2.6 (/sys is so
...
* netload.c: (read_value), (linux_2_6_stats), (linux_2_0_stats),
(linux_2_4_stats), (glibtop_get_netload_s): Split implementations.
New (simpler) implementation for 2.6 (/sys is so nice ;)
2005-07-09 21:09:15 +00:00
Benoît Dejean
16e0c943b2
Cached boot_time.
...
* glibtop_private.c: (read_boot_time), (get_boot_time): Cached boot_time.
2005-07-07 19:34:18 +00:00
Benoît Dejean
f409c553f5
Et m***e ... CVS got me. I wanted to commit a single change on the
...
toplevel configure.in but commited the whole tree. Sorry.
* glibtop_private.c:
* glibtop_private.h:
* proctime.c:
* uptime.c:
Added new function get_boot_time.
Retrieve boot_time from /proc/stat.
2005-07-05 23:08:58 +00:00
Benoît Dejean
b6a10fd8f7
Made some checks solaris only.
...
* configure.in: Made some checks solaris only.
2005-07-05 23:05:20 +00:00
Benoît Dejean
c81e055427
Removed LT_VERSION_INFO from LDFLAGS when unused.
...
* sysdeps/common/Makefile.am:
* sysdeps/linux/Makefile.am: Removed LT_VERSION_INFO from LDFLAGS
when unused.
2005-06-14 22:21:06 +00:00
Benoît Dejean
06fb19b5c6
Ensures buffer is 0-terminated.
...
* glibtop_private.c: (try_file_to_buffer): Ensures buffer is 0-terminated.
2005-06-14 22:17:49 +00:00
Benoît Dejean
ef2ed50bf7
Added pagein/pageout for linux 2.6.
...
* swap.c: (glibtop_get_swap_s): Added pagein/pageout for linux 2.6.
2005-06-13 09:03:41 +00:00
Benoît Dejean
872a4180e4
Fixed compilation on mips. Closes #304570 .
...
* siglist.c: Fixed compilation on mips. Closes #304570 .
2005-05-25 22:28:42 +00:00
Benoît Dejean
d1891b11ef
Fixed gcc-4.0 warnings.
...
* glibtop_private.h: Fixed gcc-4.0 warnings.
2005-04-01 20:06:35 +00:00
Benoît Dejean
59fd67c7e0
Removed a g_return_if_fail.
...
* fsusage.c: (get_partition): Removed a g_return_if_fail.
2005-03-29 13:16:58 +00:00
Benoît Dejean
bbc10e3790
Fixed behaviour when locale is not C s/strtod/g_ascii_strod/. (strtod
...
* loadavg.c: (glibtop_get_loadavg_s):
* uptime.c: (glibtop_get_uptime_s): Fixed behaviour when locale is not C
s/strtod/g_ascii_strod/. (strtod behaviour is locale specific, which is bad
because linux /proc is always C.
2005-03-27 14:30:30 +00:00
Benoît Dejean
83a9bef192
s/strerror/g_strerror/.
...
* netload.c: (get_ipv6): s/strerror/g_strerror/.
2005-03-25 13:23:24 +00:00
Benoît Dejean
ca4dc56342
Updated.
...
* siglist.c: Updated.
2005-03-25 12:52:12 +00:00
Benoît Dejean
a5982555b9
Fixed G_GNUC attribute usage.
...
* fsusage.c: Fixed G_GNUC attribute usage.
2005-02-15 09:51:12 +00:00
Benoît Dejean
270ec235c1
UTF-8-ified.
...
* include/glibtop/procopenfiles.h:
* sysdeps/linux/procopenfiles.c:
* sysdeps/stub/procopenfiles.c: UTF-8-ified.
2005-01-24 14:27:19 +00:00
Benoît Dejean
46380bf655
Total rewrite. socket/localsocket should be much faster.
...
* procopenfiles.c: (parse_file), (get_all), (inet_socket_parser),
(get_all_inet_sockets), (local_socket_parser),
(get_all_local_sockets), (glibtop_get_proc_open_files_s): Total rewrite.
socket/localsocket should be much faster.
2005-01-21 23:30:54 +00:00
Benoît Dejean
703a17f3f0
Uninlined.
...
* glibtop_private.c: (skip_token):
* glibtop_private.h: Uninlined.
2005-01-16 11:16:19 +00:00
Benoît Dejean
fcb83e637d
Reworked. Should works with IDE, SCSI. DM support is ready, but i don't
...
* fsusage.c: (get_partition), (get_sys_path), (linux_2_6_0): Reworked.
Should works with IDE, SCSI. DM support is ready, but i don't know why
their /stat is empty ...
2005-01-13 08:56:54 +00:00
Benoît Dejean
ab40c94db3
Parses /proc/net/tcp only once.
...
* procopenfiles.c: (get_all_sockets),
(glibtop_get_proc_open_files_s): Parses /proc/net/tcp only once.
2005-01-12 22:39:31 +00:00
Benoît Dejean
70ac398a44
Fixed.
...
* procopenfiles.c: (get_socket_endpoint): Fixed.
2005-01-10 17:04:50 +00:00
Benoît Dejean
48056f7d8a
Disabled.
...
* glibtop_server.h:
* procopenfiles.c: (get_socket_endpoint): Disabled.
(glibtop_get_proc_open_files_s): Secured -> g_snprintf.
2005-01-10 12:05:13 +00:00
Benoît Dejean
7ca4171652
New feature by nick@reloco.com.ar (Nicolás Lichtmaier).
...
* configure.in:
* examples/.cvsignore:
* examples/Makefile.am:
* examples/openfiles.c: (show_open_files), (main):
* features.def:
* include/glibtop/Makefile.am:
* include/glibtop/command.h:
* include/glibtop/procopenfiles.h:
* include/glibtop/sysdeps.h:
* include/glibtop/union.h:
* structures.def:
* sysdeps/linux/Makefile.am:
* sysdeps/linux/procopenfiles.c: (glibtop_init_proc_open_files_s),
(get_socket_endpoint), (glibtop_get_proc_open_files_s):
* sysdeps/stub/Makefile.am:
* sysdeps/stub/procopenfiles.c: (glibtop_init_proc_open_files_s),
(glibtop_get_proc_open_files_s):
New feature by nick@reloco.com.ar (Nicolás Lichtmaier).
glibtop_get_open_files(pid) -> list of files by process.
TODO: Add documentation.
2005-01-10 08:43:04 +00:00
Benoît Dejean
0a425e4e41
Added I/O and IRQ wait time to glibtop_cpu. Closes #160443 .
...
* examples/pprint.c: (pprint_get_cpu):
* features.def:
* include/glibtop/cpu.h:
* sysdeps/linux/cpu.c: (glibtop_init_cpu_s), (glibtop_get_cpu_s):
Added I/O and IRQ wait time to glibtop_cpu. Closes #160443 .
* configure.in: Post-release bump 2.9.4
2005-01-03 09:17:45 +00:00
Benoît Dejean
817057bc3c
Marked private functions G_GNUC_INTERNAL.
...
* fsusage.c: (_glibtop_linux_get_fsusage_read_write):
* glibtop_private.h: Marked private functions G_GNUC_INTERNAL.
2004-12-23 15:56:51 +00:00
Benoît Dejean
e9e2b7c09b
Glibified. g_array_free which returns a char* ! If you want to change
...
* proclist.c: (glibtop_get_proclist_s): Glibified. g_array_free which
returns a char* ! If you want to change this, please tell them
http://bugzilla.gnome.org/show_bug.cgi?id=145767 .
2004-11-29 23:55:03 +00:00
Benoît Dejean
2fa0dc1cd8
Added Added Removed
...
* Makefile.am:
* cpu.c:
* fsusage.c:
* glibtop_private.c: (get_scaled), (try_file_to_buffer),
(file_to_buffer): Added
* glibtop_private.h: Added
* glibtop_server.c: Removed
* glibtop_server.h:
* loadavg.c:
* mem.c:
* netload.c:
* open.c:
* prockernel.c:
* procmem.c:
* procsegment.c:
* procsignal.c:
* procstate.c:
* proctime.c:
* procuid.c:
* swap.c:
* sysinfo.c:
* uptime.c: Moved linux impl utils function from glibtop_server.* to
glibtob_private.* because glibtop_server.h is a public header.
2004-11-28 01:32:55 +00:00
Benoît Dejean
1d6debfa56
Added a check for NULL pointer when wlaking though interfaces (though i
...
* netload.c: (get_ipv6), (glibtop_get_netload_s): Added a check for NULL
pointer when wlaking though interfaces (though i don't understand why some
interface don't have an ifa_addr).
Move all ipv6 code into a separate function. Added a paranoid check on
getifaddrs.
2004-11-15 14:58:06 +00:00