Compare commits

...

30 Commits

Author SHA1 Message Date
Benoît Dejean
2930c9f092 Released 2.12.0.
* NEWS:
        * configure.in:

        Released 2.12.0.
2005-09-04 22:31:58 +00:00
Josep Puigdemont i Casamajó
fe6a33a5fd Fixed some typos and strings. 2005-09-03 23:17:21 +00:00
Telsa Gwynne
30ebfb45d0 Updated Welsh Translation 2005-08-29 19:34:50 +00:00
Benoît Dejean
b43a1e01c0 Hum hum, it's better if release number is 2.11.92 too.
* configure.in:

	Hum hum, it's better if release number is 2.11.92 too.
2005-08-22 17:06:23 +00:00
Benoît Dejean
88d606d814 Released 2.11.92.
* NEWS:

	Released 2.11.92.
2005-08-22 17:02:57 +00:00
Mugurel Tudor
dd0d06898a Updated Romanian translation by Misu Moldovan <dumol@gnome.ro>
2005-08-22  Mugurel Tudor  <mugurelu@gnome.ro>

        * ro.po: Updated Romanian translation
	 by Misu Moldovan <dumol@gnome.ro>
2005-08-21 23:37:57 +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
22a1120348 Added missing includes. Added missing GLIBTOP_SUID_NETLIST.
* glibtop_server.h:
	* open.c:
	* open_suid.c:
	* procdata.c:

	Added missing includes.
	Added missing GLIBTOP_SUID_NETLIST.
2005-08-12 14:55:38 +00:00
Benoît Dejean
da4dc46b7a Released 2.11.91.
* NEWS:

	Released 2.11.91.
2005-08-07 23:12:39 +00:00
Benoît Dejean
03bcc48da6 Removed static examples.
* configure.in:
	* examples/Makefile.am:

	Removed static examples.
2005-08-03 22:47:19 +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
Dave Neary
9f7d505d20 Fix a C formatting string translation.
2005-08-02  Dave Neary  <bolsh@gimp.org>

	* tr.po: Fix a C formatting string translation.
2005-08-03 13:21:44 +00:00
Benoît Dejean
78cb7832c5 Moved _glibtop_init_hook_[sp] declaration to private glibtop/init_hooks.h.
* configure.in:
	* include/glibtop/Makefile.am:
	* include/glibtop/glibtop-server.h:
	* include/glibtop/init_hooks.h:
	* include/glibtop/sysdeps.h:
	* lib/init.c: (glibtop_init_s):
	* lib/sysdeps.c:
	* sysdeps/aix/open.c: (glibtop_init_p):
	* sysdeps/common/sysdeps_suid.c:
	* sysdeps/freebsd/open.c: (glibtop_init_p):
	* sysdeps/osf1/open_suid.c: (glibtop_init_p):
	* sysdeps/solaris/open_suid.c: (glibtop_init_p):
	* sysdeps/stub_suid/open.c: (glibtop_init_p):

	Moved _glibtop_init_hook_[sp] declaration to private
	glibtop/init_hooks.h. Marked them const.

	Fixed GLIBTOP_SUID_NETLIST issues.
2005-08-02 09:47:21 +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
92d3176303 Added pprint_get_proc_kernel(pid).
Fixed prototypes.
2005-08-02 04:39:13 +00:00
Alexander Shopov
e5c7f87f50 Updated Bulgarian translation by Alexander Shopov <ash@contact.bg>
2005-06-28  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Alexander Shopov <ash@contact.bg>
2005-07-28 11:01:25 +00:00
Benoît Dejean
7e506a6c83 Released 2.11.90.
* NEWS:
        * configure.in: Released 2.11.90.
2005-07-25 13:20:08 +00:00
Benoît Dejean
1645027004 Fixed .flags.
* uptime.c:

	Fixed .flags.
2005-07-23 00:01:11 +00:00
Benoît Dejean
8e656af060 2.11.3 post release version bump.
* configure.in: 2.11.3 post release version bump.
2005-07-22 19:24:40 +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
Nguyen Thai Ngoc Duy
59da1618b0 Merged from gnome-2.10 2005-07-21 11:47:39 +00:00
Ivan Stojmirov
e9ce3ccc1c done 2005-07-20 16:02:35 +00:00
Benoît Dejean
84e45a6519 Released 2.11.2.
* NEWS: Released 2.11.2.
2005-07-13 14:50:16 +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
efeca4a865 2.11.2 post release version bump.
* configure.in: 2.11.2 post release version bump.
2005-07-05 23:02:46 +00:00
Hendrik Richter
5e70932b66 Fixed German translation by Jens Seidel <jensseidel@users.sf.net>.
2005-07-04  Hendrik Richter  <hendi@gnome-de.org>

	* de.po: Fixed German translation by
	Jens Seidel <jensseidel@users.sf.net>.
2005-07-04 18:01:16 +00:00
42 changed files with 1935 additions and 4088 deletions

View File

@@ -1,3 +1,73 @@
2005-09-04 Benoît Dejean <benoit@placenet.org>
* NEWS:
* configure.in:
Released 2.12.0.
2005-08-22 Benoît Dejean <benoit@placenet.org>
* configure.in:
Hum hum, it's better if release number is 2.11.92 too.
2005-08-22 Benoît Dejean <benoit@placenet.org>
* NEWS:
Released 2.11.92.
2005-08-08 Benoît Dejean <benoit@placenet.org>
* NEWS:
Released 2.11.91.
2005-08-04 Benoît Dejean <TazForEver@dlfp.org>
* configure.in:
* examples/Makefile.am:
Removed static examples.
2005-08-02 Benoît Dejean <TazForEver@dlfp.org>
* configure.in:
* include/glibtop/Makefile.am:
* include/glibtop/glibtop-server.h:
* include/glibtop/init_hooks.h:
* include/glibtop/sysdeps.h:
* lib/init.c: (glibtop_init_s):
* lib/sysdeps.c:
* sysdeps/aix/open.c: (glibtop_init_p):
* sysdeps/common/sysdeps_suid.c:
* sysdeps/freebsd/open.c: (glibtop_init_p):
* sysdeps/osf1/open_suid.c: (glibtop_init_p):
* sysdeps/solaris/open_suid.c: (glibtop_init_p):
* sysdeps/stub_suid/open.c: (glibtop_init_p):
Moved _glibtop_init_hook_[sp] declaration to private
glibtop/init_hooks.h. Marked them const.
Fixed GLIBTOP_SUID_NETLIST issues.
2005-07-24 Benoît Dejean <TazForEver@dlfp.org>
* NEWS:
* configure.in: Released 2.11.90.
2005-07-22 Benoît Dejean <TazForEver@dlfp.org>
* configure.in: 2.11.3 post release version bump.
2005-07-13 Benoît Dejean <TazForEver@dlfp.org>
* NEWS: Released 2.11.2.
2005-07-06 Benoît Dejean <TazForEver@dlfp.org>
* configure.in: 2.11.2 post release version bump.
2005-07-03 Benoît Dejean <TazForEver@dlfp.org>
* NEWS: Released 2.11.1.

28
NEWS
View File

@@ -1,3 +1,31 @@
September 4, 2005: Overview of changes from 2.11.92 to 2.12.0
=============================================================
* Updated translations.
August 22, 2005: Overview of changes from 2.11.91 to 2.11.92
============================================================
* Linux:
- fixed for 2.6 without /sys
- glibtop_get_cpu() : Do not add irq, softirq and iowait to idle.
August 9, 2005: Overview of changes from 2.11.90 to 2.11.91
===========================================================
* All:
- cleaned some headers.
- removed static examples.
* Linux:
- fixed some issues with 2.6 without /sys
July 24, 2005: Overview of changes from 2.11.2 to 2.11.90
=========================================================
* Linux:
- fixed glibtop_uptime .flags.
July &3, 2005: Overview of changes from 2.11.1 to 2.11.2
========================================================
* Linux:
- little improvements for 2.6.
July 3, 2005: Overview of changes from 2.11.0 to 2.11.1
=======================================================
* Linux:

View File

