Compare commits
40 Commits
LIBGTOP_2_
...
LIBGTOP_2_
Author | SHA1 | Date | |
---|---|---|---|
|
2930c9f092 | ||
|
fe6a33a5fd | ||
|
30ebfb45d0 | ||
|
b43a1e01c0 | ||
|
88d606d814 | ||
|
dd0d06898a | ||
|
3e77f3cf13 | ||
|
22a1120348 | ||
|
da4dc46b7a | ||
|
03bcc48da6 | ||
|
708285f0d2 | ||
|
a0493a0ff1 | ||
|
9f7d505d20 | ||
|
78cb7832c5 | ||
|
b3979e6942 | ||
|
92d3176303 | ||
|
e5c7f87f50 | ||
|
7e506a6c83 | ||
|
1645027004 | ||
|
8e656af060 | ||
|
4efcfb2cb3 | ||
|
59da1618b0 | ||
|
e9ce3ccc1c | ||
|
84e45a6519 | ||
|
96fe554afd | ||
|
16e0c943b2 | ||
|
f409c553f5 | ||
|
b6a10fd8f7 | ||
|
efeca4a865 | ||
|
5e70932b66 | ||
|
d499bd3761 | ||
|
48e3d5b2ec | ||
|
55270e618e | ||
|
a5c897b846 | ||
|
b0093954b3 | ||
|
c81e055427 | ||
|
06fb19b5c6 | ||
|
f8d9557257 | ||
|
ef2ed50bf7 | ||
|
c19ba1af03 |
84
ChangeLog
84
ChangeLog
@@ -1,3 +1,87 @@
|
||||
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.
|
||||
|
||||
2005-06-15 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* sysdeps/common/Makefile.am:
|
||||
* sysdeps/linux/Makefile.am: Removed LT_VERSION_INFO from LDFLAGS
|
||||
when unused.
|
||||
|
||||
2005-06-08 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* configure.in: 2.11.1 post release version bump.
|
||||
|
||||
2005-06-08 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* NEWS: Released 2.11.0.
|
||||
|
33
NEWS
33
NEWS
@@ -1,3 +1,36 @@
|
||||
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:
|
||||
- glibtop_get_swap : added page(in|out) for linux 2.6.
|
||||
|
||||
June 8, 2005: Overview of changes from 2.10.x to 2.11.0
|
||||
=======================================================
|
||||
* Replaced a lot of macros by functions
|
||||
|
70
configure.in
70
configure.in
@@ -7,7 +7,7 @@ AM_CONFIG_HEADER(config.h)
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
LIBGTOP_MAJOR_VERSION=2
|
||||
LIBGTOP_MINOR_VERSION=11
|
||||
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)
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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 */
|
||||
|
11
include/glibtop/init_hooks.h
Normal file
11
include/glibtop/init_hooks.h
Normal 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 */
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
38
po/ChangeLog
38
po/ChangeLog
@@ -1,10 +1,46 @@
|
||||
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.
|
||||
|
||||
2005-06-15 Alexander Shopov <ash@contact.bg>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by
|
||||
Rostislav Raykov <zbrox@i-space.org>
|
||||
|
||||
2005-06-13 Ignacio Casal Quinteiro <nacho.resa@gmail.com>
|
||||
|
||||
* gl.po: Updated Galician Translation.
|
||||
|
||||
2005-04-01 Adi Attar <aattar@cvs.gnome.org>
|
||||
|
||||
* xh.po: Added Xhosa translation.
|
||||
|
||||
2005-03-31 Steve Murphy <murf@e-tools.com>
|
||||
|
||||
* rw.po: Added Kinyarwanda translation.
|
||||
* rw.po: Added Kinyarwanda translation.
|
||||
|
||||
2005-03-19 Priit Laes <plaes@cvs.gnome.org>
|
||||
|
||||
|
98
po/bg.po
98
po/bg.po
@@ -9,8 +9,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-01-27 12:05+0200\n"
|
||||
"PO-Revision-Date: 2005-03-05 16:34+0800\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"
|
||||
@@ -18,64 +18,64 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
|
||||
#: lib/read.c:64
|
||||
#: ../lib/read.c:65
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "прочетен %d байт"
|
||||
msgstr[1] "прочетени %d байта"
|
||||
|
||||
#: lib/read_data.c:52
|
||||
#: ../lib/read_data.c:53
|
||||
msgid "read data size"
|
||||
msgstr "размер прочетени данни"
|
||||
|
||||
#: lib/read_data.c:71
|
||||
#, fuzzy, c-format
|
||||
#: ../lib/read_data.c:72
|
||||
#, 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:51
|
||||
#: ../lib/write.c:52
|
||||
#, c-format
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "записан %d байт"
|
||||
msgstr[1] "записани %d байта"
|
||||
|
||||
#: src/daemon/gnuserv.c:461
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
msgid "Enable debugging"
|
||||
msgstr "Включване на дебъгване"
|
||||
|
||||
#: src/daemon/gnuserv.c:461
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
msgid "DEBUG"
|
||||
msgstr "DEBUG"
|
||||
|
||||
#: src/daemon/gnuserv.c:463
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Включен подробен изход"
|
||||
|
||||
#: src/daemon/gnuserv.c:463
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
msgid "VERBOSE"
|
||||
msgstr "ПОДРОБЕН"
|
||||
|
||||
#: src/daemon/gnuserv.c:465
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Не се поражда процес във фонов режим"
|
||||
|
||||
#: src/daemon/gnuserv.c:465
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "БЕЗ-ДЕМОН"
|
||||
|
||||
#: src/daemon/gnuserv.c:467
|
||||
#: ../src/daemon/gnuserv.c:466
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Извикан от inetd"
|
||||
|
||||
#: src/daemon/gnuserv.c:467
|
||||
#: ../src/daemon/gnuserv.c:466
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: src/daemon/gnuserv.c:501
|
||||
#: ../src/daemon/gnuserv.c:500
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
@@ -85,126 +85,126 @@ msgstr ""
|
||||
"Изпълнете '%s --help' за да видите пълния списък от налични за командата "
|
||||
"опции.\n"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Hangup"
|
||||
msgstr "Разпадане"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Interrupt"
|
||||
msgstr "Прекъсване"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Quit"
|
||||
msgstr "Напускане"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Illegal instruction"
|
||||
msgstr "Недопустима инструкция"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Trace trap"
|
||||
msgstr "Точка на прекъсване"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "Abort"
|
||||
msgstr "Прекъсване"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "EMT error"
|
||||
msgstr "EMT грешка"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Изключение с плаваща запетая"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Kill"
|
||||
msgstr "Убиване"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Bus error"
|
||||
msgstr "Грешка в шината"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Segmentation violation"
|
||||
msgstr "Сегментация"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Грешен аргумент на системно извикване"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Broken pipe"
|
||||
msgstr "Нарушен програмен канал"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Alarm clock"
|
||||
msgstr "Алармен часовник"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Termination"
|
||||
msgstr "Завършване"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Неотложно състояние на socket"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Stop"
|
||||
msgstr "Стоп"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Стоп от клавиатурата"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Continue"
|
||||
msgstr "Продължаване"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Child status has changed"
|
||||
msgstr "Промяна в състоянието на дъщерни процеси"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background read from tty"
|
||||
msgstr "Фоново четене от tty"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "Background write to tty"
|
||||
msgstr "Фонов запис в tty"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "I/O now possible"
|
||||
msgstr "I/O сега е възможно"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "Превишено ограничение за CPU"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Превишено ограничение за размер на файл"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "Виртуален алармен часовник"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Профилиран алармен часовник"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Window size change"
|
||||
msgstr "Променяне размера на прозорец"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "Information request"
|
||||
msgstr "Заявка за данни"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 1"
|
||||
msgstr "Сигнал на потребител 1"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
|
||||
#: ../sysdeps/osf1/siglist.c:58 ../sysdeps/sun4/siglist.c:58
|
||||
msgid "User defined signal 2"
|
||||
msgstr "Сигнал на потребител 2"
|
||||
|
38
po/ca.po
38
po/ca.po
@@ -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"
|
||||
|
6
po/de.po
6
po/de.po
@@ -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"
|
||||
|
4
po/tr.po
4
po/tr.po
@@ -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
|
||||
|
26
po/zh_TW.po
26
po/zh_TW.po
@@ -1,15 +1,15 @@
|
||||
# traditional Chinese translation for libgtop.
|
||||
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Abel Cheung <maddog@linuxhall.org>, 2001-2003.
|
||||
# Abel Cheung <abel@oaka.org>, 2001-2003.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop 2.9.92\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-03-05 16:31+0800\n"
|
||||
"POT-Creation-Date: 2005-06-23 22:05+0000\n"
|
||||
"PO-Revision-Date: 2005-03-05 16:33+0800\n"
|
||||
"Last-Translator: Abel Cheung <maddog@linuxhall.org>\n"
|
||||
"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
|
||||
"Last-Translator: Abel Cheung <abel@oaka.org>\n"
|
||||
"Language-Team: Chinese (traditional) <community@linuxhall.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -37,39 +37,39 @@ msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "寫入 %d 位元組"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
msgid "Enable debugging"
|
||||
msgstr "啟用偵錯功能"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
msgid "DEBUG"
|
||||
msgstr "偵錯"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
msgid "Enable verbose output"
|
||||
msgstr "顯示詳細的輸出訊息"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
msgid "VERBOSE"
|
||||
msgstr "詳細訊息"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:463
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
msgid "Don't fork into background"
|
||||
msgstr "不要放置於背景執行"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:463
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "NO-DAEMON"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:465
|
||||
#: ../src/daemon/gnuserv.c:466
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "透過 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"
|
||||
|
@@ -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)");
|
||||
|
@@ -20,11 +20,11 @@ libgtop_common_2_0_la_SOURCES = error.c gnuslib.c \
|
||||
default.c \
|
||||
$(inodedb_SRCLIST)
|
||||
|
||||
libgtop_common_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
# libgtop_common_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
libgtop_common_2_0_la_LIBADD = $(LIBGTOP_EXTRA_LIBS)
|
||||
|
||||
libgtop_suid_common_2_0_la_SOURCES = error.c sysdeps_suid.c
|
||||
|
||||
libgtop_suid_common_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
# libgtop_suid_common_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
|
||||
EXTRA_DIST = inodedb.c
|
||||
|
@@ -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
|
||||
|
@@ -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)");
|
||||
|
@@ -1,3 +1,75 @@
|
||||
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.
|
||||
|
||||
2005-06-13 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* swap.c: (glibtop_get_swap_s): Added pagein/pageout for linux 2.6.
|
||||
|
||||
2005-05-26 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* siglist.c: Fixed compilation on mips. Closes #304570.
|
||||
|
@@ -12,7 +12,7 @@ libgtop_sysdeps_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
|
||||
|
||||
libgtop_sysdeps_2_0_la_LIBADD = @GLIB_LIBS@
|
||||
|
||||
libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
# libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
|
||||
libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
|
||||
libgtopincludedir = $(includedir)/libgtop-2.0
|
||||
|
@@ -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 */
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
unsigned long long
|
||||
@@ -66,6 +67,8 @@ int try_file_to_buffer(char *buffer, const char *format, ...)
|
||||
|
||||
va_end(pa);
|
||||
|
||||
buffer [0] = '\0';
|
||||
|
||||
if((fd = open (path, O_RDONLY)) < 0)
|
||||
return TRY_FILE_TO_BUFFER_OPEN;
|
||||
|
||||
@@ -94,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;
|
||||
}
|
||||
|
@@ -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__ */
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -49,6 +49,7 @@ glibtop_init_swap_s (glibtop *server)
|
||||
|
||||
#define MEMINFO "/proc/meminfo"
|
||||
#define PROC_STAT "/proc/stat"
|
||||
#define PROC_VMSTAT "/proc/vmstat"
|
||||
|
||||
void
|
||||
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
|
||||
@@ -69,15 +70,38 @@ glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
|
||||
|
||||
buf->flags = _glibtop_sysdeps_swap;
|
||||
|
||||
file_to_buffer(server, buffer, PROC_STAT);
|
||||
|
||||
p = strstr (buffer, "\nswap");
|
||||
if (p == NULL) return;
|
||||
if(server->os_version_code >= LINUX_VERSION_CODE(2, 6, 0))
|
||||
{
|
||||
file_to_buffer (server, buffer, PROC_VMSTAT);
|
||||
|
||||
p = skip_token (p);
|
||||
p = strstr (buffer, "\npswpin");
|
||||
|
||||
buf->pagein = strtoull (p, &p, 0);
|
||||
buf->pageout = strtoull (p, &p, 0);
|
||||
if(p)
|
||||
{
|
||||
p = skip_token(p);
|
||||
buf->pagein = strtoull (p, &p, 0);
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_swap_paging;
|
||||
p = skip_token(p);
|
||||
buf->pageout = strtoull (p, &p, 0);
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_swap_paging;
|
||||
}
|
||||
}
|
||||
else /* Linux 2.4 */
|
||||
{
|
||||
file_to_buffer (server, buffer, PROC_STAT);
|
||||
|
||||
p = strstr (buffer, "\nswap");
|
||||
|
||||
if(p)
|
||||
{
|
||||
p = skip_token (p);
|
||||
|
||||
buf->pagein = strtoull (p, &p, 0);
|
||||
buf->pageout = strtoull (p, &p, 0);
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_swap_paging;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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)");
|
||||
|
@@ -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):
|
||||
|
@@ -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
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/cpu.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <dlfcn.h>
|
||||
|
@@ -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)");
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <glibtop.h>
|
||||
#include <glibtop_private.h>
|
||||
#include <glibtop/procuid.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
|
@@ -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)");
|
||||
|
Reference in New Issue
Block a user