Compare commits

..

63 Commits

Author SHA1 Message Date
Benoît Dejean
a1657f81cb Released 2.9.92.
* NEWS: Released 2.9.92.
2005-02-28 08:59:38 +00:00
Benoît Dejean
0561316344 Forgot to add this file.
* fsusage.c: (_glibtop_freebsd_get_fsusage_read_write): Forgot to add
	this file.
2005-02-28 08:54:41 +00:00
Benoît Dejean
2c0f291b3c Fix a bug in netlist where glibtop_netlist.number was never initialized to
* Makefile.am:
	* cpu.c: (glibtop_get_cpu_p):
	* netlist.c: (glibtop_get_netlist_s):
	* netload.c: (glibtop_get_netload_p):
	* procmem.c: (glibtop_get_proc_mem_p):

	Fix a bug in netlist where glibtop_netlist.number was never initialized to 0
	(this resulted in a NULL pointer dereference in the network load feature
	of the multiload applet)

	* Add support for getting interface flags and packet counts even on interfaces
	without IP addresses (needed for the network load feature of the multiload applet)

	* Restore per-process limits in the !FreeBSD or __FreeBSD_version < 500013
	case

	* Add CPU interrupt time as IOWAIT to get support for the cpu load feature of
	the multiload applet.

	Patch from marcus@freebsd.org (Joe Marcus Clarke).
	Closes #168704.
2005-02-28 08:15:59 +00:00
Benoît Dejean
fc7d872381 * Add support for file system read and write counting (needed for the disk
* fsusage.c: * Add support for file system read and write counting
	(needed for the disk load feature of the multiload applet).
2005-02-28 08:11:15 +00:00
Benoît Dejean
c97d63f368 /me stupid. I've already post-bumped version.
* configure.in: /me stupid. I've already post-bumped version.
2005-02-25 00:02:59 +00:00
Artur Flinta
675145ea55 Updated Polish translation by GNOME PL Team.
2005-02-24  Artur Flinta  <aflinta@cvs.gnome.org>

	* pl.po: Updated Polish translation by GNOME PL Team.
2005-02-24 20:36:48 +00:00
Benoît Dejean
965bd33d55 post release bump 2.9.93.
* configure.in: post release bump 2.9.93.
2005-02-24 17:22:25 +00:00
Ankitkumar Rameshchandra Patel
7a5e1a0f37 ankit@redhat.com * Updated Gujarati Translation 2005-02-24 12:52:11 +00:00
Amanpreet Singh Alam
da24dd8fd9 update by amanpreetalam@yahoo.com 2005-02-24 04:47:57 +00:00
Benoît Dejean
717ee1c88f Add support for FreeBSD 6-CURRENT. Use the more portable getrlimit to
* Makefile.am:
	* netlist.c: (glibtop_get_netlist_s):
	* procmap.c: (glibtop_get_proc_map_p):
	* procmem.c: (glibtop_get_proc_mem_p):
	* procopenfiles.c: (glibtop_init_proc_open_files_s),
	(glibtop_get_proc_open_files_s):
	* proctime.c:

	Add support for FreeBSD 6-CURRENT.
	Use the more portable getrlimit to obtain process memory limits.
	Correctly determine process time.
	Stub out the procopenfiles() function (this is not yet implemented, however).
	Fix a nasty infinite loop and memory leak due to a forgot pointer increment.

	Patch from marcus@freebsd.org (Joe Marcus Clarke).
	Closes #168232.
2005-02-23 08:20:45 +00:00
Benoît Dejean
f031b77b3b Correct file system size calculations. Patch from marcus@freebsd.org (Joe
* fsusage.c: (glibtop_get_fsusage_s): Correct file system size calculations.
	Patch from marcus@freebsd.org (Joe Marcus Clarke).
	Closes #168232.
2005-02-23 08:18:48 +00:00
Roozbeh Pournader
e0ae6ebcaa Updated Persian translation by Azin Azadi <aazadi@gmail.com>.
2004-02-22  Roozbeh Pournader  <roozbeh@farsiweb.info>

	* fa.po: Updated Persian translation by
	  Azin Azadi <aazadi@gmail.com>.
2005-02-22 18:21:59 +00:00
Benoît Dejean
16123b6fe9 Build and install libgtop2_daemon only if needed.
* src/Makefile.am: Build and install libgtop2_daemon only if needed.
2005-02-22 12:42:09 +00:00
Priit Laes
672da9122e Translation updated by Ivar Smolin.
2005-02-22  Priit Laes  <plaes@cvs.gnome.org>

	* et.po: Translation updated by Ivar Smolin.
2005-02-22 09:46:02 +00:00
Benoît Dejean
35f0277afd don't export private symbols.
* lib/Makefile.am: don't export private symbols.
2005-02-21 15:24:26 +00:00
Leonid Kanter
8d77e50c03 fixed typo 2005-02-21 12:58:04 +00:00
Raphael Higino
82dc5aefe1 Updated pt_BR translation 2005-02-20 14:51:33 +00:00
Changwoo Ryu
f2f5ab9b73 Updated Korean translation.
2005-02-18  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.
2005-02-18 12:25:03 +00:00
Kostas Papadimas
49acc8769c Updated Greek Translation. 2005-02-18 11:45:38 +00:00
Vincent van Adrighem
15759a964a Translation updated by Tino Meinen.
2005-02-17  Vincent van Adrighem  <adrighem@gnome.org>

	* nl.po: Translation updated by Tino Meinen.
2005-02-17 13:29:37 +00:00
Jordi Mallach
649b88a7fa Updated Catalan translation. 2005-02-16 09:47:35 +00:00
Maxim Dziumanenko
073a6dd8c1 Update Ukrainian translation.
2005-02-15  Maxim Dziumanenko <mvd@mylinux.com.ua>

	* Update Ukrainian translation.
2005-02-15 19:04:50 +00:00
Benoît Dejean
d61ad50e23 ChangeLog commit 2005-02-15 12:53:53 +00:00
Benoît Dejean
53c43e6e90 Removed some dead files. Don't install private headers.
* 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.
2005-02-15 12:48:34 +00:00
Benoît Dejean
b43e879cc0 Misc. cleanups.
* daemon.h:
* gnuserv.c: (syslog_message), (syslog_io_message):
* main.c: (handle_parent_connection):
* slave.c: (handle_slave_connection), (handle_slave_command): Misc. cleanups.
2005-02-15 10:35:44 +00:00
Benoît Dejean
0fdfd65a2a Don't export private symbols.
* include/glibtop/error.h: Don't export private symbols.
2005-02-15 10:14:59 +00:00
Benoît Dejean
1ac8744251 G_GNUC_NORETURN love.
* include/glibtop/error.h: G_GNUC_NORETURN love.

	* include/glibtop/errors.h:
	* lib/errors.c: Bye bye dead code.
2005-02-15 09:55:01 +00:00
Benoît Dejean
bbbbb27edc Fixed G_GNUC attribute usage. Replaced macro by inline function.
* fsusage.c: (_glibtop_get_fsusage_read_write): Fixed G_GNUC attribute usage.
	Replaced macro by inline function.
2005-02-15 09:51:59 +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
Christophe Merlet
7d44f04aed Updated French translation. 2005-02-14 21:35:31 +00:00
Laurent Dhima
c9dc0d0ef8 Updated Albanian translation.
2005-02-14  Laurent Dhima  <laurenti@alblinux.net>

	* sq.po: Updated Albanian translation.
2005-02-14 12:25:09 +00:00
Benoît Dejean
e82f908824 Updated French translation.
* fr.po: Updated French translation.
2005-02-14 08:31:47 +00:00
Leonid Kanter
8365f40856 Updated Russian translation 2005-02-08 15:24:30 +00:00
David Lodge
b2917db0be Updated British translation.
2005-02-07  David Lodge <dave@cirt.net>

        * en_GB.po: Updated British translation.
2005-02-07 12:37:01 +00:00
Benoît Dejean
3d21fd97f6 Released 2.9.91.
* NEWS:
	* configure.in: Released 2.9.91.
2005-02-06 18:46:05 +00:00
Ole Laursen
666a347f25 Updated Danish translation.
2005-02-06  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2005-02-06 15:47:24 +00:00
Pauli Virtanen
68db204d6a Updated Finnish translation.
2005-02-06  Pauli Virtanen <pauli.virtanen@hut.fi>

	 * fi.po: Updated Finnish translation.
2005-02-06 01:14:53 +00:00
Priit Laes
fbe5c8da8e Translation updated by Tõivo Leedjärv.
2005-02-04  Priit Laes  <plaes@cvs.gnome.org>

	* et.po: Translation updated by Tõivo Leedjärv.
2005-02-04 08:52:01 +00:00
Benoît Dejean
a354ca2635 Fixed typo. Closes #166090
* procopenfiles.c: Fixed typo. Closes #166090
2005-02-02 21:30:27 +00:00
Žygimantas Beručka
639ea4870c Updated Lithuanian translation.
2005-01-30  Žygimantas Beručka  <uid0@akl.lt>

        * lt.po: Updated Lithuanian translation.
2005-01-30 01:52:45 +00:00
Kjartan Maraas
702d9a1501 Update Update
2005-01-28  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Update
	* no.po: Update
2005-01-28 16:05:47 +00:00
Alexander Shopov
ea1a6dbaca Updated Bulgarian translation by Iassen Pramatarov <turin@fsa-bg.org>
2005-01-27  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Iassen Pramatarov <turin@fsa-bg.org>
2005-01-27 10:05:43 +00:00
Tomasz Kłoczko
bb60753844 fixed format string specification bugs in translations. 2005-01-26 08:03:07 +00:00
Duarte Loreto
d9781917c5 Updated Portuguese translation.
2005-01-26  Duarte Loreto <happyguy_pt@hotmail.com>

	* pt.po: Updated Portuguese translation.
2005-01-26 01:08:31 +00:00
Funda Wang
bd119a72e2 Updated Simplified Chinese translation 2005-01-24 15:04:04 +00:00
Benoît Dejean
78c10bca9b Released 2.9.90.
* NEWS:
	* configure.in: Released 2.9.90.
2005-01-24 14:41:20 +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
Alexander Shopov
2362be986b Updated Bulgarian translation by Vladimir Petkov <vpetkov@i-space.org>
2005-01-24  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Vladimir Petkov <vpetkov@i-space.org>
2005-01-24 10:33:28 +00:00
Benoît Dejean
8a1e1cff91 Removed lib/lib.c as it is generated. Closes #165038.
* POTFILES.in:
	* POTFILES.skip: Removed lib/lib.c as it is generated.
	Closes #165038.
2005-01-24 08:31:22 +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
91dda5b70d Updated.
* openfiles.c: (show_open_files): Updated.
2005-01-21 23:29:38 +00:00
Benoît Dejean
9b263e0fbb added localsock { name } to glibtop_open_files_entry. Should not break
* examples/openfiles.c: (show_open_files):
	* include/glibtop/procopenfiles.h: added localsock { name } to
	glibtop_open_files_entry. Should not break ABI.
2005-01-21 23:28:47 +00:00
Benoît Dejean
793807b07e Re-worked with bsearch.
* mountlist.c: (ignore_mount_entry): Re-worked with bsearch.
2005-01-18 21:57:52 +00:00
Benoît Dejean
9898e7ee58 Updated.
* POTFILES.in: Updated.
2005-01-17 12:32:26 +00:00
Hendrik Richter
7ecdcd712d Updated German translation. 2005-01-16 16:02:30 +00:00
Benoît Dejean
703a17f3f0 Uninlined.
* glibtop_private.c: (skip_token):
	* glibtop_private.h: Uninlined.
2005-01-16 11:16:19 +00:00
Updated ja.po. T.Aihana
92a9e7d937 2005-01-16 Updated ja.po. T.Aihana <aihana@jcom.home.ne.jp> 2005-01-16 05:29:47 +00:00
Benoît Dejean
01c7e99aa6 Don't translate examples/smp.c.
* POTFILES.in:
	* POTFILES.skip: Don't translate examples/smp.c.
2005-01-13 21:15:05 +00:00
Christian Rose
6fe16f1d91 Added missing file.
2005-01-13  Christian Rose  <menthos@menthos.com>

	* POTFILES.in: Added missing file.
2005-01-13 17:54:11 +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
50e4e07013 2.9.5.
* configure.in: 2.9.5.
2005-01-12 22:40:43 +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
Tomasz Kłoczko
fee415ecd8 Fixed format string bug in plural forms: use in all forms %lu. 2005-01-11 02:09:50 +00:00
83 changed files with 10408 additions and 27552 deletions

View File

@@ -1,3 +1,92 @@
2005-02-28 Benoît Dejean <TazForEver@dlfp.org>
* NEWS: Released 2.9.92.
2005-02-25 Benoît Dejean <TazForEver@dlfp.org>
* configure.in: /me stupid. I've already post-bumped version.
2005-02-24 Benoît Dejean <TazForEver@dlfp.org>
* configure.in: post release bump 2.9.93.
2005-02-22 Benoît Dejean <TazForEver@dlfp.org>
* src/Makefile.am: Build and install libgtop2_daemon only if needed.
2005-02-21 Benoît Dejean <TazForEver@dlfp.org>
* lib/Makefile.am: don't export private symbols.
2005-02-15 Benoît Dejean <TazForEver@dlfp.org>
* 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.
Depends on glib-2.6.
Post-release bump : 2.9.92
2005-02-15 Benoît Dejean <TazForEver@dlfp.org>
* include/glibtop/error.h: Don't export private symbols.
2005-02-15 Benoît Dejean <TazForEver@dlfp.org>
* include/glibtop/error.h: G_GNUC_NORETURN love.
* include/glibtop/errors.h:
* lib/errors.c: Bye bye dead code.
2005-02-06 Benoît Dejean <TazForEver@dlfp.org>
* NEWS:
* configure.in: Released 2.9.91.
2005-01-24 Benoît Dejean <TazForEver@dlfp.org>
* NEWS:
* configure.in: Released 2.9.90.
2005-01-24 Benoît Dejean <TazForEver@dlfp.org>
* include/glibtop/procopenfiles.h:
* sysdeps/linux/procopenfiles.c:
* sysdeps/stub/procopenfiles.c: UTF-8-ified.
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
* examples/openfiles.c: (show_open_files):
* include/glibtop/procopenfiles.h: added localsock { name } to
glibtop_open_files_entry. Should not break ABI.
2005-01-12 Benoît Dejean <TazForEver@dlfp.org>
* configure.in: 2.9.5.
2005-01-10 Benoît Dejean <TazForEver@dlfp.org>
* NEWS: Released 2.9.4.

15
NEWS
View File

@@ -1,3 +1,18 @@
February 28, 2005: Overview of Changes from 2.9.90 to 2.9.92
============================================================
* *BSD updated by marcus@freebsd.org (Joe Marcus Clarke).
* Removed a lot of dead files :)
* Don't build&install libgtop_daemon when it's never used.
February 6, 2004: Overview of Changes from 2.9.90 to 2.9.91
==========================================================
* Fixed typo in stub.
* Updated i18n.
January 24, 2004: Overview of Changes from 2.9.4 to 2.9.90
==========================================================
* Updated Linux support.
January 10, 2004: Overview of Changes from 2.9.3 to 2.9.4
=========================================================
* New glibtop_proc_open_files nick@reloco.com.ar (Nicolás Lichtmaier).

View File

@@ -27,7 +27,6 @@
#define __GLIBTOP_DAEMON_H__
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/open.h>
#include <glibtop/union.h>

View File

@@ -8,7 +8,7 @@ AC_CANONICAL_SYSTEM
LIBGTOP_MAJOR_VERSION=2
LIBGTOP_MINOR_VERSION=9
LIBGTOP_MICRO_VERSION=4
LIBGTOP_MICRO_VERSION=92
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION)
@@ -133,7 +133,7 @@ AM_CONDITIONAL(ENABLE_SHARED, test x$enable_static = xyes)
AC_SUBST(static_targets)
AC_SUBST(smp_examples)
GLIB_REQUIRED=2.4.0
GLIB_REQUIRED=2.6.0
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GLIB_CFLAGS)