@@ -7,8 +7,8 @@ AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
LIBGTOP_MAJOR_VERSION=2
LIBGTOP_MINOR_VERSION=11
LIBGTOP_MICRO_VERSION=1
LIBGTOP_MINOR_VERSION=12
LIBGTOP_MICRO_VERSION=0
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION)
@@ -112,27 +112,6 @@ if test x$build_inodedb = xyes ; then
AC_DEFINE(GLIBTOP_INODEDB)
fi
if test x$libgtop_smp = xyes ; then
smp_examples='smp'
smp_static_examples='smp_static'
else
smp_examples=
smp_static_examples=
fi
if test "x$enable_static" != xno; then
static_targets="first_static second_static mountlist_static procmap_static netload_static sysdeps_static timings_static $smp_static_examples pprint_static procargs_static df_static netlist netlist_static openfiles_static"
else
static_targets=""
fi
AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
AM_CONDITIONAL(ENABLE_SHARED, test x$enable_static = xyes)
AC_SUBST(static_targets)
AC_SUBST(smp_examples)
GLIB_REQUIRED=2.6.0
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
@@ -195,28 +174,33 @@ AH_TEMPLATE(HAVE_VMGETINFO, [Define to 1 if you have the 'vmgetinfo' function in
AC_CHECK_LIB(perfstat, vmgetinfo, AC_DEFINE(HAVE_VMGETINFO))
dnl Solaris
AC_CHECK_LIB(kstat, kstat_open)
AC_CHECK_FUNCS(getloadavg swapctl)
AC_CHECK_HEADERS(procfs.h sys/procfs.h, break)
case "$host_os" in
solaris*)
AC_CHECK_LIB(kstat, kstat_open)
AC_CHECK_FUNCS(getloadavg swapctl)
AC_CHECK_HEADERS(procfs.h sys/procfs.h, break)
dnl Some versions of Solaris require -lelf for -lkvm
AC_CHECK_LIB(kvm, kvm_open,[
LIBS="-lkvm $LIBS"
],[AC_MSG_CHECKING(for kvm_open in -lkvm with -lelf)
AC_CACHE_VAL(ac_cv_lib_kvm_with_elf,
[ac_save_LIBS="$LIBS"
LIBS="-lkvm -lelf $LIBS"
AC_TRY_LINK([char kvm_open();], [kvm_open()],
ac_cv_lib_kvm_with_elf=yes, ac_cv_lib_kvm_with_elf=no)
LIBS="$ac_save_LIBS"
])
if test "$ac_cv_lib_kvm_with_elf" = "yes"; then
AC_MSG_RESULT(yes)
LIBS="-lkvm -lelf $LIBS"
else
AC_MSG_RESULT(no)
fi
])
dnl Some versions of Solaris require -lelf for -lkvm
AC_CHECK_LIB(kvm, kvm_open,[
LIBS="-lkvm $LIBS"
],[AC_MSG_CHECKING(for kvm_open in -lkvm with -lelf)
AC_CACHE_VAL(ac_cv_lib_kvm_with_elf,
[ac_save_LIBS="$LIBS"
LIBS="-lkvm -lelf $LIBS"
AC_TRY_LINK([char kvm_open();], [kvm_open()],
ac_cv_lib_kvm_with_elf=yes, ac_cv_lib_kvm_with_elf=no)
LIBS="$ac_save_LIBS"
])
if test "$ac_cv_lib_kvm_with_elf" = "yes"; then
AC_MSG_RESULT(yes)
LIBS="-lkvm -lelf $LIBS"
else
AC_MSG_RESULT(no)
fi
])
;;
esac
dnl For DEC OSF1
AC_CHECK_LIB(mach, vm_statistics)

View File

@@ -1,3 +1,13 @@
2005-08-02 Benoît Dejean <TazForEver@dlfp.org>
* pprint.c: (pprint_get_cpu), (pprint_get_loadavg),
(pprint_get_mem), (pprint_get_msg_limits), (pprint_get_netlist),
(pprint_get_swap), (pprint_get_uptime), (pprint_get_proc_kernel),
(main):
Added pprint_get_proc_kernel(pid).
Fixed prototypes.
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
* openfiles.c: (show_open_files): Updated.

View File

@@ -8,112 +8,43 @@ DEFS = @DEFS@
noinst_PROGRAMS = first second pprint procargs df netlist \
mountlist procmap netload sysdeps timings \
openfiles \
@static_targets@ @smp_examples@
EXTRA_PROGRAMS = first_static second_static \
mountlist_static procmap_static \
smp smp_static openfiles_static \
netload_static sysdeps_static \
timings_static pprint_static procargs_static \
df_static netlist_static
openfiles smp
first_SOURCES = first.c
first_LDADD = $(top_builddir)/lib/libgtop-2.0.la
first_static_SOURCES = $(first_SOURCES)
first_static_LDADD = $(first_LDADD)
first_static_LDFLAGS = -static
second_SOURCES = second.c
second_LDADD = $(top_builddir)/lib/libgtop-2.0.la -lm
second_static_SOURCES = $(second_SOURCES)
second_static_LDADD = $(second_LDADD)
second_static_LDFLAGS = -static
procmap_SOURCES = procmap.c
procmap_LDADD = $(top_builddir)/lib/libgtop-2.0.la
procmap_static_SOURCES = $(procmap_SOURCES)
procmap_static_LDADD = $(procmap_LDADD)
procmap_static_LDFLAGS = -static
netload_SOURCES = netload.c
netload_LDADD = $(top_builddir)/lib/libgtop-2.0.la
netload_static_SOURCES = $(netload_SOURCES)
netload_static_LDADD = $(netload_LDADD)
netload_static_LDFLAGS = -static
sysdeps_SOURCES = sysdeps.c
sysdeps_LDADD = $(top_builddir)/lib/libgtop-2.0.la
sysdeps_static_SOURCES = $(sysdeps_SOURCES)
sysdeps_static_LDADD = $(sysdeps_LDADD)
sysdeps_static_LDFLAGS = -static
mountlist_SOURCES = mountlist.c
mountlist_LDADD = $(top_builddir)/lib/libgtop-2.0.la
mountlist_static_SOURCES= $(mountlist_SOURCES)
mountlist_static_LDADD = $(mountlist_LDADD)
mountlist_static_LDFLAGS= -static
smp_SOURCES = smp.c
smp_LDADD = $(top_builddir)/lib/libgtop-2.0.la -lm
smp_static_SOURCES = $(smp_SOURCES)
smp_static_LDADD = $(smp_LDADD)
smp_static_LDFLAGS = -static
timings_SOURCES = timings.c
timings_LDADD = $(top_builddir)/lib/libgtop-2.0.la
timings_static_SOURCES = $(timings_SOURCES)
timings_static_LDADD = $(timings_LDADD)
timings_static_LDFLAGS = -static
pprint_SOURCES = pprint.c
pprint_LDADD = $(top_builddir)/lib/libgtop-2.0.la
pprint_static_SOURCES = $(pprint_SOURCES)
pprint_static_LDADD = $(pprint_LDADD)
pprint_static_LDFLAGS = -static
procargs_SOURCES = procargs.c
procargs_LDADD = $(top_builddir)/lib/libgtop-2.0.la
procargs_static_SOURCES = $(procargs_SOURCES)
procargs_static_LDADD = $(procargs_LDADD)
procargs_static_LDFLAGS = -static
df_SOURCES = df.c
df_LDADD = $(top_builddir)/lib/libgtop-2.0.la
df_static_SOURCES = $(df_SOURCES)
df_static_LDADD = $(df_LDADD)
df_static_LDFLAGS = -static
netlist_SOURCES = netlist.c
netlist_LDADD = $(top_builddir)/lib/libgtop-2.0.la
netlist_static_SOURCES = $(netlist_SOURCES)
netlist_static_LDADD = $(netlist_LDADD)
netlist_static_LDFLAGS = -static
openfiles_SOURCES = openfiles.c
openfiles_LDADD = $(top_builddir)/lib/libgtop-2.0.la
openfiles_static_SOURCES = $(openfiles_SOURCES)
openfiles_static_LDADD = $(openfiles_LDADD)
openfiles_static_LDFLAGS = -static

View File

@@ -2,6 +2,7 @@
#include <glibtop/union.h>
#include <unistd.h>
#include <stdio.h>
#include <stddef.h>
@@ -28,7 +29,7 @@ printf(".%u = " FORMAT " }\n", SIZE - 1 , buf.ARRAY[SIZE - 1]); \
static void pprint_get_cpu()
static void pprint_get_cpu(void)
{
glibtop_cpu buf;
@@ -81,7 +82,7 @@ static void pprint_get_fsusage(const char *mountpoint)
static void pprint_get_loadavg()
static void pprint_get_loadavg(void)
{
glibtop_loadavg buf;
@@ -98,7 +99,7 @@ static void pprint_get_loadavg()
static void pprint_get_mem()
static void pprint_get_mem(void)
{
glibtop_mem buf;
@@ -156,7 +157,7 @@ static void pprint_get_mountlist(gboolean allfs)
static void pprint_get_msg_limits()
static void pprint_get_msg_limits(void)
{
glibtop_msg_limits buf;
@@ -189,7 +190,7 @@ static void pprint_get_netload(const char *iface)
}
static void pprint_get_netlist()
static void pprint_get_netlist(void)
{
glibtop_netlist buf;
char **devices;
@@ -211,7 +212,7 @@ static void pprint_get_netlist()
static void pprint_get_swap()
static void pprint_get_swap(void)
{
glibtop_swap buf;
@@ -229,7 +230,7 @@ static void pprint_get_swap()
static void pprint_get_uptime()
static void pprint_get_uptime(void)
{
glibtop_uptime buf;
@@ -246,6 +247,23 @@ static void pprint_get_uptime()
static void pprint_get_proc_kernel(pid_t pid)
{
glibtop_proc_kernel buf;
glibtop_get_proc_kernel(&buf, pid);
HEADER_PPRINT(glibtop_get_proc_kernel);
PPRINT(flags, "%#llx");
PPRINT(k_flags, "%llu");
PPRINT(min_flt, "%llu");
PPRINT(maj_flt, "%llu");
PPRINT(cmin_flt, "%llu");
PPRINT(cmaj_flt, "%llu");
FOOTER_PPRINT();
}
int main()
{
@@ -275,6 +293,8 @@ int main()
pprint_get_uptime();
pprint_get_proc_kernel(getpid());
glibtop_close();
return 0;

View File

@@ -10,4 +10,4 @@ glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
inodedb.h sysinfo.h ppp.h procargs.h netload.h \
netlist.h procopenfiles.h open.h
noinst_HEADERS = error.h write.h read_data.h read.h
noinst_HEADERS = error.h write.h read_data.h read.h init_hooks.h

View File

@@ -36,11 +36,6 @@ typedef struct _glibtop_server_info glibtop_server_info;
typedef struct _glibtop_closure glibtop_closure;
typedef int (*glibtop_init_func_t) (glibtop_server *, glibtop_closure *);
extern glibtop_init_func_t _glibtop_init_hook_s [];
extern glibtop_init_func_t _glibtop_init_hook_p [];
struct _glibtop_server_info
{
int ncpu; /* Number of CPUs, zero if single-processor */

View File

@@ -0,0 +1,11 @@
#ifndef H_LIBGTOP_INIT_HOOKS_1122955666
#define H_LIBGTOP_INIT_HOOKS_1122955666
#include <glibtop.h>
typedef void (*glibtop_init_func_t)(glibtop *);
extern const glibtop_init_func_t _glibtop_init_hook_s[];
extern const glibtop_init_func_t _glibtop_init_hook_p[];
#endif /* H_LIBGTOP_INIT_HOOKS_1122955666 */

View File

@@ -58,10 +58,6 @@ G_BEGIN_DECLS
#define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1)
typedef void (*glibtop_init_func_t) (glibtop *);
extern glibtop_init_func_t _glibtop_init_hook_s [];
extern glibtop_init_func_t _glibtop_init_hook_p [];
typedef struct _glibtop_sysdeps glibtop_sysdeps;
struct _glibtop_sysdeps

View File

@@ -26,6 +26,7 @@
#include <glibtop/sysdeps.h>
#include <glibtop/open.h>
#include <glibtop/parameter.h>
#include <glibtop/init_hooks.h>
#ifndef DEFAULT_PORT
#define DEFAULT_PORT 42800
@@ -219,7 +220,7 @@ glibtop *
glibtop_init_s (glibtop **server_ptr, unsigned long features, unsigned flags)
{
glibtop *server;
glibtop_init_func_t *init_fkt;
const glibtop_init_func_t *init_fkt;
if (server_ptr == NULL)
return NULL;

View File

@@ -22,6 +22,7 @@
#include <glibtop.h>
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
#include <glibtop/init_hooks.h>
const unsigned long glibtop_server_features =
GLIBTOP_SUID_CPU +
@@ -43,9 +44,10 @@ GLIBTOP_SUID_PROC_SEGMENT +
GLIBTOP_SUID_PROC_ARGS +
GLIBTOP_SUID_PROC_MAP +
GLIBTOP_SUID_NETLOAD +
GLIBTOP_SUID_NETLIST +
GLIBTOP_SUID_PPP;
glibtop_init_func_t _glibtop_init_hook_s [] = {
const glibtop_init_func_t _glibtop_init_hook_s [] = {
#if !GLIBTOP_SUID_CPU
glibtop_init_cpu_s,
#endif
@@ -103,13 +105,16 @@ glibtop_init_func_t _glibtop_init_hook_s [] = {
#if !GLIBTOP_SUID_NETLOAD
glibtop_init_netload_s,
#endif
#if !GLIBTOP_SUID_NETLIST
glibtop_init_netlist_s,
#endif
#if !GLIBTOP_SUID_PPP
glibtop_init_ppp_s,
#endif
NULL
};
glibtop_init_func_t _glibtop_init_hook_p [] = {
const glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_CPU
glibtop_init_cpu_p,
#endif
@@ -167,6 +172,9 @@ glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_NETLOAD
glibtop_init_netload_p,
#endif
#if GLIBTOP_SUID_NETLIST
glibtop_init_netlist_p,
#endif
#if GLIBTOP_SUID_PPP
glibtop_init_ppp_p,
#endif

View File

@@ -1,3 +1,26 @@
2005-08-29 Telsa Gwynne <hobbit@aloss.ukuu.org.uk>
* cy.po: Updated Welsh translation.
2005-08-22 Mugurel Tudor <mugurelu@gnome.ro>
* ro.po: Updated Romanian translation
by Mişu Moldovan <dumol@gnome.ro>
2005-08-02 Dave Neary <bolsh@gimp.org>
* tr.po: Fix a C formatting string translation.
2005-06-28 Alexander Shopov <ash@contact.bg>
* bg.po: Updated Bulgarian translation by
Alexander Shopov <ash@contact.bg>
2005-07-04 Hendrik Richter <hendi@gnome-de.org>
* de.po: Fixed German translation by
Jens Seidel <jensseidel@users.sf.net>.
2005-06-22 Abel Cheung <maddog@linuxhall.org>
* zh_TW.po: Fix language team reference.

View File

@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: libgtop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-06-15 16:26+0300\n"
"PO-Revision-Date: 2005-06-15 16:28+0300\n"
"POT-Creation-Date: 2005-07-28 14:05+0300\n"
"PO-Revision-Date: 2005-07-28 14:04+0300\n"
"Last-Translator: Rostislav Raykov <zbrox@i-space.org>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
"MIME-Version: 1.0\n"
@@ -33,8 +33,8 @@ msgstr "размер прочетени данни"
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "прочетен %d байт данни"
msgstr[1] "прочетени %d байта данни"
msgstr[0] "прочетен %lu байт данни"
msgstr[1] "прочетени %lu байта данни"
#: ../lib/write.c:52
#, c-format

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: libgtop 2.9.91\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-16 10:43+0100\n"
"PO-Revision-Date: 2005-02-16 10:46+0100\n"
"POT-Creation-Date: 2005-09-04 01:14+0200\n"
"PO-Revision-Date: 2005-09-04 01:16+0200\n"
"Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
"MIME-Version: 1.0\n"
@@ -41,47 +41,47 @@ msgid_plural "wrote %d bytes"
msgstr[0] "s'ha escrit %d octet"
msgstr[1] "s'ha escrit %d octets"
#: ../src/daemon/gnuserv.c:459
#: ../src/daemon/gnuserv.c:460
msgid "Enable debugging"
msgstr "Activa la depuració"
#: ../src/daemon/gnuserv.c:459
#: ../src/daemon/gnuserv.c:460
msgid "DEBUG"
msgstr "DEPURACIÓ"
#: ../src/daemon/gnuserv.c:461
#: ../src/daemon/gnuserv.c:462
msgid "Enable verbose output"
msgstr "Activa la sortida detallada"
#: ../src/daemon/gnuserv.c:461
#: ../src/daemon/gnuserv.c:462
msgid "VERBOSE"
msgstr "DETALLA"
#: ../src/daemon/gnuserv.c:463
#: ../src/daemon/gnuserv.c:464
msgid "Don't fork into background"
msgstr "No bifurquis dintre del fons"
msgstr "No bifurquis al segon pla"
#: ../src/daemon/gnuserv.c:463
#: ../src/daemon/gnuserv.c:464
msgid "NO-DAEMON"
msgstr "SENSE DIMONI"
#: ../src/daemon/gnuserv.c:465
#: ../src/daemon/gnuserv.c:466
msgid "Invoked from inetd"
msgstr "Ha estat cridat des d'inetd"
#: ../src/daemon/gnuserv.c:465
#: ../src/daemon/gnuserv.c:466
msgid "INETD"
msgstr "INETD"
#: ../src/daemon/gnuserv.c:499
#: ../src/daemon/gnuserv.c:500
#, c-format
msgid ""
"Error on option %s: %s.\n"
"Run '%s --help' to see a full list of available command line options.\n"
msgstr ""
"Error en l'opció %s: %s.\n"
"Executa '%s --ajuda' per veure una llista completa de les opcions de línies "
"d'ordre disponibles.\n"
"S'ha produït un error en l'opció %s: %s.\n"
"Executeu '%s --ajuda' per a veure una llista completa de les opcions de "
"línies d'ordre disponibles.\n"
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
msgid "Hangup"
@@ -89,7 +89,7 @@ msgstr "Termina"
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
msgid "Interrupt"
msgstr "Interrumpeix"
msgstr "Interromp"
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
msgid "Quit"
@@ -113,7 +113,7 @@ msgstr "Error EMT"
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
msgid "Floating-point exception"
msgstr "excepció de coma flotant"
msgstr "Excepció de coma flotant"
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
msgid "Kill"
@@ -165,7 +165,7 @@ msgstr "L'estat del fill ha canviat"
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
msgid "Background read from tty"
msgstr "Llegida de tty en segon pla"
msgstr "Lectura de tty en segon pla"
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
msgid "Background write to tty"
@@ -173,7 +173,7 @@ msgstr "Escriptura a tty en segon pla"
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
msgid "I/O now possible"
msgstr "E/E ara possible"
msgstr "E/S ara és possible"
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
msgid "CPU limit exceeded"

2178
po/cy.po

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,8 @@ msgstr ""
"Project-Id-Version: libgtop 2.5.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-01-16 16:59+0100\n"
"PO-Revision-Date: 2005-01-16 17:00+0100\n"
"Last-Translator: Hendrik Richter <hendrik@gnome-de.org>\n"
"PO-Revision-Date: 2005-07-04 17:11+0200\n"
"Last-Translator: Hendrik Richter <hendi@gnome-de.org>\n"
"Language-Team: German <gnome-de@gnome.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -967,7 +967,7 @@ msgstr "Benutzerdefiniertes Signal 2"
#~ msgstr "Sitzungskennung"
#~ msgid "Full device number of controlling terminal"
#~ msgstr "Volle Gerätenummer des kontrolierenden Terminals"
#~ msgstr "Volle Gerätenummer des kontrollierenden Terminals"
#~ msgid "Terminal process group ID"
#~ msgstr "Terminalprozessgruppenkennung"

942
po/mk.po
View File

@@ -10,23 +10,29 @@
# Jovan Kostovski <chombium@freemail.com.mk>, 2003.
# Глигор Костоски <gigo@ajvar.com.mk>, 2003.
# Arangel Angov <ufo@linux.net.mk>, 2004.
# Арангел Ангов <ufo@linux.net.mk>, 2005.
#
msgid ""
msgstr ""
"Project-Id-Version: mk\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-07-02 06:18+0000\n"
"PO-Revision-Date: 2005-07-02 12:18+0200\n"
"Last-Translator: Arangel Angov <ufo@linux.net.mk>\n"
"POT-Creation-Date: 2005-07-20 14:39+0000\n"
"PO-Revision-Date: 2005-07-20 18:04+0200\n"
"Last-Translator: Арангел Ангов <ufo@linux.net.mk>\n"
"Language-Team: Macedonian <ossm-members@hedona.on.net.mk>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit"
"Plural-Forms: nplurals=3; plural= n==1 || n%10==1 ? 0 : 1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.10\n"
#: ../lib/read.c:65
#, c-format
msgid "read %d byte"
msgstr "прочитан %d бајт"
msgid_plural "read %d bytes"
msgstr[0] "прочитан %d бајт"
msgstr[1] "прочитани %d бајти"
msgstr[2] "прочитани %d бајти"
#: ../lib/read_data.c:53
msgid "read data size"
@@ -35,12 +41,18 @@ msgstr "големина на прочитаните податоци"
#: ../lib/read_data.c:72
#, c-format
msgid "read %lu byte of data"
msgstr "прочитани %lu бајти податоци"
msgid_plural "read %lu bytes of data"
msgstr[0] "прочитан %lu бајт податоци"
msgstr[1] "прочитани %lu бајти податоци"
msgstr[2] "прочитани %lu бајти податоци"
#: ../lib/write.c:52
#, c-format
msgid "wrote %d byte"
msgstr "запишан %d бајт"
msgid_plural "wrote %d bytes"
msgstr[0] "запишан %d бајт"
msgstr[1] "запишани %d бајти"
msgstr[2] "запишани %d бајти"
#: ../src/daemon/gnuserv.c:460
msgid "Enable debugging"
@@ -207,919 +219,3 @@ msgstr "Сигнал 1 дефиниран од корисникот"
msgid "User defined signal 2"
msgstr "Сигнал 2 дефиниран од корисникот"
#~ msgid "Ticks (%ld per second):"
#~ msgstr "Тактови (%ld во секунда):"
#~ msgid "Total"
#~ msgstr "Вкупно"
#~ msgid "User"
#~ msgstr "Корисник"
#~ msgid "Nice"
#~ msgstr "Убаво"
#~ msgid "Sys"
#~ msgstr "Sys"
#~ msgid "Idle"
#~ msgstr "Неактивно"
#~ 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 "Проценти:"
#~ msgid "Total (%)"
#~ msgstr "Вкупно (%)"
#~ msgid "User (%)"
#~ msgstr "Корисник (%)"
#~ msgid "Nice (%)"
#~ msgstr "Убаво (%)"
#~ msgid "Sys (%)"
#~ msgstr "Sys(%)"
#~ msgid "Idle (%)"
#~ msgstr "Неактивно (%)"
#~ 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 "Ротација:"
#~ msgid "read data %d byte"
#~ msgstr "прочитани податоци %d бајти"
#~ msgid "Total CPU Time"
#~ msgstr "Вкупно процесорско време"
#~ msgid "CPU Time in User Mode"
#~ msgstr "Процесорско време во кориснички режим"
#~ msgid "CPU Time in User Mode (nice)"
#~ msgstr "Процесорско време во кориснички режим"
#~ msgid "CPU Time in System Mode"
#~ msgstr "Процесорско време во системски режим"
#~ msgid "CPU Time in the Idle Task"
#~ msgstr "Процесорско време без задачи"
#~ msgid "Tick Frequency"
#~ msgstr "Фреквенција на такт"
#~ msgid "SMP Total CPU Time"
#~ msgstr "Вкупно процесорско време за SMP"
#~ msgid "SMP CPU Time in User Mode"
#~ msgstr "Процесорско време за SMP во кориснички режим"
#~ msgid "SMP CPU Time in User Mode (nice)"
#~ msgstr "Процесорско време за SMP во кориснички режим"
#~ msgid "SMP CPU Time in System Mode"
#~ msgstr "Процесорско време за SMP во системски режим"
#~ msgid "SMP CPU Time in the Idle Task"
#~ msgstr "Процесорско време за SMP без задачи"
#~ msgid "SMP CPU Flags"
#~ msgstr "SMP CPU знаменца"
#~ msgid "Number of clock ticks since system boot"
#~ msgstr "Број на тактови од подигањето на системот"
#~ msgid "Number of clock ticks the system spent in user mode"
#~ msgstr "Број на тактови од потрошени од системот во кориснички режим"
#~ msgid "Number of clock ticks the system spent in user mode (nice)"
#~ msgstr "Број на тактови од потрошени од системот во кориснички режим"
#~ msgid "Number of clock ticks the system spent in system mode"
#~ msgstr "Број на тактови од потрошени од системот во системски режим"
#~ msgid "Number of clock ticks the system spent in the idle task"
#~ msgstr "Број на тактови од потрошени од системот без задачи"
#~ msgid "Tick frequency (default is 100)"
#~ msgstr "Фреквенција на такт (стандардно 100)"
#~ msgid "Bit field indicating which CPU is currently running"
#~ msgstr "Поле кое покажува кој процесор работи"
#~ msgid "Total blocks"
#~ msgstr "Вкупно блокови"
#~ msgid "Free blocks"
#~ msgstr "Слободни блокови"
#~ msgid "Available blocks"
#~ msgstr "Достапни блокови"
#~ msgid "Total file nodes"
#~ msgstr "Вкупно јазли за датотеки"
#~ msgid "Free file nodes"
#~ msgstr "Слободни јазли за датотеки"
#~ msgid "Block size"
#~ msgstr "Големина на блокот"
#~ msgid "Free blocks available to the superuser"
#~ msgstr "Слободни блокови достапни на супер корисникот"
#~ msgid "Free blocks available to non-superusers"
#~ msgstr "Слободни блокови достапни на корисници кои не се супер"
#~ msgid "Load Average"
#~ msgstr "Средна оптеретеност"
#~ msgid "Running Tasks"
#~ msgstr "Активни задачи"
#~ msgid "Number of Tasks"
#~ msgstr "Број од задачи"
#~ msgid "Last PID"
#~ msgstr "Последен PID"
#~ msgid ""
#~ "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
#~ msgstr ""
#~ "Број на задачи кои работат истовремено, просечно во 1, 5 и 15 минути"
#~ msgid "Number of tasks currently running"
#~ msgstr "Број на моментално активни задачи"
#~ msgid "Total number of tasks"
#~ msgstr "Вкупно број на задачи"
#~ msgid "Total Memory"
#~ msgstr "Вкупно меморија"
#~ msgid "Used Memory"
#~ msgstr "Искористена меморија"
#~ msgid "Free Memory"
#~ msgstr "Слободна меморија"
#~ msgid "Shared Memory"
#~ msgstr "Заедничка меморија"
#~ msgid "Buffers"
#~ msgstr "Бафери"
#~ msgid "Cached"
#~ msgstr "Кеширано"
#~ msgid "Locked"
#~ msgstr "Заклучено"
#~ msgid "Total physical memory in kB"
#~ msgstr "Вкупно физичка меморија во kB"
#~ msgid "Used memory size in kB"
#~ msgstr "Искористена меморија во kB"
#~ msgid "Free memory size in kB"
#~ msgstr "Слободна меморија во kB"
#~ msgid "Shared memory size in kB"
#~ msgstr "Заедничка меморија во kB"
#~ msgid "Size of buffers kB"
#~ msgstr "Големина на бафери во kB"
#~ msgid "Size of cached memory in kB"
#~ msgstr "Големина на кеширана меморија во kB"
#~ msgid "Memory used from user processes in kB"
#~ msgstr "Меморија користена од корисничките процеси во kB"
#~ msgid "Memory in locked pages in kB"
#~ msgstr "Меморија во заклучените страници во kB"
#~ msgid "Number of list elements"
#~ msgstr "Број на елементи од листата"
#~ msgid "Total size of list"
#~ msgstr "Вкупна големина на листата"
#~ msgid "Size of a single list element"
#~ msgstr "Големина еден елемент од листата"
#~ msgid "Size in kilobytes of message pool"
#~ msgstr "Големина во килобајти на за складот пораки"
#~ msgid "Number of entries in message map"
#~ msgstr "Број на записи во мапата со пораки"
#~ msgid "Max size of message"
#~ msgstr "Максимална големина на порака"
#~ msgid "Default max size of queue"
#~ msgstr "Стандардна максимална големина на редот за чекање"
#~ msgid "Max queues system wide"
#~ msgstr "Максимален број на редици за чекање во системот"
#~ msgid "Message segment size"
#~ msgstr "Големина на сегментот за порака"
#~ msgid "Number of system message headers"
#~ msgstr "Број на заглавја од системски пораки"
#~ msgid "Interface Flags"
#~ msgstr "Интерфејс флагови"
#~ msgid "MTU"
#~ msgstr "MTU"
#~ msgid "IPv4 Subnet"
#~ msgstr "IPv4 подмрежа"
#~ msgid "IPv4 Address"
#~ msgstr "IPv4 адреса"
#~ msgid "Packets In"
#~ msgstr "Примени пакети "
#~ msgid "Packets Out"
#~ msgstr "Пратени пакети"
#~ msgid "Packets Total"
#~ msgstr "Вкупно пакети"
#~ msgid "Bytes In"
#~ msgstr "Примени бајти"
#~ msgid "Bytes Out"
#~ msgstr "Пратени бајти"
#~ msgid "Bytes Total"
#~ msgstr "Вкупно бајти"
#~ msgid "Errors In"
#~ msgstr "Грешно примени"
#~ msgid "Errors Out"
#~ msgstr "Грешно пратени"
#~ msgid "Errors Total"
#~ msgstr "Вкупно грешни"
#~ msgid "Collisions"
#~ msgstr "Колизии"
#~ msgid "IPv6 Address"
#~ msgstr "IPv6 адреса"
#~ msgid "IPv6 Prefix"
#~ msgstr "Префикс за IPv6"
#~ msgid "IPv6 Scope"
#~ msgstr "Опсег на IPv6"
#~ msgid "Maximum Transfer Unit"
#~ msgstr "Максимална единица за транфер"
#~ msgid "PPP State"
#~ msgstr "PPP Состојба"
#~ msgid "Input bytes"
#~ msgstr "Примени бајти"
#~ msgid "Output bytes"
#~ msgstr "Пратени бајти"
#~ msgid "Number of input bytes"
#~ msgstr "Број на примени бајти"
#~ msgid "Number of output bytes"
#~ msgstr "Број на пратени бајти"
#~ msgid "Size"
#~ msgstr "Големина"
#~ msgid "Length in bytes of the returned string."
#~ msgstr "Должина на вратената низа во бајти."
#~ msgid "K_Flags"
#~ msgstr "K_Флаг"
#~ msgid "Min_Flt"
#~ msgstr "Min_Flt"
#~ msgid "Maj_Flt"
#~ msgstr "Maj_Flt"
#~ msgid "CMin_Flt"
#~ msgstr "CMin_Flt"
#~ msgid "CMaj_Flt"
#~ msgstr "CMaj_Flt"
#~ msgid "KStk_ESP"
#~ msgstr "KStk_ESP"
#~ msgid "KStk_EIP"
#~ msgstr "KStk_EIP"
#~ msgid "NWChan"
#~ msgstr "NWChan"
#~ msgid "WChan"
#~ msgstr "WChan"
#~ msgid ""
#~ "Kernel flags of the process.\n"
#~ "\n"
#~ "On Linux, currently every flag has the math bit set, because crt0.s "
#~ "checks for math emulation, so this is not included in the output.\n"
#~ "\n"
#~ "This is probably a bug, as not every process is a compiled C program.\n"
#~ "\n"
#~ "The math bit should be a decimal 4, and the traced bit is decimal 10."
#~ msgstr ""
#~ "Кернел флагови за процесите.\n"
#~ "Моментално на Линукс секој флаг има сетиран math бит заради тоа што crt0."
#~ "s проверува дали има емулација за математички процесор, па ова не е "
#~ "вклучено во излезот.\n"
#~ "\n"
#~ "Ова најверојатно е бубачка бидејќи секој процес не е компајлирана С "
#~ "програма.\n"
#~ "Math битот треба да биде 4 децимално, а пронајдената вредност е 10 "
#~ "децимално."
#~ msgid ""
#~ "The number of minor faults the process has made, those which have not "
#~ "required loading a memory page from disk."
#~ msgstr ""
#~ "Бројот на ситните грешки што ги направи процесот, тие што не бараат "
#~ "вчитување на мемориски страницо од диск."
#~ msgid ""
#~ "The number of major faults the process has made, those which have "
#~ "required loading a memory page from disk."
#~ msgstr ""
#~ "Бројот на големи грешки што ги направи процесот, тие што бараат вчитување "
#~ "на мемориска страница од диск."
#~ msgid ""
#~ "The number of minor faults that the process and its children have made."
#~ msgstr "Број на ситни грешки што ги направи процесот и неговите деца."
#~ msgid ""
#~ "The number of major faults that the process and its children have made."
#~ msgstr "Број на големи грешки што ги направи процесот и неговите деца."
#~ msgid ""
#~ "The current value of esp (32-bit stack pointer), as found in the kernel "
#~ "stack page for the process."
#~ msgstr ""
#~ "Моменталната вредност на ESP (32-битен покажувач на склад) како што е во "
#~ "страницата на слладот на кернелот за процесот."
#~ msgid "The current EIP (32-bit instruction pointer)."
#~ msgstr "Моментална вредност EIP (32 битен инструкциски покажувач)."
#~ msgid ""
#~ "This is the \"channel\" in which the process is waiting. This is the "
#~ "address of a system call, and can be looked up in a namelist if you need "
#~ "a textual name. (If you have an up-to-date /etc/psdatabase, then try ps -"
#~ "l to see the WCHAN field in action)"
#~ msgstr ""
#~ "Ова е каналот во кој чека процесот. Ова е адресата на системскиот повик и "
#~ "може да се најде во листата со имиња ако Ви треба текстуално име.(Ако "
#~ "имате освежена /etc/psdatabase тогаш пробајте ps -I за да го видите WCHAN "
#~ "полето во акција)"
#~ msgid "This is the textual name of the `nwchan' field."
#~ msgstr "Ова е текстуалното име на nwchan полето"
#~ msgid "Virtual"
#~ msgstr "Виртуелен"
#~ msgid "Resident"
#~ msgstr "Постојан"
#~ msgid "Share"
#~ msgstr "Заедничко"
#~ msgid "Resident Set Size"
#~ msgstr "Заеднички постави големина"
#~ msgid "Resident Set Size Limit"
#~ msgstr "Заеднички постави граница на големина"
#~ msgid "Total # of pages of memory"
#~ msgstr "Вкупно # од страниците во меморија"
#~ msgid "Number of pages of virtual memory"
#~ msgstr "Број на страници од виртуелната меморија"
#~ msgid "Number of resident set (non-swapped) pages"
#~ msgstr "Број на постојани (не свопувани) страници"
#~ msgid "Number of pages of shared (mmap'd) memory"
#~ msgstr "Број на страници од заедничката (м мапирана) меморија"
#~ msgid ""
#~ "Number of pages the process has in real memory, minus 3 for "
#~ "administrative purposes. This is just the pages which count towards text, "
#~ "data, or stack space. This does not include pages which have not been "
#~ "demand-loaded in, or which are swapped out."
#~ msgstr ""
#~ "Број на страници кои процесот ги има во меморијата, минус 3 за "
#~ "анминистративни потреби. Ова се само страниците за текст, податоци и "
#~ "склад простор. Ова не ги вклучува страниците кои се вчитуваат на барање "
#~ "или кои се свопувани"
#~ msgid ""
#~ "Current limit in bytes on the rss of the process (usually 2,147,483,647)."
#~ msgstr ""
#~ "Моментална граница во бајти на rss на процесот (вообичаено 2,147,483,647)"
#~ msgid "Text_RSS"
#~ msgstr "Текст RSS"
#~ msgid "ShLib_RSS"
#~ msgstr "ShLib_RSS"
#~ msgid "Data_RSS"
#~ msgstr "Data_RSS"
#~ msgid "Stack_RSS"
#~ msgstr "Stack_RSS"
#~ msgid "Dirty Size"
#~ msgstr "Големина на непотребни "
#~ msgid "Start_Code"
#~ msgstr "Start_Code"
#~ msgid "End_Code"
#~ msgstr "End_Code"
#~ msgid "Start_Stack"
#~ msgstr "Start_Stack"
#~ msgid "Text resident set size"
#~ msgstr "Текст постојана големина "
#~ msgid "Shared-Lib resident set size"
#~ msgstr "Делена-библиотека постојана големина"
#~ msgid "Data resident set size"
#~ msgstr "Податоци постојана подесена големина"
#~ msgid "Stack resident set size"
#~ msgstr "Стек постојана подесена големина"
#~ msgid "Total size of dirty pages"
#~ msgstr "Вкупно големина на модифицирани страници"
#~ msgid "Address of beginning of code segment"
#~ msgstr "Адреса на сегментот на почетокот на кодот"
#~ msgid "Address of end of code segment"
#~ msgstr "Адреса на сегментот на крајот на кодот"
#~ msgid "Address of the bottom of stack segment"
#~ msgstr "Адреса на сегментот на дното од складот"
#~ msgid "Signal"
#~ msgstr "Сигнал"
#~ msgid "Blocked"
#~ msgstr "Блокиран"
#~ msgid "SigIgnore"
#~ msgstr "SigIgnore"
#~ msgid "SigCatch"
#~ msgstr "SigCatch"
#~ msgid "Mask of pending signals"
#~ msgstr "Маска на сигналите што чекаат"
#~ msgid "Mask of blocked signals"
#~ msgstr "Маска на блокираните сигнали"
#~ msgid "Mask of ignored signals"
#~ msgstr "Маска на игнорираните сигнали"
#~ msgid "Mask of caught signals"
#~ msgstr "Маска на фатените сигнали"
#~ msgid "Cmd"
#~ msgstr "Cmd"
#~ msgid "State"
#~ msgstr "Состојба"
#~ msgid "UID"
#~ msgstr "UID"
#~ msgid "GID"
#~ msgstr "GID"
#~ msgid "RGid"
#~ msgstr "RGid"
#~ msgid "RUid"
#~ msgstr "RUid"
#~ msgid "HasCPU"
#~ msgstr "Има процесор"
#~ msgid "Proc"
#~ msgstr "Proc"
#~ msgid "LProc"
#~ msgstr "LProc"
#~ msgid "Basename of executable file in call to exec()"
#~ msgstr "Основно име на извршната датотека во повикот на exec()"
#~ msgid "Single-Char code for process state (S=sleeping)"
#~ msgstr "Карактер за код со состојба на процес (Ѕ = спие)"
#~ msgid "UID of process"
#~ msgstr "UID на процес"
#~ msgid "GID of process"
#~ msgstr "GID на процес"
#~ msgid "Real UID of process"
#~ msgstr "Вистински UID на процесот"
#~ msgid "Real GID of process"
#~ msgstr "Вистински GID на процесот"
#~ msgid "Has CPU"
#~ msgstr "Има процесор"
#~ msgid "Processor"
#~ msgstr "Процесор"
#~ msgid "Last Processor"
#~ msgstr "Последен процесор"
#~ msgid "Start_Time"
#~ msgstr "Почетно време"
#~ msgid "RTime"
#~ msgstr "RTime"
#~ msgid "UTime"
#~ msgstr "UTime"
#~ msgid "STime"
#~ msgstr "STime"
#~ msgid "CUTime"
#~ msgstr "CUTime"
#~ msgid "CSTime"
#~ msgstr "CSTime"
#~ msgid "TimeOut"
#~ msgstr "TimeOut"
#~ msgid "It_Real_Value"
#~ msgstr "Реална вредност"
#~ msgid "Frequency"
#~ msgstr "Фреквенција"
#~ msgid "XCPU_UTime"
#~ msgstr "XCPU_UTime"
#~ msgid "XCPU_STime"
#~ msgstr "XCPU_STime"
#~ msgid "Start time of process in seconds since the epoch"
#~ msgstr "Почетно време на процесот од во секунди од епохата"
#~ msgid "Real time accumulated by process (should be utime + stime)"
#~ msgstr "Реално време акумулирано од процесот (треба да е utime + stime)"
#~ msgid "user-mode CPU time accumulated by process"
#~ msgstr "Кориснични режим, процесорско време акумулирано од процесот"
#~ msgid "kernel-mode CPU time accumulated by process"
#~ msgstr "Режим на кернелот, процесорското време акумулирано од процесот"
#~ msgid "cumulative utime of process and reaped children"
#~ msgstr "cumulative utime of process and reaped children"
#~ msgid "cumulative stime of process and reaped children"
#~ msgstr "cumulative stime of process and reaped children"
#~ msgid "The time (in jiffies) of the process's next timeout"
#~ msgstr "Време (во jiffies) за следното истекување на процесот"
#~ msgid ""
#~ "The time (in jiffies) before the next SIGALRM is sent to the process due "
#~ "to an interval timer."
#~ msgstr ""
#~ "Време (во jiffies) пред следниот SIGALRM да биде пратен на процесот "
#~ "според тајмерот."
#~ msgid "Tick frequency"
#~ msgstr "Фреквенција на такт"
#~ msgid "SMP user-mode CPU time accumulated by process"
#~ msgstr "SMP кориснички режим, процесорско време акумулирано од процесот"
#~ msgid "SMP kernel-mode CPU time accumulated by process"
#~ msgstr "SMP кернел режим, процесорско време акумулирано од процесот"
#~ msgid "Uid"
#~ msgstr "Uid"
#~ msgid "EUid"
#~ msgstr "EUid"
#~ msgid "Gid"
#~ msgstr "Gid"
#~ msgid "EGid"
#~ msgstr "EGid"
#~ msgid "SUid"
#~ msgstr "SUid"
#~ msgid "SGid"
#~ msgstr "SGid"
#~ msgid "FSUid"
#~ msgstr "FSUid"
#~ msgid "FSGid"
#~ msgstr "FSGid"
#~ msgid "Pid"
#~ msgstr "Pid"
#~ msgid "PPid"
#~ msgstr "PPid"
#~ msgid "PGrp"
#~ msgstr "PGrp"
#~ msgid "Session"
#~ msgstr "Сесија"
#~ msgid "Tty"
#~ msgstr "Tty"
#~ msgid "TPGid"
#~ msgstr "TPGid"
#~ msgid "Priority"
#~ msgstr "Приоритет"
#~ msgid "NGroups"
#~ msgstr "NGroups"
#~ msgid "Groups"
#~ msgstr "Групи"
#~ msgid "User ID"
#~ msgstr "ID на корисник"
#~ msgid "Effective User ID"
#~ msgstr "Ефективен кориснички ID"
#~ msgid "Group ID"
#~ msgstr "ID на група"
#~ msgid "Effective Group ID"
#~ msgstr "ID на ефективна Група"
#~ msgid "Set User ID"
#~ msgstr "Поставете ID за корисникот"
#~ msgid "Set Group ID"
#~ msgstr "Поставете ID на група"
#~ msgid "Filesystem User ID"
#~ msgstr "Кориснички ID на датотечниот систем"
#~ msgid "Filesystem Group ID"
#~ msgstr "Групен ID на датотечниот систем"
#~ msgid "Process ID"
#~ msgstr "ID на процесот"
#~ msgid "PID of parent process"
#~ msgstr "ID на родителскиот процес"
#~ msgid "Process group ID"
#~ msgstr "ID на групата"
#~ msgid "Session ID"
#~ msgstr "ID на сесијата"
#~ msgid "Full device number of controlling terminal"
#~ msgstr "Целосен број на уредот од контролниот терминал"
#~ msgid "Terminal process group ID"
#~ msgstr "ID на група терминални процеси"
#~ msgid "Kernel scheduling priority"
#~ msgstr "Кернел приоритет при распоредување"
#~ msgid "Standard unix nice level of process"
#~ msgstr "Стандардно јуникс ниво на процеси"
#~ msgid "Number of additional process groups"
#~ msgstr "Број на додатни групи за процеси"
#~ msgid "Array of additional process groups"
#~ msgstr "Низа на додатни групи за процеси"
#~ msgid "Number of entries in semaphore map"
#~ msgstr "Број на влезови во семафорската мапа"
#~ msgid "Max number of arrays"
#~ msgstr "Максимален број на низи"
#~ msgid "Max semaphores system wide"
#~ msgstr "Максимален број на семафори во системот"
#~ msgid "Number of undo structures system wide"
#~ msgstr "Број на \"враќање структури \" на ниво на систем"
#~ msgid "Max semaphores per array"
#~ msgstr "Максимален број на семафори по низа"
#~ msgid "Max ops per semop call"
#~ msgstr "Максимален број на оператори по семафорски повик"
#~ msgid "Max number of undo entries per process"
#~ msgstr "Максимум број на места за враќање по процес"
#~ msgid "sizeof struct sem_undo"
#~ msgstr "големина на структурата sem_undo"
#~ msgid "Semaphore max value"
#~ msgstr "Максимална вредност на семафорот"
#~ msgid "Adjust on exit max value"
#~ msgstr "Подеси ја вредноста на променливата \"exit max\""
#~ msgid "Max segment size"
#~ msgstr "Максимална големина на сегмент"
#~ msgid "Min segment size"
#~ msgstr "Минимална големина на сегмент"
#~ msgid "Max number of segments"
#~ msgstr "Максимален број на сегменти"
#~ msgid "Max shared segments per process"
#~ msgstr "Максимален број на поделени сегменти по процес"
#~ msgid "Max total shared memory"
#~ msgstr "Максимална големина на поделена меморија"
#~ msgid "Total Swap Space"
#~ msgstr "Вкупен swap простор"
#~ msgid "Used Swap Space"
#~ msgstr "Искористен swap простор"
#~ msgid "Free Swap Space"
#~ msgstr "Слободен swap простор"
#~ msgid "Page In"
#~ msgstr "Во страница"
#~ msgid "Page Out"
#~ msgstr "Од страница"
#~ msgid ""
#~ "Total number of swap pages that have been brought in since system boot"
#~ msgstr ""
#~ "Вкупен број на swap страници што се внесени од бутирањето на системот"
#~ msgid ""
#~ "Total number of swap pages that have been brought out since system boot"
#~ msgstr ""
#~ "Вкупен број на swap страници што се изнесени од бутирањето на системот"
#~ msgid "Server Features"
#~ msgstr "Серверски карактеристики"
#~ msgid "CPU Usage"
#~ msgstr "Искористеност на процесорот"
#~ msgid "Memory Usage"
#~ msgstr "Искористена меморија"
#~ msgid "Swap Usage"
#~ msgstr "Swap искористеност"
#~ msgid "System Uptime"
#~ msgstr "Време на подигање на системот"
#~ msgid "Load Averange"
#~ msgstr "Просечна оптеретеност"
#~ msgid "Shared Memory Limits"
#~ msgstr "Состојба на поделена меморија"
#~ msgid "Message Queue Limits"
#~ msgstr "Граница на ред за чекање на пораки"
#~ msgid "Semaphore Set Limits"
#~ msgstr "Постави лимит на семафорот"
#~ msgid "List of running Processes"
#~ msgstr "Листа на стартувани процеси"
#~ msgid "Process Status information"
#~ msgstr "Информација за статус на процесот"
#~ msgid "Process UID and TTY information"
#~ msgstr "UID и TTY информации за процесот"
#~ msgid "Process Memory information"
#~ msgstr "Информации за меморија на процесот"
#~ msgid "Process Time information"
#~ msgstr "Информации за процесорското време"
#~ msgid "Process Signal information"
#~ msgstr "Информации за процесните сигнали"
#~ msgid "Process Kernel Data information"
#~ msgstr "Информации за процесорските-кернел податоци"
#~ msgid "Process Segment information"
#~ msgstr "Информации за сегментот на процесот"
#~ msgid "Process Arguments"
#~ msgstr "Аргументи на процесот"
#~ msgid "Process Memory Map"
#~ msgstr "Mемориска мапа на процесот"
#~ msgid "Mount List"
#~ msgstr "Листа на монтирани уреди"
#~ msgid "File System Usage"
#~ msgstr "Искористеност на фајл системот"
#~ msgid "Network Load"
#~ msgstr "Оптеретеност на мрежата"
#~ msgid "PPP Statistics"
#~ msgstr "PPP статистика"
#~ msgid "Command line arguments of the process"
#~ msgstr "Аргументи од командната линија од процесот"
#~ msgid "List of currently mounted filesystems"
#~ msgstr "Листа на моментално монитрани фајл системи"
#~ msgid "Uptime"
#~ msgstr "Време на работење"
#~ msgid "Idletime"
#~ msgstr "Време на неактивност"
#~ msgid "BootTime"
#~ msgstr "При подигнување"
#~ msgid "Time in seconds since system boot"
#~ msgstr "Време во секунди од последното бутирање на системот"
#~ msgid "Time in seconds the system spent in the idle task since system boot"
#~ msgstr ""
#~ "Време во секунди што поминале за неактивна задача од последното бутирање"
#~ msgid "Time of last system boot in seconds since the epoch"
#~ msgstr "Времето од последното подигнување на системот во секунди од епохата"

1023
po/ro.po

File diff suppressed because it is too large Load Diff

View File

@@ -32,8 +32,8 @@ msgstr "okunan veri miktarı"
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "%d bayt oku"
msgstr[1] "%d bayt oku"
msgstr[0] "%lu bayt oku"
msgstr[1] "%lu bayt oku"
#: lib/write.c:52
#, c-format

822
po/vi.po

File diff suppressed because it is too large Load Diff

View File

@@ -26,7 +26,7 @@
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/open.h>
#include <glibtop/init_hooks.h>
#include "glibtop_suid.h"
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
@@ -35,7 +35,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
glibtop_init_func_t *init_fkt;
const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");

View File

@@ -25,8 +25,9 @@
#include <glibtop/open.h>
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
#include <glibtop/init_hooks.h>
glibtop_init_func_t _glibtop_init_hook_p [] = {
const glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_CPU
glibtop_init_cpu_p,
#endif
@@ -84,6 +85,9 @@ glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_NETLOAD
glibtop_init_netload_p,
#endif
#if GLIBTOP_SUID_NETLIST
glibtop_init_netlist_p,
#endif
#if GLIBTOP_SUID_PPP
glibtop_init_ppp_p,
#endif

View File

@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/init_hooks.h>
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
@@ -30,7 +31,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
glibtop_init_func_t *init_fkt;
const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");

View File

@@ -1,3 +1,67 @@
2005-08-15 Benoît Dejean <benoit@placenet.org>
* cpu.c: (glibtop_get_cpu_s):
Do not add irq, softirq and iowait to idle.
2005-08-04 Benoît Dejean <TazForEver@dlfp.org>
* open.c: (set_linux_version), (glibtop_open_s):
Reworked a bit.
Warn on 2.6 without /sys.
2005-08-03 Benoît Dejean <TazForEver@dlfp.org>
* netload.c: (glibtop_get_netload_s):
Fixed for people running 2.6 without /sys.
2005-08-02 Benoît Dejean <TazForEver@dlfp.org>
* glibtop_server.h:
Added GLIBTOP_SUID_NETLIST.
2005-07-23 Benoît Dejean <TazForEver@dlfp.org>
* uptime.c:
Fixed .flags.
2005-07-22 Benoît Dejean <TazForEver@dlfp.org>
* 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-09 Benoît Dejean <TazForEver@dlfp.org>
* 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-07 Benoît Dejean <TazForEver@dlfp.org>
* glibtop_private.c: (read_boot_time), (get_boot_time): Cached boot_time.
2005-07-06 Benoît Dejean <TazForEver@dlfp.org>
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-06-13 Benoît Dejean <TazForEver@dlfp.org>
* glibtop_private.c: (try_file_to_buffer): Ensures buffer is 0-terminated.

View File

@@ -91,6 +91,7 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
buf->nice = strtoull (p, &p, 0);
buf->sys = strtoull (p, &p, 0);
buf->idle = strtoull (p, &p, 0);
buf->total = buf->user + buf->nice + buf->sys + buf->idle;
/* 2.6 kernel */
if(server->os_version_code >= LINUX_VERSION_CODE(2, 6, 0))
@@ -99,12 +100,9 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
buf->irq = strtoull(p, &p, 0);
buf->softirq = strtoull(p, &p, 0);
buf->idle += buf->iowait;
buf->sys += buf->irq + buf->softirq;
buf->total += buf->iowait + buf->irq + buf->softirq;
}
buf->total = buf->user + buf->nice + buf->sys + buf->idle;
buf->frequency = 100;
buf->flags = _glibtop_sysdeps_cpu;
@@ -125,6 +123,10 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
buf->xcpu_nice [i] = strtoull (p, &p, 0);
buf->xcpu_sys [i] = strtoull (p, &p, 0);
buf->xcpu_idle [i] = strtoull (p, &p, 0);
buf->xcpu_total[i] = buf->xcpu_user [i] \
+ buf->xcpu_nice [i] \
+ buf->xcpu_sys [i] \
+ buf->xcpu_idle [i];
/* 2.6 kernel */
if(server->os_version_code >= LINUX_VERSION_CODE(2, 6, 0))
@@ -133,14 +135,10 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
buf->xcpu_irq [i] = strtoull(p, &p, 0);
buf->xcpu_softirq [i] = strtoull(p, &p, 0);
buf->xcpu_idle [i] += buf->xcpu_iowait [i];
buf->xcpu_sys [i] += buf->xcpu_irq [i] + buf->xcpu_softirq [i];
buf->xcpu_total [i] += buf->xcpu_iowait [i] \
+ buf->xcpu_irq [i] \
+ buf->xcpu_softirq [i];
}
buf->xcpu_total[i] = buf->xcpu_user [i] \
+ buf->xcpu_nice [i] \
+ buf->xcpu_sys [i] \
+ buf->xcpu_idle [i];
}
if(i >= 2) /* ok, that's a real SMP */

View File

@@ -10,6 +10,7 @@
#include <stdarg.h>
#include <fcntl.h>
#include <unistd.h>
unsigned long long
@@ -96,3 +97,49 @@ file_to_buffer(glibtop *server, char *buffer, const char *filename)
}
static unsigned long
read_boot_time(glibtop *server)
{
char buffer[BUFSIZ];
char *btime;
file_to_buffer(server, buffer, "/proc/stat");
btime = strstr(buffer, "btime");
g_return_val_if_fail(btime != NULL, 0UL);
btime = skip_token(btime);
return strtoul(btime, NULL, 10);
}
unsigned long
get_boot_time(glibtop *server)
{
static unsigned long boot_time = 0UL;
if(G_UNLIKELY(!boot_time))
{
boot_time = read_boot_time(server);
}
return boot_time;
}
size_t
get_page_size(void)
{
static size_t pagesize = 0;
if(G_UNLIKELY(!pagesize))
{
pagesize = getpagesize();
}
return pagesize;
}

View File

@@ -111,6 +111,16 @@ proc_stat_after_cmd (char *p)
*p++ = '\0';
return p;
}
unsigned long
get_boot_time(glibtop *server) G_GNUC_INTERNAL;
size_t
get_page_size(void) G_GNUC_INTERNAL;
G_END_DECLS
#endif /* __LINUX__GLIBTOP_PRIVATE_H__ */

View File

@@ -43,6 +43,7 @@
#define GLIBTOP_SUID_PROC_ARGS 0
#define GLIBTOP_SUID_PROC_MAP 0
#define GLIBTOP_SUID_NETLOAD 0
#define GLIBTOP_SUID_NETLIST 0
#define GLIBTOP_SUID_PPP 0
#define GLIBTOP_SUID_PROC_FILE 0

View File

@@ -186,179 +186,179 @@ static void get_ipv6(glibtop *server, glibtop_netload *buf,
/* Provides network statistics. */
static gboolean
read_value(glibtop *server,
const char *device,
const char *filename,
guint64 *value)
{
char buffer[BUFSIZ];
void
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
const char *interface)
if(try_file_to_buffer(buffer,
"/sys/class/net/%s/statistics/%s",
device,
filename))
{
glibtop_warn_io_r(server,
"Failed to open \"/sys/class/net/%s/statistics/%s\"",
device,
filename);
return FALSE;
}
*value = strtoull(buffer, NULL, 10);
return TRUE;
}
static void
linux_2_6_stats(glibtop *server,
glibtop_netload *buf,
const char *dev)
{
if(read_value(server, dev, "rx_packets", &buf->packets_in))
buf->flags |= (1 << GLIBTOP_NETLOAD_PACKETS_IN);
if(read_value(server, dev, "tx_packets", &buf->packets_out))
buf->flags |= (1 << GLIBTOP_NETLOAD_PACKETS_OUT);
buf->packets_total = buf->packets_in + buf->packets_out;
buf->flags |= (1 << GLIBTOP_NETLOAD_PACKETS_TOTAL);
if(read_value(server, dev, "rx_bytes", &buf->bytes_in))
buf->flags |= (1 << GLIBTOP_NETLOAD_BYTES_IN);
if(read_value(server, dev, "tx_bytes", &buf->bytes_out))
buf->flags |= (1 << GLIBTOP_NETLOAD_BYTES_OUT);
buf->bytes_total = buf->bytes_in + buf->bytes_out;
buf->flags |= (1 << GLIBTOP_NETLOAD_BYTES_TOTAL);
if(read_value(server, dev, "rx_errors", &buf->errors_in))
buf->flags |= (1 << GLIBTOP_NETLOAD_ERRORS_IN);
if(read_value(server, dev, "tx_errors", &buf->errors_out))
buf->flags |= (1 << GLIBTOP_NETLOAD_ERRORS_OUT);
buf->errors_total = buf->errors_in + buf->errors_out;
buf->flags |= (1 << GLIBTOP_NETLOAD_ERRORS_TOTAL);
if(read_value(server, dev, "collisions", &buf->collisions))
buf->flags |= (1 << GLIBTOP_NETLOAD_COLLISIONS);
}
static void
linux_2_0_stats(glibtop *server,
glibtop_netload *buf,
const char *interface)
{
FILE *f;
char buffer[BUFSIZ];
f = fopen ("/proc/net/ip_acct", "r");
if (!f) {
glibtop_warn_io_r (server,
"Failed to open \"/proc/net/ip_acct\"");
return;
}
/* Skip over the header line. */
fgets (buffer, BUFSIZ-1, f);
while (fgets (buffer, BUFSIZ-1, f)) {
unsigned long long flags, packets, bytes;
char *p, *dev;
/* Skip over the network thing. */
dev = skip_token (buffer) + 1;
p = skip_token (dev);
*p++ = 0;
if (strcmp (dev, interface))
continue;
p = skip_token (p);
flags = strtoull (p, &p, 16);
p = skip_multiple_token (p, 2);
packets = strtoull (p, &p, 0);
bytes = strtoull (p, &p, 0);
if (flags & _GLIBTOP_IP_FW_ACCTIN) {
/* Incoming packets only. */
buf->packets_total += packets;
buf->packets_in += packets;
buf->bytes_total += bytes;
buf->bytes_in += bytes;
buf->flags |= _glibtop_sysdeps_netload_in;
} else if (flags & _GLIBTOP_IP_FW_ACCTOUT) {
/* Outgoing packets only. */
buf->packets_total += packets;
buf->packets_out += packets;
buf->bytes_total += bytes;
buf->bytes_out += bytes;
buf->flags |= _glibtop_sysdeps_netload_out;
} else {
/* Only have total values. */
buf->packets_total += packets;
buf->bytes_total += bytes;
buf->flags |= _glibtop_sysdeps_netload_total;
}
}
fclose (f);
}
static void
linux_2_4_stats(glibtop *server,
glibtop_netload *buf,
const char *interface)
{
char buffer [BUFSIZ], *p;
int have_bytes, fields, skfd;
int have_bytes, fields;
FILE *f;
memset (buf, 0, sizeof (glibtop_netload));
skfd = socket (AF_INET, SOCK_DGRAM, 0);
if (skfd) {
struct ifreq ifr;
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFFLAGS, &ifr)) {
const unsigned long long flags = ifr.ifr_flags;
buf->flags |= (1L << GLIBTOP_NETLOAD_IF_FLAGS);
if (flags & IFF_UP)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
if (flags & IFF_BROADCAST)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
if (flags & IFF_DEBUG)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
if (flags & IFF_LOOPBACK)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
if (flags & IFF_POINTOPOINT)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
if (flags & IFF_RUNNING)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
if (flags & IFF_NOARP)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
if (flags & IFF_PROMISC)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
if (flags & IFF_ALLMULTI)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
if (flags & IFF_MULTICAST)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
}
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFADDR, &ifr)) {
buf->address = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr;
buf->flags |= (1L << GLIBTOP_NETLOAD_ADDRESS);
}
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFNETMASK, &ifr)) {
buf->subnet = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr;
buf->flags |= (1L << GLIBTOP_NETLOAD_SUBNET);
}
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFMTU, &ifr)) {
buf->mtu = ifr.ifr_mtu;
buf->flags |= (1L << GLIBTOP_NETLOAD_MTU);
}
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFHWADDR, &ifr)) {
memcpy(buf->hwaddress, &ifr.ifr_hwaddr.sa_data, 8);
buf->flags |= (1L << GLIBTOP_NETLOAD_HWADDRESS);
}
close (skfd);
}
/* Linux 2.1.114 - don't know where exactly this was added, but
* recent kernels have byte count in /proc/net/dev so we don't
* need IP accounting.
*/
if (server->os_version_code < LINUX_VERSION_CODE(2, 1, 14)) {
/* If IP accounting is enabled in the kernel and it is
* enabled for the requested interface, we use it to
* get the data. In this case, we don't use /proc/net/dev
* to get errors and collisions.
*/
f = fopen ("/proc/net/ip_acct", "r");
if (f) {
int success = 0;
/* Skip over the header line. */
fgets (buffer, BUFSIZ-1, f);
while (fgets (buffer, BUFSIZ-1, f)) {
unsigned long long flags, packets, bytes;
char *p, *dev;
/* Skip over the network thing. */
dev = skip_token (buffer) + 1;
p = skip_token (dev);
*p++ = 0;
if (strcmp (dev, interface))
continue;
success = 1;
p = skip_token (p);
flags = strtoull (p, &p, 16);
p = skip_multiple_token (p, 2);
packets = strtoull (p, &p, 0);
bytes = strtoull (p, &p, 0);
if (flags & _GLIBTOP_IP_FW_ACCTIN) {
/* Incoming packets only. */
buf->packets_total += packets;
buf->packets_in += packets;
buf->bytes_total += bytes;
buf->bytes_in += bytes;
buf->flags |= _glibtop_sysdeps_netload_in;
} else if (flags & _GLIBTOP_IP_FW_ACCTOUT) {
/* Outgoing packets only. */
buf->packets_total += packets;
buf->packets_out += packets;
buf->bytes_total += bytes;
buf->bytes_out += bytes;
buf->flags |= _glibtop_sysdeps_netload_out;
} else {
/* Only have total values. */
buf->packets_total += packets;
buf->bytes_total += bytes;
buf->flags |= _glibtop_sysdeps_netload_total;
}
}
fclose (f);
if (success) return;
}
}
/* Ok, either IP accounting is not enabled in the kernel or
* it was not enabled for the requested interface. */
* it was not enabled for the requested interface. */
f = fopen ("/proc/net/dev", "r");
if (!f) return;
if (!f) {
glibtop_warn_io_r(server,
"Failed to open \"/proc/net/dev\"");
return;
}
/* Skip over the header line. */
/* Skip over the header line. */
fgets (buffer, BUFSIZ-1, f);
fgets (buffer, BUFSIZ-1, f);
/* Starting with 2.1.xx (don't know exactly which version)
* /proc/net/dev contains both byte and package counters. */
/* Starting with 2.1.xx (don't know exactly which version)
* /proc/net/dev contains both byte and package counters. */
p = strchr (buffer, '|');
if (!p) {
@@ -370,7 +370,7 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
have_bytes = strncmp (++p, "bytes", 5) == 0;
/* Count remaining 'Receive' fields so we know where
* the first 'Transmit' field starts. */
* the first 'Transmit' field starts. */
fields = 0;
while (*p != '|') {
@@ -445,6 +445,109 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
}
fclose (f);
}
/* Provides network statistics. */
void
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
const char *interface)
{
int skfd;
memset (buf, 0, sizeof (glibtop_netload));
skfd = socket (AF_INET, SOCK_DGRAM, 0);
if (skfd) {
struct ifreq ifr;
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFFLAGS, &ifr)) {
const unsigned long long flags = ifr.ifr_flags;
buf->flags |= (1L << GLIBTOP_NETLOAD_IF_FLAGS);
if (flags & IFF_UP)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
if (flags & IFF_BROADCAST)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
if (flags & IFF_DEBUG)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
if (flags & IFF_LOOPBACK)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
if (flags & IFF_POINTOPOINT)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
if (flags & IFF_RUNNING)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
if (flags & IFF_NOARP)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
if (flags & IFF_PROMISC)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
if (flags & IFF_ALLMULTI)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
if (flags & IFF_MULTICAST)
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
}
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFADDR, &ifr)) {
buf->address = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr;
buf->flags |= (1L << GLIBTOP_NETLOAD_ADDRESS);
}
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFNETMASK, &ifr)) {
buf->subnet = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr;
buf->flags |= (1L << GLIBTOP_NETLOAD_SUBNET);
}
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFMTU, &ifr)) {
buf->mtu = ifr.ifr_mtu;
buf->flags |= (1L << GLIBTOP_NETLOAD_MTU);
}
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
if (!ioctl (skfd, SIOCGIFHWADDR, &ifr)) {
memcpy(buf->hwaddress, &ifr.ifr_hwaddr.sa_data, 8);
buf->flags |= (1L << GLIBTOP_NETLOAD_HWADDRESS);
}
close (skfd);
}
/*
* Statistics
*/
/* Linux 2.1.114 - don't know where exactly this was added, but
* recent kernels have byte count in /proc/net/dev so we don't
* need IP accounting.
*/
if (server->os_version_code < LINUX_VERSION_CODE(2, 1, 14)) {
linux_2_0_stats(server, buf, interface);
}
else if (server->os_version_code > LINUX_VERSION_CODE(2, 6, 0)
&& g_file_test("/sys", G_FILE_TEST_IS_DIR)) {
linux_2_6_stats(server, buf, interface);
}
else {
/* 2.4 and 2.6 without /sys (?$£Z¥!) */
linux_2_4_stats(server, buf, interface);
}
#ifdef HAVE_IFADDRS_H
get_ipv6(server, buf, interface);