View File

@@ -1,3 +1,7 @@
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
* openfiles.c: (show_open_files): Updated.
2004-12-23 Benoît Dejean <tazforever@dlfp.org>
* netload.c: (main):

View File

@@ -34,7 +34,7 @@ static void show_open_files(pid_t pid)
break;
case GLIBTOP_FILE_TYPE_LOCALSOCKET:
printf("localsocket\n");
printf("localsocket %s\n", files[i].info.localsock.name);
break;
}
}

View File

@@ -51,7 +51,6 @@ LIBGTOP_MICRO_VERSION >= (micro)))
#include <glibtop/global.h>
#include <glibtop_server.h>
#include <glibtop/types.h>
#ifdef HAVE_GLIBTOP_MACHINE_H
#include <glibtop_machine.h>

View File

@@ -3,9 +3,11 @@ glibtopdir = $(includedir)/libgtop-2.0/glibtop
glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
sem_limits.h uptime.h command.h mem.h proclist.h \
proctime.h shm_limits.h version.h cpu.h msg_limits.h \
procmem.h procuid.h swap.h write.h error.h open.h \
procsegment.h read.h sysdeps.h global.h \
procsignal.h read_data.h union.h types.h gnuserv.h \
procmem.h procuid.h swap.h \
procsegment.h sysdeps.h global.h \
procsignal.h union.h gnuserv.h \
parameter.h mountlist.h fsusage.h procmap.h signal.h \
inodedb.h sysinfo.h ppp.h procargs.h netload.h \
netlist.h procopenfiles.h
noinst_HEADERS = error.h write.h open.h read_data.h read.h

View File

@@ -21,6 +21,11 @@
Boston, MA 02111-1307, USA.
*/
/*
* This is private API
*/
#ifndef __GLIBTOP_ERROR_H__
#define __GLIBTOP_ERROR_H__
@@ -28,20 +33,20 @@
G_BEGIN_DECLS
void glibtop_error_vr (glibtop *server, const char *format, va_list args);
void glibtop_warn_vr (glibtop *server, const char *format, va_list args);
void glibtop_error_io_vr (glibtop *server, const char *format, int, va_list args);
void glibtop_warn_io_vr (glibtop *server, const char *format, int, va_list args);
void glibtop_error_vr (glibtop *server, const char *format, va_list args) G_GNUC_INTERNAL G_GNUC_NORETURN;
void glibtop_warn_vr (glibtop *server, const char *format, va_list args) G_GNUC_INTERNAL;
void glibtop_error_io_vr (glibtop *server, const char *format, int, va_list args) G_GNUC_INTERNAL G_GNUC_NORETURN;
void glibtop_warn_io_vr (glibtop *server, const char *format, int, va_list args) G_GNUC_INTERNAL;
void glibtop_error_r (glibtop *server, const char *format, ...) G_GNUC_PRINTF(2, 3);
void glibtop_warn_r (glibtop *server, const char *format, ...) G_GNUC_PRINTF(2, 3);
void glibtop_error_io_r (glibtop *server, const char *format, ...) G_GNUC_PRINTF(2, 3);
void glibtop_warn_io_r (glibtop *server, const char *format, ...) G_GNUC_PRINTF(2, 3);
void glibtop_error_r (glibtop *server, const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(2, 3) G_GNUC_NORETURN;
void glibtop_warn_r (glibtop *server, const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(2, 3);
void glibtop_error_io_r (glibtop *server, const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(2, 3) G_GNUC_NORETURN;
void glibtop_warn_io_r (glibtop *server, const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(2, 3);
void glibtop_error (const char *format, ...) G_GNUC_PRINTF(1, 2);
void glibtop_warn (const char *format, ...) G_GNUC_PRINTF(1, 2);
void glibtop_error_io (const char *format, ...) G_GNUC_PRINTF(1, 2);
void glibtop_warn_io (const char *format, ...) G_GNUC_PRINTF(1, 2);
void glibtop_error (const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(1, 2) G_GNUC_NORETURN;
void glibtop_warn (const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(1, 2);
void glibtop_error_io (const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(1, 2) G_GNUC_NORETURN;
void glibtop_warn_io (const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(1, 2);
G_END_DECLS

View File

@@ -1,95 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
LibGTop is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
LibGTop is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LibGTop; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __GLIBTOP_ERRORS_H__
#define __GLIBTOP_ERRORS_H__
#include <glibtop.h>
#include <glib/gerror.h>
G_BEGIN_DECLS
#define GLIBTOP_ERROR glibtop_error_quark ()
GQuark glibtop_error_quark (void) G_GNUC_CONST;
typedef enum {
GLIBTOP_ERROR_NO_ERROR = 0,
GLIBTOP_ERROR_UNKNOWN,
GLIBTOP_ERROR_INVALID_ARGUMENT,
GLIBTOP_ERROR_NO_SUCH_PARAMETER,
GLIBTOP_ERROR_READONLY_VALUE,
GLIBTOP_ERROR_SIZE_MISMATCH,
GLIBTOP_ERROR_SERVER_COMM_FAILURE,
GLIBTOP_ERROR_NO_SUCH_PROCESS,
GLIBTOP_ERROR_NO_KERNEL_SUPPORT,
GLIBTOP_ERROR_INCOMPATIBLE_KERNEL,
GLIBTOP_ERROR_NO_SUCH_BACKEND,
GLIBTOP_ERROR_NOT_IMPLEMENTED,
GLIBTOP_ERROR_NO_BACKEND_OPENED,
GLIBTOP_ERROR_DEMARSHAL_ERROR
} glibtop_error;
void
glibtop_error_vl (glibtop_client *client, glibtop_error code,
const char *format, va_list args);
void
glibtop_error_io_vl (glibtop_client *client, glibtop_error code,
int io_errno, const char *format, va_list args);
void
glibtop_warn_vl (glibtop_client *client, glibtop_error code,
const char *format, va_list args);
void
glibtop_warn_io_vl (glibtop_client *client, glibtop_error code,
int io_errno, const char *format, va_list args);
void
glibtop_error_l (glibtop_client *client, glibtop_error code,
char *format, ...);
void
glibtop_warn_l (glibtop_client *client, glibtop_error code,
char *format, ...);
void
glibtop_error_io_l (glibtop_client *client, glibtop_error code,
char *format, ...);
void
glibtop_warn_io_l (glibtop_client *client, glibtop_error code,
char *format, ...);
G_END_DECLS
#endif

View File

@@ -42,7 +42,6 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
/* gnuserv should not be compiled using SOCKS */
#define DO_NOT_SOCKSIFY
#include <glibtop.h>
#include <glibtop/error.h>
#undef read
#undef write
#undef open

View File

@@ -23,8 +23,6 @@
#define __GLIBTOP_OPEN_H__
#include <glibtop.h>
#include <glibtop/read.h>
#include <glibtop/error.h>
G_BEGIN_DECLS

View File

@@ -1,12 +1,12 @@
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
Copyright (C) 2004 Nicolás Lichtmaier
Copyright (C) 2004 Nicolás Lichtmaier
This file is part of LibGTop 1.0.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
Modified by Nicolás Lichtmaier to give open process files.
Modified by Nicolás Lichtmaier to give open process files.
LibGTop is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
@@ -77,6 +77,12 @@ struct _glibtop_open_files_entry
struct {
char name[GLIBTOP_OPEN_FILENAME_LEN+1];
} file;
/* When type == GLIBTOP_FILE_TYPE_LOCALSOCKET */
struct {
char name[GLIBTOP_OPEN_FILENAME_LEN+1];
} localsock;
} info;
};

View File

@@ -25,7 +25,6 @@
#define __GLIBTOP_READ_H__
#include <glibtop.h>
#include <glibtop/error.h>
G_BEGIN_DECLS

View File

@@ -25,7 +25,6 @@
#define __GLIBTOP_READ_DATA_H__
#include <glibtop.h>
#include <glibtop/error.h>
G_BEGIN_DECLS

View File

@@ -25,7 +25,6 @@
#define __GLIBTOP_WRITE_H__
#include <glibtop.h>
#include <glibtop/error.h>
G_BEGIN_DECLS

View File

@@ -7,7 +7,7 @@ libgtop_2_0_la_SOURCES = init.c open.c close.c command.c read.c \
read_data.c write.c lib.c parameter.c \
sysdeps.c
libgtop_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
libgtop_2_0_la_LDFLAGS = $(LT_VERSION_INFO) -export-symbols-regex "^[^_].*"
libgtop_2_0_la_LIBADD = $(GLIB_LIBS) $(top_builddir)/sysdeps/common/libgtop_common-2.0.la $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la $(sysdeps_suid_lib)
BUILT_SOURCES = lib.c

View File

@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/error.h>
#include <glibtop/close.h>
#include <glibtop/command.h>

View File

@@ -1,156 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
LibGTop is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
LibGTop is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LibGTop; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <glibtop.h>
#include <glibtop/global.h>
#include <glibtop/errors.h>
/* Error quark */
GQuark
glibtop_error_quark (void)
{
static GQuark q = 0;
if (G_UNLIKELY(q == 0))
q = g_quark_from_static_string ("glibtop-error-quark");
return q;
}
void
glibtop_error_vl (glibtop_client *client, glibtop_error code,
const char *format, va_list args)
{
gchar *message;
GError *error;
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
message = g_strdup_vprintf (format, args);
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
glibtop_client_propagate_error (client, error);
g_error_free (error);
g_free (message);
}
void
glibtop_error_io_vl (glibtop_client *client, glibtop_error code,
int io_errno, const char *format, va_list args)
{
gchar *message, *fullmessage;
GError *error;
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
message = g_strdup_vprintf (format, args);
fullmessage = g_strdup_printf ("%s: %s", message, strerror (io_errno));
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
glibtop_client_propagate_error (client, error);
g_error_free (error);
g_free (fullmessage);
g_free (message);
}
void
glibtop_warn_vl (glibtop_client *client, glibtop_error code,
const char *format, va_list args)
{
gchar *message;
GError *error;
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
message = g_strdup_vprintf (format, args);
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
glibtop_client_propagate_warning (client, error);
g_error_free (error);
g_free (message);
}
void
glibtop_warn_io_vl (glibtop_client *client, glibtop_error code,
int io_errno, const char *format, va_list args)
{
gchar *message, *fullmessage;
GError *error;
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
message = g_strdup_vprintf (format, args);
fullmessage = g_strdup_printf ("%s: %s", message, strerror (io_errno));
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
glibtop_client_propagate_warning (client, error);
g_error_free (error);
g_free (fullmessage);
g_free (message);
}
void
glibtop_error_l (glibtop_client *client, glibtop_error code,
char *format, ...)
{
va_list args;
va_start (args, format);
glibtop_error_vl (client, code, format, args);
va_end (args);
}
void
glibtop_warn_l (glibtop_client *client, glibtop_error code,
char *format, ...)
{
va_list args;
va_start (args, format);
glibtop_warn_vl (client, code, format, args);
va_end (args);
}
void
glibtop_error_io_l (glibtop_client *client, glibtop_error code,
char *format, ...)
{
va_list args;
va_start (args, format);
glibtop_error_io_vl (client, code, errno, format, args);
va_end (args);
}
void
glibtop_warn_io_l (glibtop_client *client, glibtop_error code,
char *format, ...)
{
va_list args;
va_start (args, format);
glibtop_warn_io_vl (client, code, errno, format, args);
va_end (args);
}

View File

@@ -22,6 +22,7 @@
*/
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/sysdeps.h>
#include <glibtop/parameter.h>

View File

@@ -23,6 +23,7 @@ print '';
print '#include <config.h>';
print '';
print '#include <glibtop.h>';
print '#include <glibtop/error.h>';
print '#include <glibtop/open.h>';
print '';
print '#include <glibtop/sysdeps.h>';

View File

@@ -23,6 +23,8 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/read.h>
#include <glibtop/error.h>
#include <glibtop/version.h>
#include <glibtop/sysdeps.h>
#include <glibtop/command.h>

View File

@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/parameter.h>
#include <glibtop/error.h>
#define _write_data(ptr,size) \
if ((data_ptr == NULL) || (data_size < size)) return -size; \

View File

@@ -23,6 +23,7 @@
#include <config.h>
#include <glibtop/read.h>
#include <glibtop/error.h>
#include "libgtop-i18n.h"

View File

@@ -23,6 +23,7 @@
#include <config.h>
#include <glibtop/error.h>
#include <glibtop/read_data.h>
#include "libgtop-i18n.h"

View File

@@ -24,6 +24,7 @@
#include <config.h>
#include <glibtop/write.h>
#include <glibtop/error.h>
#include "libgtop-i18n.h"
/* Writes some data to server. */

View File

@@ -1,3 +1,130 @@
2005-02-24 Artur Flinta <aflinta@cvs.gnome.org>
* pl.po: Updated Polish translation by GNOME PL Team.
2004-02-24 Ankit Patel <ankit644@yahoo.com>
* gu.po: Updated Gujarati Translation.
2004-02-22 Roozbeh Pournader <roozbeh@farsiweb.info>
* fa.po: Updated Persian translation by
Azin Azadi <aazadi@gmail.com>.
2005-02-22 Priit Laes <plaes@cvs.gnome.org>
* et.po: Translation updated by Ivar Smolin.
2005-02-20 Raphael Higino <raphaelh@cvs.gnome.org>
* pt_BR.po: Updated Brazilian Portuguese translation.
2005-02-18 Changwoo Ryu <cwryu@debian.org>
* ko.po: Updated Korean translation.
2005-02-18 Kostas Papadimas <pkst@gnome.org>
* el.po: Updated Greek translation.
2005-02-17 Vincent van Adrighem <adrighem@gnome.org>
* nl.po: Translation updated by Tino Meinen.
2005-02-16 Jordi Mallach <jordi@sindominio.net>
* ca.po: Updated Catalan translation.
2005-02-15 Maxim Dziumanenko <mvd@mylinux.com.ua>
* uk.po: Updated Ukrainian translation.
2005-02-14 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation.
2005-02-14 Laurent Dhima <laurenti@alblinux.net>
* sq.po: Updated Albanian translation.
2005-02-14 Benoît Dejean <TazForEver@dlfp.org>
* fr.po: Updated French translation.
2005-02-08 Leonid Kanter <leon@asplinux.ru>
* ru.po: Updated Russian translation
2005-02-07 David Lodge <dave@cirt.net>
* en_GB.po: Updated British translation.
2005-02-06 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2005-02-06 Pauli Virtanen <pauli.virtanen@hut.fi>
* fi.po: Updated Finnish translation.
2005-02-04 Priit Laes <plaes@cvs.gnome.org>
* et.po: Translation updated by Tõivo Leedjärv.
2005-01-30 Žygimantas Beručka <uid0@akl.lt>
* lt.po: Updated Lithuanian translation.
2005-01-28 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Update
* no.po: Update
2005-01-27 Alexander Shopov <ash@contact.bg>
* bg.po: Updated Bulgarian translation by
Iassen Pramatarov <turin@fsa-bg.org>
2005-01-26 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
2005-01-24 Funda Wang <fundawang@linux.net.cn>
* zh_CN.po: Updated Simplified Chinese translation.
2005-01-24 Alexander Shopov <ash@contact.bg>
* bg.po: Updated Bulgarian translation by
Vladimir Petkov <vpetkov@i-space.org>
2005-01-24 Benoît Dejean <TazForEver@dlfp.org>
* POTFILES.in:
* POTFILES.skip: Removed lib/lib.c as it is generated.
Closes #165038.
2005-01-17 Benoît Dejean <TazForEver@dlfp.org>
* POTFILES.in: Updated.
2005-01-16 Hendrik Richter <hendrik@gnome-de.org>
* de.po: Updated German translation.
2005-01-16 Takeshi AIHANA <aihana@gnome.gr.jp>
* ja.po: Updated Japanese translation.
2005-01-13 Benoît Dejean <TazForEver@dlfp.org>
* POTFILES.in:
* POTFILES.skip: Don't translate examples/smp.c.
2005-01-13 Christian Rose <menthos@menthos.com>
* POTFILES.in: Added missing file.
2005-01-02 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation.

View File

@@ -2,3 +2,5 @@ support/error.c
support/getopt.c
support/popt.c
support/popthelp.c
examples/smp.c
lib/lib.c

1354
po/bg.po

File diff suppressed because it is too large Load Diff

2270
po/ca.po

File diff suppressed because it is too large Load Diff

2239
po/da.po

File diff suppressed because it is too large Load Diff

2215
po/de.po

File diff suppressed because it is too large Load Diff

1512
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -40,8 +40,8 @@ msgstr "leído tamaño de datos"
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "leído %d byte de datos"
msgstr[1] "leídos %d bytes de datos"
msgstr[0] "leído %lu byte de datos"
msgstr[1] "leídos %lu bytes de datos"
#: lib/write.c:51
#, c-format

1311
po/et.po

File diff suppressed because it is too large Load Diff

376
po/fa.po

File diff suppressed because it is too large Load Diff

1292
po/fi.po

File diff suppressed because it is too large Load Diff

1264
po/fr.po

File diff suppressed because it is too large Load Diff

1249
po/gu.po

File diff suppressed because it is too large Load Diff

1255
po/ja.po

File diff suppressed because it is too large Load Diff

2220
po/ko.po

File diff suppressed because it is too large Load Diff

1247
po/lt.po

File diff suppressed because it is too large Load Diff

160
po/nb.po
View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: libgtop 2.5.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-12-28 11:39+0100\n"
"PO-Revision-Date: 2004-12-28 11:40+0100\n"
"POT-Creation-Date: 2005-01-28 17:04+0100\n"
"PO-Revision-Date: 2005-01-28 17:05+0100\n"
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
"Language-Team: Norwegian <i18n-nb@lister.ping.uio.no>\n"
"MIME-Version: 1.0\n"
@@ -15,87 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: examples/smp.c:76
#, c-format
msgid "Ticks (%ld per second):"
msgstr "Tikk (%ld per sekund):"
#: examples/smp.c:79
msgid "Total"
msgstr "Totalt"
#: examples/smp.c:79
msgid "User"
msgstr "Bruker"
#: examples/smp.c:79
msgid "Nice"
msgstr "Nice"
#: examples/smp.c:79
msgid "Sys"
msgstr "Sys"
#: examples/smp.c:79
msgid "Idle"
msgstr "Idle"
#: examples/smp.c:81
#, c-format
msgid ""
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
"\n"
msgstr ""
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
"\n"
#: examples/smp.c:85
#, c-format
msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
#: examples/smp.c:102
msgid "Percent:"
msgstr "Prosent:"
#: examples/smp.c:103
msgid "Total (%)"
msgstr "Total (%)"
#: examples/smp.c:103
msgid "User (%)"
msgstr "Bruker (%)"
#: examples/smp.c:103
msgid "Nice (%)"
msgstr "Nice (%)"
#: examples/smp.c:103
msgid "Sys (%)"
msgstr "Sys (%)"
#: examples/smp.c:104
msgid "Idle (%)"
msgstr "Idle (%)"
#: examples/smp.c:106
#, c-format
msgid ""
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
"\n"
msgstr ""
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
"\n"
#: examples/smp.c:122
#, c-format
msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#: examples/smp.c:128
msgid "Spin:"
msgstr "Spinn:"
#: lib/read.c:64
#, c-format
msgid "read %d byte"
@@ -109,17 +28,17 @@ msgstr "les størrelse på data"
#: lib/read_data.c:71
#, c-format
msgid "read data %lu byte"
msgid_plural "read data %lu bytes"
msgstr[0] "les data %lu byte"
msgstr[1] "les data %lu bytes"
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "leste %lu byte med data"
msgstr[1] "leste %lu bytes med data"
#: lib/write.c:51
#, c-format
msgid "write %d byte"
msgid_plural "write %d bytes"
msgstr[0] "skriv %d byte"
msgstr[1] "skriv %d bytes"
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "skrev %d byte"
msgstr[1] "skrev %d bytes"
#: src/daemon/gnuserv.c:461
msgid "Enable debugging"
@@ -287,6 +206,65 @@ msgstr "Brukerdefinert signal 1"
msgid "User defined signal 2"
msgstr "Brukerdefinert signal 2"
#~ msgid "Ticks (%ld per second):"
#~ msgstr "Tikk (%ld per sekund):"
#~ msgid "Total"
#~ msgstr "Totalt"
#~ msgid "User"
#~ msgstr "Bruker"
#~ msgid "Nice"
#~ msgstr "Nice"
#~ msgid "Sys"
#~ msgstr "Sys"
#~ msgid "Idle"
#~ msgstr "Idle"
#~ msgid ""
#~ "CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
#~ "\n"
#~ msgstr ""
#~ "CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
#~ "\n"
#~ msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
#~ msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
#~ msgid "Percent:"
#~ msgstr "Prosent:"
#~ msgid "Total (%)"
#~ msgstr "Total (%)"
#~ msgid "User (%)"
#~ msgstr "Bruker (%)"
#~ msgid "Nice (%)"
#~ msgstr "Nice (%)"
#~ msgid "Sys (%)"
#~ msgstr "Sys (%)"
#~ msgid "Idle (%)"
#~ msgstr "Idle (%)"
#~ msgid ""
#~ "CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#~ "\n"
#~ msgstr ""
#~ "CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#~ "\n"
#~ msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#~ msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#~ msgid "Spin:"
#~ msgstr "Spinn:"
#~ msgid "Total CPU Time"
#~ msgstr "Total prosessortid"

2214
po/nl.po

File diff suppressed because it is too large Load Diff

160
po/no.po
View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: libgtop 2.5.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-12-28 11:39+0100\n"
"PO-Revision-Date: 2004-12-28 11:40+0100\n"
"POT-Creation-Date: 2005-01-28 17:04+0100\n"
"PO-Revision-Date: 2005-01-28 17:05+0100\n"
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
"Language-Team: Norwegian <i18n-nb@lister.ping.uio.no>\n"
"MIME-Version: 1.0\n"
@@ -15,87 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: examples/smp.c:76
#, c-format
msgid "Ticks (%ld per second):"
msgstr "Tikk (%ld per sekund):"
#: examples/smp.c:79
msgid "Total"
msgstr "Totalt"
#: examples/smp.c:79
msgid "User"
msgstr "Bruker"
#: examples/smp.c:79
msgid "Nice"
msgstr "Nice"
#: examples/smp.c:79
msgid "Sys"
msgstr "Sys"
#: examples/smp.c:79
msgid "Idle"
msgstr "Idle"
#: examples/smp.c:81
#, c-format
msgid ""
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
"\n"
msgstr ""
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
"\n"
#: examples/smp.c:85
#, c-format
msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
#: examples/smp.c:102
msgid "Percent:"
msgstr "Prosent:"
#: examples/smp.c:103
msgid "Total (%)"
msgstr "Total (%)"
#: examples/smp.c:103
msgid "User (%)"
msgstr "Bruker (%)"
#: examples/smp.c:103
msgid "Nice (%)"
msgstr "Nice (%)"
#: examples/smp.c:103
msgid "Sys (%)"
msgstr "Sys (%)"
#: examples/smp.c:104
msgid "Idle (%)"
msgstr "Idle (%)"
#: examples/smp.c:106
#, c-format
msgid ""
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
"\n"
msgstr ""
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
"\n"
#: examples/smp.c:122
#, c-format
msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#: examples/smp.c:128
msgid "Spin:"
msgstr "Spinn:"
#: lib/read.c:64
#, c-format
msgid "read %d byte"
@@ -109,17 +28,17 @@ msgstr "les størrelse på data"
#: lib/read_data.c:71
#, c-format
msgid "read data %lu byte"
msgid_plural "read data %lu bytes"
msgstr[0] "les data %lu byte"
msgstr[1] "les data %lu bytes"
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "leste %lu byte med data"
msgstr[1] "leste %lu bytes med data"
#: lib/write.c:51
#, c-format
msgid "write %d byte"
msgid_plural "write %d bytes"
msgstr[0] "skriv %d byte"
msgstr[1] "skriv %d bytes"
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "skrev %d byte"
msgstr[1] "skrev %d bytes"
#: src/daemon/gnuserv.c:461
msgid "Enable debugging"
@@ -287,6 +206,65 @@ msgstr "Brukerdefinert signal 1"
msgid "User defined signal 2"
msgstr "Brukerdefinert signal 2"
#~ msgid "Ticks (%ld per second):"
#~ msgstr "Tikk (%ld per sekund):"
#~ msgid "Total"
#~ msgstr "Totalt"
#~ msgid "User"
#~ msgstr "Bruker"
#~ msgid "Nice"
#~ msgstr "Nice"
#~ msgid "Sys"
#~ msgstr "Sys"
#~ msgid "Idle"
#~ msgstr "Idle"
#~ msgid ""
#~ "CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
#~ "\n"
#~ msgstr ""
#~ "CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
#~ "\n"
#~ msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
#~ msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
#~ msgid "Percent:"
#~ msgstr "Prosent:"
#~ msgid "Total (%)"
#~ msgstr "Total (%)"
#~ msgid "User (%)"
#~ msgstr "Bruker (%)"
#~ msgid "Nice (%)"
#~ msgstr "Nice (%)"
#~ msgid "Sys (%)"
#~ msgstr "Sys (%)"
#~ msgid "Idle (%)"
#~ msgstr "Idle (%)"
#~ msgid ""
#~ "CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#~ "\n"
#~ msgstr ""
#~ "CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#~ "\n"
#~ msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#~ msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
#~ msgid "Spin:"
#~ msgstr "Spinn:"
#~ msgid "Total CPU Time"
#~ msgstr "Total prosessortid"

352
po/pa.po

File diff suppressed because it is too large Load Diff

2265
po/pl.po

File diff suppressed because it is too large Load Diff

2180
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1301
po/ru.po

File diff suppressed because it is too large Load Diff

1257
po/sq.po

File diff suppressed because it is too large Load Diff

1265
po/uk.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,13 @@ else
inodedb_SUBDIRS =
endif
SUBDIRS = daemon $(inodedb_SUBDIRS)
if NEED_LIBGTOP
daemon_SUBDIRS = daemon
else
daemon_SUBDIRS =
endif
SUBDIRS = $(daemon_SUBDIRS) $(inodedb_SUBDIRS)
DIST_SUBDIRS = daemon inodedb

View File

@@ -1,3 +1,10 @@
2005-02-15 Benoît Dejean <TazForEver@dlfp.org>
* daemon.h:
* gnuserv.c: (syslog_message), (syslog_io_message):
* main.c: (handle_parent_connection):
* slave.c: (handle_slave_connection), (handle_slave_command): Misc. cleanups.
2004-09-19 Benoît Dejean <tazforever@dlfp.org>
* gnuserv.c: (setup_table): 'screen' is only defined when AUTH_MAGIC_COOKIE

View File

@@ -25,7 +25,6 @@
#define __GLIBTOP_DAEMON_H__
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/gnuserv.h>
#include <glibtop/open.h>
@@ -60,17 +59,17 @@ G_BEGIN_DECLS
#define MSG_BUFSZ sizeof (struct _glibtop_ipc_message)
#define MSG_MSGSZ (MSG_BUFSZ - sizeof (long))
void handle_parent_connection (int s);
void handle_slave_connection (int input, int output);
void handle_parent_connection (int s) G_GNUC_INTERNAL;
void handle_slave_connection (int input, int output) G_GNUC_INTERNAL;
void handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
const void *parameter);
const void *parameter) G_GNUC_INTERNAL ;
void do_output (int s, glibtop_response *resp, off_t offset,
size_t data_size, const void *data);
int do_read (int s, void *ptr, size_t total_size);
size_t data_size, const void *data) G_GNUC_INTERNAL;
int do_read (int s, void *ptr, size_t total_size) G_GNUC_INTERNAL;
void syslog_message (int priority, char *format, ...);
void syslog_io_message (int priority, char *format, ...);
void syslog_message (int priority, const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(2, 3);
void syslog_io_message (int priority, const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(2, 3);
extern int enable_debug;
extern int verbose_output;

View File

@@ -65,8 +65,6 @@ char *program_invocation_short_name;
char *program_invocation_name;
#endif
void handle_parent_connection (int s);
void handle_slave_connection (int input, int output);
#if !defined(INTERNET_DOMAIN_SOCKETS)
#error "Internet Domain sockets are required"
@@ -87,7 +85,7 @@ static int invoked_from_inetd = 0;
static int changed_uid = 0;
void
syslog_message (int priority, char *format, ...)
syslog_message (int priority, const char *format, ...)
{
va_list ap;
char buffer [BUFSIZ];
@@ -100,7 +98,7 @@ syslog_message (int priority, char *format, ...)
}
void
syslog_io_message (int priority, char *format, ...)
syslog_io_message (int priority, const char *format, ...)
{
va_list ap;
char buffer [BUFSIZ];

View File

@@ -22,6 +22,7 @@
*/
#include "daemon.h"
#include <glibtop/error.h>
void
do_output (int s, glibtop_response *resp, off_t offset,

View File

@@ -62,13 +62,13 @@ handle_parent_connection (int s)
while (do_read (s, cmnd, sizeof (glibtop_command))) {
if (enable_debug)
syslog_message (LOG_DEBUG,
"Parent (%d) received command %d from client.",
getpid (), (int) cmnd->command);
"Parent (%d) received command %llu from client.",
getpid (), cmnd->command);
if (cmnd->data_size >= BUFSIZ) {
syslog_message (LOG_WARNING,
"Client sent %d bytes, but buffer is %d",
cmnd->data_size, BUFSIZ);
"Client sent %llu bytes, but buffer is %lu",
cmnd->data_size, (unsigned long)BUFSIZ);
return;
}
@@ -78,8 +78,8 @@ handle_parent_connection (int s)
if (cmnd->data_size) {
if (enable_debug)
syslog_message (LOG_DEBUG, "Client has %d bytes of data.",
(int) cmnd->data_size);
syslog_message (LOG_DEBUG, "Client has %llu bytes of data.",
cmnd->data_size);
do_read (s, parameter, cmnd->data_size);
@@ -229,7 +229,7 @@ handle_parent_connection (int s)
0, NULL);
break;
default:
syslog_message (LOG_ERR, "Parent received unknown command %u.",
syslog_message (LOG_ERR, "Parent received unknown command %llu.",
cmnd->command);
break;
}

View File

@@ -22,6 +22,7 @@
*/
#include "daemon.h"
#include <glibtop/error.h>
void
handle_slave_connection (int input, int output)
@@ -42,13 +43,13 @@ handle_slave_connection (int input, int output)
while (do_read (input, cmnd, sizeof (glibtop_command))) {
#ifdef SLAVE_DEBUG
fprintf (stderr, "Slave %d received command "
"%d from client.\n", getpid (), cmnd->command);
"%llu from client.\n", getpid (), cmnd->command);
#endif
if (cmnd->data_size >= BUFSIZ)
glibtop_error ("Client sent %d bytes, "
"but buffer is %d",
cmnd->size, BUFSIZ);
glibtop_error ("Client sent %llu bytes, "
"but buffer is %lu",
cmnd->size, (unsigned long)BUFSIZ);
memset (resp, 0, sizeof (glibtop_response));
@@ -56,7 +57,7 @@ handle_slave_connection (int input, int output)
if (cmnd->data_size) {
#ifdef SLAVE_DEBUG
fprintf (stderr, "Client has %d bytes of data.\n",
fprintf (stderr, "Client has %llu bytes of data.\n",
cmnd->data_size);
#endif
@@ -249,7 +250,7 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
break;
#endif
default:
glibtop_error ("Child received unknown command %u",
glibtop_error ("Child received unknown command %llu",
cmnd->command);
break;
}

View File

@@ -1,3 +1,23 @@
2005-02-28 Benoît Dejean <TazForEver@dlfp.org>
* fsusage.c: * Add support for file system read and write counting
(needed for the disk load feature of the multiload applet).
2005-02-23 Benoît Dejean <TazForEver@dlfp.org>
* fsusage.c: (glibtop_get_fsusage_s): Correct file system size calculations.
Patch from marcus@freebsd.org (Joe Marcus Clarke).
Closes #168232.
2005-02-15 Benoît Dejean <TazForEver@dlfp.org>
* fsusage.c: (_glibtop_get_fsusage_read_write): Fixed G_GNUC attribute usage.
Replaced macro by inline function.
2005-01-18 Benoît Dejean <TazForEver@dlfp.org>
* mountlist.c: (ignore_mount_entry): Re-worked with bsearch.
2004-12-09 Benoît Dejean <tazforever@dlfp.org>
* mountlist.c: (ignore_mount_entry): Ignores "unkown" file system type.

View File

@@ -126,13 +126,28 @@ static const unsigned long _glibtop_sysdeps_fsusage =
*/
#ifdef linux
void G_GNUC_INTERNAL
void
_glibtop_linux_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path);
const char *path) G_GNUC_INTERNAL;
static inline void
_glibtop_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path)
{
_glibtop_linux_get_fsusage_read_write(server, buf, path);
}
#elif defined(__FreeBSD__)
void G_GNUC_INTERNAL
_glibtop_freebsd_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path);
#define _glibtop_get_fsusage_read_write(S, B, P) \
_glibtop_linux_get_fsusage_read_write(S, B, P)
_glibtop_freebsd_get_fsusage_read_write(S, B, P)
#else /* default fallback */
#warning glibtop_get_fsusage .read .write are not implemented.
@@ -143,7 +158,7 @@ _glibtop_get_fsusage_read_write(glibtop *server,
{
/* NOOP */
}
#endif
#endif /* default fallback */
/* end _glibtop_get_fsusage_read_write */
@@ -254,8 +269,9 @@ glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf,
if (statvfs (path, &fsd) < 0)
return;
#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))
/* Solaris but not SunOS */
#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)) \
|| defined(__FreeBSD__)
/* Solaris but not SunOS and FreeBSD */
buf->block_size = fsd.f_frsize;
#else
/* else, including Linux */

View File

@@ -30,6 +30,7 @@
*/
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/gnuserv.h>
#include <fcntl.h>

View File

@@ -21,6 +21,7 @@
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
@@ -535,31 +536,28 @@ read_filesystem_list (void)
static gboolean ignore_mount_entry(const struct mount_entry *me)
{
/* keep sorted */
static const char ignored[][12] = {
"autofs",
"binfmt_misc",
"devpts",
"mntfs",
"none",
"openpromfs",
"proc",
"procfs",
"autofs",
"sysfs",
"usbfs",
"none",
"devpts",
"usbdevfs",
"binfmt_misc",
"supermount",
"mntfs",
"openpromfs",
"unknown"
"sysfs",
"unknown",
"usbdevfs",
"usbfs"
};
const char (*i)[12] = &ignored[0];
typedef int (*Comparator)(const void*, const void*);
while(i != (&ignored[0] + G_N_ELEMENTS(ignored))) {
if(strcmp(*i, me->me_type) == 0)
return TRUE;
++i;
}
return FALSE;
return bsearch(me->me_type,
ignored, G_N_ELEMENTS(ignored), sizeof ignored[0],
(Comparator) strcmp) != NULL;
}

View File

@@ -1,3 +1,51 @@
2005-02-28 Benoît Dejean <TazForEver@dlfp.org>
* fsusage.c: (_glibtop_freebsd_get_fsusage_read_write): Forgot to add
this file :)
2005-02-28 Benoît Dejean <TazForEver@dlfp.org>
* Makefile.am:
* cpu.c: (glibtop_get_cpu_p):
* netlist.c: (glibtop_get_netlist_s):
* netload.c: (glibtop_get_netload_p):
* procmem.c: (glibtop_get_proc_mem_p):
Fix a bug in netlist where glibtop_netlist.number was never initialized to 0
(this resulted in a NULL pointer dereference in the network load feature
of the multiload applet)
* Add support for getting interface flags and packet counts even on interfaces
without IP addresses (needed for the network load feature of the multiload applet)
* Restore per-process limits in the !FreeBSD or __FreeBSD_version < 500013
case
* Add CPU interrupt time as IOWAIT to get support for the cpu load feature of
the multiload applet.
Patch from marcus@freebsd.org (Joe Marcus Clarke).
Closes #168704.
2005-02-23 Benoît Dejean <TazForEver@dlfp.org>
* Makefile.am:
* netlist.c: (glibtop_get_netlist_s):
* procmap.c: (glibtop_get_proc_map_p):
* procmem.c: (glibtop_get_proc_mem_p):
* procopenfiles.c: (glibtop_init_proc_open_files_s),
(glibtop_get_proc_open_files_s):
* proctime.c:
Add support for FreeBSD 6-CURRENT.
Use the more portable getrlimit to obtain process memory limits.
Correctly determine process time.
Stub out the procopenfiles() function (this is not yet implemented, however).
Fix a nasty infinite loop and memory leak due to a forgot pointer increment.
Patch from marcus@freebsd.org (Joe Marcus Clarke).
Closes #168232.
2004-12-05 Benoît Dejean <tazforever@dlfp.org>
* Makefile.am:

View File

@@ -12,7 +12,7 @@ libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
sem_limits.c proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \
procsegment.c procargs.c procmap.c netlist.c \
netload.c ppp.c
netload.c ppp.c procopenfiles.c fsusage.c
libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)

View File

@@ -34,7 +34,8 @@
static const unsigned long _glibtop_sysdeps_cpu =
(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
(1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) +
(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY);
(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY) +
(1L << GLIBTOP_CPU_IOWAIT);
#ifndef KERN_CP_TIME
/* nlist structure for kernel access */
@@ -122,6 +123,8 @@ glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
buf->sys = cpts [CP_SYS];
/* set idle time */
buf->idle = cpts [CP_IDLE];
/* set iowait (really just interrupt) time */
buf->iowait = cpts [CP_INTR];
/* set frequency */
/*

41
sysdeps/freebsd/fsusage.c Normal file
View File

@@ -0,0 +1,41 @@
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/fsusage.h>
#include <glibtop_suid.h>
#include <glib.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/mount.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void
G_GNUC_INTERNAL
_glibtop_freebsd_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path);
void G_GNUC_INTERNAL
_glibtop_freebsd_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path)
{
int result;
struct statfs sfs;
result = statfs (path, &sfs);
if (result == -1) {
return;
}
buf->read = sfs.f_syncreads + sfs.f_asyncreads;
buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
}

View File

@@ -43,6 +43,10 @@ glibtop_get_netlist_s (glibtop *server, glibtop_netlist *buf)
struct if_nameindex *ifstart, *ifs;
GPtrArray *devices;
glibtop_init_s (&server, GLIBTOP_SYSDEPS_NETLIST, 0);
memset (buf, 0, sizeof (glibtop_netlist));
ifs = ifstart = if_nameindex();
devices = g_ptr_array_new();
@@ -50,6 +54,7 @@ glibtop_get_netlist_s (glibtop *server, glibtop_netlist *buf)
while(ifs && ifs->if_name) {
g_ptr_array_add(devices, g_strdup(ifs->if_name));
buf->number++;
ifs++;
}
if_freenameindex(ifstart);

View File

@@ -40,11 +40,6 @@
static const unsigned long _glibtop_sysdeps_netload =
(1L << GLIBTOP_NETLOAD_IF_FLAGS) +
(1L << GLIBTOP_NETLOAD_MTU) +
#if !defined(__bsdi__)
(1L << GLIBTOP_NETLOAD_SUBNET) +
#endif
(1L << GLIBTOP_NETLOAD_ADDRESS) +
(1L << GLIBTOP_NETLOAD_PACKETS_IN) +
(1L << GLIBTOP_NETLOAD_PACKETS_OUT) +
(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
@@ -56,6 +51,13 @@ static const unsigned long _glibtop_sysdeps_netload =
(1L << GLIBTOP_NETLOAD_ERRORS_TOTAL) +
(1L << GLIBTOP_NETLOAD_COLLISIONS);
static const unsigned _glibtop_sysdeps_netload_data =
(1L << GLIBTOP_NETLOAD_ADDRESS) +
#if !defined(__bsdi__)
(1L << GLIBTOP_NETLOAD_SUBNET) +
#endif
(1L << GLIBTOP_NETLOAD_MTU);
/* nlist structure for kernel access */
static struct nlist nlst [] = {
{ "_ifnet" },
@@ -81,9 +83,9 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
{
struct ifnet ifnet;
u_long ifnetaddr, ifnetfound, ifaddraddr;
struct sockaddr *sa;
struct sockaddr *sa = NULL;
char tname [16];
char temp [16];
char name [32];
union {
struct ifaddr ifa;
@@ -114,12 +116,21 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
if (kvm_read (server->machine.kd, (u_long) ifnet.if_name,
tname, 16) != 16)
glibtop_error_io_r (server, "kvm_read (if_name)");
snprintf(temp, (15 - strlen(tname)), "%d", ifnet.if_unit);
strcat(tname, temp);
tname [15] = 0;
tname[15] = '\0';
snprintf (name, 32, "%s%d", tname, ifnet.if_unit);
#else
g_strlcpy (tname, ifnet.if_xname, sizeof tname);
g_strlcpy (name, ifnet.if_xname, sizeof(name));
#endif
#if defined(__FreeBSD__) && (__FreeBSD_version >= 300000)
ifnetaddr = (u_long) ifnet.if_link.tqe_next;
#elif defined(__FreeBSD__) || defined(__bsdi__)
ifnetaddr = (u_long) ifnet.if_next;
#else
ifnetaddr = (u_long) ifnet.if_list.tqe_next;
#endif
if (strcmp (name, interface) != 0)
continue;
#if defined(__FreeBSD__) && (__FreeBSD_version >= 300000)
ifaddraddr = (u_long) ifnet.if_addrhead.tqh_first;
@@ -129,6 +140,55 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
ifaddraddr = (u_long) ifnet.if_addrlist.tqh_first;
#endif
}
if (ifnet.if_flags & IFF_UP)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
if (ifnet.if_flags & IFF_BROADCAST)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
if (ifnet.if_flags & IFF_DEBUG)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
if (ifnet.if_flags & IFF_LOOPBACK)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
if (ifnet.if_flags & IFF_POINTOPOINT)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
if (ifnet.if_flags & IFF_RUNNING)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
if (ifnet.if_flags & IFF_NOARP)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
if (ifnet.if_flags & IFF_PROMISC)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
if (ifnet.if_flags & IFF_ALLMULTI)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
if (ifnet.if_flags & IFF_OACTIVE)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_OACTIVE);
if (ifnet.if_flags & IFF_SIMPLEX)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_SIMPLEX);
if (ifnet.if_flags & IFF_LINK0)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK0);
if (ifnet.if_flags & IFF_LINK1)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK1);
if (ifnet.if_flags & IFF_LINK2)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK2);
#ifdef __FreeBSD__
if (ifnet.if_flags & IFF_ALTPHYS)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALTPHYS);
#endif
if (ifnet.if_flags & IFF_MULTICAST)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
buf->packets_in = ifnet.if_ipackets;
buf->packets_out = ifnet.if_opackets;
buf->packets_total = buf->packets_in + buf->packets_out;
buf->bytes_in = ifnet.if_ibytes;
buf->bytes_out = ifnet.if_obytes;
buf->bytes_total = buf->bytes_in + buf->bytes_out;
buf->errors_in = ifnet.if_ierrors;
buf->errors_out = ifnet.if_oerrors;
buf->errors_total = buf->errors_in + buf->errors_out;
buf->collisions = ifnet.if_collisions;
buf->flags = _glibtop_sysdeps_netload;
if (ifaddraddr) {
if ((kvm_read (server->machine.kd, ifaddraddr, &ifaddr,
@@ -137,86 +197,22 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
#define CP(x) ((char *)(x))
cp = (CP(ifaddr.ifa.ifa_addr) - CP(ifaddraddr)) +
CP(&ifaddr); sa = (struct sockaddr *)cp;
CP(&ifaddr);
sa = (struct sockaddr *)cp;
if (!strcmp (interface, tname) && (sa->sa_family == AF_INET)) {
if (sa->sa_family == AF_INET) {
sin = (struct sockaddr_in *)sa;
if (ifnet.if_flags & IFF_UP)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
if (ifnet.if_flags & IFF_BROADCAST)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
if (ifnet.if_flags & IFF_DEBUG)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
if (ifnet.if_flags & IFF_LOOPBACK)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
if (ifnet.if_flags & IFF_POINTOPOINT)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
if (ifnet.if_flags & IFF_RUNNING)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
if (ifnet.if_flags & IFF_NOARP)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
if (ifnet.if_flags & IFF_PROMISC)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
if (ifnet.if_flags & IFF_ALLMULTI)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
if (ifnet.if_flags & IFF_OACTIVE)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_OACTIVE);
if (ifnet.if_flags & IFF_SIMPLEX)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_SIMPLEX);
if (ifnet.if_flags & IFF_LINK0)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK0);
if (ifnet.if_flags & IFF_LINK1)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK1);
if (ifnet.if_flags & IFF_LINK2)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK2);
#ifdef __FreeBSD__
if (ifnet.if_flags & IFF_ALTPHYS)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALTPHYS);
#endif
if (ifnet.if_flags & IFF_MULTICAST)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
#if !defined(__bsdi__)
/* Commenting out to "fix" #13345. */
buf->subnet = htonl (ifaddr.in.ia_subnet);
#endif
buf->address = sin->sin_addr.s_addr;
buf->mtu = ifnet.if_mtu;
buf->packets_in = ifnet.if_ipackets;
buf->packets_out = ifnet.if_opackets;
buf->packets_total = buf->packets_in + buf->packets_out;
buf->flags |= _glibtop_sysdeps_netload_data;
buf->bytes_in = ifnet.if_ibytes;
buf->bytes_out = ifnet.if_obytes;
buf->bytes_total = buf->bytes_in + buf->bytes_out;
buf->errors_in = ifnet.if_ierrors;
buf->errors_out = ifnet.if_oerrors;
buf->errors_total = buf->errors_in + buf->errors_out;
buf->collisions = ifnet.if_collisions;
buf->flags = _glibtop_sysdeps_netload;
return;
}
#if defined(__FreeBSD__) && (__FreeBSD_version >= 300000)
ifaddraddr = (u_long)ifaddr.ifa.ifa_link.tqe_next;
#elif defined(__FreeBSD__) || defined(__bsdi__)
ifaddraddr = (u_long)ifaddr.ifa.ifa_next;
#else
ifaddraddr = (u_long)ifaddr.ifa.ifa_list.tqe_next;
#endif
}
#if defined(__FreeBSD__) && (__FreeBSD_version >= 300000)
ifnetaddr = (u_long) ifnet.if_link.tqe_next;
#elif defined(__FreeBSD__) || defined(__bsdi__)
ifnetaddr = (u_long) ifnet.if_next;
#else
ifnetaddr = (u_long) ifnet.if_list.tqe_next;
#endif
return;
}
}