View File

@@ -24,6 +24,7 @@
#include <glibtop.h>
#include <glibtop/cpu.h>
#include <glibtop/open.h>
#include <glibtop/error.h>
#include "glibtop_private.h"
@@ -33,27 +34,27 @@
*/
#include <sys/utsname.h>
static unsigned get_linux_version(void) {
static unsigned linux_version_code = 0;
if(!linux_version_code) {
static void set_linux_version(glibtop *server)
{
struct utsname uts;
unsigned x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
if (uname(&uts) == -1) /* failure most likely implies impending death */
exit(1);
glibtop_error_r(server, "uname() failed");
if (sscanf(uts.release, "%u.%u.%u", &x, &y, &z) < 3)
fprintf(stderr, /* *very* unlikely to happen by accident */
"Non-standard uts for running kernel:\n"
"release %s=%u.%u.%u gives version code %d\n",
uts.release, x, y, z, LINUX_VERSION_CODE(x,y,z));
glibtop_warn_r(server,
"Non-standard uts for running kernel:\n"
"release %s=%u.%u.%u gives version code %d\n",
uts.release, x, y, z, LINUX_VERSION_CODE(x,y,z));
linux_version_code = LINUX_VERSION_CODE(x, y, z);
}
if (LINUX_VERSION_CODE(x, y, z) >= LINUX_VERSION_CODE(2, 6, 0)
&& !g_file_test("/sys", G_FILE_TEST_IS_DIR))
glibtop_warn_r(server,
"You're running a 2.6 kernel without /sys."
"You should mount it.");
return linux_version_code;
server->os_version_code = LINUX_VERSION_CODE(x, y, z);
}
/* ======================================================= */
@@ -71,7 +72,7 @@ glibtop_open_s (glibtop *server, const char *program_name,
server->name = program_name;
server->os_version_code = get_linux_version();
set_linux_version(server);
file_to_buffer(server, buffer, FILENAME);

View File

@@ -51,7 +51,7 @@ void
glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid)
{
char buffer [BUFSIZ], *p;
const size_t pagesize = getpagesize();
const size_t pagesize = get_page_size();
glibtop_init_s (&server, GLIBTOP_SYSDEPS_MEM, 0);

View File

@@ -55,7 +55,7 @@ glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
char buffer [BUFSIZ], *p;
const size_t pagesize = getpagesize();
const size_t pagesize = get_page_size();
glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0);

View File

@@ -87,11 +87,7 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid)
/* seconds since epoch */
{
/* Linux provides start_time as clock_t representing
the start of <pid> after boot_time.
Let's use glibtop_get_uptime to get boot_time.
But i'm not sure if this is safe
/*
See libgtop documentation.
#ifdef __KERNEL__
@@ -109,10 +105,7 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid)
system clock is not synchronised with you hardware clock.
'man hwclock'
*/
glibtop_uptime up;
glibtop_get_uptime_s(server, &up);
buf->start_time = up.boot_time + strtoull (p, &p, 0) / 100;
buf->start_time = get_boot_time(server) + strtoull (p, &p, 0) / 100;
}
buf->frequency = 100;