View File

@@ -47,7 +47,13 @@
#endif
#endif
#ifdef __FreeBSD__
#define _KVM_VNODE
#endif
#include <sys/vnode.h>
#ifdef __FreeBSD__
#undef _KVM_VNODE
#endif
#include <sys/mount.h>
#include <ufs/ufs/quota.h>
#include <ufs/ufs/inode.h>
@@ -104,7 +110,7 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
glibtop_map_entry *maps;
#if defined __FreeBSD__
struct vnode vnode;
#if __FreeBSD_version >= 500039
#if __FreeBSD_version < 500039
struct inode inode;
#endif
#endif
@@ -122,8 +128,10 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
/* Get the process data */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
if ((pinfo == NULL) || (count < 1))
if ((pinfo == NULL) || (count < 1)) {
glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
return NULL;
}
/* Now we get the memory maps. */
@@ -264,8 +272,10 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
#if defined(__FreeBSD__) && (__FreeBSD_version >= 500039)
switch (vnode.v_type) {
case VREG:
#if __FreeBSD_version < 600006
maps [i-1].inode = vnode.v_cachedid;
maps [i-1].device = vnode.v_cachedfs;
#endif
default:
continue;
}
@@ -278,13 +288,9 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
&inode, sizeof (inode)) != sizeof (inode))
glibtop_error_io_r (server, "kvm_read (inode)");
if (kvm_read (server->machine.kd,
(unsigned long) vnode.v_mount,
&mount, sizeof (mount)) != sizeof (mount))
glibtop_error_io_r (server, "kvm_read (mount)");
#endif
maps [i-1].inode = inode.i_number;
maps [i-1].device = inode.i_dev;
#endif
#endif
} while (entry.next != first);

View File

@@ -31,7 +31,7 @@
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/resource.h>
#ifdef __NetBSD__ && (__NetBSD_Version__ >= 105020000)
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105020000)
#include <uvm/uvm_extern.h>
#else
#include <vm/vm_object.h>
@@ -47,7 +47,7 @@
#include <sys/user.h>
#endif
#include <sys/sysctl.h>
#ifdef __NetBSD__ && (__NetBSD_Version__ >= 105020000)
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105020000)
#include <uvm/uvm.h>
#else
#include <vm/vm.h>
@@ -125,7 +125,9 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
#else
struct vm_object object;
#endif
#if !defined(__FreeBSD__) || (__FreeBSD_version < 500013)
struct plimit plimit;
#endif
int count;
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MEM), 0);

View File

@@ -1,8 +1,11 @@
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
Copyright (C) 2004 Nicolás Lichtmaier
This file is part of LibGTop 1.0.
Modified by Nicolás Lichtmaier to give a process open files.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
LibGTop is free software; you can redistribute it and/or modify it
@@ -21,18 +24,29 @@
Boston, MA 02111-1307, USA.
*/
#ifndef __GLIBTOP_TYPES_H__
#define __GLIBTOP_TYPES_H__
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/procopenfiles.h>
G_BEGIN_DECLS
#include <glibtop_suid.h>
#define GLIBTOP_TYPE_LONG 1
#define GLIBTOP_TYPE_ULONG 2
#define GLIBTOP_TYPE_DOUBLE 3
#define GLIBTOP_TYPE_INT 4
#define GLIBTOP_TYPE_CHAR 5
#define GLIBTOP_TYPE_STRING 6
static const unsigned long _glibtop_sysdeps_proc_open_files =
(1L << GLIBTOP_PROC_OPEN_FILES_NUMBER)|
(1L << GLIBTOP_PROC_OPEN_FILES_TOTAL)|
(1L << GLIBTOP_PROC_OPEN_FILES_SIZE);
G_END_DECLS
/* Init function. */
#endif
void
glibtop_init_proc_open_files_s (glibtop *server)
{
server->sysdeps.proc_open_files = _glibtop_sysdeps_proc_open_files;
}
/* XXX Unimplemented on FreeBSD */
glibtop_open_files_entry *
glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pid_t pid)
{
return NULL;
}