View File

@@ -30,7 +30,9 @@
#include <time.h>
static const unsigned long _glibtop_sysdeps_uptime =
(1L << GLIBTOP_UPTIME_UPTIME) + (1L << GLIBTOP_UPTIME_IDLETIME);
(1UL << GLIBTOP_UPTIME_UPTIME) \
+ (1UL << GLIBTOP_UPTIME_IDLETIME) \
+ (1UL << GLIBTOP_UPTIME_BOOT_TIME);
/* Init function. */
@@ -57,7 +59,7 @@ glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
buf->uptime = g_ascii_strtod (buffer, &p);
buf->idletime = g_ascii_strtod (p, &p);
buf->boot_time = (guint64) time(NULL) - (guint64) buf->uptime;
buf->boot_time = get_boot_time(server);
buf->flags = _glibtop_sysdeps_uptime;
}

View File

@@ -23,7 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/init_hooks.h>
#include <glibtop_suid.h>
#include <unistd.h>
@@ -35,7 +35,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
glibtop_init_func_t *init_fkt;
const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");

View File

@@ -1,3 +1,13 @@
2005-08-12 Benoît Dejean <benoit@placenet.org>
* glibtop_server.h:
* open.c:
* open_suid.c:
* procdata.c:
Added missing includes.
Added missing GLIBTOP_SUID_NETLIST.
2004-10-11 Benoît Dejean <tazforever@dlfp.org>
* cpu.c: (glibtop_init_cpu_s), (glibtop_get_cpu_s):

View File

@@ -45,6 +45,7 @@ G_BEGIN_DECLS
#define GLIBTOP_SUID_PROC_ARGS 0
#define GLIBTOP_SUID_PROC_MAP 0
#define GLIBTOP_SUID_NETLOAD 0
#define GLIBTOP_SUID_NETLIST 0
#define GLIBTOP_SUID_PPP 0
G_END_DECLS

View File

@@ -23,6 +23,7 @@
#include <glibtop/open.h>
#include <glibtop/cpu.h>
#include <glibtop/error.h>
#include <unistd.h>
#include <dlfcn.h>

View File

@@ -23,7 +23,8 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/init_hooks.h>
#include <glibtop/error.h>
#include <glibtop_suid.h>
#include <unistd.h>
@@ -35,7 +36,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
glibtop_init_func_t *init_fkt;
const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");

View File

@@ -24,6 +24,7 @@
#include <glibtop.h>
#include <glibtop_private.h>
#include <glibtop/procuid.h>
#include <glibtop/error.h>
#include <errno.h>

View File

@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/init_hooks.h>
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
@@ -30,7 +31,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
glibtop_init_func_t *init_fkt;
const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");