View File

@@ -59,6 +59,7 @@ glibtop_init_proc_time_p (glibtop *server)
#ifndef __FreeBSD__
#ifndef __FreeBSD__
static void
calcru(p, up, sp, ip)
struct proc *p;
@@ -81,19 +82,10 @@ calcru(p, up, sp, ip)
tot = 1;
}
#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003)
/* This was changed from a `struct timeval' into a `guint64'
* on FreeBSD 3.0 and renamed p_rtime -> p_runtime.
*/
totusec = (u_quad_t) p->p_runtime;
#else
sec = p->p_rtime.tv_sec;
usec = p->p_rtime.tv_usec;
totusec = (quad_t)sec * 1000000 + usec;
#endif
if (totusec < 0) {
/* XXX no %qd in kernel. Truncate. */
@@ -116,6 +108,7 @@ calcru(p, up, sp, ip)
ip->tv_usec = it % 1000000;
}
}
#endif
#endif /* !__FreeBSD__ */
@@ -134,9 +127,6 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
struct pstats pstats;
int count;
char filename [BUFSIZ];
struct stat statb;
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_TIME), 0);
memset (buf, 0, sizeof (glibtop_proc_time));

View File

@@ -1,3 +1,30 @@
2005-02-15 Benoît Dejean <TazForEver@dlfp.org>
* fsusage.c: Fixed G_GNUC attribute usage.
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
* 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-16 Benoît Dejean <TazForEver@dlfp.org>
* glibtop_private.c: (skip_token):
* glibtop_private.h: Uninlined.
2005-01-13 Benoît Dejean <TazForEver@dlfp.org>
* 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-12 Benoît Dejean <TazForEver@dlfp.org>
* procopenfiles.c: (get_all_sockets),
(glibtop_get_proc_open_files_s): Parses /proc/net/tcp only once.
2005-01-10 Benoît Dejean <TazForEver@dlfp.org>
* procopenfiles.c: (get_socket_endpoint): Fixed.

View File

@@ -5,87 +5,116 @@
#include <glib.h>
#include <mntent.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <linux/kdev_t.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void
G_GNUC_INTERNAL
_glibtop_linux_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path);
const char *path) G_GNUC_INTERNAL;
/*
* Linux 2.6.x
* linux/Documentation/iostats.txt
*/
static char *
get_partition(const char *mountpoint)
{
FILE *partitions;
char *name = NULL;
char line[1024];
struct stat statb;
if(stat(mountpoint, &statb) == -1)
return NULL;
g_return_val_if_fail((partitions = fopen("/proc/partitions", "r")), NULL);
while(fgets(line, sizeof line, partitions))
{
unsigned major, minor;
char dev[32];
if(sscanf(line, "%u %u %*u %31s", &major, &minor, dev) != 3)
continue;
if(MKDEV(major, minor) != statb.st_dev)
continue;
name = g_strdup(dev);
break;
}
fclose(partitions);
return name;
}
static char *
get_sys_path(const char *device)
{
if(g_str_has_prefix(device, "hd") || g_str_has_prefix(device, "sd"))
{
char *prefix;
char *path;
size_t offset;
offset = strcspn(device, "0123456789");
prefix = g_strdup(device);
prefix [offset] = '\0';
path = g_strdup_printf("/sys/block/%s/%s/stat",
prefix, device);
g_free(prefix);
return path;
}
else
{
return g_strdup_printf("/sys/block/%s/stat", device);
}
}
static void linux_2_6_0(glibtop *server, glibtop_fsusage *buf, const char *path)
{
FILE *mtab = setmntent("/etc/mtab", "r");
char *device;
char *filename;
int ret;
char buffer[BUFSIZ];
char *p;
struct mntent *emnt;
device = get_partition(path);
if(!device) return;
while((emnt = getmntent(mtab)) != NULL)
{
if(strcmp(emnt->mnt_dir, path) == 0)
{
char filename[64]; /* magic */
filename = get_sys_path(device);
g_free(device);
char buffer[1024]; /* magic */
char *p;
ret = try_file_to_buffer(buffer, filename);
g_free(filename);
char device[32]; /* magic */
unsigned partition;
if(ret < 0) return;
const char *devname = emnt->mnt_fsname;
size_t offset;
p = buffer;
p = skip_token(p);
buf->read = strtoull(p, &p, 0);
p = skip_token(p);
buf->write = strtoull(p, &p, 0);
/*
we only deal with /dev block devices "/dev/<DEVICE><PARTITION>"
i don't know if other block devices such as network block
devices provide this kind of information.
*/
if(!g_str_has_prefix(devname, "/dev/"))
break;
/* skip the "/dev/" */
devname += sizeof "/dev/" - 1;
g_strlcpy(device, devname, sizeof device);
offset = strcspn(devname, "0123456789");
partition = strtoul(devname + offset, NULL, 0);
device[offset] = '\0';
if((size_t) g_snprintf(filename, sizeof filename,
"/sys/block/%s/%s%u/stat",
device, device, partition) >= sizeof filename)
break;
if(try_file_to_buffer(buffer, filename) < 0)
break;
p = buffer;
p = skip_token(p);
buf->read = strtoull(p, &p, 0);
p = skip_token(p);
buf->write = strtoull(p, &p, 0);
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
break;
}
}
endmntent(mtab);
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
}

View File

@@ -32,6 +32,16 @@ get_scaled(const char *buffer, const char *key)
}
char *
skip_token (const char *p)
{
p = next_token(p);
while (*p && !isspace(*p)) p++;
p = next_token(p);
return (char *)p;
}
/*
* Read functions
*/

View File

@@ -40,14 +40,8 @@ next_token(const char *p)
return (char*) p;
}
static inline char *
skip_token (const char *p)
{
p = next_token(p);
while (*p && !isspace(*p)) p++;
p = next_token(p);
return (char *)p;
}
char * G_GNUC_INTERNAL
skip_token (const char *p);
static inline char *
skip_multiple_token (const char *p, size_t count)

View File

@@ -1,10 +1,10 @@
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
Copyright (C) 2004 Nicolás Lichtmaier
Copyright (C) 2004 Nicolás Lichtmaier
This file is part of LibGTop 1.0.
Modified by Nicolás Lichtmaier to give a process open files.
Modified by Nicolás Lichtmaier to give a process open files.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
@@ -49,41 +49,127 @@ glibtop_init_proc_open_files_s (glibtop *server)
}
typedef void (*LineParser)(GHashTable *dict, const char *line);
static void
get_socket_endpoint(char *buf, int *prmtport, int s)
parse_file(const char *filename, LineParser parser, GHashTable *dict)
{
FILE *f;
char line[1024];
buf[0] = '\0';
*prmtport = 0;
f = fopen(filename, "r");
f = fopen("/proc/net/tcp", "r");
if(!f)
if(!f) {
g_warning("Cannot open '%s'", filename);
return;
}
/* skip the first line */
if(!fgets(line, sizeof line, f)) goto eof;
while(fgets(line, sizeof line, f))
{
unsigned int rmt;
int sock = -42;
sscanf(line, "%*d: %*x:%*x %8x:%4x %*x %*x:%*x %*x:%*x %*d %*d %*d %d",
&rmt, prmtport, &sock);
if(sock == s)
{
inet_ntop(AF_INET, &rmt, buf, GLIBTOP_OPEN_DEST_HOST_LEN);
break;
}
parser(dict, line);
}
eof:
fclose(f);
}
static GHashTable*
get_all(const char *filename, LineParser parser)
{
GHashTable *dict;
dict = g_hash_table_new_full(g_direct_hash, g_direct_equal,
NULL, g_free);
parse_file(filename, parser, dict);
return dict;
}
struct InetSocketEntry
{
char host[GLIBTOP_OPEN_DEST_HOST_LEN + 1];
int port;
};
static void
inet_socket_parser(GHashTable *dict, const char* line)
{
struct InetSocketEntry *se;
int sock;
unsigned addr;
se = g_malloc0(sizeof *se);
if(sscanf(line, "%*d: %*x:%*x %8x:%4x %*x %*x:%*x %*x:%*x %*d %*d %*d %d",
&addr, &se->port, &sock) != 3)
goto error;
if(!inet_ntop(AF_INET, &addr, se->host, sizeof se->host))
goto error;
g_hash_table_insert(dict, GINT_TO_POINTER(sock), se);
return;
error:
g_free(se);
}
static inline GHashTable *
get_all_inet_sockets()
{
return get_all("/proc/net/tcp", inet_socket_parser);
}
struct LocalSocketEntry
{
char name[GLIBTOP_OPEN_DEST_HOST_LEN + 1];
};
static void
local_socket_parser(GHashTable *dict, const char *line)
{
int sock;
struct LocalSocketEntry *use;
char *p;
use = g_malloc0(sizeof *use);
/* dfaf1640: 00000003 00000000 00000000 0001 03 6457 /dev/log */
p = skip_multiple_token(line, 6);
sock = strtoul(p, &p, 10);
g_strlcpy(use->name, p, sizeof use->name);
g_strstrip(use->name);
g_hash_table_insert(dict, GINT_TO_POINTER(sock), use);
}
static inline GHashTable *
get_all_local_sockets()
{
return get_all("/proc/net/unix", local_socket_parser);
}
/* Provides detailed information about a process' open files */
glibtop_open_files_entry *
@@ -91,8 +177,8 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
{
char fn [BUFSIZ];
GArray *entries;
GHashTable *inet_sockets = NULL, *local_sockets = NULL;
struct dirent *direntry;
int rv;
DIR *dir;
glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_OPEN_FILES, 0);
@@ -108,9 +194,9 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
while((direntry = readdir(dir))) {
char tgt [BUFSIZ];
int rv;
glibtop_open_files_entry entry = {0};
if(direntry->d_name[0] == '.')
continue;
@@ -126,11 +212,37 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
if(g_str_has_prefix(tgt, "socket:["))
{
int sockfd;
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
struct InetSocketEntry *ise;
struct LocalSocketEntry *lse;
if(!inet_sockets) inet_sockets = get_all_inet_sockets();
if(!local_sockets) local_sockets = get_all_local_sockets();
sockfd = atoi(tgt + 8);
get_socket_endpoint(entry.info.sock.dest_host,
&(entry.info.sock.dest_port),
sockfd);
ise = g_hash_table_lookup(inet_sockets,
GINT_TO_POINTER(sockfd));
if(ise) {
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
entry.info.sock.dest_port = ise->port;
g_strlcpy(entry.info.sock.dest_host, ise->host,
sizeof entry.info.sock.dest_host);
goto found;
}
lse = g_hash_table_lookup(local_sockets,
GINT_TO_POINTER(sockfd));
if(lse) {
entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET;
g_strlcpy(entry.info.localsock.name, lse->name,
sizeof entry.info.localsock.name);
goto found;
}
found:
(void)0; /* kills warning */
}
else if(g_str_has_prefix(tgt, "pipe:["))
{
@@ -147,6 +259,9 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
closedir (dir);
if(inet_sockets) g_hash_table_destroy(inet_sockets);
if(local_sockets) g_hash_table_destroy(local_sockets);
buf->flags = _glibtop_sysdeps_proc_open_files;
buf->number = entries->len;
buf->size = sizeof(glibtop_open_files_entry);

View File

@@ -25,7 +25,6 @@
#define __GLIBTOP_PRIVATE_H__
#include <glibtop.h>
#include <glibtop/error.h>
#include <sys/param.h>
#include <kstat.h>

View File

@@ -1,3 +1,7 @@
2005-02-02 Benoît Dejean <TazForEver@dlfp.org>
* procopenfiles.c: Fixed typo. Closes #166090
2004-12-23 Benoît Dejean <tazforever@dlfp.org>
* netlist.c: (glibtop_get_netlist_s): Fixed.

View File

@@ -1,7 +1,7 @@
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
Copyright (C) 2004 Nicolás Lichtmaier
Copyright (C) 2004 Nicolás Lichtmaier
This file is part of LibGTop 1.0.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
@@ -37,7 +37,7 @@ glibtop_init_proc_open_files_s (glibtop *server)
/* Provides detailed information about a process. */
glibtop_open_file_entry *
glibtop_open_files_entry *
glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pid_t pid)
{
glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0);