Compare commits
99 Commits
LIBGTOP_2_
...
LIBGTOP_2_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9c01aac4a | ||
|
|
82c28b2ad2 | ||
|
|
05345dc032 | ||
|
|
63ba7b2c12 | ||
|
|
5371e8ec88 | ||
|
|
e682094418 | ||
|
|
2e861977a6 | ||
|
|
a39f290683 | ||
|
|
02b55313f3 | ||
|
|
596c42d7f1 | ||
|
|
d4d4f7735a | ||
|
|
4cd3e4fed6 | ||
|
|
c99ceeaa65 | ||
|
|
ecbfade528 | ||
|
|
73d4679ad8 | ||
|
|
df1db43032 | ||
|
|
ff07ba102f | ||
|
|
07d2816d5b | ||
|
|
2caff8bf5c | ||
|
|
78e257e958 | ||
|
|
efaaf6eb77 | ||
|
|
47bcd423b5 | ||
|
|
38bfee6739 | ||
|
|
3147bf2e34 | ||
|
|
2506662196 | ||
|
|
b6eb0873e7 | ||
|
|
2c08229f04 | ||
|
|
753d9abb13 | ||
|
|
af7e9cd1b6 | ||
|
|
552ea7ec3a | ||
|
|
43f19912e3 | ||
|
|
16bb5c8075 | ||
|
|
bebcb377af | ||
|
|
4cffb2f094 | ||
|
|
5adaa90de3 | ||
|
|
f9e8ae8dfc | ||
|
|
efeb24a96c | ||
|
|
3c4ddb5572 | ||
|
|
fec9e956e3 | ||
|
|
2ee4fa70a5 | ||
|
|
7a4b2d91ad | ||
|
|
dc7eab4329 | ||
|
|
a44392d948 | ||
|
|
b013937b2c | ||
|
|
4bded8fa91 | ||
|
|
f88a38aa52 | ||
|
|
37774dc02d | ||
|
|
4efe3721e7 | ||
|
|
31cbc3374d | ||
|
|
c8a33802c2 | ||
|
|
a3ff5fb398 | ||
|
|
8d5b3dd86a | ||
|
|
fecedf8c72 | ||
|
|
183b7b0cf1 | ||
|
|
1523fae41e | ||
|
|
a6d0d61175 | ||
|
|
b0f4bee85e | ||
|
|
1d1d3fb907 | ||
|
|
bd363a9ca6 | ||
|
|
46c1169ab1 | ||
|
|
b11aa1517e | ||
|
|
aa7572abfd | ||
|
|
17b03f33ab | ||
|
|
dd46d6a00e | ||
|
|
7bd52fc397 | ||
|
|
ff7cbcbe61 | ||
|
|
d1d565aa60 | ||
|
|
169b76a88f | ||
|
|
0a265d05d4 | ||
|
|
08ac661b19 | ||
|
|
1baa3fcc6a | ||
|
|
eaff15b741 | ||
|
|
4612e7c7eb | ||
|
|
f66324f84d | ||
|
|
138889c4d6 | ||
|
|
cac71bf6c4 | ||
|
|
2ea3da9da5 | ||
|
|
5144c3e127 | ||
|
|
c4907672cd | ||
|
|
4c9a161eb5 | ||
|
|
32833323d9 | ||
|
|
0de702b142 | ||
|
|
4e24854dbf | ||
|
|
08fd95d253 | ||
|
|
aa1a6766f2 | ||
|
|
537dc1bff1 | ||
|
|
93829c8cbb | ||
|
|
cecf53394b | ||
|
|
62239cfe50 | ||
|
|
15ffb2d039 | ||
|
|
7f14f4409d | ||
|
|
f8c573b78c | ||
|
|
49641cc363 | ||
|
|
46706961ac | ||
|
|
edda30a4ad | ||
|
|
c775a536c8 | ||
|
|
84a697a826 | ||
|
|
07c04634bc | ||
|
|
78a4292fb4 |
100
.gitignore
vendored
Normal file
100
.gitignore
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
sysdeps/Makefile
|
||||
sysdeps/Makefile.in
|
||||
sysdeps/*/Makefile
|
||||
sysdeps/*/Makefile.in
|
||||
sysdeps/*/.deps
|
||||
sysdeps/*/.libs
|
||||
sysdeps/*/*.o
|
||||
sysdeps/*/*.lo
|
||||
sysdeps/*/*.la
|
||||
src/*/Makefile
|
||||
src/*/Makefile.in
|
||||
src/*/.deps
|
||||
src/Makefile
|
||||
src/Makefile.in
|
||||
stamp-h1
|
||||
po/*.gmo
|
||||
po/stamp-it
|
||||
po/POTFILES
|
||||
po/Makefile.in.in
|
||||
po/Makefile.in
|
||||
po/Makefile
|
||||
missing
|
||||
misc/Makefile
|
||||
misc/Makefile.in
|
||||
m4/
|
||||
ltmain.sh
|
||||
libtool
|
||||
libgtopconfig.h
|
||||
libgtop.spec
|
||||
libgtop-2.0.pc
|
||||
lib/Makefile
|
||||
lib/Makefile.in
|
||||
lib/.deps
|
||||
lib/.libs
|
||||
lib/*.o
|
||||
lib/*.lo
|
||||
lib/*.la
|
||||
lib/lib.c
|
||||
lib/GTop-2.0.gir
|
||||
lib/GTop-2.0.typelib
|
||||
INSTALL
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
doc/Makefile
|
||||
doc/Makefile.in
|
||||
doc/libgtop2.info
|
||||
doc/mdate-sh
|
||||
doc/reference/Makefile
|
||||
doc/reference/Makefile.in
|
||||
doc/reference/html/
|
||||
doc/reference/libgtop-decl-list.txt
|
||||
doc/reference/libgtop-decl.txt
|
||||
doc/reference/tmpl/
|
||||
doc/reference/version.xml
|
||||
doc/reference/xml/
|
||||
doc/stamp-vti
|
||||
doc/texinfo.tex
|
||||
doc/version.texi
|
||||
examples/.deps/
|
||||
examples/.libs/
|
||||
examples/*.o
|
||||
examples/Makefile
|
||||
examples/Makefile.in
|
||||
examples/affinity
|
||||
examples/df
|
||||
examples/first
|
||||
examples/mem
|
||||
examples/mountlist
|
||||
examples/netlist
|
||||
examples/netload
|
||||
examples/openfiles
|
||||
examples/pprint
|
||||
examples/procargs
|
||||
examples/proclist
|
||||
examples/procmap
|
||||
examples/second
|
||||
examples/smp
|
||||
examples/sysdeps
|
||||
examples/timings
|
||||
examples/wd
|
||||
gtk-doc.make
|
||||
include/Makefile
|
||||
include/Makefile.in
|
||||
include/glibtop/Makefile
|
||||
include/glibtop/Makefile.in
|
||||
install-sh
|
||||
intltool-extract.in
|
||||
intltool-merge.in
|
||||
intltool-update.in
|
||||
|
||||
11
NEWS
11
NEWS
@@ -1,3 +1,14 @@
|
||||
19 August 2013: Overview of changes in 2.28.5
|
||||
=============================================
|
||||
* Fix numerous bugs in the OpenBSD backend.
|
||||
* Updated translations.
|
||||
|
||||
30 August 2011: Overview of changes in 2.28.4
|
||||
=============================================
|
||||
* Fix numerous bugs in the FreeBSD backend.
|
||||
* Split off OpenBSD code in its own backend, and fixes.
|
||||
* Updated translations.
|
||||
|
||||
25 March 2011: Overview of changes in 2.28.3
|
||||
================================================
|
||||
* Fix build issue for strict linkers.
|
||||
|
||||
@@ -4,11 +4,11 @@ dnl
|
||||
|
||||
m4_define([libgtop_major_version], [2])
|
||||
m4_define([libgtop_minor_version], [28])
|
||||
m4_define([libgtop_micro_version], [3])
|
||||
m4_define([libgtop_micro_version], [6])
|
||||
m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version])
|
||||
|
||||
dnl increment if the interface has additions, changes, removals.
|
||||
m4_define([libgtop_current], [9])
|
||||
m4_define([libgtop_current], [10])
|
||||
|
||||
dnl increment any time the source changes; set to
|
||||
dnl 0 if you increment CURRENT
|
||||
@@ -17,7 +17,7 @@ m4_define([libgtop_revision], [0])
|
||||
dnl increment if any interfaces have been added; set to 0
|
||||
dnl if any interfaces have been removed. removal has
|
||||
dnl precedence over adding, so set to 0 if both happened.
|
||||
m4_define([libgtop_age], [2])
|
||||
m4_define([libgtop_age], [0])
|
||||
|
||||
# Increase each time you change the client/server protocol.
|
||||
m4_define([libgtop_server_version], [5])
|
||||
@@ -33,7 +33,7 @@ AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE([-Wno-portability])
|
||||
AM_INIT_AUTOMAKE([-Wno-portability tar-ustar no-dist-gzip dist-xz])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
GOBJECT_INTROSPECTION_CHECK([0.6.7])
|
||||
|
||||
@@ -385,6 +385,7 @@ sysdeps/aix/Makefile
|
||||
sysdeps/bsd/Makefile
|
||||
sysdeps/darwin/Makefile
|
||||
sysdeps/cygwin/Makefile
|
||||
sysdeps/openbsd/Makefile
|
||||
src/Makefile
|
||||
src/daemon/Makefile
|
||||
lib/Makefile
|
||||
|
||||
@@ -743,7 +743,7 @@ The description above is taken from the manual page of the @file{/proc}
|
||||
filesystem under Linux and is a little bit confusing, so I make this clear
|
||||
here.
|
||||
|
||||
@strong{Note for people porting LibGTop to other systems:}
|
||||
@strong{A word for people porting LibGTop to other systems:}
|
||||
Every operating system has its own idea about the memory usage of a process
|
||||
and also system utilities like @code{ps} show different things on different
|
||||
systems.
|
||||
|
||||
@@ -219,17 +219,8 @@ glibtop_set_parameter_l
|
||||
<INCLUDE>glibtop/procargs.h</INCLUDE>
|
||||
<SECTION>
|
||||
<FILE>procargs</FILE>
|
||||
GLIBTOP_PROC_ARGS_SIZE
|
||||
GLIBTOP_MAX_PROC_ARGS
|
||||
glibtop_proc_args
|
||||
glibtop_get_proc_args_l
|
||||
glibtop_get_proc_args
|
||||
glibtop_get_proc_args_r
|
||||
glibtop_init_proc_args_p
|
||||
glibtop_get_proc_args_p
|
||||
glibtop_init_proc_args_s
|
||||
glibtop_get_proc_args_s
|
||||
glibtop_get_proc_argv_l
|
||||
glibtop_get_proc_argv
|
||||
</SECTION>
|
||||
|
||||
@@ -420,26 +411,8 @@ glibtop_get_proc_uid_s
|
||||
<INCLUDE>glibtop/proctime.h</INCLUDE>
|
||||
<SECTION>
|
||||
<FILE>proctime</FILE>
|
||||
GLIBTOP_PROC_TIME_START_TIME
|
||||
GLIBTOP_PROC_TIME_RTIME
|
||||
GLIBTOP_PROC_TIME_UTIME
|
||||
GLIBTOP_PROC_TIME_STIME
|
||||
GLIBTOP_PROC_TIME_CUTIME
|
||||
GLIBTOP_PROC_TIME_CSTIME
|
||||
GLIBTOP_PROC_TIME_TIMEOUT
|
||||
GLIBTOP_PROC_TIME_IT_REAL_VALUE
|
||||
GLIBTOP_PROC_TIME_FREQUENCY
|
||||
GLIBTOP_PROC_TIME_XCPU_UTIME
|
||||
GLIBTOP_PROC_TIME_XCPU_STIME
|
||||
GLIBTOP_MAX_PROC_TIME
|
||||
glibtop_proc_time
|
||||
glibtop_get_proc_time
|
||||
glibtop_get_proc_time_r
|
||||
glibtop_get_proc_time_l
|
||||
glibtop_init_proc_time_p
|
||||
glibtop_get_proc_time_p
|
||||
glibtop_init_proc_time_s
|
||||
glibtop_get_proc_time_s
|
||||
</SECTION>
|
||||
|
||||
<INCLUDE>glibtop/signal.h</INCLUDE>
|
||||
@@ -515,10 +488,6 @@ glibtop_send_version
|
||||
<INCLUDE>glibtop/proclist.h</INCLUDE>
|
||||
<SECTION>
|
||||
<FILE>proclist</FILE>
|
||||
GLIBTOP_PROCLIST_NUMBER
|
||||
GLIBTOP_PROCLIST_TOTAL
|
||||
GLIBTOP_PROCLIST_SIZE
|
||||
GLIBTOP_MAX_PROCLIST
|
||||
GLIBTOP_KERN_PROC_ALL
|
||||
GLIBTOP_KERN_PROC_PID
|
||||
GLIBTOP_KERN_PROC_PGRP
|
||||
@@ -532,12 +501,6 @@ GLIBTOP_EXCLUDE_SYSTEM
|
||||
GLIBTOP_EXCLUDE_NOTTY
|
||||
glibtop_proclist
|
||||
glibtop_get_proclist
|
||||
glibtop_get_proclist_r
|
||||
glibtop_get_proclist_l
|
||||
glibtop_init_proclist_p
|
||||
glibtop_get_proclist_p
|
||||
glibtop_init_proclist_s
|
||||
glibtop_get_proclist_s
|
||||
</SECTION>
|
||||
|
||||
<INCLUDE>glibtop/sem_limits.h</INCLUDE>
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES = @INCLUDES@
|
||||
|
||||
DEFS = @DEFS@
|
||||
|
||||
LDFLAGS = $(LIBGTOP_EXTRA_LIBS)
|
||||
AM_LDFLAGS = $(LIBGTOP_EXTRA_LIBS)
|
||||
|
||||
noinst_PROGRAMS = first second pprint procargs df netlist \
|
||||
mountlist procmap netload sysdeps timings \
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#endif
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/sysinfo.h>
|
||||
|
||||
#include <glibtop/union.h>
|
||||
|
||||
@@ -29,9 +30,41 @@ for(i = 0; i < (SIZE - 1); ++i) printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \
|
||||
printf(".%u = " FORMAT " }\n", SIZE - 1 , buf.ARRAY[SIZE - 1]); \
|
||||
} while(0)
|
||||
|
||||
#define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \
|
||||
size_t i; \
|
||||
printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \
|
||||
(unsigned long) sizeof buf->ARRAY, 0,\
|
||||
(unsigned long) G_N_ELEMENTS(buf->ARRAY)); \
|
||||
for(i = 0; i < SIZE; ++i) { \
|
||||
printf ("[ ");\
|
||||
PPRINT_HASHTABLE(buf->ARRAY[i].values); \
|
||||
printf ("]\n");\
|
||||
} \
|
||||
printf("} "); \
|
||||
} while(0)
|
||||
|
||||
#define PPRINT_HASHTABLE(HASHTABLE) do { \
|
||||
g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \
|
||||
} while(0)
|
||||
|
||||
#define FOOTER_PPRINT() putchar('\n');
|
||||
|
||||
static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data)
|
||||
{
|
||||
printf ("'%s': '%s', ", key, value);
|
||||
}
|
||||
static void pprint_get_sysinfo(void)
|
||||
{
|
||||
const glibtop_sysinfo *buf;
|
||||
|
||||
buf = glibtop_get_sysinfo();
|
||||
|
||||
HEADER_PPRINT(glibtop_get_sysinfo);
|
||||
//PPRINT(flags, "%#llx");
|
||||
//PPRINT(ncpu, "%llu");
|
||||
PPRINT_ENTRY_ARRAY(cpuinfo, 4);
|
||||
FOOTER_PPRINT();
|
||||
}
|
||||
|
||||
static void pprint_get_cpu(void)
|
||||
{
|
||||
@@ -291,6 +324,7 @@ int main()
|
||||
{
|
||||
glibtop_init();
|
||||
|
||||
pprint_get_sysinfo();
|
||||
pprint_get_cpu();
|
||||
|
||||
pprint_get_fsusage("/");
|
||||
|
||||
@@ -54,7 +54,7 @@ G_BEGIN_DECLS
|
||||
Yes we are :)
|
||||
Nobody should really be using more than 32 processors.
|
||||
*/
|
||||
#define GLIBTOP_NCPU 32
|
||||
#define GLIBTOP_NCPU 1024
|
||||
|
||||
typedef struct _glibtop_cpu glibtop_cpu;
|
||||
|
||||
|
||||
@@ -36,22 +36,89 @@ G_BEGIN_DECLS
|
||||
/* You can use the folowing constants as the `which' member of
|
||||
* glibtop_get_proclist () to specify which processes to fetch. */
|
||||
|
||||
#define GLIBTOP_KERN_PROC_ALL 0 /* all processes */
|
||||
/**
|
||||
* GLIBTOP_KERN_PROC_ALL:
|
||||
*
|
||||
* Return information about all processes
|
||||
**/
|
||||
#define GLIBTOP_KERN_PROC_ALL 0
|
||||
|
||||
/**
|
||||
* GLIBTOP_KERN_PROC_PID:
|
||||
*
|
||||
* Return all processes with the pid which is passed in @arg. You can use this to find out whether some process still exists.
|
||||
**/
|
||||
#define GLIBTOP_KERN_PROC_PID 1
|
||||
|
||||
/**
|
||||
* GLIBTOP_KERN_PROC_PGRP:
|
||||
*
|
||||
* Return all processes in the process group passed in @arg.
|
||||
**/
|
||||
#define GLIBTOP_KERN_PROC_PGRP 2
|
||||
|
||||
/**
|
||||
* GLIBTOP_KERN_PROC_SESSION:
|
||||
*
|
||||
* Return all processes in the session passed in @arg.
|
||||
**/
|
||||
#define GLIBTOP_KERN_PROC_SESSION 3
|
||||
|
||||
/**
|
||||
* GLIBTOP_KERN_PROC_TTY:
|
||||
*
|
||||
* Return all processes which have the controlling tty passed in @arg
|
||||
* (which is interpreted as the device number).
|
||||
**/
|
||||
#define GLIBTOP_KERN_PROC_TTY 4
|
||||
|
||||
/**
|
||||
* GLIBTOP_KERN_PROC_UID:
|
||||
*
|
||||
* Return all processes with the effective uid passed in @arg.
|
||||
**/
|
||||
#define GLIBTOP_KERN_PROC_UID 5
|
||||
|
||||
/**
|
||||
* GLIBTOP_KERN_PROC_RUID:
|
||||
*
|
||||
* Return all processes with the real uid passed in @arg.
|
||||
**/
|
||||
#define GLIBTOP_KERN_PROC_RUID 6
|
||||
|
||||
#define GLIBTOP_KERN_PROC_MASK 15
|
||||
|
||||
|
||||
/**
|
||||
* GLIBTOP_EXCLUDE_IDLE:
|
||||
*
|
||||
* Exclude idle processes.
|
||||
**/
|
||||
#define GLIBTOP_EXCLUDE_IDLE 0x1000
|
||||
|
||||
/**
|
||||
* GLIBTOP_EXCLUDE_SYSTEM:
|
||||
*
|
||||
* Exclude system (on most UNIXes root's) processes.
|
||||
**/
|
||||
#define GLIBTOP_EXCLUDE_SYSTEM 0x2000
|
||||
|
||||
/**
|
||||
* GLIBTOP_EXCLUDE_NOTTY:
|
||||
*
|
||||
* Exclude processes without a controlling terminal.
|
||||
**/
|
||||
#define GLIBTOP_EXCLUDE_NOTTY 0x4000
|
||||
|
||||
typedef struct _glibtop_proclist glibtop_proclist;
|
||||
|
||||
/**
|
||||
* glibtop_proclist:
|
||||
* @number: Number of entries in the returned list.
|
||||
* @total: Total size of the returned list (this equals @number * @size).
|
||||
* @size: Size of a single entry in the returned list
|
||||
* (this equals <type>sizeof(unsigned)</type>).
|
||||
*/
|
||||
struct _glibtop_proclist
|
||||
{
|
||||
guint64 flags;
|
||||
|
||||
@@ -46,26 +46,50 @@ typedef struct _glibtop_proc_time glibtop_proc_time;
|
||||
|
||||
/* Time section */
|
||||
|
||||
/**
|
||||
* glibtop_proc_time:
|
||||
* @start_time: Start time of process in seconds since the epoch.
|
||||
* @rtime: Real time accumulated by process (should be @utime + @stime).
|
||||
* @utime: User-mode CPU time accumulated by process.
|
||||
* @stime: Kernel-mode CPU time accumulated by process.
|
||||
* @cutime: Cumulative utime of process and reaped children.
|
||||
* @cstime: Cumulative stime of process and reaped children.
|
||||
* @timeout: The time (in jiffies) of the process’s next timeout.
|
||||
* @it_real_value: The time (in jiffies) before the next <type>SIGALRM</type>
|
||||
* is sent to the process due to an interval timer.
|
||||
* @frequency: Tick frequency.
|
||||
* @xcpu_utime: SMP user-mode CPU time accumulated by process.
|
||||
* @xcpu_stime: SMP kernel-mode CPU time accumulated by process
|
||||
*
|
||||
* Process time data filled by glibtop_get_proc_time().
|
||||
*
|
||||
* Under Linux the @start_time value may be wrong due to the information
|
||||
* available from the kernel.
|
||||
*
|
||||
* The Linux kernel defines <type>INITIAL_JIFFIES</type> which implies a time
|
||||
* shift. Because <type>INITIAL_JIFFIES</type> is not user-space defined,
|
||||
* we cannot use it to compute an accurate @start_time. On Linux 2.6,
|
||||
* <type>INITIAL_JIFFIES</type> is 300 so @start_time is
|
||||
* always 3s different from the real start time of the given process. You
|
||||
* may also get shift results if your system clock is not synchronised
|
||||
* with your hardware clock. See <command>man hwclock</command>.
|
||||
*/
|
||||
struct _glibtop_proc_time
|
||||
{
|
||||
/*< private >*/
|
||||
guint64 flags;
|
||||
guint64 start_time; /* start time of process --
|
||||
* seconds since 1-1-70 */
|
||||
guint64 rtime; /* real time accumulated by process */
|
||||
guint64 utime; /* user-mode CPU time accumulated by process */
|
||||
guint64 stime; /* kernel-mode CPU time accumulated by process */
|
||||
guint64 cutime; /* cumulative utime of process and
|
||||
* reaped children */
|
||||
guint64 cstime; /* cumulative stime of process and
|
||||
* reaped children */
|
||||
guint64 timeout; /* The time (in jiffies) of the process's
|
||||
* next timeout */
|
||||
guint64 it_real_value; /* The time (in jiffies) before the
|
||||
* next SIGALRM is sent to the process
|
||||
* due to an interval timer. */
|
||||
guint64 frequency; /* Tick frequency. */
|
||||
guint64 xcpu_utime [GLIBTOP_NCPU]; /* utime and stime for all CPUs on */
|
||||
guint64 xcpu_stime [GLIBTOP_NCPU]; /* SMP machines. */
|
||||
/*< public >*/
|
||||
guint64 start_time;
|
||||
guint64 rtime;
|
||||
guint64 utime;
|
||||
guint64 stime;
|
||||
guint64 cutime;
|
||||
guint64 cstime;
|
||||
guint64 timeout;
|
||||
guint64 it_real_value;
|
||||
guint64 frequency;
|
||||
guint64 xcpu_utime [GLIBTOP_NCPU];
|
||||
guint64 xcpu_stime [GLIBTOP_NCPU];
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -69,12 +69,20 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
|
||||
libgtop_sysdeps_private_mountlist=yes
|
||||
libgtop_sysdeps_private_fsusage=yes
|
||||
;;
|
||||
netbsd*|openbsd*|bsdi*)
|
||||
netbsd*|bsdi*)
|
||||
libgtop_sysdeps_dir=bsd
|
||||
libgtop_use_machine_h=yes
|
||||
libgtop_need_server=yes
|
||||
libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2755 $(bindir)/libgtop_server2'
|
||||
;;
|
||||
openbsd*)
|
||||
libgtop_sysdeps_dir=openbsd
|
||||
libgtop_use_machine_h=yes
|
||||
libgtop_need_server=yes
|
||||
libgtop_sysdeps_private_mountlist=yes
|
||||
libgtop_sysdeps_private_fsusage=yes
|
||||
libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2555 $(bindir)/libgtop_server2'
|
||||
;;
|
||||
freebsd*|kfreebsd*)
|
||||
libgtop_sysdeps_dir=freebsd
|
||||
libgtop_use_machine_h=yes
|
||||
@@ -149,30 +157,13 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
|
||||
|
||||
case "$host_os" in
|
||||
*bsd*)
|
||||
case "$host_os" in
|
||||
*kfreebsd*)
|
||||
AC_CHECK_LIB(kvm, kvm_open, KVM_LIBS="-lkvm -lfreebsd -lbsd", KVM_LIBS=, -lfreebsd -lbsd);;
|
||||
*)
|
||||
AC_CHECK_LIB(kvm, kvm_open, KVM_LIBS=-lkvm, KVM_LIBS=);;
|
||||
esac
|
||||
|
||||
AC_CHECK_LIB(kvm, kvm_open, KVM_LIBS=-lkvm, KVM_LIBS=)
|
||||
AC_SUBST(KVM_LIBS)
|
||||
|
||||
case "$host_os" in
|
||||
kfreebsd*)
|
||||
EXTRA_SYSDEPS_LIBS="-lgeom -ldevstat"
|
||||
;;
|
||||
freebsd*)
|
||||
osreldate=`sysctl -n kern.osreldate 2>/dev/null`
|
||||
if test -n "${osreldate}" && test ${osreldate} -ge 600000 ; then
|
||||
EXTRA_SYSDEPS_LIBS="-lgeom -ldevstat"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(EXTRA_SYSDEPS_LIBS)
|
||||
|
||||
AC_CHECK_HEADERS(net/if_var.h)
|
||||
AC_CHECK_HEADERS(net/if_var.h,,, [
|
||||
#include <net/if.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>])
|
||||
AC_MSG_CHECKING([for I4B])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
@@ -237,10 +228,10 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(what we need to define to get struct msginfo)
|
||||
AC_CACHE_VAL(msginfo_needs,
|
||||
msginfo_needs=
|
||||
AC_CACHE_VAL(msginfo_cv_needs,
|
||||
msginfo_cv_needs=
|
||||
for def in nothing KERNEL _KERNEL; do
|
||||
AC_COMPILE_IFELSE([#define $def
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([#define $def
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
@@ -252,23 +243,23 @@ main (void)
|
||||
struct msginfo mi;
|
||||
mi.msgmax = 0;
|
||||
return 0;
|
||||
}],
|
||||
}])],
|
||||
[
|
||||
msginfo_needs=$def
|
||||
if test ${msginfo_needs} = KERNEL; then
|
||||
msginfo_cv_needs=$def
|
||||
if test ${msginfo_cv_needs} = KERNEL; then
|
||||
AC_DEFINE(STRUCT_MSGINFO_NEEDS_KERNEL, 1,
|
||||
[Define to 1 if we need to define KERNEL to get 'struct msginfo'])
|
||||
elif test ${msginfo_needs} = _KERNEL; then
|
||||
elif test ${msginfo_cv_needs} = _KERNEL; then
|
||||
AC_DEFINE(STRUCT_MSGINFO_NEEDS__KERNEL, 1,
|
||||
[Define to 1 if we need to define _KERNEL to get 'struct msginfo'])
|
||||
fi
|
||||
]
|
||||
)
|
||||
test -n "${msginfo_needs}" && break
|
||||
test -n "${msginfo_cv_needs}" && break
|
||||
done
|
||||
)
|
||||
AC_MSG_RESULT($msginfo_needs)
|
||||
if test -z "${msginfo_needs}"; then
|
||||
AC_MSG_RESULT($msginfo_cv_needs)
|
||||
if test -z "${msginfo_cv_needs}"; then
|
||||
AC_MSG_ERROR([Could not find the definition of 'struct msginfo'])
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -17,5 +17,14 @@
|
||||
<gnome:userid>bdejean</gnome:userid>
|
||||
</foaf:Person>
|
||||
</maintainer>
|
||||
|
||||
<maintainer>
|
||||
<foaf:Person>
|
||||
<foaf:name>Robert Roth</foaf:name>
|
||||
<foaf:mbox rdf:resource="mailto:robert.roth.off@gmail.com" />
|
||||
<gnome:userid>robertroth</gnome:userid>
|
||||
</foaf:Person>
|
||||
</maintainer>
|
||||
|
||||
</Project>
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
||||
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
||||
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
||||
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
||||
INTROSPECTION_GIRDIR=${INTROSPECTION_GIRDIR/$datadir/\$(datadir)}
|
||||
INTROSPECTION_GIRDIR=`echo ${INTROSPECTION_GIRDIR} | sed -e "s|${datadir}|\\\$(datadir)|"`
|
||||
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
||||
INTROSPECTION_TYPELIBDIR=${INTROSPECTION_TYPELIBDIR/$libdir/\$(libdir)}
|
||||
INTROSPECTION_TYPELIBDIR=`echo ${INTROSPECTION_TYPELIBDIR} | sed -e "s|${libdir}|\\\$(libdir)|"`
|
||||
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
|
||||
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
|
||||
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
||||
|
||||
@@ -28,6 +28,7 @@ eu
|
||||
fa
|
||||
fi
|
||||
fr
|
||||
fur
|
||||
ga
|
||||
gl
|
||||
gu
|
||||
@@ -75,6 +76,7 @@ sr@latin
|
||||
sv
|
||||
ta
|
||||
te
|
||||
tg
|
||||
th
|
||||
tr
|
||||
ug
|
||||
|
||||
92
po/as.po
92
po/as.po
@@ -2,68 +2,68 @@
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Amitakhya Phukan <aphukan@fedoraproject.org>, 2009.
|
||||
# Nilamdyuti Goswami <ngoswami@redhat.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: as\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
|
||||
"cgi?product=libgtop&component=general\n"
|
||||
"POT-Creation-Date: 2009-03-01 23:08+0000\n"
|
||||
"PO-Revision-Date: 2009-03-16 11:01+0530\n"
|
||||
"Last-Translator: Amitakhya Phukan <aphukan@fedoraproject.org>\n"
|
||||
"Language-Team: Assamese <fedora-trans-as@redhat.com>\n"
|
||||
"POT-Creation-Date: 2010-11-17 08:15+0000\n"
|
||||
"PO-Revision-Date: 2011-08-17 16:13+0530\n"
|
||||
"Last-Translator: Nilamdyuti Goswami <ngoswami@redhat.com>\n"
|
||||
"Language-Team: as_IN <kde-i18n-doc@kde.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Lokalize 0.3\n"
|
||||
"X-Generator: Lokalize 1.0\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "%d বাইট পড়া হৈছে"
|
||||
msgstr[1] "%d বাইট পড়া হৈছে"
|
||||
msgstr[0] "%d বাইট পঢ়া হল"
|
||||
msgstr[1] "%d বাইটসমূহ পঢ়া হল"
|
||||
|
||||
#: ../lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
msgstr "তথ্যেৰ মাপ পড়া হ'ব"
|
||||
msgstr "তথ্যৰ আকাৰ পঢ়া হল"
|
||||
|
||||
#: ../lib/read_data.c:70
|
||||
#, c-format
|
||||
msgid "read %lu byte of data"
|
||||
msgid_plural "read %lu bytes of data"
|
||||
msgstr[0] "%lu বাইট তথ্য পড়া হৈছে"
|
||||
msgstr[1] "%lu বাইট তথ্য পড়া হৈছে"
|
||||
msgstr[0] "তথ্যৰ %lu বাইট পঢ়া হল"
|
||||
msgstr[1] "তথ্যৰ %lu বাইটসমূহ পঢ়া হল"
|
||||
|
||||
#: ../lib/write.c:51
|
||||
#, c-format
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "%d বাইট লেখা হৈছে"
|
||||
msgstr[1] "%d বাইট লেখা হৈছে"
|
||||
msgstr[0] "%d বাইট লিখা হল"
|
||||
msgstr[1] "%d বাইট লিখা হল"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "ডিবাগ ব্যবস্থা সক্ৰিয় কৰক"
|
||||
msgstr "ডিবাগিং সামৰ্থবান কৰক"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "বিস্তাৰিত (ভাৰ্বোস) আউটপুট সক্ৰিয় কৰা হ'ব"
|
||||
msgstr "ভাৰ্বোচ আউটপুট সামৰ্থবান কৰক"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "পটভূমিতে fork কৰা হ'ব না"
|
||||
msgstr "পটভূমিত fork নকৰিব"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "inetd ৰ পৰা আৰম্ভ কৰা হৈছে"
|
||||
msgstr "inetd ৰ পৰা আৱাহন কৰা হৈছে"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:495, c-format
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"কমান্ড-লাইন ৰ পৰা ব্যবহাৰযোগ্য সমস্ত উপলব্ধ বিকল্পেৰ তালিকা দেখতে '%s "
|
||||
"--help' "
|
||||
"ব্যবহাৰ কৰক।\n"
|
||||
"উপলব্ধ কমান্ড শাৰী বিকল্পসমূহৰ এটা সম্পূৰ্ণ তালিকা চাবলে '%s --help' চলাওক। \n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
@@ -71,11 +71,11 @@ msgstr "বন্ধ কৰক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "ইন্টাৰাপ্ট উৎপন্ন কৰা হ'ব"
|
||||
msgstr "বাধা দিয়ক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
msgstr "প্ৰস্থান"
|
||||
msgstr "প্ৰস্থান কৰক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
@@ -83,19 +83,19 @@ msgstr "অবৈধ নিৰ্দেশ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Trace trap"
|
||||
msgstr "ট্ৰেস ট্ৰ্যাপ"
|
||||
msgstr "ট্ৰেইচ ট্ৰ্যাপ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "অস্বাভাবিক প্ৰস্থান"
|
||||
msgstr "বাদ দিয়ক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "EMT সংক্ৰান্ত সমস্যা"
|
||||
msgstr "EMT ত্ৰুটি"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "ফ্লোটিং-পয়েন্ট এক্সেপশন"
|
||||
msgstr "দশমিক-বিন্দু ব্যতিক্ৰম"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
@@ -103,23 +103,23 @@ msgstr "Kill কৰক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "বাস সংক্ৰান্ত সমস্যা"
|
||||
msgstr "বাচ ত্ৰুটি"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
msgstr "সেগমেন্টেশন সংক্ৰান্ত সমস্যা"
|
||||
msgstr "বিভাজন অমান্যকৰণ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "সিস্টেম-কল'এ ভুল আৰ্গুমেন্ট প্ৰেৰিত হৈছে"
|
||||
msgstr "চিস্টেম কললে বেয়া তৰ্ক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
msgstr "ক্ষতিগ্ৰস্ত পাইপ"
|
||||
msgstr "ভঙা পাইপ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "অ্যালাৰ্ম ঘড়ি"
|
||||
msgstr "এলাৰ্ম ঘড়ি"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
@@ -127,7 +127,7 @@ msgstr "সমাপ্তি"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "সকেটে গুৰুতৰ অবস্থা"
|
||||
msgstr "চকেটত গুৰুতৰ অবস্থা"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
@@ -135,57 +135,57 @@ msgstr "বন্ধ কৰক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "কি-বোৰ্ড বন্ধ কৰক"
|
||||
msgstr "কিবৰ্ড বন্ধ কৰক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
msgstr "অগ্ৰসৰ হওক"
|
||||
msgstr "চলাই যাওক"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Child status has changed"
|
||||
msgstr "চাইল্ডেৰ অবস্থা পৰিবৰ্তিত হৈছে"
|
||||
msgstr "চাইল্ডৰ অবস্থা সলনি হৈছে"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "পটভূমিতে tty'ৰ পৰা পড়া হচ্ছে"
|
||||
msgstr "tty ৰ পৰা পটভূমি পঢ়া"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "পটভূমিতে tty'এ লেখা হচ্ছে"
|
||||
msgstr "tty ৰ পৰা পটভূমি লিখা"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
msgstr "I/O বৰ্তমানে কৰা সম্ভব"
|
||||
msgstr "I/O বৰ্তমানত সম্ভব"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "CPU'ৰ সীমা অতিক্ৰান্ত"
|
||||
msgstr "CPU ৰ সীমা পাৰ হৈছে"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "ফাইলেৰ মাপেৰ সীমা অতিক্ৰান্ত"
|
||||
msgstr "ফাইলৰ আকাৰৰ সীমা পাৰ হৈছে"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "ভাৰ্চুয়াল অ্যালাৰ্ম ঘড়ি"
|
||||
msgstr "ভাৰ্ছুৱেল এলাৰ্ম ঘড়ি"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "অ্যালাৰ্ম ঘড়ি প্ৰোফাইল কৰা হ'ব"
|
||||
msgstr "এলাৰ্ম ঘড়ি আলেখ্যন কৰা হৈছে"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "উইন্ডোৰ মাপে পৰিবৰ্তন"
|
||||
msgstr "উইন্ডোৰ আকাৰত পৰিবৰ্তন"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "তথ্যেৰ অনুৰোধ"
|
||||
msgstr "তথ্যৰ অনুৰোধ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
msgstr "ব্যবহাৰকাৰী নিৰ্ধাৰিত সিগনাল ১"
|
||||
msgstr "ব্যবহাৰকাৰী নিৰ্ধাৰিত সংকেত ১"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "ব্যবহাৰকাৰী নিৰ্ধাৰিত সিগনাল ২"
|
||||
msgstr "ব্যবহাৰকাৰী নিৰ্ধাৰিত সংকেত ২"
|
||||
|
||||
|
||||
206
po/be.po
206
po/be.po
@@ -1,213 +1,193 @@
|
||||
# Беларускі пераклад libgtop.HEAD.
|
||||
# Беларускі пераклад libgtop.HEAD
|
||||
# Copyright (C) 1999, 2004 Free Software Foundation, Inc.
|
||||
# Vital Khilko <dojlid@mova.org>, 2003.
|
||||
# Ales Nyakhaychyk <nab@mail.by>, 2004.
|
||||
# Ihar Hrachyshka <ihar.hrachyshka@gmail.com>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop.HEAD\n"
|
||||
"Project-Id-Version: libgtop.master\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-04-07 13:38+0200\n"
|
||||
"PO-Revision-Date: 2004-03-13 14:28+0200\n"
|
||||
"Last-Translator: Ales Nyakhaychyk <nab@mail.by>\n"
|
||||
"Language-Team: Belarusian <i18n@mova.org>\n"
|
||||
"POT-Creation-Date: 2011-07-24 19:42+0300\n"
|
||||
"PO-Revision-Date: 2011-07-24 19:41+0300\n"
|
||||
"Last-Translator: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>\n"
|
||||
"Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n"
|
||||
"Language: be\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
|
||||
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: KBabel 1.0.2\n"
|
||||
|
||||
#: ../lib/read.c:65
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "прачытаны %d байт"
|
||||
msgstr[1] "прачытаны %d байты"
|
||||
msgstr[1] "прачытана %d байты"
|
||||
msgstr[2] "прачытана %d байтаў"
|
||||
|
||||
#: ../lib/read_data.c:53
|
||||
#: ../lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
msgstr "памер прачытаных даньняў"
|
||||
msgstr "прачытаны памер даных"
|
||||
|
||||
#: ../lib/read_data.c:72
|
||||
#: ../lib/read_data.c:70
|
||||
#, c-format
|
||||
msgid "read %lu byte of data"
|
||||
msgid_plural "read %lu bytes of data"
|
||||
msgstr[0] "прачытаны %lu байт даных"
|
||||
msgstr[1] "прачытаны %lu байты даных"
|
||||
msgstr[1] "прачытана %lu байты даных"
|
||||
msgstr[2] "прачытана %lu байтаў даных"
|
||||
|
||||
#: ../lib/write.c:52
|
||||
#: ../lib/write.c:51
|
||||
#, c-format
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "запісаны %d байт"
|
||||
msgstr[1] "запісаны %d байты"
|
||||
msgstr[1] "запісана %d байты"
|
||||
msgstr[2] "запісана %d байтаў"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Уключыць адладку"
|
||||
msgstr "Уключыць адладачны код"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
msgid "DEBUG"
|
||||
msgstr "АДЛАДКА"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Уключыць дэталёвы вывад"
|
||||
msgstr "Уключыць падрабязны вывад"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
msgid "VERBOSE"
|
||||
msgstr "ПАДРАБЯЗНА"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Ня нараджаць у рэжыме тла"
|
||||
msgstr "Не адгаліноўваць фонавы працэс"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "БЯЗ-ДЭМАНУ"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:466
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Выкліканы з inetd"
|
||||
msgstr "Запушчаны з дапамогай inetd"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:466
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:500
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
"Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Памылка ў ключох %s: %s.\n"
|
||||
"Запусьціце '%s --help' каб убачыць поўны сьпіс даступных ключоў.\n"
|
||||
"Каб убачыць спіс наяўных опцый загаднага радка, запусціце \"%s --help\".\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "Абрыў сувязі (HUP)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "Перарыў (INT)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Hangup"
|
||||
msgstr "Разарваць"
|
||||
msgid "Quit"
|
||||
msgstr "Выхад (QUIT)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Interrupt"
|
||||
msgstr "Перарваць"
|
||||
msgid "Illegal instruction"
|
||||
msgstr "Забароненая інструкцыя (ILL)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Quit"
|
||||
msgstr "Выйсьці"
|
||||
msgid "Trace trap"
|
||||
msgstr "Захоп трасіроўкі (TRAP)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Illegal instruction"
|
||||
msgstr "Недапушчальная інструкцыя"
|
||||
msgid "Abort"
|
||||
msgstr "Перарванне (ABRT)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "Trace trap"
|
||||
msgstr "Захоп трасыроўкі"
|
||||
msgid "EMT error"
|
||||
msgstr "Памылка (EMT)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Abort"
|
||||
msgstr "Перарываньне"
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Выключэнне float (FPE)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "EMT error"
|
||||
msgstr "Памылка EMT"
|
||||
msgid "Kill"
|
||||
msgstr "Забойства (KILL)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Выключэньне пункту, які плавае"
|
||||
msgid "Bus error"
|
||||
msgstr "Памылка магістралі (BUS)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Kill"
|
||||
msgstr "Забіць"
|
||||
msgid "Segmentation violation"
|
||||
msgstr "Парушэнне сегментацыі (SEGV)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bus error"
|
||||
msgstr "Памылка шыны"
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Хібны аргумент сістэмнага выкліку (SYS)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Segmentation violation"
|
||||
msgstr "Парушэньне сэгментацыі"
|
||||
msgid "Broken pipe"
|
||||
msgstr "Зламаны канал (PIPE)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Кепскі аргумэнт у сыстэмным выкліку"
|
||||
msgid "Alarm clock"
|
||||
msgstr "Таймер (ALRM)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Broken pipe"
|
||||
msgstr "Парушаны канал"
|
||||
msgid "Termination"
|
||||
msgstr "Знішчэнне (TERM)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Alarm clock"
|
||||
msgstr "Таймэр"
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Тэрміновыя даныя на сокеце (URG)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Termination"
|
||||
msgstr "Завяршэньне"
|
||||
msgid "Stop"
|
||||
msgstr "Прыпыненне (STOP)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Тэрміновыя умовы сокету"
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Прыпыненне з клавіятуры (TSTP)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Stop"
|
||||
msgstr "Спыніць"
|
||||
msgid "Continue"
|
||||
msgstr "Працяг працы (CONT)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Спыненьне клявіятуры"
|
||||
msgid "Child status has changed"
|
||||
msgstr "Змена стану нашчадка (CHLD)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Continue"
|
||||
msgstr "Працягнуць"
|
||||
msgid "Background read from tty"
|
||||
msgstr "Фонавае чытанне з tty (TTIN)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Child status has changed"
|
||||
msgstr "Стан нашчадку быў зьменены"
|
||||
msgid "Background write to tty"
|
||||
msgstr "Фонавы запіс у tty (TTOU)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "Background read from tty"
|
||||
msgstr "Чытаньне ў тле з tty"
|
||||
msgid "I/O now possible"
|
||||
msgstr "Магчымасць уводу/вываду (IO)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "Background write to tty"
|
||||
msgstr "Запіс у тле ў tty"
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "Абмежаванне працэсара (XCPU)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "I/O now possible"
|
||||
msgstr "Зараз магчымы ўвод/вывад"
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Абмежаванне памеру файла (XFSZ)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "Перавышана мяжа ЦПУ"
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "Віртуальны таймер (VTALRM)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Перавышана мяжа памеру файлу"
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Таймер прафілявання (PROF)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "Віртуальны таймэр"
|
||||
msgid "Window size change"
|
||||
msgstr "Змена памераў акна (WINCH)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Прафіляваны таймэр"
|
||||
msgid "Information request"
|
||||
msgstr "Запыт інфармацыі (INFO)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "Window size change"
|
||||
msgstr "Зьмена памераў акна"
|
||||
msgid "User defined signal 1"
|
||||
msgstr "Карыстальніцкі сігнал 1 (USR1)"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "Information request"
|
||||
msgstr "Запыт інфармацыі"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:58 ../sysdeps/sun4/siglist.c:58
|
||||
msgid "User defined signal 1"
|
||||
msgstr "Сыгнал карыстальніку 1"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:59 ../sysdeps/sun4/siglist.c:59
|
||||
msgid "User defined signal 2"
|
||||
msgstr "Сыгнал карыстальніку 2"
|
||||
msgstr "Карыстальніцкі сігнал 2 (USR2)"
|
||||
|
||||
25
po/bg.po
25
po/bg.po
@@ -3,21 +3,22 @@
|
||||
# Borislav Aleksandrov <B.Aleksandrov@cnsys.bg>, 2002.
|
||||
# Yanko Kaneti <yaneti@declera.com>, 2002.
|
||||
# Rostislav Raykov <zbrox@i-space.org>, 2004.
|
||||
# Vladimir Petkov <vpetkov@i-space.org>, 2005.
|
||||
# Alexander Shopov <ash@contact.bg>, 2007.
|
||||
# Vladimir Petkov <kaladan@gmail.com>, 2005.
|
||||
# Alexander Shopov <ash@kambanaria.org>, 2007.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop trunk\n"
|
||||
"Project-Id-Version: libgtop master\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-09-18 10:43+0300\n"
|
||||
"PO-Revision-Date: 2007-09-18 10:43+0300\n"
|
||||
"Last-Translator: Alexander Shopov <ash@contact.bg>\n"
|
||||
"POT-Creation-Date: 2012-04-01 18:21+0300\n"
|
||||
"PO-Revision-Date: 2012-04-01 18:20+0300\n"
|
||||
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
|
||||
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
|
||||
"Language: bg\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
@@ -44,23 +45,23 @@ msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "записан %d байт"
|
||||
msgstr[1] "записани %d байта"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:458
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Включване на изчистване на грешките"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Включване на подробен изход"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Не се поражда процес във фонов режим"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Извикан от inetd"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:498
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr "Изпълнете „%s --help“ за пълния списък от опции за командата.\n"
|
||||
|
||||
24
po/ca.po
24
po/ca.po
@@ -2,13 +2,15 @@
|
||||
# Copyright © 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Softcatalà <gnome@softcatala.net>, 2000, 2001, 2002.
|
||||
# Jordi Mallach <jordi@sindominio.net>, 2002, 2003, 2004, 2005.
|
||||
# Jordi Serratosa <jordis@softcatala.cat>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop 2.9.91\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-09-16 22:33+0200\n"
|
||||
"PO-Revision-Date: 2005-09-04 01:16+0200\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=libgtop&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2011-04-04 20:06+0000\n"
|
||||
"PO-Revision-Date: 2011-04-04 22:04+0200\n"
|
||||
"Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
|
||||
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -41,27 +43,27 @@ msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "s'ha escrit %d octet"
|
||||
msgstr[1] "s'ha escrit %d octets"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:458
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Activa la depuració"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Activa la sortida detallada"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "No bifurquis al segon pla"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Ha estat cridat des d'inetd"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:498
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Executeu «%s --help» per a veure una llista completa de les opcions "
|
||||
"Executeu «%s --help» per veure una llista completa de les opcions "
|
||||
"disponibles de la línia d'ordres.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
@@ -86,7 +88,7 @@ msgstr "Captura traça"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "Avorta"
|
||||
msgstr "Interromp"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
@@ -178,7 +180,7 @@ msgstr "Canvi de la mida de la finestra"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "Petició d'informació"
|
||||
msgstr "Sol·licitud d'informació"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
# Copyright © 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Softcatalà <gnome@softcatala.net>, 2000, 2001, 2002.
|
||||
# Jordi Mallach <jordi@sindominio.net>, 2002, 2003, 2004, 2005.
|
||||
# Jordi Serratosa <jordis@softcatala.cat>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop 2.9.91\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-10-29 21:31+0100\n"
|
||||
"PO-Revision-Date: 2005-09-04 01:16+0200\n"
|
||||
"POT-Creation-Date: 2012-04-10 21:12+0200\n"
|
||||
"PO-Revision-Date: 2011-04-04 22:04+0200\n"
|
||||
"Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
|
||||
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
||||
"Language: ca\n"
|
||||
"Language: ca-XV\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -48,7 +49,7 @@ msgstr "Activa la depuració"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Activa la eixida detallada"
|
||||
msgstr "Activa l'eixida detallada"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
@@ -62,7 +63,7 @@ msgstr "Ha estat cridat des d'inetd"
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Executeu «%s --help» per a veure una llista completa de les opcions "
|
||||
"Executeu «%s --help» per veure una llista completa de les opcions "
|
||||
"disponibles de la línia d'ordes.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
@@ -87,7 +88,7 @@ msgstr "Captura traça"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "Avorta"
|
||||
msgstr "Interromp"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
@@ -179,7 +180,7 @@ msgstr "Canvi de la mida de la finestra"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "Petició d'informació"
|
||||
msgstr "Sol·licitud d'informació"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
|
||||
56
po/eo.po
56
po/eo.po
@@ -1,24 +1,24 @@
|
||||
# Esperanto translation of libgtop
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
# Esperanto translation for libgtop.
|
||||
# Copyright (C) 2006-2011 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the libgtop package.
|
||||
# Dominique PELLE <dominique.pelle@free.fr>, 2006.
|
||||
# Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>, 2010.
|
||||
# Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>, 2010, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=libgtop&component=general\n"
|
||||
"POT-Creation-Date: 2010-05-13 22:14+0000\n"
|
||||
"PO-Revision-Date: 2010-06-27 15:22+0200\n"
|
||||
"POT-Creation-Date: 2011-03-31 17:35+0000\n"
|
||||
"PO-Revision-Date: 2011-06-08 11:49+0200\n"
|
||||
"Last-Translator: Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>\n"
|
||||
"Language-Team: Esperanto <ubuntu-l10n-eo@lists.launchpad.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-27 13:20+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Launchpad-Export-Date: 2011-06-08 09:44+0000\n"
|
||||
"X-Generator: Launchpad (build 13144)\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
@@ -29,7 +29,7 @@ msgstr[1] "legis %d bajtojn"
|
||||
|
||||
#: ../lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
msgstr "grandeco de legita datumo"
|
||||
msgstr "grando de legita datumo"
|
||||
|
||||
#: ../lib/read_data.c:70
|
||||
#, c-format
|
||||
@@ -47,11 +47,11 @@ msgstr[1] "skribis %d bajtojn"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Ebligi sencimigon"
|
||||
msgstr "Enŝalti sencimigon"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Ebligi babileman eligon"
|
||||
msgstr "Enŝalti babileman eligon"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
@@ -59,26 +59,26 @@ msgstr "Ne forki fonen"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Alvokita de inetd"
|
||||
msgstr "Alvokita de \"inetd\""
|
||||
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Ruli „%s --help“ por vidigi plenan liston de disponeblajn komandliniaj "
|
||||
"Ruli '%s --help' por vidigi tutan liston de disponeblajn komandliniaj "
|
||||
"opciojn.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "Malkontaktu"
|
||||
msgstr "Malkonekti"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "Interrompu"
|
||||
msgstr "Interrompi"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
msgstr "Adiaŭu"
|
||||
msgstr "Ĉesi"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
@@ -90,11 +90,11 @@ msgstr "Spura escepto"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "Ĉesigu"
|
||||
msgstr "Ĉesigi"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "EMT eraro"
|
||||
msgstr "EMT-eraro"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
@@ -102,11 +102,11 @@ msgstr "Glitpunkta escepto"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
msgstr "Mortigu"
|
||||
msgstr "Mortigi"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "Busa eraro"
|
||||
msgstr "Bus-eraro"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
@@ -114,7 +114,7 @@ msgstr "Aliro al nerezervita memoro"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Nevalida argumento de kornovoko"
|
||||
msgstr "Nevalida argumento al sistemvoko"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
@@ -122,11 +122,11 @@ msgstr "Rompita dukto"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "Vekhorloĝo"
|
||||
msgstr "Alarm-takto"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
msgstr "Ĉesigo"
|
||||
msgstr "Finiĝo"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
@@ -134,11 +134,11 @@ msgstr "Urĝa kondiĉo ĉe kontaktoskatolo"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
msgstr "Ĉesigu"
|
||||
msgstr "Haltigi"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Klavara ĉesigo"
|
||||
msgstr "Klavara halto"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
@@ -150,11 +150,11 @@ msgstr "Stato de ido ŝanĝiĝis"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "Fona lego el tty"
|
||||
msgstr "Fona lego de \"tty\""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "Fona skribo al tty"
|
||||
msgstr "Fona skribo al \"tty\""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
@@ -166,7 +166,7 @@ msgstr "Limo de procesilo superitas"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Limo de dosiergrandeco superitas"
|
||||
msgstr "Limo de dosiergrando superitas"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
@@ -178,7 +178,7 @@ msgstr "Profila alarm-takto"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "Ŝanĝo de grandeco de fenestro"
|
||||
msgstr "Ŝanĝo de fenestrogrando"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
|
||||
173
po/fa.po
173
po/fa.po
@@ -1,206 +1,233 @@
|
||||
# Persian translation of libgtop.
|
||||
# Copyright (C) 2010, 2011 Iranian Free Software Users Group (IFSUG.org)translation team.
|
||||
# Copyright (C) 2003, 2005 Sharif FarsiWeb, Inc.
|
||||
# Roozbeh Pournader <roozbeh@farsiweb.info>, 2003.
|
||||
# Azin Azadi <aazadi@gmail.com>, 2005.
|
||||
# Arash Mousavi <mousavi.arash@gmail.com>, 2010, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-09-25 18:15+0200\n"
|
||||
"PO-Revision-Date: 2005-02-03 13:40+0330\n"
|
||||
"Last-Translator: Azin Azadi <aazadi@gmail.com>\n"
|
||||
"Language-Team: Persian <farsi@lists.sharif.edu>\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgtop&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2011-04-04 20:06+0000\n"
|
||||
"PO-Revision-Date: 2011-04-24 17:45+0330\n"
|
||||
"Last-Translator: Arash Mousavi <mousavi.arash@gmail.com>\n"
|
||||
"Language-Team: Persian <translate@ifsug.org>\n"
|
||||
"Language: fa\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Poedit-Language: Persian\n"
|
||||
"X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#: lib/read.c:65
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "خوانده شد %Id بایت"
|
||||
|
||||
#: lib/read_data.c:53
|
||||
#: ../lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
msgstr "اندازهی دادههای خوانده شده"
|
||||
|
||||
#: lib/read_data.c:72
|
||||
#, fuzzy, c-format
|
||||
#: ../lib/read_data.c:70
|
||||
#, c-format
|
||||
msgid "read %lu byte of data"
|
||||
msgid_plural "read %lu bytes of data"
|
||||
msgstr[0] "خوانده شد %Id بایت"
|
||||
msgstr[0] "%lu بایت اطلاعات خوانده شد"
|
||||
|
||||
#: lib/write.c:52
|
||||
#, fuzzy, c-format
|
||||
#: ../lib/write.c:51
|
||||
#, c-format
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "%Id بایت نوشته شد"
|
||||
|
||||
#: src/daemon/gnuserv.c:460
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "به کار انداختن اشکالزدایی"
|
||||
|
||||
#: src/daemon/gnuserv.c:460
|
||||
msgid "DEBUG"
|
||||
msgstr "اشکالزدایی"
|
||||
|
||||
#: src/daemon/gnuserv.c:462
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "به کار انداختن خروجی مفصل"
|
||||
|
||||
#: src/daemon/gnuserv.c:462
|
||||
msgid "VERBOSE"
|
||||
msgstr "مفصل"
|
||||
|
||||
#: src/daemon/gnuserv.c:464
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "عدم انشعاب در پسزمینه"
|
||||
|
||||
#: src/daemon/gnuserv.c:464
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "NO-DAEMON"
|
||||
|
||||
#: src/daemon/gnuserv.c:466
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "از inetd احضار شد"
|
||||
|
||||
#: src/daemon/gnuserv.c:466
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: src/daemon/gnuserv.c:500
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
"Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"خطا در گزینهی .\n"
|
||||
"%s: %sبرای دیدن فهرست کاملی از گزینههای موجود برای سطر فرمان، «%s --help» را "
|
||||
"اجرا کنید.\n"
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr "برای نمایش تمام گزینههای موجود خط فرمان «%s --help» را اجرا کنید.\n"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
|
||||
#: ../sysdeps/osf1/siglist.c:27
|
||||
#: ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "معوق گذاشتن"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
|
||||
#: ../sysdeps/osf1/siglist.c:28
|
||||
#: ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "وقفه"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
|
||||
#: ../sysdeps/osf1/siglist.c:29
|
||||
#: ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
msgstr "خروج"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
|
||||
#: ../sysdeps/osf1/siglist.c:30
|
||||
#: ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
msgstr "دستورالعمل غیرمجاز"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
|
||||
#: ../sysdeps/osf1/siglist.c:31
|
||||
#: ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Trace trap"
|
||||
msgstr "ردگیری تله"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
|
||||
#: ../sysdeps/osf1/siglist.c:32
|
||||
#: ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "قطع کردن"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
|
||||
#: ../sysdeps/osf1/siglist.c:33
|
||||
#: ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "خطای EMT"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
|
||||
#: ../sysdeps/osf1/siglist.c:34
|
||||
#: ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "استثنای ممیز شناور"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
|
||||
#: ../sysdeps/osf1/siglist.c:35
|
||||
#: ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
msgstr "خاموش کردن"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
|
||||
#: ../sysdeps/osf1/siglist.c:36
|
||||
#: ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "خطای گذرگاه"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
|
||||
#: ../sysdeps/osf1/siglist.c:37
|
||||
#: ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
msgstr "تخلف قطعه قطعه کردن"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
|
||||
#: ../sysdeps/osf1/siglist.c:38
|
||||
#: ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "آرگومان بد به فراخوانی سیستم"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
|
||||
#: ../sysdeps/osf1/siglist.c:39
|
||||
#: ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
msgstr "لولهی شکسته"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
|
||||
#: ../sysdeps/osf1/siglist.c:40
|
||||
#: ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "ساعت زنگی"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
|
||||
#: ../sysdeps/osf1/siglist.c:41
|
||||
#: ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
msgstr "پایان دادن"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
|
||||
#: ../sysdeps/osf1/siglist.c:42
|
||||
#: ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "وضعیت اورژانس برای سوکت"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
|
||||
#: ../sysdeps/osf1/siglist.c:43
|
||||
#: ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
msgstr "توقف"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
|
||||
#: ../sysdeps/osf1/siglist.c:44
|
||||
#: ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "توقف صفحهکلید"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
|
||||
#: ../sysdeps/osf1/siglist.c:45
|
||||
#: ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
msgstr "ادامه"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
|
||||
#: ../sysdeps/osf1/siglist.c:46
|
||||
#: ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Child status has changed"
|
||||
msgstr "وضعیت بچه عوض شد"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
|
||||
#: ../sysdeps/osf1/siglist.c:47
|
||||
#: ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "خواندن پسزمینه از tty"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
|
||||
#: ../sysdeps/osf1/siglist.c:48
|
||||
#: ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "نوشتن پسزمینه در tty"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
|
||||
#: ../sysdeps/osf1/siglist.c:49
|
||||
#: ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
msgstr "ورودی/خروجی اکنون امکان دارد"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
|
||||
#: ../sysdeps/osf1/siglist.c:50
|
||||
#: ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "بیشتر از محدودیت واحد پردازش مرکزی شد"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
|
||||
#: ../sysdeps/osf1/siglist.c:51
|
||||
#: ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "بیشتر از محدودیت اندازهی پرونده شد"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
|
||||
#, fuzzy
|
||||
#: ../sysdeps/osf1/siglist.c:52
|
||||
#: ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "ساعت هشدار مجازی"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
|
||||
#: ../sysdeps/osf1/siglist.c:53
|
||||
#: ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr ""
|
||||
msgstr "درحال تنظیم زنگ هشدار"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
|
||||
#: ../sysdeps/osf1/siglist.c:54
|
||||
#: ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "تغییر اندازهی پنجره"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
|
||||
#: ../sysdeps/osf1/siglist.c:55
|
||||
#: ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "درخواست اطلاعات"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
|
||||
#: ../sysdeps/osf1/siglist.c:56
|
||||
#: ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
msgstr "سیگنال تعریف شده توسط کاربر ۱"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
|
||||
#: ../sysdeps/osf1/siglist.c:57
|
||||
#: ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "سیگنال تعریف شده توسط کاربر ۲"
|
||||
|
||||
#~ msgid "DEBUG"
|
||||
#~ msgstr "اشکالزدایی"
|
||||
|
||||
#~ msgid "VERBOSE"
|
||||
#~ msgstr "مفصل"
|
||||
|
||||
#~ msgid "NO-DAEMON"
|
||||
#~ msgstr "NO-DAEMON"
|
||||
|
||||
#~ msgid "INETD"
|
||||
#~ msgstr "INETD"
|
||||
|
||||
191
po/fur.po
Normal file
191
po/fur.po
Normal file
@@ -0,0 +1,191 @@
|
||||
# Friulian translation for libgtop.
|
||||
# Copyright (C) 2012 libgtop's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the libgtop package.
|
||||
# TmTFx <f.t.public@gmail.com>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=libgtop&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2012-12-18 21:48+0000\n"
|
||||
"PO-Revision-Date: 2012-12-28 13:37+0100\n"
|
||||
"Last-Translator: TmTFx <f.t.public@gmail.com>\n"
|
||||
"Language-Team: Friulian <fur@li.org>\n"
|
||||
"Language: fur\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "let %d byte"
|
||||
msgstr[1] "lets %d bytes"
|
||||
|
||||
#: ../lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
msgstr "Dimension dai dâts lets"
|
||||
|
||||
#: ../lib/read_data.c:70
|
||||
#, c-format
|
||||
msgid "read %lu byte of data"
|
||||
msgid_plural "read %lu bytes of data"
|
||||
msgstr[0] "let %lu byte di dâts"
|
||||
msgstr[1] "lets %lu bytes di dâts"
|
||||
|
||||
#: ../lib/write.c:51
|
||||
#, c-format
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "scrit %d byte"
|
||||
msgstr[1] "scrits %d bytes"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Abilite debug"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Abilite jessude verbôs"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "No stâ fâ fork in background"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Clamât di inetd"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Fâs partî '%s --help' par viodi une liste complete dis opzions par la rie di "
|
||||
"comant.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "Hangup"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "Interrupt"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
msgstr "Quit"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
msgstr "Istruzion no legâl"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Trace trap"
|
||||
msgstr "Trace trap"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "Abort"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "EMT error"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Floating-point exception"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
msgstr "Kill"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "Bus error"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
msgstr "Segmentation violation"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Bad argument to system call"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
msgstr "Broken pipe"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "Alarm clock"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
msgstr "Termination"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Urgent condition on socket"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
msgstr "Stop"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Keyboard stop"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
msgstr "Continue"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Child status has changed"
|
||||
msgstr "Il stât dal fî al è cambiât"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "Leture in background di tty"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "Scriture in background su tty"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
msgstr "I/O cumò pussibil"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "Limit CPU superât"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Limit di dimension di file superât"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "Virtual alarm clock"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Profiling alarm clock"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "Window size change"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "Information request"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
msgstr "Segnâl definît da l'utent 1"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "Segnâl definît da l'utent 2"
|
||||
12
po/ja.po
12
po/ja.po
@@ -10,10 +10,10 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=libgtop&component=general\n"
|
||||
"POT-Creation-Date: 2010-06-27 13:25+0000\n"
|
||||
"PO-Revision-Date: 2009-10-04 17:38+0900\n"
|
||||
"Last-Translator: Takayuki KUSANO <AE5T-KSN@asahi-net.or.jp>\n"
|
||||
"product=libgtop&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2011-09-08 07:27+0000\n"
|
||||
"PO-Revision-Date: 2011-09-11 07:40+0900\n"
|
||||
"Last-Translator: Jiro Matsuzawa <jmatsuzawa@src.gnome.org>\n"
|
||||
"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -183,8 +183,8 @@ msgstr "情報リクエスト"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
msgstr "ユーザ定義のシグナル1"
|
||||
msgstr "ユーザー定義のシグナル1"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "ユーザ定義のシグナル2"
|
||||
msgstr "ユーザー定義のシグナル2"
|
||||
|
||||
109
po/kn.po
109
po/kn.po
@@ -1,21 +1,23 @@
|
||||
# translation of libgtop.HEAD.po to Kannada
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
#
|
||||
# Shankar Prasad <svenkate@redhat.com>, 2009.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop.HEAD\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgtop&component=general\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product="
|
||||
"libgtop&component=general\n"
|
||||
"POT-Creation-Date: 2009-03-01 23:08+0000\n"
|
||||
"PO-Revision-Date: 2009-03-14 20:01+0530\n"
|
||||
"PO-Revision-Date: 2009-03-14 10:31-0400\n"
|
||||
"Last-Translator: Shankar Prasad <svenkate@redhat.com>\n"
|
||||
"Language-Team: Kannada <en@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"Language: kn\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Zanata 3.2.3\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
@@ -61,129 +63,160 @@ msgstr "inetd ಇಂದ ರದ್ದು ಮಾಡಲಾದ"
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr "ಲಭ್ಯವಿರುವ ಆಜ್ಞೆಯ ಒಂದು ಸಂಪೂರ್ಣ ಪಟ್ಟಿಯನ್ನು ನೋಡಲು '%s --help' ಅನ್ನು ಚಲಾಯಿಸಿ.\n"
|
||||
msgstr ""
|
||||
"ಲಭ್ಯವಿರುವ ಆಜ್ಞೆಯ ಒಂದು ಸಂಪೂರ್ಣ ಪಟ್ಟಿಯನ್ನು ನೋಡಲು '%s --help' ಅನ್ನು ಚಲಾಯಿಸಿ.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
#: ../sysdeps/osf1/siglist.c:27
|
||||
#: ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "ನೇತಾಡು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
#: ../sysdeps/osf1/siglist.c:28
|
||||
#: ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "ತಡೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
#: ../sysdeps/osf1/siglist.c:29
|
||||
#: ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
msgstr "ತ್ಯಜಿಸು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
#: ../sysdeps/osf1/siglist.c:30
|
||||
#: ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
msgstr "ಅನಧೀಕೃತ ಸೂಚನೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
#: ../sysdeps/osf1/siglist.c:31
|
||||
#: ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Trace trap"
|
||||
msgstr "ಜಾಡಿನ ಟ್ರಾಪ್"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
#: ../sysdeps/osf1/siglist.c:32
|
||||
#: ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "ಸ್ಥಗಿತಗೊಳಿಸು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
#: ../sysdeps/osf1/siglist.c:33
|
||||
#: ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "EMT ದೋಷ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
#: ../sysdeps/osf1/siglist.c:34
|
||||
#: ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "ತೇಲುವ-ಬಿಂದುವಿನ ವಿನಾಯಿತಿ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
#: ../sysdeps/osf1/siglist.c:35
|
||||
#: ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
msgstr "ಕೊಲ್ಲು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
#: ../sysdeps/osf1/siglist.c:36
|
||||
#: ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "ಬಸ್ ದೋಷ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
#: ../sysdeps/osf1/siglist.c:37
|
||||
#: ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
msgstr "ಸೆಗ್ಮೆಂಟೇಶನ್ ಉಲ್ಲಂಘನೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
#: ../sysdeps/osf1/siglist.c:38
|
||||
#: ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "ವ್ಯವಸ್ಥೆಯ ಕೋಶಕ್ಕೆ ಸರಿಯಲ್ಲದ ಆರ್ಗ್ಯುಮೆಂಟ್"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
#: ../sysdeps/osf1/siglist.c:39
|
||||
#: ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
msgstr "ತುಂಡಾದ ಪೈಪ್"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
#: ../sysdeps/osf1/siglist.c:40
|
||||
#: ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "ಅಲಾರಮ್ ಗಡಿಯಾರ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
#: ../sysdeps/osf1/siglist.c:41
|
||||
#: ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
msgstr "ಅಂತ್ಯಗೊಳಿಕೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
#: ../sysdeps/osf1/siglist.c:42
|
||||
#: ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "ಸಾಕೆಟ್ನಲ್ಲಿ ತುರ್ತು ಪರಿಸ್ಥಿತಿ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
#: ../sysdeps/osf1/siglist.c:43
|
||||
#: ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
msgstr "ನಿಲ್ಲಿಸು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
#: ../sysdeps/osf1/siglist.c:44
|
||||
#: ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "ಕೀಲಿಮಣೆ ನಿಲುಗಡೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
#: ../sysdeps/osf1/siglist.c:45
|
||||
#: ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
msgstr "ಮುಂದುವರೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
#: ../sysdeps/osf1/siglist.c:46
|
||||
#: ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Child status has changed"
|
||||
msgstr "ಚೈಲ್ಡಿನ ಸ್ಥಿತಿ ಬದಲಾಗಿದೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
#: ../sysdeps/osf1/siglist.c:47
|
||||
#: ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "tty ಇಂದ ಓದಲಾದ ಹಿನ್ನಲೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
#: ../sysdeps/osf1/siglist.c:48
|
||||
#: ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "tty ಗೆ ಹಿನ್ನಲೆ ಬರೆಯುವಿಕೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
#: ../sysdeps/osf1/siglist.c:49
|
||||
#: ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
msgstr "I/O ಈಗ ಸಾಧ್ಯವಿದೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
#: ../sysdeps/osf1/siglist.c:50
|
||||
#: ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "CPU ಮಿತಿಯನ್ನು ಮೀರಲಾಗಿದೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
#: ../sysdeps/osf1/siglist.c:51
|
||||
#: ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "ಕಡತದ ಗಾತ್ರದ ಮಿತಿಯನ್ನು ಮೀರಲಾಗಿದೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
#: ../sysdeps/osf1/siglist.c:52
|
||||
#: ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "ವರ್ಚುವಲ್ ಅಲಾರಮ್ ಗಡಿಯಾರ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
#: ../sysdeps/osf1/siglist.c:53
|
||||
#: ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "ಪ್ರೊಫೈಲಿಂಗ್ ಅಲಾರಮ್ ಗಡಿಯಾರ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
#: ../sysdeps/osf1/siglist.c:54
|
||||
#: ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "ವಿಂಡೋ ಗಾತ್ರದ ಬದಲಾವಣೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
#: ../sysdeps/osf1/siglist.c:55
|
||||
#: ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "ಮಾಹಿತಿಯ ಮನವಿ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
#: ../sysdeps/osf1/siglist.c:56
|
||||
#: ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
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 2"
|
||||
msgstr "ಬಳಕೆದಾರ ಸೂಚಿತ ಸಂಕೇತ ೨"
|
||||
|
||||
|
||||
22
po/ko.po
22
po/ko.po
@@ -1,15 +1,15 @@
|
||||
# libgtop ko.po
|
||||
# Sung-Hyun Nam <namsh@lgic.co.kr>, 1998
|
||||
# Changwoo Ryu <cwryu@debian.org>, 2002, 2004, 2005, 2008.
|
||||
# Changwoo Ryu <cwryu@debian.org>, 2002, 2004, 2005, 2008, 2013.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgtop&component=general\n"
|
||||
"POT-Creation-Date: 2008-02-26 19:13+0900\n"
|
||||
"PO-Revision-Date: 2009-01-29 16:18+0900\n"
|
||||
"PO-Revision-Date: 2013-03-19 02:23+0900\n"
|
||||
"Last-Translator: Changwoo Ryu <cwryu@debian.org>\n"
|
||||
"Language-Team: GNOME Korea <gnome-kr-hackers@lists.kldp.net>\n"
|
||||
"Language-Team: GNOME Korea <gnome-kr@googlegroups.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -51,7 +51,7 @@ msgstr "백그라운드로 실행 안 함"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "inetd에 의해 불림"
|
||||
msgstr "inetd가 호출"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:498
|
||||
#, c-format
|
||||
@@ -181,15 +181,3 @@ msgstr "사용자 정의 신호 1"
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "사용자 정의 신호 2"
|
||||
|
||||
#~ msgid "DEBUG"
|
||||
#~ msgstr "디버그"
|
||||
|
||||
#~ msgid "VERBOSE"
|
||||
#~ msgstr "VERBOSE"
|
||||
|
||||
#~ msgid "NO-DAEMON"
|
||||
#~ msgstr "NO-DAEMON"
|
||||
|
||||
#~ msgid "INETD"
|
||||
#~ msgstr "INETD"
|
||||
|
||||
142
po/ky.po
142
po/ky.po
@@ -1,210 +1,192 @@
|
||||
# translation of ky.po to Kitghiz
|
||||
# translation of libgtop to Kyrgyz
|
||||
# Kirghiz translation of libgtop.
|
||||
# Copyright (C) 1999, 2005 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the libgtop package.
|
||||
# Timur Jamakeev <ztimur@gmail.com>, 2005.
|
||||
#
|
||||
# Timur Zhamakeev <ztimur@gmail.com>, 2005, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ky\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-11-17 17:07+0500\n"
|
||||
"PO-Revision-Date: 2005-11-17 17:42+0500\n"
|
||||
"Last-Translator: Timur Jamakeev <ztimur@gmail.com>\n"
|
||||
"Language-Team: Kitghiz\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=libgtop&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2011-09-05 21:47+0000\n"
|
||||
"PO-Revision-Date: 2012-09-27 12:10+0600\n"
|
||||
"Last-Translator: Timur Zhamakeev <ztimur@gmail.com>\n"
|
||||
"Language-Team: Kirghiz <gnome-i18n@gnome.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ky\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: KBabel 1.9.1\n"
|
||||
"X-Generator: Lokalize 1.4\n"
|
||||
|
||||
#: ../lib/read.c:65
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "%d байт окулду"
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../lib/read_data.c:53
|
||||
#: ../lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
msgstr "окулган берилиштердин көлөмү"
|
||||
msgstr "окулган маалымат көлөмү"
|
||||
|
||||
#: ../lib/read_data.c:72
|
||||
#: ../lib/read_data.c:70
|
||||
#, c-format
|
||||
msgid "read %lu byte of data"
|
||||
msgid_plural "read %lu bytes of data"
|
||||
msgstr[0] "%lu байт берилиш окулду"
|
||||
msgstr[1] ""
|
||||
msgstr[0] "%lu байт маалымат окулду"
|
||||
|
||||
#: ../lib/write.c:52
|
||||
#: ../lib/write.c:51
|
||||
#, c-format
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "%d байт жазылды"
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Дебагды иштетүү"
|
||||
msgstr "Ката издөөнү иштетүү"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
msgid "DEBUG"
|
||||
msgstr "ДЕБАГ"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Кеңири чыгаруу"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
msgid "VERBOSE"
|
||||
msgstr "КЕҢИРИ"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Фондук режимге бөлбөө"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "ДЕМОНУ-ЖОК"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:466
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "inetd аркылуу чакырылган"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:466
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:500
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
"Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"\"%s\" параметринде ката байкалды: %s\n"
|
||||
"Командалык саптын мүмкүн болгон бардык параметрлерин көрүү үчүн \"%s --help\" командасын колдонуңуз.\n"
|
||||
"Командалык саптын мүмкүн болгон бардык параметрлерин көрүү үчүн \"%s --help\" "
|
||||
"командасын колдонуңуз.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "Үзүү"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "Убактылуу токтотуу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
msgstr "Чыгуу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
msgstr "Туура эмес инструкция"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Trace trap"
|
||||
msgstr "Трассировканы кармоо"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "Токтотуу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "EMT катасы"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr ""
|
||||
msgstr "Анык сан катасы"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
msgstr "Өлтүрүү"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "Шина катасы"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
msgstr "Сегментациянын бузулушу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Системалык чакыруудагы туура эмес аргумент"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
msgstr "Бузулган канал"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "Таймер"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
msgstr "Аяктоо"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Көңүл бурууну талап кылган сокет"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
msgstr "Стоп"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Алиптергичти токтотуу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
msgstr "Улантуу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Child status has changed"
|
||||
msgstr "Тукумдун абалы өзгөрүлдү"
|
||||
msgstr "Туунду процесстин абалы өзгөрүлдү"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "tty-ден фондук режимде окуу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "tty-ге фондук режимде жазуу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
msgstr "Киргизүү/Чыгаруу эми мүмкүн"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "CPU пределинен ашты"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Файл көлөмүнүн пределинен ашты"
|
||||
msgstr "Файл көлөмү пределинен ашты"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "Виртуалдык таймер"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Профилдик таймер"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "Терезе өлчөмүн өзгөртүү"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "Маалымат талап кылуу"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
msgstr "Колдонуучу сигналы 1"
|
||||
msgstr "Колдонуучу аныктаган сигналы 1"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:58 ../sysdeps/sun4/siglist.c:58
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "Колдонуучу сигналы 2"
|
||||
msgstr "Колдонуучу аныктаган сигналы 2"
|
||||
|
||||
|
||||
35
po/lv.po
35
po/lv.po
@@ -5,21 +5,22 @@
|
||||
# Peteris Krisjanis <peteris.krisjanis@os.lv>, 2002.
|
||||
# Raivis Dejus <orvils@gmail.com>, 2006, 2009.
|
||||
# Peteris Krisjanis <pecisk@gmail.com>, 2010.
|
||||
# Rūdolfs Mazurs <rudolfs.mazurs@gmail.com>, 2012.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: lv\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
|
||||
"cgi?product=libgtop&component=general\n"
|
||||
"POT-Creation-Date: 2009-11-12 10:53+0000\n"
|
||||
"PO-Revision-Date: 2010-04-26 11:18+0300\n"
|
||||
"Last-Translator: Peteris Krisjanis <pecisk@gmail.com>\n"
|
||||
"Language-Team: Latviešu <lata-l10n@googlegroups.com>\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-09-24 15:33+0300\n"
|
||||
"PO-Revision-Date: 2012-09-24 15:36+0300\n"
|
||||
"Last-Translator: Rūdolfs Mazurs <rudolfs.mazurs@gmail.com>\n"
|
||||
"Language-Team: Latvian <lata-l10n@googlegroups.com>\n"
|
||||
"Language: lv\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
|
||||
"2);\n"
|
||||
"X-Generator: Lokalize 1.0\n"
|
||||
"X-Generator: Lokalize 1.4\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
@@ -51,15 +52,15 @@ msgstr[2] "ierakstīti %d baitu"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Aktivizēt atkļūdošanu"
|
||||
msgstr "Aktivēt atkļūdošanu"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Aktivizēt vārdisku izvadi"
|
||||
msgstr "Aktivēt detalizētu izvadi"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Nesadalīties fona"
|
||||
msgstr "Nesadalīties fonā"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
@@ -69,7 +70,7 @@ msgstr "Izsaukts no inetd"
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Palaidiet '%s --help' lai redzētu pilnu pieejamo komandrindas iespēju "
|
||||
"Palaidiet “%s --help”, lai redzētu pilnu pieejamo komandrindas opciju "
|
||||
"sarakstu.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
@@ -94,7 +95,7 @@ msgstr "Izsekot slazdu"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "Pātraukt"
|
||||
msgstr "Pārtraukt"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
@@ -102,7 +103,7 @@ msgstr "EMT kļūda"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Peldošā punkta izņēmums"
|
||||
msgstr "Peldošā komata izņēmums"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
@@ -110,7 +111,7 @@ msgstr "Nobeigt"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "Šinas kļūda"
|
||||
msgstr "Kopnes kļūda"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
@@ -118,7 +119,7 @@ msgstr "Segmentācijas pārkāpums"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Slikts arguments sistēmas izsaukumam"
|
||||
msgstr "Slikts parametrs sistēmas izsaukumam"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
@@ -134,7 +135,7 @@ msgstr "Pārtraukšana"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Steidzama situācija kontaktā"
|
||||
msgstr "Steidzama situācija ligzdā"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
@@ -170,7 +171,7 @@ msgstr "CPU limits pārsniegts"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Faila izmēra limits pārsniegts"
|
||||
msgstr "Datnes izmēra limits pārsniegts"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
|
||||
27
po/nb.po
27
po/nb.po
@@ -1,15 +1,16 @@
|
||||
# Norwegian translation for Libgtop (bokmål dialect)
|
||||
# Norwegian bokmål translation for libgtop
|
||||
# Copyright (C) 1998-2004 Free Software Foundation, Inc.
|
||||
# Kjartan Maraas <kmaraas@gnome.org>, 1998-2007.
|
||||
# Kjartan Maraas <kmaraas@gnome.org>, 1998-2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop 2.21.x\n"
|
||||
"Project-Id-Version: libgtop 2.28.x\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-06-23 11:52+0200\n"
|
||||
"PO-Revision-Date: 2007-06-23 11:52+0200\n"
|
||||
"POT-Creation-Date: 2012-01-28 16:53+0100\n"
|
||||
"PO-Revision-Date: 2012-01-28 16:54+0100\n"
|
||||
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
|
||||
"Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"
|
||||
"Language-Team: Norwegian bokmål <i18n-nb@lister.ping.uio.no>\n"
|
||||
"Language: nb\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
@@ -40,26 +41,28 @@ msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "skrev %d byte"
|
||||
msgstr[1] "skrev %d bytes"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:458
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Slå på avlusing"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Slå på utfyllende utskrift"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Ikke forgren til bakgrunnen"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Kalt fra inetd"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:498
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr "Kjør '%s --help' for å se en full liste av tilgjengelige kommandolinjeflagg.\n"
|
||||
msgstr ""
|
||||
"Kjør '%s --help' for å se en full liste av tilgjengelige "
|
||||
"kommandolinjeflagg.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
|
||||
16
po/pl.po
16
po/pl.po
@@ -4,14 +4,19 @@
|
||||
# pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas:
|
||||
# gnomepl@aviary.pl
|
||||
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
# Zbigniew Chyla <chyla@alice.ci.pwr.wroc.pl>, 1999-2002.
|
||||
# Artur Flinta <aflinta@at.kernel.pl>, 2004-2007.
|
||||
# Piotr Drąg <piotrdrag@gmail.com>, 2010-2012.
|
||||
# Aviary.pl <gnomepl@aviary.pl>, 2010-2012.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-02-25 12:52+0100\n"
|
||||
"PO-Revision-Date: 2010-02-25 12:47+0100\n"
|
||||
"Last-Translator: Tomasz Dominikowski <dominikowski@gmail.com>\n"
|
||||
"POT-Creation-Date: 2012-09-04 18:37+0200\n"
|
||||
"PO-Revision-Date: 2012-09-04 18:42+0200\n"
|
||||
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
|
||||
"Language-Team: Polish <gnomepl@aviary.pl>\n"
|
||||
"Language: pl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -68,7 +73,8 @@ msgstr "Wywołanie przez inetd"
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Proszę wykonać \"%s --help\", aby wyświetlić pełną listę dostępnych opcji.\n"
|
||||
"Polecenie \"%s --help\" wyświetli pełną listę dostępnych opcji wiersza "
|
||||
"poleceń.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
@@ -164,7 +170,7 @@ msgstr "Wejście/wyjście jest teraz dostępne"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "Przekroczenie ograniczenia procesora"
|
||||
msgstr "Przekroczono ograniczenie procesora"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
|
||||
37
po/pt.po
37
po/pt.po
@@ -1,16 +1,17 @@
|
||||
# libgtop's Portuguese Translation
|
||||
# Copyright © 2001, 2002, 2003, 2004, 2005, 2007 libgtop
|
||||
# Distributed under the same licence as the libgtop package
|
||||
# Duarte Loreto <happyguy_pt@hotmail.com>, 2001, 2002, 2003, 2004, 2005, 2007.
|
||||
#
|
||||
# libgtop's Portuguese Translation
|
||||
# Copyright © 2001, 2002, 2003, 2004, 2005, 2007, 2013 libgtop
|
||||
# Distributed under the same licence as the libgtop package
|
||||
# Duarte Loreto <happyguy_pt@hotmail.com>, 2001, 2002, 2003, 2004, 2005, 2007, 2013.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 2.20\n"
|
||||
"Project-Id-Version: 3.8\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-09-08 01:57+0100\n"
|
||||
"PO-Revision-Date: 2007-09-08 02:00+0000\n"
|
||||
"POT-Creation-Date: 2013-03-17 01:06+0000\n"
|
||||
"PO-Revision-Date: 2013-03-17 01:10+0000\n"
|
||||
"Last-Translator: Duarte Loreto <happyguy_pt@hotmail.com>\n"
|
||||
"Language-Team: Portuguese <gnome_pt@yahoogroups.com>\n"
|
||||
"Language: pt\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -41,23 +42,23 @@ msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "%d byte escrito"
|
||||
msgstr[1] "%d bytes escritos"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:458
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Activar depuração"
|
||||
msgstr "Ativar depuração"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:460
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Activar resultados extensos"
|
||||
msgstr "Ativar resultados extensos"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:462
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Não efectuar fork em fundo"
|
||||
msgstr "Não efetuar fork em fundo"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:464
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Invocado pelo inetd"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:498
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
@@ -94,7 +95,7 @@ msgstr "Erro EMT"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Excepção de vírgula flutuante"
|
||||
msgstr "Exceção de vírgula flutuante"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
@@ -170,7 +171,7 @@ msgstr "Alarme virtual"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Alarme de optimização"
|
||||
msgstr "Alarme de otimização"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
|
||||
192
po/tg.po
Normal file
192
po/tg.po
Normal file
@@ -0,0 +1,192 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Victor Ibragimov <victor.ibragimov@gmail.com>, 2013.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Tajik Gnome\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=libgtop&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2013-12-19 14:39+0000\n"
|
||||
"PO-Revision-Date: 2013-12-20 13:36+0500\n"
|
||||
"Last-Translator: Victor Ibragimov <victor.ibragimov@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: tg\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=1;\n"
|
||||
"X-Generator: Poedit 1.6.3\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "%d байти хондашуда"
|
||||
msgstr[1] "%d байти хондашуда"
|
||||
|
||||
#: ../lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
msgstr "андозаи иттилооти хондашуда"
|
||||
|
||||
#: ../lib/read_data.c:70
|
||||
#, c-format
|
||||
msgid "read %lu byte of data"
|
||||
msgid_plural "read %lu bytes of data"
|
||||
msgstr[0] "%lu байти иттилооти хондашуда"
|
||||
msgstr[1] "%lu байти иттилооти хондашуда"
|
||||
|
||||
#: ../lib/write.c:51
|
||||
#, c-format
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "%d байти сабтшуда"
|
||||
msgstr[1] "%d байти сабтшуда"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Фаъол кардани ислоҳи хатоҳо"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Фаъол кардани барориши ботафсил"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Нагузаштан ба пасзамина"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Дархостшуда аз inetd"
|
||||
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Барои намоиш додани рӯйхати ҳамаи фармонҳои имконпазир '%s --help'-ро иҷро "
|
||||
"намоед.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "Боздоштан"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "Қатъ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
msgstr "Баромад"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
msgstr "Дастури нодуруст"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Trace trap"
|
||||
msgstr "Таҳлил"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "Қатъ кардан"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "Хатои EMT"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Истиснои нуқтаи тағйирёбанда"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
msgstr "Қатъ кардан"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "Хатои гузаргоҳ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
msgstr "Вайронии қисматбандӣ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Аргументи нокифоя барои дархости системавӣ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
msgstr "Вуруди вайроншуда"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "Соати зангдор"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
msgstr "Анҷоми кор"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Шарти таъҷилӣ дар бастагоҳ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
msgstr "Истодан"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Қатъи клавиатура"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
msgstr "Идома додан"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Child status has changed"
|
||||
msgstr "Вазъияти иловагӣ тағйир ёфт"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "Пасзаминаи хониш аз tty"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "Пасзаминаи сабт ба tty"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
msgstr "I/O ҳоло имконпазир аст"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "Аз ҳудуди CPU афзуд"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Аз ҳудуди андозаи файл афзуд"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "Соати зангдори виртуалӣ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Соати зангдори профил"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "Тағйири андозаи равзана"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "Дархости иттилоот"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
msgstr "Сигнали интихобшудаи 1"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "Сигнали интихобшудаи 2"
|
||||
2
po/ug.po
2
po/ug.po
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgtop&component=general\n"
|
||||
"POT-Creation-Date: 2010-11-20 11:02+0000\n"
|
||||
"POT-Creation-Date: 2010-12-23 18:26+0000\n"
|
||||
"PO-Revision-Date: 2010-10-08 10:12+0600\n"
|
||||
"Last-Translator: Sahran <sahran@live.com>\n"
|
||||
"Language-Team: Uyghur Computer Science Association <UKIJ@yahoogroups.com>\n"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
## Martin <martin@home-of-linux.org>
|
||||
##
|
||||
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES = $(LIBGTOP_CFLAGS) @INCLUDES@ -D_BSD \
|
||||
-DLIBGTOP_COMPILE_SYSTEM="\"`uname -s`\"" \
|
||||
-DLIBGTOP_COMPILE_RELEASE="\"`uname -r`\"" \
|
||||
|
||||
@@ -90,11 +90,13 @@ main(int argc, char *argv[])
|
||||
if (strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) ||
|
||||
strcmp (uts.release, LIBGTOP_COMPILE_RELEASE) ||
|
||||
strcmp (uts.machine, LIBGTOP_COMPILE_MACHINE)) {
|
||||
fprintf (stderr, "Can only run on %s %s %s\n",
|
||||
fprintf (stderr, "This libgtop was compiled on %s %s %s\n",
|
||||
LIBGTOP_COMPILE_SYSTEM,
|
||||
LIBGTOP_COMPILE_RELEASE,
|
||||
LIBGTOP_COMPILE_MACHINE);
|
||||
_exit (1);
|
||||
fprintf (stderr, "If you see strange problems caused by it,\n");
|
||||
fprintf (stderr, "you should recompile libgtop and dependent "
|
||||
"applications.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
SUBDIRS = common @sysdeps_dir@
|
||||
|
||||
DIST_SUBDIRS = bsd common linux osf1 \
|
||||
stub stub_suid sun4 freebsd solaris aix darwin cygwin
|
||||
stub stub_suid sun4 freebsd solaris aix darwin \
|
||||
cygwin openbsd
|
||||
|
||||
@@ -153,7 +153,7 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
|
||||
#endif
|
||||
|
||||
int nswap, i;
|
||||
int avail = 0, inuse = 0;
|
||||
guint64 avail = 0, inuse = 0;
|
||||
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
|
||||
struct uvmexp uvmexp;
|
||||
@@ -195,29 +195,32 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
buf->pagein = vmm.v_swappgsin - swappgsin;
|
||||
buf->pageout = vmm.v_swappgsout - swappgsout;
|
||||
#else
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
|
||||
#elif defined(__NetBSD__) && (__NetBSD_Version__ >= 599002100)
|
||||
/* no uvmexp.swap{ins,outs} */
|
||||
buf->pagein = 0;
|
||||
buf->pageout = 0;
|
||||
#elif defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
|
||||
buf->pagein = uvmexp.swapins - swappgsin;
|
||||
buf->pageout = uvmexp.swapouts - swappgsout;
|
||||
#else
|
||||
buf->pagein = vmm.v_swpin - swappgsin;
|
||||
buf->pageout = vmm.v_swpout - swappgsout;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
swappgsin = vmm.v_swappgsin;
|
||||
swappgsout = vmm.v_swappgsout;
|
||||
#else
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
|
||||
#elif defined(__NetBSD__) && (__NetBSD_Version__ >= 599002100)
|
||||
swappgsin = 0;
|
||||
swappgsout = 0;
|
||||
#elif defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
|
||||
swappgsin = uvmexp.swapins;
|
||||
swappgsout = uvmexp.swapouts;
|
||||
#else
|
||||
swappgsin = vmm.v_swpin;
|
||||
swappgsout = vmm.v_swpout;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
|
||||
|
||||
@@ -134,19 +134,19 @@ glibtop_get_proc_uid(glibtop_proc_uid *buf, pid_t pid)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:proctime
|
||||
* @title: Process Time
|
||||
* @short_description: Get process time information
|
||||
* @stability: Stable
|
||||
*/
|
||||
|
||||
/**
|
||||
* glibtop_get_proc_time:
|
||||
* @buf:
|
||||
* @pid: Process id to get the user and tty information
|
||||
* @buf: Returned process time information - see #glibtop_proc_time.
|
||||
* @pid: Process id
|
||||
*
|
||||
* Please note that under Linux, #start_time value may be strange.
|
||||
* Linux kernel defines <type>INITIAL_JIFFIES</type> which implies a time
|
||||
* shift. Because <type>INITIAL_JIFFIES</type> is not user-space defined,
|
||||
* we cannot use it to compute accurate @code{start_time}. On Linux2.6,
|
||||
* <type>INITIAL_JIFFIES</type> is 300 so <type>start_time</type> is
|
||||
* always 3s different from real start time of the given process. You
|
||||
* may also get shift results if your system clock is not synchronised
|
||||
* with your hardware clock. See <command>man hwclock</command>.
|
||||
* Get process time information.
|
||||
*/
|
||||
void
|
||||
glibtop_get_proc_time(glibtop_proc_time *buf, pid_t pid)
|
||||
@@ -197,6 +197,26 @@ glibtop_get_proc_map(glibtop_proc_map *buf, pid_t pid)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:procargs
|
||||
* @title: Process Arguments
|
||||
* @short_description: Get process command line arguments
|
||||
* @see_also: #libgtop-Process-List
|
||||
* @stability: Stable
|
||||
*/
|
||||
|
||||
/**
|
||||
* glibtop_get_proc_args:
|
||||
* @buf: Struct with @size of returned string.
|
||||
* @pid: Process id
|
||||
* @max_len: Maximum length of string to return (use zero to get all arguments).
|
||||
*
|
||||
* Get process command line arguments.
|
||||
*
|
||||
* Returns: @pid's command line arguments separated by null bytes; the length of
|
||||
* this string is returned in the @buf size field. You are required to free
|
||||
* the string when done.
|
||||
*/
|
||||
char *
|
||||
glibtop_get_proc_args(glibtop_proc_args *buf, pid_t pid, unsigned max_len)
|
||||
{
|
||||
@@ -204,6 +224,18 @@ glibtop_get_proc_args(glibtop_proc_args *buf, pid_t pid, unsigned max_len)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* glibtop_get_proc_argv
|
||||
* @buf: Struct with @size of combined returned arguments.
|
||||
* @pid: Process id
|
||||
* @max_len: Maximum length of all arguments combined (use zero to get all arguments).
|
||||
*
|
||||
* Get process command line arguments.
|
||||
*
|
||||
* Returns: A NULL-terminated array of strings with all arguments of process pid
|
||||
* (up to @max_len characters). Remember to <function>g_strfreev</function>
|
||||
* the returned array to avoid a memory leak.
|
||||
*/
|
||||
char **
|
||||
glibtop_get_proc_argv(glibtop_proc_args *buf, pid_t pid, unsigned max_len)
|
||||
{
|
||||
@@ -211,6 +243,23 @@ glibtop_get_proc_argv(glibtop_proc_args *buf, pid_t pid, unsigned max_len)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:proclist
|
||||
* @title: Process List
|
||||
* @short_description: List running processes
|
||||
* @stability: Stable
|
||||
*/
|
||||
|
||||
/**
|
||||
* glibtop_get_proclist
|
||||
* @buf: Extra return information, see #glibtop_proclist.
|
||||
* @which: Criteria for processes in returned list. See the <type>GLIBTOP_KERN_PROC_*</type> and <type>GLIBTOP_EXCLUDE_*</type> constants.
|
||||
* @arg: Extra arguments applied to @which. Only <type>GLIBTOP_KERN_PROC_*</type> constants take arguments, see each constant definition for particular @arg description.
|
||||
*
|
||||
* Returns: A list of running processes or <type>NULL</type> on error. The
|
||||
* returned list is allocated using <function>g_malloc</function> and must be
|
||||
* freed using <function>g_free</function> to avoid a memory leak.
|
||||
*/
|
||||
pid_t*
|
||||
glibtop_get_proclist(glibtop_proclist *buf, gint64 which, gint64 arg)
|
||||
{
|
||||
|
||||
@@ -149,6 +149,15 @@ _glibtop_freebsd_get_fsusage_read_write(glibtop *server,
|
||||
#define _glibtop_get_fsusage_read_write(S, B, P) \
|
||||
_glibtop_freebsd_get_fsusage_read_write(S, B, P)
|
||||
|
||||
#elif defined(__OpenBSD__)
|
||||
void
|
||||
_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
|
||||
glibtop_fsusage *buf,
|
||||
const char *path);
|
||||
|
||||
#define _glibtop_get_fsusage_read_write(S, B, P) \
|
||||
_glibtop_openbsd_get_fsusage_read_write(S, B, P)
|
||||
|
||||
#else /* default fallback */
|
||||
#warning glibtop_get_fsusage .read .write are not implemented.
|
||||
static inline void
|
||||
@@ -270,7 +279,7 @@ glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf,
|
||||
return;
|
||||
|
||||
#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)) \
|
||||
|| defined(__FreeBSD__)
|
||||
|| defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
/* Solaris but not SunOS and FreeBSD */
|
||||
buf->block_size = fsd.f_frsize;
|
||||
#else
|
||||
|
||||
@@ -43,7 +43,7 @@ _glibtop_init_proclist_p (glibtop *server)
|
||||
|
||||
pid_t *
|
||||
glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
unsigned count, total, i;
|
||||
pid_t *pids_chain;
|
||||
|
||||
@@ -7,12 +7,12 @@ libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c shm_limits.c \
|
||||
cpu.c msg_limits.c sem_limits.c loadavg.c \
|
||||
uptime.c netlist.c fsusage.c mem.c \
|
||||
mountlist.c procopenfiles.c procwd.c \
|
||||
procaffinity.c glibtop_private.c
|
||||
procaffinity.c glibtop_private.c open.c
|
||||
|
||||
libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
|
||||
libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS) $(EXTRA_SYSDEPS_LIBS)
|
||||
libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c swap.c \
|
||||
libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS)
|
||||
libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.c \
|
||||
proclist.c procstate.c procuid.c \
|
||||
proctime.c procmem.c procsignal.c \
|
||||
prockernel.c procsegment.c procargs.c \
|
||||
|
||||
@@ -54,6 +54,7 @@ void
|
||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
{
|
||||
long cpts [CPUSTATES];
|
||||
long *cp_times = NULL;
|
||||
struct clockinfo ci;
|
||||
size_t length;
|
||||
int ncpu, i;
|
||||
@@ -75,6 +76,16 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
return;
|
||||
}
|
||||
|
||||
length = 0;
|
||||
if (sysctlbyname ("kern.cp_times", NULL, &length, NULL, 0) == 0) {
|
||||
cp_times = g_malloc (length);
|
||||
length = sizeof(long) * CPUSTATES * (length / (sizeof(long) * CPUSTATES));
|
||||
if (sysctlbyname ("kern.cp_times", cp_times, &length, NULL, 0)) {
|
||||
g_free (cp_times);
|
||||
cp_times = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* set user time */
|
||||
buf->user = cpts [CP_USER];
|
||||
/* set nice time */
|
||||
@@ -89,22 +100,32 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
/* set frequency */
|
||||
buf->frequency = (ci.stathz ? ci.stathz : ci.hz);
|
||||
/* set total */
|
||||
buf->total = cpts [CP_USER] + cpts [CP_NICE]
|
||||
buf->total = cpts [CP_USER] + cpts [CP_NICE] \
|
||||
+ cpts [CP_SYS] + cpts [CP_IDLE] + cpts [CP_INTR];
|
||||
|
||||
ncpu = server->ncpu + 1;
|
||||
|
||||
for (i = 0; i < ncpu; i++) {
|
||||
buf->xcpu_user[i] = cpts [CP_USER] / ncpu;
|
||||
buf->xcpu_nice[i] = cpts [CP_NICE] / ncpu;
|
||||
buf->xcpu_sys[i] = cpts [CP_SYS] / ncpu;
|
||||
buf->xcpu_idle[i] = cpts [CP_IDLE] / ncpu;
|
||||
buf->xcpu_irq[i] = cpts [CP_INTR] / ncpu;
|
||||
if (cp_times) {
|
||||
buf->xcpu_user[i] = cp_times[i * CPUSTATES + CP_USER];
|
||||
buf->xcpu_nice[i] = cp_times[i * CPUSTATES + CP_NICE];
|
||||
buf->xcpu_sys[i] = cp_times[i * CPUSTATES + CP_SYS];
|
||||
buf->xcpu_idle[i] = cp_times[i * CPUSTATES + CP_IDLE];
|
||||
buf->xcpu_irq[i] = cp_times[i * CPUSTATES + CP_INTR];
|
||||
} else {
|
||||
buf->xcpu_user[i] = cpts [CP_USER] / ncpu;
|
||||
buf->xcpu_nice[i] = cpts [CP_NICE] / ncpu;
|
||||
buf->xcpu_sys[i] = cpts [CP_SYS] / ncpu;
|
||||
buf->xcpu_idle[i] = cpts [CP_IDLE] / ncpu;
|
||||
buf->xcpu_irq[i] = cpts [CP_INTR] / ncpu;
|
||||
}
|
||||
buf->xcpu_total[i] = buf->xcpu_user[i] + buf->xcpu_nice[i] \
|
||||
+ buf->xcpu_sys[i] + buf->xcpu_idle[i] \
|
||||
+ buf->xcpu_irq[i];
|
||||
}
|
||||
|
||||
g_free (cp_times);
|
||||
|
||||
/* Set the flags last. */
|
||||
buf->flags = _glibtop_sysdeps_cpu;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/statvfs.h>
|
||||
#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__)
|
||||
#if 0
|
||||
#include <libgeom.h>
|
||||
#include <sys/resource.h>
|
||||
#include <devstat.h>
|
||||
@@ -32,7 +32,7 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch
|
||||
{
|
||||
int result;
|
||||
struct statfs sfs;
|
||||
#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__)
|
||||
#if 0
|
||||
struct devstat *ds;
|
||||
void *sc;
|
||||
struct timespec ts;
|
||||
@@ -49,7 +49,7 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch
|
||||
glibtop_warn_io_r (server, "statfs");
|
||||
return;
|
||||
}
|
||||
#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__)
|
||||
#if 0
|
||||
ld[0] = 0;
|
||||
ld[1] = 0;
|
||||
result = geom_gettree (&gmp);
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <nlist.h>
|
||||
#include <limits.h>
|
||||
#include <kvm.h>
|
||||
#include <sys/dkstat.h>
|
||||
#include <time.h>
|
||||
|
||||
@@ -21,16 +21,8 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/close.h>
|
||||
|
||||
void
|
||||
glibtop_open_s (glibtop *server,
|
||||
const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags)
|
||||
{ }
|
||||
|
||||
void
|
||||
glibtop_close_s (glibtop *server)
|
||||
{ }
|
||||
|
||||
@@ -20,76 +20,29 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/init_hooks.h>
|
||||
#include <glibtop/cpu.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#include <glibtop_private.h>
|
||||
|
||||
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
|
||||
|
||||
void
|
||||
glibtop_init_p (glibtop *server, const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
const _glibtop_init_func_t *init_fkt;
|
||||
|
||||
if (server == NULL)
|
||||
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
|
||||
|
||||
/* Do the initialization, but only if not already initialized. */
|
||||
|
||||
if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
|
||||
glibtop_open_p (server, "glibtop", features, flags);
|
||||
|
||||
for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++)
|
||||
(*init_fkt) (server);
|
||||
|
||||
server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_open_p (glibtop *server, const char *program_name,
|
||||
glibtop_open_s (glibtop *server, const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "DEBUG (%d): glibtop_open_p ()\n", getpid ());
|
||||
#endif
|
||||
int ncpus;
|
||||
size_t len;
|
||||
|
||||
/* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */
|
||||
len = sizeof (ncpus);
|
||||
sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
|
||||
server->real_ncpu = ncpus - 1;
|
||||
server->ncpu = MIN(GLIBTOP_NCPU - 1, server->real_ncpu);
|
||||
|
||||
server->machine.uid = getuid ();
|
||||
server->machine.euid = geteuid ();
|
||||
server->machine.gid = getgid ();
|
||||
server->machine.egid = getegid ();
|
||||
#if defined(__FreeBSD_kernel__)
|
||||
server->os_version_code = __FreeBSD_kernel_version;
|
||||
#else
|
||||
server->os_version_code = __FreeBSD_version;
|
||||
#endif
|
||||
/* Setup machine-specific data */
|
||||
server->machine.kd = kvm_open (NULL, NULL, NULL, O_RDONLY, "kvm_open");
|
||||
|
||||
if (server->machine.kd == NULL)
|
||||
glibtop_error_io_r (server, "kvm_open");
|
||||
|
||||
/* Drop priviledges. */
|
||||
|
||||
if (setreuid (server->machine.euid, server->machine.uid))
|
||||
_exit (1);
|
||||
|
||||
if (setregid (server->machine.egid, server->machine.gid))
|
||||
_exit (1);
|
||||
|
||||
/* !!! END OF SUID ROOT PART !!! */
|
||||
|
||||
/* Our effective uid is now those of the user invoking the server,
|
||||
* so we do no longer have any priviledges. */
|
||||
|
||||
/* NOTE: On FreeBSD, we do not need to be suid root, we just need to
|
||||
* be sgid kmem.
|
||||
*
|
||||
* The server will only use setegid() to get back it's priviledges,
|
||||
* so it will fail if it is suid root and not sgid kmem. */
|
||||
}
|
||||
|
||||
@@ -38,11 +38,8 @@
|
||||
#include <sys/vnode.h>
|
||||
#undef _KVM_VNODE
|
||||
|
||||
#define _KERNEL
|
||||
#include <sys/pipe.h>
|
||||
#include <sys/conf.h>
|
||||
#undef _KERNEL
|
||||
#if __FreeBSD_version >= 800038
|
||||
#if (__FreeBSD_version >= 800038) || (__FreeBSD_kernel_version >= 800038)
|
||||
#define _WANT_FILE
|
||||
#include <sys/file.h>
|
||||
#undef _WANT_FILE
|
||||
@@ -85,7 +82,9 @@ _glibtop_sysdeps_freebsd_dev_inode (glibtop *server, struct vnode *vnode,
|
||||
char tagstr[12];
|
||||
struct inode inode;
|
||||
struct cdev_priv priv;
|
||||
#if __FreeBSD_version < 800039
|
||||
struct cdev si;
|
||||
#endif
|
||||
|
||||
*inum = 0;
|
||||
*dev = 0;
|
||||
@@ -111,18 +110,18 @@ _glibtop_sysdeps_freebsd_dev_inode (glibtop *server, struct vnode *vnode,
|
||||
return;
|
||||
}
|
||||
|
||||
if (kvm_read (server->machine.kd, (gulong) inode.i_dev, (char *) &si,
|
||||
sizeof (si)) != sizeof (si) ||
|
||||
#if __FreeBSD_version >= 800039
|
||||
kvm_read (server->machine.kd, (gulong) cdev2priv(&si), (char *) &priv,
|
||||
#if (__FreeBSD_version >= 800039) || (__FreeBSD_kernel_version >= 800039)
|
||||
if (kvm_read (server->machine.kd, (gulong) cdev2priv(inode.i_dev), (char *) &priv,
|
||||
sizeof (priv))
|
||||
#else
|
||||
if (kvm_read (server->machine.kd, (gulong) inode.i_dev, (char *) &si,
|
||||
sizeof (si)) != sizeof (si) ||
|
||||
kvm_read (server->machine.kd, (gulong) si.si_priv, (char *) &priv,
|
||||
sizeof (priv))
|
||||
#endif
|
||||
!= sizeof (priv))
|
||||
{
|
||||
glibtop_warn_io_r (server, "kvm_read (si)");
|
||||
glibtop_warn_io_r (server, "kvm_read (priv)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include <sys/user.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#ifdef HAVE_KINFO_GETFILE
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -263,9 +266,13 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
|
||||
{
|
||||
#if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104)
|
||||
struct kinfo_file *freep, *kif;
|
||||
#ifndef HAVE_KINFO_GETFILE
|
||||
int name[4];
|
||||
size_t len;
|
||||
size_t i;
|
||||
#else
|
||||
int cnt;
|
||||
#endif
|
||||
ssize_t i;
|
||||
#else
|
||||
char *output;
|
||||
#endif
|
||||
@@ -274,6 +281,7 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
|
||||
memset(buf, 0, sizeof (glibtop_proc_open_files));
|
||||
|
||||
#if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104)
|
||||
#ifndef HAVE_KINFO_GETFILE
|
||||
name[0] = CTL_KERN;
|
||||
name[1] = KERN_PROC;
|
||||
name[2] = KERN_PROC_FILEDESC;
|
||||
@@ -287,12 +295,25 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
|
||||
g_free(freep);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
freep = kinfo_getfile(pid, &cnt);
|
||||
#endif
|
||||
|
||||
entries = g_array_new(FALSE, FALSE, sizeof(glibtop_open_files_entry));
|
||||
|
||||
#ifndef HAVE_KINFO_GETFILE
|
||||
for (i = 0; i < len / sizeof(*kif); i++, kif++) {
|
||||
glibtop_open_files_entry entry = {0};
|
||||
|
||||
if (kif->kf_structsize != sizeof(*kif))
|
||||
continue;
|
||||
#else
|
||||
for (i = 0; i < cnt; i++) {
|
||||
glibtop_open_files_entry entry = {0};
|
||||
|
||||
kif = &freep[i];
|
||||
#endif
|
||||
|
||||
if (kif->kf_fd < 0)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#ifdef HAVE_KINFO_GETFILE
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_wd =
|
||||
@@ -40,7 +43,7 @@ _glibtop_init_proc_wd_s(glibtop *server)
|
||||
server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd;
|
||||
}
|
||||
|
||||
#if (__FreeBSD_version >= 800000 && __FreeBSD_version < 800019) || _FreeBSD_version < 700104
|
||||
#if (__FreeBSD_version >= 800000 && __FreeBSD_version < 800019) || __FreeBSD_version < 700104
|
||||
static GPtrArray *
|
||||
parse_output(const char *output, glibtop_proc_wd *buf)
|
||||
{
|
||||
@@ -97,24 +100,39 @@ parse_output(const char *output, glibtop_proc_wd *buf)
|
||||
char**
|
||||
glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid)
|
||||
{
|
||||
char path[MAXPATHLEN];
|
||||
int exe_mib[4];
|
||||
size_t len;
|
||||
#if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104)
|
||||
struct kinfo_file *freep, *kif;
|
||||
GPtrArray *dirs;
|
||||
size_t len;
|
||||
int i;
|
||||
#ifndef HAVE_KINFO_GETFILE
|
||||
int name[4];
|
||||
#else
|
||||
int cnt;
|
||||
#endif
|
||||
int i;
|
||||
#else
|
||||
char *output;
|
||||
#endif
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_wd));
|
||||
len = 0;
|
||||
|
||||
g_snprintf(path, sizeof(path), "/proc/%u/file", pid);
|
||||
if (safe_readlink(path, buf->exe, sizeof(buf->exe)))
|
||||
buf->flags |= (1 << GLIBTOP_PROC_WD_EXE);
|
||||
exe_mib[0] = CTL_KERN;
|
||||
exe_mib[1] = KERN_PROC;
|
||||
exe_mib[2] = KERN_PROC_PATHNAME;
|
||||
exe_mib[3] = pid;
|
||||
|
||||
if (sysctl(exe_mib, 4, NULL, &len, NULL, 0) == 0) {
|
||||
if (len > sizeof(buf->exe))
|
||||
len = sizeof(buf->exe);
|
||||
if (sysctl(exe_mib, 4, buf->exe, &len, NULL, 0) == 0)
|
||||
buf->flags |= (1 << GLIBTOP_PROC_WD_EXE);
|
||||
}
|
||||
|
||||
#if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104)
|
||||
#ifndef HAVE_KINFO_GETFILE
|
||||
len = 0;
|
||||
name[0] = CTL_KERN;
|
||||
name[1] = KERN_PROC;
|
||||
name[2] = KERN_PROC_FILEDESC;
|
||||
@@ -127,10 +145,21 @@ glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid)
|
||||
g_free(freep);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
freep = kinfo_getfile(pid, &cnt);
|
||||
#endif
|
||||
|
||||
dirs = g_ptr_array_sized_new(1);
|
||||
|
||||
#ifndef HAVE_KINFO_GETFILE
|
||||
for (i = 0; i < len / sizeof(*kif); i++, kif++) {
|
||||
if (kif->kf_structsize != sizeof(*kif))
|
||||
continue;
|
||||
#else
|
||||
for (i = 0; i < cnt; i++) {
|
||||
kif = &freep[i];
|
||||
#endif
|
||||
|
||||
switch (kif->kf_fd) {
|
||||
case KF_FD_TYPE_ROOT:
|
||||
g_strlcpy(buf->root, kif->kf_path,
|
||||
|
||||
92
sysdeps/freebsd/suid_open.c
Normal file
92
sysdeps/freebsd/suid_open.c
Normal file
@@ -0,0 +1,92 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/cpu.h>
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/init_hooks.h>
|
||||
|
||||
|
||||
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
|
||||
|
||||
void
|
||||
glibtop_init_p (glibtop *server, const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
const _glibtop_init_func_t *init_fkt;
|
||||
|
||||
if (server == NULL)
|
||||
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
|
||||
|
||||
/* Do the initialization, but only if not already initialized. */
|
||||
|
||||
if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
|
||||
glibtop_open_p (server, "glibtop", features, flags);
|
||||
|
||||
for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++)
|
||||
(*init_fkt) (server);
|
||||
|
||||
server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_open_p (glibtop *server, const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
char errbuf[_POSIX2_LINE_MAX];
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "DEBUG (%d): glibtop_open_p ()\n", getpid ());
|
||||
#endif
|
||||
|
||||
/* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */
|
||||
server->machine.uid = getuid ();
|
||||
server->machine.euid = geteuid ();
|
||||
server->machine.gid = getgid ();
|
||||
server->machine.egid = getegid ();
|
||||
/* Setup machine-specific data */
|
||||
server->machine.kd = kvm_openfiles (NULL, NULL, NULL, O_RDONLY, errbuf);
|
||||
|
||||
if (server->machine.kd == NULL)
|
||||
glibtop_error_io_r (server, "kvm_open");
|
||||
|
||||
/* Drop priviledges. */
|
||||
|
||||
if (setreuid (server->machine.euid, server->machine.uid))
|
||||
_exit (1);
|
||||
|
||||
if (setregid (server->machine.egid, server->machine.gid))
|
||||
_exit (1);
|
||||
|
||||
/* !!! END OF SUID ROOT PART !!! */
|
||||
|
||||
/* Our effective uid is now those of the user invoking the server,
|
||||
* so we do no longer have any priviledges. */
|
||||
|
||||
/* NOTE: On FreeBSD, we do not need to be suid root, we just need to
|
||||
* be sgid kmem.
|
||||
*
|
||||
* The server will only use setegid() to get back it's priviledges,
|
||||
* so it will fail if it is suid root and not sgid kmem. */
|
||||
}
|
||||
@@ -45,8 +45,8 @@ init_sysinfo (glibtop *server)
|
||||
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
|
||||
|
||||
len = sizeof (ncpus);
|
||||
sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
|
||||
ncpus = server->ncpu + 1;
|
||||
|
||||
len = 0;
|
||||
sysctlbyname ("hw.model", NULL, &len, NULL, 0);
|
||||
model = g_malloc (len);
|
||||
|
||||
@@ -66,11 +66,12 @@ _glibtop_init_cpu_s (glibtop *server)
|
||||
/* Provides information about cpu usage. */
|
||||
|
||||
#define FILENAME "/proc/stat"
|
||||
#define STAT_BUFSIZ 81920
|
||||
|
||||
void
|
||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
{
|
||||
char buffer [BUFSIZ], *p;
|
||||
char buffer [STAT_BUFSIZ], *p;
|
||||
int i;
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_cpu));
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <mntent.h>
|
||||
|
||||
|
||||
@@ -41,6 +42,10 @@ get_device(glibtop* server, const char *mountpoint,
|
||||
|
||||
while ((mnt = getmntent(fp)))
|
||||
{
|
||||
/* There can be multiple root mount entries, skip the unuseful one */
|
||||
if (!strcmp(mnt->mnt_fsname, "rootfs"))
|
||||
continue;
|
||||
|
||||
if (!strcmp(mountpoint, mnt->mnt_dir)) {
|
||||
if (!strncmp(mnt->mnt_fsname, "/dev/", 5)) {
|
||||
g_strlcpy(device, mnt->mnt_fsname + 5, device_size);
|
||||
@@ -193,7 +198,7 @@ glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path)
|
||||
memset(buf, 0, sizeof(glibtop_fsusage));
|
||||
|
||||
if (statvfs(path, &fsd) < 0) {
|
||||
glibtop_warn_r(server, "statvfs '%s' failed", path);
|
||||
glibtop_warn_r(server, "statvfs '%s' failed: %s", path, strerror (errno));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,13 +61,14 @@ static void set_linux_version(glibtop *server)
|
||||
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
|
||||
|
||||
#define FILENAME "/proc/stat"
|
||||
#define STAT_BUFSIZ 81920
|
||||
|
||||
void
|
||||
glibtop_open_s (glibtop *server, const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
char buffer [BUFSIZ], *p = buffer;
|
||||
char buffer [STAT_BUFSIZ], *p = buffer;
|
||||
|
||||
server->name = program_name;
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
/* ANSI-C code produced by gperf version 3.0.3 */
|
||||
/* Command-line: gperf sysdeps/linux/procmap_smaps.gperf */
|
||||
/* Computed positions: -k'9' */
|
||||
|
||||
@@ -36,7 +36,7 @@ static glibtop_sysinfo sysinfo = { .flags = 0 };
|
||||
static void
|
||||
init_sysinfo (glibtop *server)
|
||||
{
|
||||
char buffer [16384];
|
||||
char buffer [65536];
|
||||
gchar ** processors;
|
||||
|
||||
if(G_LIKELY(sysinfo.flags)) return;
|
||||
@@ -51,7 +51,8 @@ init_sysinfo (glibtop *server)
|
||||
sysinfo.ncpu++) {
|
||||
|
||||
gchar **parts, **p;
|
||||
|
||||
if (g_strrstr (processors[sysinfo.ncpu], "processor" ) == NULL)
|
||||
continue;
|
||||
glibtop_entry * const cpuinfo = &sysinfo.cpuinfo[sysinfo.ncpu];
|
||||
|
||||
cpuinfo->labels = g_ptr_array_new ();
|
||||
|
||||
7
sysdeps/openbsd/AUTHORS
Normal file
7
sysdeps/openbsd/AUTHORS
Normal file
@@ -0,0 +1,7 @@
|
||||
Martin Baulig (martin@home-of-linux.org)
|
||||
Josh Sled (jsled@scam.XCF.Berkeley.EDU)
|
||||
|
||||
Contributions/bugfixes by:
|
||||
Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Ariane van der Steldt <ariane@stack.nl>
|
||||
Jasper Lievisse Adriaanse <jasper@openbsd.org>
|
||||
28
sysdeps/openbsd/Makefile.am
Normal file
28
sysdeps/openbsd/Makefile.am
Normal file
@@ -0,0 +1,28 @@
|
||||
INCLUDES = @INCLUDES@
|
||||
|
||||
noinst_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
|
||||
|
||||
libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c \
|
||||
cpu.c loadavg.c \
|
||||
uptime.c netlist.c fsusage.c mem.c \
|
||||
mountlist.c procopenfiles.c procwd.c \
|
||||
procaffinity.c glibtop_private.c open.c
|
||||
|
||||
libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
|
||||
libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS)
|
||||
libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.c \
|
||||
proclist.c procstate.c procuid.c \
|
||||
proctime.c procmem.c procsignal.c \
|
||||
prockernel.c procsegment.c procargs.c \
|
||||
procmap.c netload.c ppp.c
|
||||
|
||||
# TODO should be made nosuid like FreeBSD
|
||||
libgtop_sysdeps_suid_2_0_la_SOURCES += shm_limits.c msg_limits.c sem_limits.c
|
||||
|
||||
libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
|
||||
libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h \
|
||||
glibtop_suid.h glibtop_private.h
|
||||
|
||||
libgtopincludedir = $(includedir)/libgtop-2.0
|
||||
30
sysdeps/openbsd/close.c
Normal file
30
sysdeps/openbsd/close.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/close.h>
|
||||
|
||||
/* Closes pipe to gtop server. */
|
||||
|
||||
void
|
||||
glibtop_close_p (glibtop *server)
|
||||
{ }
|
||||
101
sysdeps/openbsd/cpu.c
Normal file
101
sysdeps/openbsd/cpu.c
Normal file
@@ -0,0 +1,101 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/cpu.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <sys/sched.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_cpu =
|
||||
(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
|
||||
(1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) +
|
||||
(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY) +
|
||||
(1L << GLIBTOP_CPU_IRQ);
|
||||
|
||||
/* MIB array for sysctl */
|
||||
static int mib_length=2;
|
||||
static int mib [] = { CTL_KERN, KERN_CLOCKRATE };
|
||||
static int mib2 [] = { CTL_KERN, KERN_CPTIME };
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_cpu_s (glibtop *server)
|
||||
{
|
||||
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
|
||||
}
|
||||
|
||||
/* Provides information about cpu usage. */
|
||||
|
||||
void
|
||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
{
|
||||
gulong cpts [CPUSTATES];
|
||||
|
||||
/* sysctl vars*/
|
||||
struct clockinfo ci;
|
||||
size_t length;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_CPU), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_cpu));
|
||||
|
||||
/* If this fails, the nlist may not be valid. */
|
||||
if (server->sysdeps.cpu == 0)
|
||||
return;
|
||||
|
||||
length = sizeof (cpts);
|
||||
if (sysctl (mib2, mib_length, cpts, &length, NULL, 0)) {
|
||||
glibtop_warn_io_r (server, "sysctl (kern.cptime)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the clockrate data */
|
||||
length = sizeof (struct clockinfo);
|
||||
if (sysctl (mib, mib_length, &ci, &length, NULL, 0)) {
|
||||
glibtop_warn_io_r (server, "sysctl (kern.clockrate)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* set user time */
|
||||
buf->user = cpts [CP_USER];
|
||||
/* set nice time */
|
||||
buf->nice = cpts [CP_NICE];
|
||||
/* set sys time */
|
||||
buf->sys = cpts [CP_SYS];
|
||||
/* set idle time */
|
||||
buf->idle = cpts [CP_IDLE];
|
||||
/* set interrupt time */
|
||||
buf->irq = cpts [CP_INTR];
|
||||
|
||||
/* set frequency */
|
||||
buf->frequency = ci.hz;
|
||||
/* set total */
|
||||
buf->total = cpts [CP_USER] + cpts [CP_NICE]
|
||||
+ cpts [CP_SYS] + cpts [CP_IDLE] + cpts [CP_INTR];
|
||||
|
||||
/* Set the flags last. */
|
||||
buf->flags = _glibtop_sysdeps_cpu;
|
||||
}
|
||||
65
sysdeps/openbsd/fsusage.c
Normal file
65
sysdeps/openbsd/fsusage.c
Normal file
@@ -0,0 +1,65 @@
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/fsusage.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_fsusage =
|
||||
(1L << GLIBTOP_FSUSAGE_BLOCKS) + (1L << GLIBTOP_FSUSAGE_BFREE)
|
||||
+ (1L << GLIBTOP_FSUSAGE_BAVAIL) + (1L << GLIBTOP_FSUSAGE_FILES)
|
||||
+ (1L << GLIBTOP_FSUSAGE_FFREE) + (1L << GLIBTOP_FSUSAGE_BLOCK_SIZE);
|
||||
|
||||
static void
|
||||
_glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const char *path)
|
||||
{
|
||||
int result;
|
||||
struct statfs sfs;
|
||||
|
||||
result = statfs (path, &sfs);
|
||||
|
||||
if (result == -1) {
|
||||
glibtop_warn_io_r (server, "statfs");
|
||||
return;
|
||||
}
|
||||
|
||||
buf->read = sfs.f_syncreads + sfs.f_asyncreads;
|
||||
buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
|
||||
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path)
|
||||
{
|
||||
struct statvfs fsd;
|
||||
|
||||
glibtop_init_r (&server, 0, 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_fsusage));
|
||||
|
||||
if (statvfs (path, &fsd) < 0)
|
||||
return;
|
||||
|
||||
buf->block_size = fsd.f_frsize;
|
||||
buf->blocks = fsd.f_blocks;
|
||||
buf->bfree = fsd.f_bfree;
|
||||
buf->bavail = (fsd.f_bavail > fsd.f_bfree) ? 0 : fsd.f_bavail;
|
||||
buf->files = fsd.f_files;
|
||||
buf->ffree = fsd.f_ffree;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_fsusage;
|
||||
|
||||
_glibtop_get_fsusage_read_write(server, buf, path);
|
||||
}
|
||||
|
||||
54
sysdeps/openbsd/glibtop_machine.h
Normal file
54
sysdeps/openbsd/glibtop_machine.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_MACHINE_H__
|
||||
#define __GLIBTOP_MACHINE_H__
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <nlist.h>
|
||||
#include <kvm.h>
|
||||
#include <sys/dkstat.h>
|
||||
#include <time.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _glibtop_machine glibtop_machine;
|
||||
|
||||
struct _glibtop_machine
|
||||
{
|
||||
uid_t uid, euid;
|
||||
gid_t gid, egid;
|
||||
|
||||
/* The kernel descriptor, used by kvm_* calls. We keep and re-use
|
||||
* it rather than re-getting it for almost all function
|
||||
* invocations. */
|
||||
kvm_t *kd;
|
||||
};
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GLIBTOP_MACHINE_H__ */
|
||||
28
sysdeps/openbsd/glibtop_private.c
Normal file
28
sysdeps/openbsd/glibtop_private.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#include "glibtop_private.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Ported from linux/glibtop_private.c */
|
||||
gboolean
|
||||
safe_readlink(const char *path, char *buf, int bufsiz)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = readlink(path, buf, bufsiz - 1);
|
||||
|
||||
if (ret == -1) {
|
||||
g_warning("Could not read link %s : %s", path, strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
buf[ret] = '\0';
|
||||
return TRUE;
|
||||
}
|
||||
39
sysdeps/openbsd/glibtop_private.h
Normal file
39
sysdeps/openbsd/glibtop_private.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/* Copyright (C) 2007 Joe Marcus Clarke
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __OPENBSD__GLIBTOP_PRIVATE_H__
|
||||
#define __OPENBSD__GLIBTOP_PRIVATE_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gboolean safe_readlink(const char *path, char *buf, int bufsiz);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __OPENBSD__GLIBTOP_PRIVATE_H__ */
|
||||
53
sysdeps/openbsd/glibtop_server.h
Normal file
53
sysdeps/openbsd/glibtop_server.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_SERVER_H__
|
||||
#define __GLIBTOP_SERVER_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_SUID_SWAP (1 << GLIBTOP_SYSDEPS_SWAP)
|
||||
#define GLIBTOP_SUID_SHM_LIMITS (1 << GLIBTOP_SYSDEPS_SHM_LIMITS)
|
||||
#define GLIBTOP_SUID_MSG_LIMITS (1 << GLIBTOP_SYSDEPS_MSG_LIMITS)
|
||||
#define GLIBTOP_SUID_SEM_LIMITS (1 << GLIBTOP_SYSDEPS_SEM_LIMITS)
|
||||
#define GLIBTOP_SUID_PROCLIST (1 << GLIBTOP_SYSDEPS_PROCLIST)
|
||||
#define GLIBTOP_SUID_PROC_STATE (1 << GLIBTOP_SYSDEPS_PROC_STATE)
|
||||
#define GLIBTOP_SUID_PROC_UID (1 << GLIBTOP_SYSDEPS_PROC_UID)
|
||||
#define GLIBTOP_SUID_PROC_MEM (1 << GLIBTOP_SYSDEPS_PROC_MEM)
|
||||
#define GLIBTOP_SUID_PROC_TIME (1 << GLIBTOP_SYSDEPS_PROC_TIME)
|
||||
#define GLIBTOP_SUID_PROC_SIGNAL (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL)
|
||||
#define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL)
|
||||
#define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT)
|
||||
#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS)
|
||||
#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
|
||||
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
|
||||
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
|
||||
#define GLIBTOP_SUID_CPU 0
|
||||
#define GLIBTOP_SUID_MEM 0
|
||||
#define GLIBTOP_SUID_UPTIME 0
|
||||
#define GLIBTOP_SUID_LOADAVG 0
|
||||
#define GLIBTOP_SUID_NETLIST 0
|
||||
#define GLIBTOP_SUID_PROC_WD 0
|
||||
#define GLIBTOP_SUID_PROC_AFFINITY 0
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
56
sysdeps/openbsd/glibtop_suid.h
Normal file
56
sysdeps/openbsd/glibtop_suid.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_SUID_H__
|
||||
#define __GLIBTOP_SUID_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#if _IN_LIBGTOP
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#define KI_PROC(ki) (&(ki))->kp_proc)
|
||||
#define KI_EPROC(ki) (&(ki))->kp_eproc)
|
||||
|
||||
#define FORCEUREAD 1
|
||||
#define UREADOK(ki) (FORCEUREAD || (KI_PROC(ki)->p_flag & P_INMEM))
|
||||
|
||||
static inline void glibtop_suid_enter (glibtop *server) {
|
||||
setregid (server->machine.gid, server->machine.egid);
|
||||
};
|
||||
|
||||
static inline void glibtop_suid_leave (glibtop *server) {
|
||||
if (setregid (server->machine.egid, server->machine.gid))
|
||||
_exit (1);
|
||||
};
|
||||
|
||||
void
|
||||
glibtop_init_p (glibtop *server, const unsigned long features,
|
||||
const unsigned flags);
|
||||
void
|
||||
glibtop_open_p (glibtop *server, const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
59
sysdeps/openbsd/loadavg.c
Normal file
59
sysdeps/openbsd/loadavg.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/loadavg.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_loadavg =
|
||||
(1L << GLIBTOP_LOADAVG_LOADAVG);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_loadavg_s (glibtop *server)
|
||||
{
|
||||
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
|
||||
}
|
||||
|
||||
/* Provides load averange. */
|
||||
|
||||
void
|
||||
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
|
||||
{
|
||||
double ldavg[3];
|
||||
int i;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_LOADAVG), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_loadavg));
|
||||
|
||||
getloadavg (ldavg, 3);
|
||||
|
||||
/* fill in the struct */
|
||||
buf->flags = _glibtop_sysdeps_loadavg;
|
||||
for (i = 0; i < 3; i++) {
|
||||
buf->loadavg [i] = ldavg [i];
|
||||
} /* end for */
|
||||
}
|
||||
116
sysdeps/openbsd/mem.c
Normal file
116
sysdeps/openbsd/mem.c
Normal file
@@ -0,0 +1,116 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/mem.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <uvm/uvm_extern.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_mem =
|
||||
(1L << GLIBTOP_MEM_TOTAL) + (1L << GLIBTOP_MEM_USED) +
|
||||
(1L << GLIBTOP_MEM_FREE) + (1L << GLIBTOP_MEM_SHARED) +
|
||||
(1L << GLIBTOP_MEM_BUFFER) + (1L << GLIBTOP_MEM_CACHED) +
|
||||
(1L << GLIBTOP_MEM_USER) + (1L << GLIBTOP_MEM_LOCKED);
|
||||
|
||||
#ifndef LOG1024
|
||||
#define LOG1024 10
|
||||
#endif
|
||||
|
||||
/* these are for getting the memory statistics */
|
||||
static int pageshift; /* log base 2 of the pagesize */
|
||||
|
||||
/* define pagetok in terms of pageshift */
|
||||
#define pagetok(size) ((size) << pageshift)
|
||||
|
||||
/* MIB array for sysctl */
|
||||
static int uvmexp_mib [] = { CTL_VM, VM_UVMEXP };
|
||||
static int bcstats_mib [] = { CTL_VFS, VFS_GENERIC, VFS_BCACHESTAT };
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_mem_s (glibtop *server)
|
||||
{
|
||||
register int pagesize;
|
||||
|
||||
/* get the page size and calculate pageshift from it */
|
||||
pagesize = sysconf(_SC_PAGESIZE);
|
||||
pageshift = 0;
|
||||
while (pagesize > 1) {
|
||||
pageshift++;
|
||||
pagesize >>= 1;
|
||||
}
|
||||
|
||||
/* we only need the amount of log(2)1024 for our conversion */
|
||||
pageshift -= LOG1024;
|
||||
|
||||
server->sysdeps.mem = _glibtop_sysdeps_mem;
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
||||
{
|
||||
struct uvmexp uvmexp;
|
||||
struct bcachestats bcstats;
|
||||
size_t length;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MEM), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_mem));
|
||||
|
||||
if (server->sysdeps.mem == 0)
|
||||
return;
|
||||
|
||||
/* Get the data from sysctl */
|
||||
length = sizeof (uvmexp);
|
||||
if (sysctl (uvmexp_mib, 2, &uvmexp, &length, NULL, 0)) {
|
||||
glibtop_warn_io_r (server, "sysctl (vm.uvmexp)");
|
||||
bzero(&uvmexp, sizeof(length));
|
||||
return;
|
||||
}
|
||||
|
||||
length = sizeof (bcstats);
|
||||
if (sysctl (bcstats_mib, 3, &bcstats, &length, NULL, 0)) {
|
||||
glibtop_warn_io_r (server, "sysctl (vfs.generic.bcstats)");
|
||||
bzero(&bcstats, sizeof(length));
|
||||
return;
|
||||
}
|
||||
|
||||
/* convert memory stats to Kbytes */
|
||||
buf->total = (guint64) pagetok (uvmexp.npages) << LOG1024;
|
||||
buf->used = (guint64) pagetok (uvmexp.npages - uvmexp.free) << LOG1024;
|
||||
buf->free = (guint64) pagetok (uvmexp.free) << LOG1024;
|
||||
buf->locked = (guint64) pagetok (uvmexp.wired) << LOG1024;
|
||||
buf->shared = (guint64) pagetok (0 /* XXX */) << LOG1024;
|
||||
buf->cached = (guint64) pagetok (bcstats.numbufpages) << LOG1024;
|
||||
buf->buffer = 0;
|
||||
|
||||
buf->user = buf->total - buf->free - buf->cached - buf->buffer;
|
||||
|
||||
/* Set the values to return */
|
||||
buf->flags = _glibtop_sysdeps_mem;
|
||||
}
|
||||
168
sysdeps/openbsd/mountlist.c
Normal file
168
sysdeps/openbsd/mountlist.c
Normal file
@@ -0,0 +1,168 @@
|
||||
/* mountlist.c -- return a list of mounted filesystems
|
||||
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/mountlist.h>
|
||||
|
||||
/* A mount table entry. */
|
||||
struct mount_entry
|
||||
{
|
||||
char *me_devname; /* Device node pathname, including "/dev/". */
|
||||
char *me_mountdir; /* Mount point directory pathname. */
|
||||
char *me_type; /* "nfs", "4.2", etc. */
|
||||
dev_t me_dev; /* Device number of me_mountdir. */
|
||||
struct mount_entry *me_next;
|
||||
};
|
||||
|
||||
static struct mount_entry *read_filesystem_list (void);
|
||||
|
||||
/* Return a list of the currently mounted filesystems, or NULL on error.
|
||||
Add each entry to the tail of the list so that they stay in order.
|
||||
*/
|
||||
|
||||
static struct mount_entry *
|
||||
read_filesystem_list (void)
|
||||
{
|
||||
struct mount_entry *mount_list;
|
||||
struct mount_entry *me;
|
||||
struct mount_entry *mtail;
|
||||
|
||||
/* Start the list off with a dummy entry. */
|
||||
me = g_new (struct mount_entry, 1);
|
||||
me->me_next = NULL;
|
||||
mount_list = mtail = me;
|
||||
{
|
||||
struct statfs *fsp;
|
||||
int entries;
|
||||
|
||||
entries = getmntinfo (&fsp, MNT_NOWAIT);
|
||||
if (entries < 0)
|
||||
return NULL;
|
||||
while (entries-- > 0)
|
||||
{
|
||||
me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
|
||||
me->me_devname = g_strdup (fsp->f_mntfromname);
|
||||
me->me_mountdir = g_strdup (fsp->f_mntonname);
|
||||
me->me_type = g_strdup (fsp->f_fstypename);
|
||||
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
|
||||
me->me_next = NULL;
|
||||
|
||||
/* Add to the linked list. */
|
||||
mtail->me_next = me;
|
||||
mtail = me;
|
||||
fsp++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Free the dummy head. */
|
||||
me = mount_list;
|
||||
mount_list = mount_list->me_next;
|
||||
g_free (me);
|
||||
return mount_list;
|
||||
}
|
||||
|
||||
static gboolean ignore_mount_entry(const struct mount_entry *me)
|
||||
{
|
||||
/* keep sorted */
|
||||
static const char ignored[][17] = {
|
||||
"autofs",
|
||||
"devfs",
|
||||
"fusectl",
|
||||
"linprocfs",
|
||||
"linsysfs",
|
||||
"mfs",
|
||||
"none",
|
||||
"nfs",
|
||||
"nullfs",
|
||||
"nwfs",
|
||||
"portalfs",
|
||||
"proc",
|
||||
"procfs",
|
||||
"smbfs",
|
||||
"tmpfs",
|
||||
"unionfs",
|
||||
"unknown"
|
||||
};
|
||||
|
||||
typedef int (*Comparator)(const void*, const void*);
|
||||
|
||||
return bsearch(me->me_type,
|
||||
ignored, G_N_ELEMENTS(ignored), sizeof ignored[0],
|
||||
(Comparator) strcmp) != NULL;
|
||||
}
|
||||
|
||||
|
||||
glibtop_mountentry *
|
||||
glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs)
|
||||
{
|
||||
struct mount_entry *entries, *cur, *next;
|
||||
|
||||
GArray *mount_array = g_array_new(FALSE, FALSE,
|
||||
sizeof(glibtop_mountentry));
|
||||
|
||||
glibtop_init_r (&server, 0, 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_mountlist));
|
||||
|
||||
/* Read filesystem list. */
|
||||
|
||||
if((entries = read_filesystem_list ()) == NULL)
|
||||
return NULL;
|
||||
|
||||
for (cur = &entries[0]; cur != NULL; cur = next) {
|
||||
|
||||
if(all_fs || !ignore_mount_entry(cur)) {
|
||||
/* add a new glibtop_mountentry */
|
||||
glibtop_mountentry e;
|
||||
|
||||
g_strlcpy(e.devname, cur->me_devname, sizeof e.devname);
|
||||
g_strlcpy(e.mountdir, cur->me_mountdir, sizeof e.mountdir);
|
||||
g_strlcpy(e.type, cur->me_type, sizeof e.type);
|
||||
e.dev = cur->me_dev;
|
||||
|
||||
g_array_append_val(mount_array, e);
|
||||
}
|
||||
|
||||
/* free current mount_entry and move to the next */
|
||||
next = cur->me_next;
|
||||
g_free(cur->me_devname);
|
||||
g_free(cur->me_mountdir);
|
||||
g_free(cur->me_type);
|
||||
g_free(cur);
|
||||
}
|
||||
|
||||
buf->size = sizeof (glibtop_mountentry);
|
||||
buf->number = mount_array->len;
|
||||
buf->total = buf->number * buf->size;
|
||||
|
||||
buf->flags = (1 << GLIBTOP_MOUNTLIST_SIZE)
|
||||
| (1 << GLIBTOP_MOUNTLIST_NUMBER)
|
||||
| (1 << GLIBTOP_MOUNTLIST_TOTAL);
|
||||
|
||||
return (glibtop_mountentry*) g_array_free(mount_array, FALSE);
|
||||
}
|
||||
94
sysdeps/openbsd/msg_limits.c
Normal file
94
sysdeps/openbsd/msg_limits.c
Normal file
@@ -0,0 +1,94 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, August 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/msg_limits.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
/* Define the appropriate macro (if any) to get declaration of `struct
|
||||
* msginfo'. Needed on, at least, FreeBSD. */
|
||||
#if defined (STRUCT_MSGINFO_NEEDS_KERNEL)
|
||||
#define KERNEL 1
|
||||
#elif defined (STRUCT_MSGINFO_NEEDS__KERNEL)
|
||||
#define _KERNEL 1
|
||||
#endif
|
||||
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_msg_limits =
|
||||
(1L << GLIBTOP_IPC_MSGMAX) + (1L << GLIBTOP_IPC_MSGMNI) +
|
||||
(1L << GLIBTOP_IPC_MSGMNB) + (1L << GLIBTOP_IPC_MSGTQL) +
|
||||
(1L << GLIBTOP_IPC_MSGSSZ);
|
||||
|
||||
/* The values in this structure never change at runtime, so we only
|
||||
* read it once during initialization. We have to use the name `_msginfo'
|
||||
* since `msginfo' is already declared external in <sys/msg.h>. */
|
||||
static struct msginfo _msginfo;
|
||||
|
||||
/* nlist structure for kernel access */
|
||||
static struct nlist nlst [] = {
|
||||
{ "_msginfo" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_msg_limits_p (glibtop *server)
|
||||
{
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (msg_limits)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (kvm_read (server->machine.kd, nlst [0].n_value,
|
||||
&_msginfo, sizeof (_msginfo)) != sizeof (_msginfo)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (msginfo)");
|
||||
return;
|
||||
}
|
||||
|
||||
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
|
||||
}
|
||||
|
||||
/* Provides information about sysv ipc limits. */
|
||||
|
||||
void
|
||||
glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
|
||||
{
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_msg_limits));
|
||||
|
||||
if (server->sysdeps.msg_limits == 0)
|
||||
return;
|
||||
|
||||
buf->msgmax = _msginfo.msgmax;
|
||||
buf->msgmni = _msginfo.msgmni;
|
||||
buf->msgmnb = _msginfo.msgmnb;
|
||||
buf->msgtql = _msginfo.msgtql;
|
||||
buf->msgssz = _msginfo.msgtql;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_msg_limits;
|
||||
}
|
||||
66
sysdeps/openbsd/netlist.c
Normal file
66
sysdeps/openbsd/netlist.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop/netlist.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_netlist = (1 << GLIBTOP_NETLIST_NUMBER);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_netlist_s (glibtop *server)
|
||||
{
|
||||
server->sysdeps.netlist = _glibtop_sysdeps_netlist;
|
||||
}
|
||||
|
||||
|
||||
char**
|
||||
glibtop_get_netlist_s (glibtop *server, glibtop_netlist *buf)
|
||||
{
|
||||
struct if_nameindex *ifstart, *ifs;
|
||||
GPtrArray *devices;
|
||||
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_NETLIST, 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_netlist));
|
||||
|
||||
ifs = ifstart = if_nameindex();
|
||||
|
||||
devices = g_ptr_array_new();
|
||||
|
||||
while(ifs && ifs->if_name) {
|
||||
g_ptr_array_add(devices, g_strdup(ifs->if_name));
|
||||
buf->number++;
|
||||
ifs++;
|
||||
}
|
||||
|
||||
if_freenameindex(ifstart);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_netlist;
|
||||
|
||||
g_ptr_array_add(devices, NULL);
|
||||
|
||||
return (char **) g_ptr_array_free(devices, FALSE);
|
||||
}
|
||||
|
||||
237
sysdeps/openbsd/netload.c
Normal file
237
sysdeps/openbsd/netload.c
Normal file
@@ -0,0 +1,237 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/netload.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_types.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <net/if_var.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#define _KERNEL
|
||||
#include <netinet/in_var.h>
|
||||
#undef _KERNEL
|
||||
#include <netinet6/in6_var.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_netload =
|
||||
(1L << GLIBTOP_NETLOAD_IF_FLAGS) +
|
||||
(1L << GLIBTOP_NETLOAD_PACKETS_IN) +
|
||||
(1L << GLIBTOP_NETLOAD_PACKETS_OUT) +
|
||||
(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
|
||||
(1L << GLIBTOP_NETLOAD_BYTES_IN) +
|
||||
(1L << GLIBTOP_NETLOAD_BYTES_OUT) +
|
||||
(1L << GLIBTOP_NETLOAD_BYTES_TOTAL) +
|
||||
(1L << GLIBTOP_NETLOAD_ERRORS_IN) +
|
||||
(1L << GLIBTOP_NETLOAD_ERRORS_OUT) +
|
||||
(1L << GLIBTOP_NETLOAD_ERRORS_TOTAL) +
|
||||
(1L << GLIBTOP_NETLOAD_COLLISIONS);
|
||||
|
||||
static const unsigned _glibtop_sysdeps_netload_data =
|
||||
(1L << GLIBTOP_NETLOAD_ADDRESS) +
|
||||
(1L << GLIBTOP_NETLOAD_SUBNET) +
|
||||
(1L << GLIBTOP_NETLOAD_MTU);
|
||||
|
||||
/* nlist structure for kernel access */
|
||||
static struct nlist nlst [] = {
|
||||
{ "_ifnet" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_netload_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
||||
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0)
|
||||
glibtop_error_io_r (server, "kvm_nlist");
|
||||
}
|
||||
|
||||
/* Provides Network statistics. */
|
||||
|
||||
void
|
||||
glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
|
||||
const char *interface)
|
||||
{
|
||||
struct ifnet ifnet;
|
||||
u_long ifnetaddr, ifnetfound;
|
||||
struct sockaddr *sa = NULL;
|
||||
char name [32];
|
||||
|
||||
union {
|
||||
struct ifaddr ifa;
|
||||
struct in_ifaddr in;
|
||||
} ifaddr;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_NETLOAD), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_netload));
|
||||
|
||||
if (kvm_read (server->machine.kd, nlst [0].n_value,
|
||||
&ifnetaddr, sizeof (ifnetaddr)) != sizeof (ifnetaddr))
|
||||
glibtop_error_io_r (server, "kvm_read (ifnet)");
|
||||
|
||||
while (ifnetaddr) {
|
||||
struct sockaddr_in *sin;
|
||||
register char *cp;
|
||||
u_long ifaddraddr;
|
||||
|
||||
{
|
||||
ifnetfound = ifnetaddr;
|
||||
|
||||
if (kvm_read (server->machine.kd, ifnetaddr, &ifnet,
|
||||
sizeof (ifnet)) != sizeof (ifnet))
|
||||
glibtop_error_io_r (server, "kvm_read (ifnetaddr)");
|
||||
|
||||
g_strlcpy (name, ifnet.if_xname, sizeof(name));
|
||||
ifnetaddr = (u_long) ifnet.if_list.tqe_next;
|
||||
|
||||
if (strcmp (name, interface) != 0)
|
||||
continue;
|
||||
|
||||
ifaddraddr = (u_long) ifnet.if_addrlist.tqh_first;
|
||||
}
|
||||
if (ifnet.if_flags & IFF_UP)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
|
||||
if (ifnet.if_flags & IFF_BROADCAST)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
|
||||
if (ifnet.if_flags & IFF_DEBUG)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
|
||||
if (ifnet.if_flags & IFF_LOOPBACK)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
|
||||
if (ifnet.if_flags & IFF_POINTOPOINT)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
|
||||
#ifdef IFF_DRV_RUNNING
|
||||
if (ifnet.if_drv_flags & IFF_DRV_RUNNING)
|
||||
#else
|
||||
if (ifnet.if_flags & IFF_RUNNING)
|
||||
#endif
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
|
||||
if (ifnet.if_flags & IFF_NOARP)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
|
||||
if (ifnet.if_flags & IFF_PROMISC)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
|
||||
if (ifnet.if_flags & IFF_ALLMULTI)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
|
||||
#ifdef IFF_DRV_OACTIVE
|
||||
if (ifnet.if_drv_flags & IFF_DRV_OACTIVE)
|
||||
#else
|
||||
if (ifnet.if_flags & IFF_OACTIVE)
|
||||
#endif
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_OACTIVE);
|
||||
if (ifnet.if_flags & IFF_SIMPLEX)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_SIMPLEX);
|
||||
if (ifnet.if_flags & IFF_LINK0)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK0);
|
||||
if (ifnet.if_flags & IFF_LINK1)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK1);
|
||||
if (ifnet.if_flags & IFF_LINK2)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK2);
|
||||
if (ifnet.if_flags & IFF_MULTICAST)
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
|
||||
|
||||
buf->packets_in = ifnet.if_ipackets;
|
||||
buf->packets_out = ifnet.if_opackets;
|
||||
buf->packets_total = buf->packets_in + buf->packets_out;
|
||||
|
||||
buf->bytes_in = ifnet.if_ibytes;
|
||||
buf->bytes_out = ifnet.if_obytes;
|
||||
buf->bytes_total = buf->bytes_in + buf->bytes_out;
|
||||
|
||||
buf->errors_in = ifnet.if_ierrors;
|
||||
buf->errors_out = ifnet.if_oerrors;
|
||||
buf->errors_total = buf->errors_in + buf->errors_out;
|
||||
|
||||
buf->collisions = ifnet.if_collisions;
|
||||
buf->flags = _glibtop_sysdeps_netload;
|
||||
|
||||
while (ifaddraddr) {
|
||||
if ((kvm_read (server->machine.kd, ifaddraddr, &ifaddr,
|
||||
sizeof (ifaddr)) != sizeof (ifaddr)))
|
||||
glibtop_error_io_r (server, "kvm_read (ifaddraddr)");
|
||||
|
||||
#define CP(x) ((char *)(x))
|
||||
cp = (CP(ifaddr.ifa.ifa_addr) - CP(ifaddraddr)) +
|
||||
CP(&ifaddr);
|
||||
sa = (struct sockaddr *)cp;
|
||||
|
||||
if (sa->sa_family == AF_LINK) {
|
||||
struct sockaddr_dl *dl = (struct sockaddr_dl *) sa;
|
||||
|
||||
memcpy (buf->hwaddress, LLADDR (dl), sizeof (buf->hwaddress));
|
||||
buf->flags |= (1L << GLIBTOP_NETLOAD_HWADDRESS);
|
||||
} else if (sa->sa_family == AF_INET) {
|
||||
sin = (struct sockaddr_in *)sa;
|
||||
buf->subnet = ifaddr.in.ia_netmask;
|
||||
buf->address = sin->sin_addr.s_addr;
|
||||
buf->mtu = ifnet.if_mtu;
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_netload_data;
|
||||
} else if (sa->sa_family == AF_INET6) {
|
||||
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
|
||||
int in6fd;
|
||||
|
||||
memcpy (buf->address6, &sin6->sin6_addr,
|
||||
sizeof (buf->address6));
|
||||
buf->flags |= (1L << GLIBTOP_NETLOAD_ADDRESS6);
|
||||
|
||||
if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
|
||||
sin6->sin6_scope_id =
|
||||
ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]);
|
||||
sin6->sin6_addr.s6_addr[2] = sin6->sin6_addr.s6_addr[3] = 0;
|
||||
}
|
||||
|
||||
buf->scope6 = (guint8) sin6->sin6_scope_id;
|
||||
buf->flags |= (1L << GLIBTOP_NETLOAD_SCOPE6);
|
||||
|
||||
in6fd = socket (AF_INET6, SOCK_DGRAM, 0);
|
||||
if (in6fd >= 0) {
|
||||
struct in6_ifreq ifr;
|
||||
|
||||
memset (&ifr, 0, sizeof (ifr));
|
||||
ifr.ifr_addr = *sin6;
|
||||
g_strlcpy (ifr.ifr_name, interface,
|
||||
sizeof (ifr.ifr_name));
|
||||
if (ioctl (in6fd, SIOCGIFNETMASK_IN6, (char *) &ifr) >= 0) {
|
||||
memcpy (buf->prefix6, &ifr.ifr_addr.sin6_addr,
|
||||
sizeof (buf->prefix6));
|
||||
buf->flags |= (1L << GLIBTOP_NETLOAD_PREFIX6);
|
||||
}
|
||||
close (in6fd);
|
||||
}
|
||||
}
|
||||
ifaddraddr = (u_long) ifaddr.ifa.ifa_list.tqe_next;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
28
sysdeps/openbsd/nosuid.c
Normal file
28
sysdeps/openbsd/nosuid.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/close.h>
|
||||
|
||||
void
|
||||
glibtop_close_s (glibtop *server)
|
||||
{ }
|
||||
36
sysdeps/openbsd/open.c
Normal file
36
sysdeps/openbsd/open.c
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <sys/types.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/open.h>
|
||||
|
||||
#include <glibtop_private.h>
|
||||
|
||||
|
||||
void
|
||||
glibtop_open_s (glibtop *server, const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
server->os_version_code = OpenBSD;
|
||||
}
|
||||
139
sysdeps/openbsd/ppp.c
Normal file
139
sysdeps/openbsd/ppp.c
Normal file
@@ -0,0 +1,139 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/ppp.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#ifdef HAVE_I4B
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_types.h>
|
||||
|
||||
#ifdef HAVE_NET_IF_VAR_H
|
||||
#include <net/if_var.h>
|
||||
#endif
|
||||
|
||||
#include <net/netisr.h>
|
||||
#include <net/route.h>
|
||||
|
||||
#include <net/if_sppp.h>
|
||||
|
||||
/* Read `misc/i4b_acct.txt' for details ... */
|
||||
#ifdef HAVE_I4B_ACCT
|
||||
#include <machine/i4b_acct.h>
|
||||
#endif
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_ppp =
|
||||
(1L << GLIBTOP_PPP_STATE);
|
||||
|
||||
#ifdef HAVE_I4B_ACCT
|
||||
static const unsigned long _glibtop_sysdeps_ppp_acct =
|
||||
(1L << GLIBTOP_PPP_BYTES_IN) + (1L << GLIBTOP_PPP_BYTES_OUT);
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_I4B */
|
||||
|
||||
/* nlist structure for kernel access */
|
||||
static struct nlist nlst [] = {
|
||||
#ifdef HAVE_I4B
|
||||
{ "_i4bisppp_softc" },
|
||||
#endif
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_ppp_p (glibtop *server)
|
||||
{
|
||||
#ifdef HAVE_I4B
|
||||
#ifdef HAVE_I4B_ACCT
|
||||
server->sysdeps.ppp = _glibtop_sysdeps_ppp |
|
||||
_glibtop_sysdeps_ppp_acct;
|
||||
#else
|
||||
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
|
||||
#endif
|
||||
#endif /* HAVE_I4B */
|
||||
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0)
|
||||
glibtop_error_io_r (server, "kvm_nlist");
|
||||
}
|
||||
|
||||
/* Provides information about ppp usage. */
|
||||
|
||||
void
|
||||
glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
|
||||
{
|
||||
#ifdef HAVE_I4B
|
||||
#ifdef HAVE_I4B_ACCT
|
||||
struct i4bisppp_softc data;
|
||||
#else
|
||||
struct sppp data;
|
||||
#endif
|
||||
int phase;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PPP), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_ppp));
|
||||
|
||||
if (kvm_read (server->machine.kd, nlst [0].n_value,
|
||||
&data, sizeof (data)) != sizeof (data))
|
||||
glibtop_error_io_r (server, "kvm_read (i4bisppp_softc)");
|
||||
|
||||
#ifdef HAVE_I4B_ACCT
|
||||
phase = data.sc_if_un.scu_sp.pp_phase;
|
||||
#else
|
||||
/* FIXME: Which FreeBSD version have this field and
|
||||
* which not. */
|
||||
#if 0
|
||||
phase = data.pp_phase;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
switch (phase) {
|
||||
#ifdef HAVE_I4B_ACCT
|
||||
case PHASE_DEAD:
|
||||
case PHASE_TERMINATE:
|
||||
buf->state = GLIBTOP_PPP_STATE_HANGUP;
|
||||
break;
|
||||
case PHASE_ESTABLISH:
|
||||
case PHASE_NETWORK:
|
||||
buf->state = GLIBTOP_PPP_STATE_ONLINE;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
buf->state = GLIBTOP_PPP_STATE_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
buf->flags = _glibtop_sysdeps_ppp;
|
||||
|
||||
#ifdef HAVE_I4B_ACCT
|
||||
buf->bytes_in = data.sc_inb;
|
||||
buf->bytes_out = data.sc_outb;
|
||||
buf->flags |= _glibtop_sysdeps_ppp_acct;
|
||||
#endif
|
||||
#endif /* HAVE_I4B */
|
||||
}
|
||||
26
sysdeps/openbsd/procaffinity.c
Normal file
26
sysdeps/openbsd/procaffinity.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* TODO (procaffinity stub)
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop/procaffinity.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
|
||||
void
|
||||
_glibtop_init_proc_affinity_s(glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_affinity =
|
||||
(1 << GLIBTOP_PROC_AFFINITY_NUMBER) |
|
||||
(1 << GLIBTOP_PROC_AFFINITY_ALL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
guint16 *
|
||||
glibtop_get_proc_affinity_s(glibtop *server, glibtop_proc_affinity *buf, pid_t pid)
|
||||
{
|
||||
memset(buf, 0, sizeof *buf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
102
sysdeps/openbsd/procargs.c
Normal file
102
sysdeps/openbsd/procargs.c
Normal file
@@ -0,0 +1,102 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/procargs.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <kvm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_args =
|
||||
(1L << GLIBTOP_PROC_ARGS_SIZE);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_args_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
|
||||
}
|
||||
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
char *
|
||||
glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
|
||||
pid_t pid, unsigned max_len)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
char *retval, **args, **ptr;
|
||||
size_t size = 0, pos = 0;
|
||||
int count;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_ARGS), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_args));
|
||||
|
||||
/*
|
||||
* Don't bother with PIDs below 20, because everything below this
|
||||
* number is highly likely to be a kernel thread.
|
||||
*/
|
||||
if (pid < 19) return NULL;
|
||||
|
||||
glibtop_suid_enter (server);
|
||||
|
||||
/* Get the process data */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_suid_leave (server);
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
args = kvm_getargv (server->machine.kd, pinfo, max_len);
|
||||
if (args == NULL) {
|
||||
glibtop_suid_leave (server);
|
||||
glibtop_warn_io_r (server, "kvm_getargv (%d)", pid);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
glibtop_suid_leave (server);
|
||||
|
||||
for (ptr = args; *ptr; ptr++)
|
||||
size += strlen (*ptr)+1;
|
||||
|
||||
size += 2;
|
||||
retval = g_malloc0 (size);
|
||||
|
||||
for (ptr = args; *ptr; ptr++) {
|
||||
const size_t len = strlen (*ptr)+1;
|
||||
memcpy (retval+pos, *ptr, len);
|
||||
pos += len;
|
||||
}
|
||||
|
||||
buf->size = pos ? pos-1 : 0;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_args;
|
||||
|
||||
return retval;
|
||||
}
|
||||
107
sysdeps/openbsd/prockernel.c
Normal file
107
sysdeps/openbsd/prockernel.c
Normal file
@@ -0,0 +1,107 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/prockernel.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <kvm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/proc.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_kernel_pstats =
|
||||
(1L << GLIBTOP_PROC_KERNEL_K_FLAGS) +
|
||||
(1L << GLIBTOP_PROC_KERNEL_MIN_FLT) +
|
||||
(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_kernel_wchan =
|
||||
(1L << GLIBTOP_PROC_KERNEL_WCHAN) +
|
||||
(1L << GLIBTOP_PROC_KERNEL_NWCHAN);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_kernel_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel_pstats |
|
||||
_glibtop_sysdeps_proc_kernel_wchan;
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_get_proc_kernel_p (glibtop *server,
|
||||
glibtop_proc_kernel *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
int count;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
||||
|
||||
if (server->sysdeps.proc_time == 0)
|
||||
return;
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
glibtop_suid_enter (server);
|
||||
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof(*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
glibtop_suid_leave (server);
|
||||
return;
|
||||
}
|
||||
|
||||
glibtop_suid_leave (server);
|
||||
|
||||
#define PROC_WCHAN p_wchan
|
||||
#define PROC_WMESG p_wmesg
|
||||
|
||||
buf->nwchan = (unsigned long) pinfo [0].PROC_WCHAN;
|
||||
|
||||
buf->flags |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN);
|
||||
|
||||
if (pinfo [0].PROC_WCHAN && pinfo [0].PROC_WMESG[0] != 0) {
|
||||
g_strlcpy (buf->wchan, pinfo [0].PROC_WMESG,
|
||||
sizeof buf->wchan);
|
||||
buf->flags |= (1L << GLIBTOP_PROC_KERNEL_WCHAN);
|
||||
} else {
|
||||
buf->wchan [0] = 0;
|
||||
}
|
||||
|
||||
buf->k_flags = (unsigned long) pinfo [0].p_flag;
|
||||
buf->min_flt = (unsigned long) pinfo [0].p_uru_minflt;
|
||||
buf->maj_flt = (unsigned long) pinfo [0].p_uru_majflt;
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_proc_kernel_pstats;
|
||||
|
||||
return;
|
||||
}
|
||||
106
sysdeps/openbsd/proclist.c
Normal file
106
sysdeps/openbsd/proclist.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/proclist.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proclist =
|
||||
(1L << GLIBTOP_PROCLIST_TOTAL) + (1L << GLIBTOP_PROCLIST_NUMBER) +
|
||||
(1L << GLIBTOP_PROCLIST_SIZE);
|
||||
|
||||
/* Fetch list of currently running processes.
|
||||
* The interface of this function is a little bit different from the others:
|
||||
* buf->flags is only set if the call succeeded, in this case pids_chain,
|
||||
* a list of the pids of all currently running processes is returned,
|
||||
* buf->number is the number of elements of this list and buf->size is
|
||||
* the size of one single element (sizeof (unsigned)). The total size is
|
||||
* stored in buf->total.
|
||||
*
|
||||
* The calling function has to free the memory to which a pointer is returned.
|
||||
*
|
||||
* IMPORTANT NOTE:
|
||||
* On error, this function MUST return NULL and set buf->flags to zero !
|
||||
* On success, it returnes a pointer to a list of buf->number elements
|
||||
* each buf->size big. The total size is stored in buf->total.
|
||||
* The calling function has to free the memory to which a pointer is returned.
|
||||
*
|
||||
* On error, NULL is returned and buf->flags is zero. */
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proclist_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
|
||||
}
|
||||
|
||||
pid_t *
|
||||
glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
|
||||
gint64 real_which, gint64 arg)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
unsigned *pids = NULL;
|
||||
int which, count;
|
||||
int i,j;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROCLIST), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proclist));
|
||||
|
||||
which = (int)(real_which & GLIBTOP_KERN_PROC_MASK);
|
||||
|
||||
/* Get the process data */
|
||||
pinfo = kvm_getprocs (server->machine.kd, which, arg,
|
||||
sizeof (*pinfo), &count);
|
||||
if ((pinfo == NULL) || (count < 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (proclist)");
|
||||
return NULL;
|
||||
}
|
||||
count--;
|
||||
|
||||
/* Allocate count objects in the pids_chain array
|
||||
* Same as malloc is pids is NULL, which it is. */
|
||||
pids = g_realloc (pids, count * sizeof (unsigned));
|
||||
/* Copy the pids over to this chain */
|
||||
for (i=j=0; i < count; i++) {
|
||||
#define PROC_STAT p_stat
|
||||
#define PROC_RUID p_ruid
|
||||
#define PROC_PID p_pid
|
||||
|
||||
if ((real_which & GLIBTOP_EXCLUDE_IDLE) &&
|
||||
(pinfo[i].PROC_STAT != SRUN))
|
||||
continue;
|
||||
else if ((real_which & GLIBTOP_EXCLUDE_SYSTEM) &&
|
||||
(pinfo[i].PROC_RUID == 0))
|
||||
continue;
|
||||
pids [j++] = (unsigned) pinfo[i].PROC_PID;
|
||||
} /* end for */
|
||||
/* Set the fields in buf */
|
||||
buf->number = j;
|
||||
buf->size = sizeof (unsigned);
|
||||
buf->total = j * sizeof (unsigned);
|
||||
buf->flags = _glibtop_sysdeps_proclist;
|
||||
return pids;
|
||||
}
|
||||
309
sysdeps/openbsd/procmap.c
Normal file
309
sysdeps/openbsd/procmap.c
Normal file
@@ -0,0 +1,309 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/procmap.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <kvm.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/resource.h>
|
||||
#include <uvm/uvm_extern.h>
|
||||
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/ufs/quota.h>
|
||||
#include <ufs/ufs/inode.h>
|
||||
|
||||
#include <sys/ucred.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#undef _KERNEL
|
||||
#define _UVM_UVM_AMAP_I_H_ 1
|
||||
#define _UVM_UVM_MAP_I_H_ 1
|
||||
#include <uvm/uvm.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_map =
|
||||
(1L << GLIBTOP_PROC_MAP_TOTAL) + (1L << GLIBTOP_PROC_MAP_NUMBER) +
|
||||
(1L << GLIBTOP_PROC_MAP_SIZE);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_map_entry =
|
||||
(1L << GLIBTOP_MAP_ENTRY_START) + (1L << GLIBTOP_MAP_ENTRY_END) +
|
||||
(1L << GLIBTOP_MAP_ENTRY_OFFSET) + (1L << GLIBTOP_MAP_ENTRY_PERM) +
|
||||
(1L << GLIBTOP_MAP_ENTRY_INODE) + (1L << GLIBTOP_MAP_ENTRY_DEVICE);
|
||||
|
||||
/* Local helper functions. */
|
||||
|
||||
ssize_t load_vmmap_entries(glibtop*, unsigned long, struct vm_map_entry**,
|
||||
struct vm_map_entry*);
|
||||
void unload_vmmap_entries(struct vm_map_entry *);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_map_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
|
||||
}
|
||||
|
||||
/*
|
||||
* Download vmmap_entries from the kernel into our address space.
|
||||
* We fix up the addr tree while downloading.
|
||||
*
|
||||
* Returns: the size of the tree on succes, or -1 on failure.
|
||||
* On failure, *rptr needs to be passed to unload_vmmap_entries to free
|
||||
* the lot.
|
||||
*/
|
||||
ssize_t
|
||||
load_vmmap_entries(glibtop *server, unsigned long kptr,
|
||||
struct vm_map_entry **rptr, struct vm_map_entry *parent)
|
||||
{
|
||||
struct vm_map_entry *entry;
|
||||
unsigned long left_kptr, right_kptr;
|
||||
ssize_t left_sz;
|
||||
ssize_t right_sz;
|
||||
|
||||
if (kptr == 0)
|
||||
return 0;
|
||||
|
||||
/* Need space. */
|
||||
entry = malloc(sizeof(*entry));
|
||||
if (entry == NULL)
|
||||
return -1;
|
||||
|
||||
/* Download entry at kptr. */
|
||||
if (kvm_read (server->machine.kd, kptr,
|
||||
(char *)entry, sizeof(*entry)) != sizeof(*entry)) {
|
||||
free(entry);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update addr pointers to have sane values in this address space.
|
||||
* We save the kernel pointers in {left,right}_kptr, so we have them
|
||||
* available to download children.
|
||||
*/
|
||||
left_kptr = (unsigned long) RB_LEFT(entry, daddrs.addr_entry);
|
||||
right_kptr = (unsigned long) RB_RIGHT(entry, daddrs.addr_entry);
|
||||
RB_LEFT(entry, daddrs.addr_entry) =
|
||||
RB_RIGHT(entry, daddrs.addr_entry) = NULL;
|
||||
/* Fill in parent pointer. */
|
||||
RB_PARENT(entry, daddrs.addr_entry) = parent;
|
||||
|
||||
/*
|
||||
* Consistent state reached, fill in *rptr.
|
||||
*/
|
||||
*rptr = entry;
|
||||
|
||||
/*
|
||||
* Download left, right.
|
||||
* On failure, our map is in a state that can be handled by
|
||||
* unload_vmmap_entries.
|
||||
*/
|
||||
left_sz = load_vmmap_entries(server, left_kptr,
|
||||
&RB_LEFT(entry, daddrs.addr_entry), entry);
|
||||
if (left_sz == -1)
|
||||
return -1;
|
||||
right_sz = load_vmmap_entries(server, right_kptr,
|
||||
&RB_RIGHT(entry, daddrs.addr_entry), entry);
|
||||
if (right_sz == -1)
|
||||
return -1;
|
||||
|
||||
return 1 + left_sz + right_sz;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free the vmmap entries in the given tree.
|
||||
*/
|
||||
void
|
||||
unload_vmmap_entries(struct vm_map_entry *entry)
|
||||
{
|
||||
if (entry == NULL)
|
||||
return;
|
||||
|
||||
unload_vmmap_entries(RB_LEFT(entry, daddrs.addr_entry));
|
||||
unload_vmmap_entries(RB_RIGHT(entry, daddrs.addr_entry));
|
||||
free(entry);
|
||||
}
|
||||
|
||||
/*
|
||||
* Provides detailed information about a process.
|
||||
* Due to the fact we are only requested info about one process, it's possible
|
||||
* the process has been reaped before we get to kvm_getprocs. Tough luck.
|
||||
*/
|
||||
|
||||
glibtop_map_entry *
|
||||
glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
struct vm_map_entry *entry;
|
||||
struct uvm_map_addr root;
|
||||
struct vmspace vmspace;
|
||||
struct vnode vnode;
|
||||
struct inode inode;
|
||||
ssize_t nentries;
|
||||
GArray *maps = g_array_sized_new(FALSE, FALSE,
|
||||
sizeof(glibtop_map_entry),
|
||||
100);
|
||||
int count = 0;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MAP), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_map));
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return (glibtop_map_entry*) g_array_free(maps, TRUE);
|
||||
|
||||
glibtop_suid_enter (server);
|
||||
|
||||
/* Get the process data */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return (glibtop_map_entry*) g_array_free(maps, TRUE);
|
||||
}
|
||||
|
||||
/* Now we get the memory maps. */
|
||||
|
||||
if (kvm_read (server->machine.kd,
|
||||
(unsigned long) pinfo [0].p_vmspace,
|
||||
(char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (vmspace)");
|
||||
glibtop_suid_leave (server);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RB_INIT(&root);
|
||||
nentries = load_vmmap_entries(server,
|
||||
(unsigned long) RB_ROOT(&vmspace.vm_map.addr),
|
||||
&RB_ROOT(&root), NULL);
|
||||
if (nentries == -1) {
|
||||
unload_vmmap_entries(RB_ROOT(&root));
|
||||
glibtop_error_io_r (server, "kvm_read (entry)");
|
||||
}
|
||||
|
||||
/* Allocate space. */
|
||||
|
||||
buf->number = nentries;
|
||||
buf->size = sizeof (glibtop_map_entry);
|
||||
|
||||
buf->total = buf->number * buf->size;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_map;
|
||||
|
||||
/* Walk through the `vm_map_entry' list ... */
|
||||
|
||||
/* I tested this a few times with `mmap'; as soon as you write
|
||||
* to the mmap'ed area, the object type changes from OBJT_VNODE
|
||||
* to OBJT_DEFAULT so it seems this really works.
|
||||
*/
|
||||
|
||||
RB_FOREACH(entry, uvm_map_addr, &root) {
|
||||
glibtop_map_entry *mentry;
|
||||
unsigned long inum, dev;
|
||||
guint len;
|
||||
|
||||
if (UVM_ET_ISSUBMAP(entry))
|
||||
continue;
|
||||
if (!entry->object.uvm_obj)
|
||||
continue;
|
||||
|
||||
/* We're only interested in vnodes */
|
||||
|
||||
if (kvm_read (server->machine.kd,
|
||||
(unsigned long) entry->object.uvm_obj,
|
||||
&vnode, sizeof (vnode)) != sizeof (vnode)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (vnode)");
|
||||
unload_vmmap_entries(RB_ROOT(&root));
|
||||
glibtop_suid_leave (server);
|
||||
return (glibtop_map_entry*) g_array_free(maps, TRUE);
|
||||
}
|
||||
|
||||
#if defined(UVM_VNODE_VALID)
|
||||
if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID)
|
||||
continue;
|
||||
#endif
|
||||
if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) ||
|
||||
!vnode.v_data) continue;
|
||||
|
||||
if (kvm_read (server->machine.kd,
|
||||
(unsigned long) vnode.v_data,
|
||||
&inode, sizeof (inode)) != sizeof (inode)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (inode)");
|
||||
unload_vmmap_entries(RB_ROOT(&root));
|
||||
glibtop_suid_leave (server);
|
||||
return (glibtop_map_entry*) g_array_free(maps, TRUE);
|
||||
}
|
||||
|
||||
inum = inode.i_number;
|
||||
dev = inode.i_dev;
|
||||
|
||||
len = maps->len;
|
||||
g_array_set_size(maps, len + 1);
|
||||
mentry = &g_array_index(maps, glibtop_map_entry, len);
|
||||
|
||||
mentry->flags = _glibtop_sysdeps_map_entry;
|
||||
|
||||
mentry->start = (guint64) entry->start;
|
||||
mentry->end = (guint64) entry->end;
|
||||
mentry->offset = (guint64) entry->offset;
|
||||
mentry->device = (guint64) dev;
|
||||
mentry->inode = (guint64) inum;
|
||||
|
||||
mentry->perm = (guint64) 0;
|
||||
|
||||
if (entry->protection & VM_PROT_READ)
|
||||
mentry->perm |= GLIBTOP_MAP_PERM_READ;
|
||||
if (entry->protection & VM_PROT_WRITE)
|
||||
mentry->perm |= GLIBTOP_MAP_PERM_WRITE;
|
||||
if (entry->protection & VM_PROT_EXECUTE)
|
||||
mentry->perm |= GLIBTOP_MAP_PERM_EXECUTE;
|
||||
}
|
||||
|
||||
glibtop_suid_leave (server);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_map;
|
||||
|
||||
buf->number = maps->len;
|
||||
buf->size = sizeof (glibtop_map_entry);
|
||||
buf->total = buf->number * buf->size;
|
||||
|
||||
unload_vmmap_entries(RB_ROOT(&root));
|
||||
return (glibtop_map_entry*) g_array_free(maps, FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't implement address comparison.
|
||||
*/
|
||||
static __inline int
|
||||
no_impl(void *p, void *q)
|
||||
{
|
||||
abort(); /* Should not be called. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
RB_GENERATE(uvm_map_addr, vm_map_entry, daddrs.addr_entry, no_impl);
|
||||
132
sysdeps/openbsd/procmem.c
Normal file
132
sysdeps/openbsd/procmem.c
Normal file
@@ -0,0 +1,132 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/procmem.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <kvm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/resource.h>
|
||||
#include <uvm/uvm_extern.h>
|
||||
|
||||
#include <sys/vnode.h>
|
||||
#include <ufs/ufs/quota.h>
|
||||
#include <ufs/ufs/inode.h>
|
||||
|
||||
#include <sys/ucred.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <uvm/uvm.h>
|
||||
|
||||
/* Fixme ... */
|
||||
#undef _KERNEL
|
||||
#define _UVM_UVM_AMAP_I_H_ 1
|
||||
#define _UVM_UVM_MAP_I_H_ 1
|
||||
#include <uvm/uvm.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_mem =
|
||||
(1L << GLIBTOP_PROC_MEM_SIZE) +
|
||||
(1L << GLIBTOP_PROC_MEM_VSIZE) +
|
||||
(1L << GLIBTOP_PROC_MEM_RESIDENT) +
|
||||
(1L << GLIBTOP_PROC_MEM_RSS) +
|
||||
(1L << GLIBTOP_PROC_MEM_RSS_RLIM);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_mem_share =
|
||||
(1L << GLIBTOP_PROC_MEM_SHARE);
|
||||
|
||||
#ifndef LOG1024
|
||||
#define LOG1024 10
|
||||
#endif
|
||||
|
||||
/* these are for getting the memory statistics */
|
||||
static int pageshift; /* log base 2 of the pagesize */
|
||||
|
||||
/* define pagetok in terms of pageshift */
|
||||
#define pagetok(size) ((size) << pageshift)
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_mem_p (glibtop *server)
|
||||
{
|
||||
register int pagesize;
|
||||
|
||||
/* get the page size and calculate pageshift from it */
|
||||
pagesize = sysconf(_SC_PAGESIZE);
|
||||
pageshift = 0;
|
||||
while (pagesize > 1) {
|
||||
pageshift++;
|
||||
pagesize >>= 1;
|
||||
}
|
||||
|
||||
/* we only need the amount of log(2)1024 for our conversion */
|
||||
pageshift -= LOG1024;
|
||||
|
||||
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem |
|
||||
_glibtop_sysdeps_proc_mem_share;
|
||||
}
|
||||
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
|
||||
int count;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MEM), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_mem));
|
||||
|
||||
if (server->sysdeps.proc_mem == 0)
|
||||
return;
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
/* Get the process data */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if ((pinfo == NULL) || (count < 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
||||
buf->rss_rlim = pinfo[0].p_uru_maxrss;
|
||||
buf->vsize = buf->size = (guint64)pagetok
|
||||
(pinfo[0].p_vm_tsize + pinfo[0].p_vm_dsize + pinfo[0].p_vm_ssize)
|
||||
<< LOG1024;
|
||||
buf->resident = buf->rss = (guint64)pagetok
|
||||
(pinfo[0].p_vm_rssize) << LOG1024;
|
||||
|
||||
/* Now we get the shared memory. */
|
||||
|
||||
buf->share = pinfo[0].p_uru_ixrss;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_mem |
|
||||
_glibtop_sysdeps_proc_mem_share;
|
||||
}
|
||||
197
sysdeps/openbsd/procopenfiles.c
Normal file
197
sysdeps/openbsd/procopenfiles.c
Normal file
@@ -0,0 +1,197 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
Copyright (C) 2004 Nicol\ufffds Lichtmaier
|
||||
Copyright (C) 2007 Joe Marcus Clarke
|
||||
Copyright (C) 2013 Robert Nagy
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Modified by Nicol\ufffds Lichtmaier to give a process open files.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/procopenfiles.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#define _KERNEL
|
||||
#include <sys/file.h>
|
||||
#undef _KERNEL
|
||||
#include <sys/mount.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "glibtop_private.h"
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_open_files =
|
||||
(1L << GLIBTOP_PROC_OPEN_FILES_NUMBER)|
|
||||
(1L << GLIBTOP_PROC_OPEN_FILES_TOTAL)|
|
||||
(1L << GLIBTOP_PROC_OPEN_FILES_SIZE);
|
||||
|
||||
kvm_t *kd;
|
||||
|
||||
struct filearg {
|
||||
SLIST_ENTRY(filearg) next;
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
char *name;
|
||||
TAILQ_HEAD(fuserhead, fuser) fusers;
|
||||
};
|
||||
|
||||
SLIST_HEAD(fileargs, filearg);
|
||||
|
||||
struct fileargs fileargs = SLIST_HEAD_INITIALIZER(fileargs);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_open_files_s (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_open_files = _glibtop_sysdeps_proc_open_files;
|
||||
}
|
||||
|
||||
static char *
|
||||
addr_to_string(struct kinfo_file *kf)
|
||||
{
|
||||
char *buffer = NULL;
|
||||
struct in_addr faddr;
|
||||
|
||||
memcpy(&faddr, kf->inp_faddru, sizeof(faddr));
|
||||
|
||||
if ((kf->so_protocol == IPPROTO_TCP) ||
|
||||
(kf->so_protocol == IPPROTO_UDP)) {
|
||||
if (kf->inp_fport) {
|
||||
buffer = g_strdup(faddr.s_addr == INADDR_ANY ? "*" :
|
||||
inet_ntoa(faddr));
|
||||
}
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
glibtop_open_files_entry *
|
||||
glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pid_t pid)
|
||||
{
|
||||
struct kinfo_file *kf, *kflast;
|
||||
int cnt;
|
||||
char kbuf[_POSIX2_LINE_MAX];
|
||||
GArray *entries;
|
||||
|
||||
memset(buf, 0, sizeof (glibtop_proc_open_files));
|
||||
|
||||
if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, kbuf)) == NULL)
|
||||
g_warning("%s", kbuf);
|
||||
|
||||
if ((kf = kvm_getfiles(kd, KERN_FILE_BYPID, pid, sizeof(*kf), &cnt)) == NULL)
|
||||
g_warning("%s", kvm_geterr(kd));
|
||||
|
||||
entries = g_array_new(FALSE, FALSE, sizeof(glibtop_open_files_entry));
|
||||
|
||||
for (kflast = &kf[cnt]; kf < kflast; ++kf) {
|
||||
glibtop_open_files_entry entry = {0};
|
||||
|
||||
if (kf->fd_fd < 0)
|
||||
continue;
|
||||
|
||||
if (kf->f_type == DTYPE_SOCKET) {
|
||||
if (kf->so_family == AF_LOCAL) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET;
|
||||
static char *stypename[] = {
|
||||
"unused", /* 0 */
|
||||
"stream",
|
||||
"dgram",
|
||||
"raw",
|
||||
"rdm",
|
||||
"seqpak"
|
||||
};
|
||||
#define STYPEMAX 5
|
||||
char *stype, stypebuf[24];
|
||||
|
||||
if (kf->so_type > STYPEMAX) {
|
||||
snprintf(stypebuf, sizeof(stypebuf), "?%d", kf->so_type);
|
||||
stype = stypebuf;
|
||||
} else {
|
||||
stype = stypename[kf->so_type];
|
||||
}
|
||||
g_strlcpy(entry.info.localsock.name, stype,
|
||||
sizeof(entry.info.localsock.name));
|
||||
} else if (kf->so_family == AF_INET ||
|
||||
kf->so_family == AF_INET6) {
|
||||
char *addrstr;
|
||||
|
||||
if (kf->so_family == AF_INET)
|
||||
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
|
||||
else
|
||||
entry.type = GLIBTOP_FILE_TYPE_INET6SOCKET;
|
||||
|
||||
addrstr = addr_to_string(kf);
|
||||
g_strlcpy(entry.info.sock.dest_host,
|
||||
addrstr,
|
||||
sizeof(entry.info.sock.dest_host));
|
||||
g_free(addrstr);
|
||||
entry.info.sock.dest_port = kf->inp_fport ? ntohs(kf->inp_fport) : 0;
|
||||
}
|
||||
} else if (kf->f_type == DTYPE_PIPE) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_PIPE;
|
||||
} else if (kf->f_type == DTYPE_VNODE) {
|
||||
int badtype = 0;
|
||||
char nbuf[MAXPATHLEN];
|
||||
|
||||
entry.type = GLIBTOP_FILE_TYPE_FILE;
|
||||
|
||||
if ((kf->v_type == VNON) ||
|
||||
(kf->v_type == VBAD) ||
|
||||
(kf->v_tag == VT_NON && !(kf->v_flag & VCLONE))) {
|
||||
badtype = 1;
|
||||
}
|
||||
|
||||
if (badtype)
|
||||
continue;
|
||||
|
||||
if ((kf->v_type == VBLK) ||
|
||||
(kf->v_type == VCHR)) {
|
||||
snprintf(nbuf, sizeof(nbuf), "/dev/%s",
|
||||
devname(kf->va_rdev, kf->v_type == VCHR ? S_IFCHR : S_IFBLK));
|
||||
} else {
|
||||
snprintf(nbuf, sizeof(nbuf), "inode %llu on %s", kf->va_fileid,
|
||||
kf->f_mntonname);
|
||||
}
|
||||
g_strlcpy(entry.info.file.name, nbuf,
|
||||
sizeof(entry.info.file.name));
|
||||
} else
|
||||
continue;
|
||||
|
||||
entry.fd = kf->fd_fd;
|
||||
|
||||
g_array_append_val(entries, entry);
|
||||
}
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_open_files;
|
||||
buf->number = entries->len;
|
||||
buf->size = sizeof(glibtop_open_files_entry);
|
||||
buf->total = buf->number * buf->size;
|
||||
|
||||
return (glibtop_open_files_entry*)g_array_free(entries, FALSE);
|
||||
}
|
||||
77
sysdeps/openbsd/procsegment.c
Normal file
77
sysdeps/openbsd/procsegment.c
Normal file
@@ -0,0 +1,77 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/procsegment.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <kvm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_segment =
|
||||
(1L << GLIBTOP_PROC_SEGMENT_TEXT_RSS) +
|
||||
(1L << GLIBTOP_PROC_SEGMENT_DATA_RSS);
|
||||
|
||||
static int pagesize;
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_segment_p (glibtop *server)
|
||||
{
|
||||
pagesize = getpagesize ();
|
||||
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
|
||||
}
|
||||
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_segment_p (glibtop *server,
|
||||
glibtop_proc_segment *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
int count = 0;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_segment));
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
/* Get the process info from the kernel */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
||||
buf->text_rss = pinfo[0].p_vm_tsize * pagesize;
|
||||
buf->data_rss = pinfo[0].p_vm_dsize * pagesize;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_segment;
|
||||
}
|
||||
89
sysdeps/openbsd/procsignal.c
Normal file
89
sysdeps/openbsd/procsignal.c
Normal file
@@ -0,0 +1,89 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/procsignal.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_signal =
|
||||
(1L << GLIBTOP_PROC_SIGNAL_SIGNAL) +
|
||||
(1L << GLIBTOP_PROC_SIGNAL_BLOCKED) +
|
||||
(1L << GLIBTOP_PROC_SIGNAL_SIGIGNORE) +
|
||||
(1L << GLIBTOP_PROC_SIGNAL_SIGCATCH);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_signal_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_get_proc_signal_p (glibtop *server,
|
||||
glibtop_proc_signal *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
int count = 0;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_signal));
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
||||
/* signal: mask of pending signals.
|
||||
* pinfo [0].kp_proc.p_siglist
|
||||
*/
|
||||
buf->signal [0] = pinfo [0].p_siglist;
|
||||
|
||||
/* blocked: mask of blocked signals.
|
||||
* pinfo [0].kp_proc.p_sigmask
|
||||
*/
|
||||
buf->blocked [0] = pinfo [0].p_sigmask;
|
||||
|
||||
/* sigignore: mask of ignored signals.
|
||||
* pinfo [0].kp_proc.p_sigignore
|
||||
*/
|
||||
buf->sigignore [0] = pinfo [0].p_sigignore;
|
||||
|
||||
/* sigcatch: mask of caught signals.
|
||||
* pinfo [0].kp_proc.p_sigcatch
|
||||
*/
|
||||
buf->sigcatch [0] = pinfo [0].p_sigcatch;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_signal;
|
||||
}
|
||||
131
sysdeps/openbsd/procstate.c
Normal file
131
sysdeps/openbsd/procstate.c
Normal file
@@ -0,0 +1,131 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/procstate.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_state =
|
||||
(1L << GLIBTOP_PROC_STATE_CMD) + (1L << GLIBTOP_PROC_STATE_UID) +
|
||||
(1L << GLIBTOP_PROC_STATE_GID);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_state_new =
|
||||
0;
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_state_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state |
|
||||
_glibtop_sysdeps_proc_state_new;
|
||||
}
|
||||
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_state_p (glibtop *server,
|
||||
glibtop_proc_state *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
int count = 0;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_STATE), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
||||
#define PROC_COMM p_comm
|
||||
#define PROC_SVUID p_svuid
|
||||
#define PROC_SVGID p_svgid
|
||||
#define PROC_STAT p_stat
|
||||
|
||||
g_strlcpy (buf->cmd, pinfo [0].PROC_COMM, sizeof buf->cmd);
|
||||
|
||||
buf->uid = pinfo [0].PROC_SVUID;
|
||||
buf->gid = pinfo [0].PROC_SVGID;
|
||||
|
||||
/* Set the flags for the data we're about to return*/
|
||||
buf->flags = _glibtop_sysdeps_proc_state |
|
||||
_glibtop_sysdeps_proc_state_new;
|
||||
|
||||
#if LIBGTOP_VERSION_CODE >= 1001000
|
||||
switch (pinfo [0].PROC_STAT) {
|
||||
case SIDL:
|
||||
buf->state = 0;
|
||||
break;
|
||||
case SRUN:
|
||||
buf->state = GLIBTOP_PROCESS_RUNNING;
|
||||
break;
|
||||
#ifdef SSLEEP
|
||||
case SSLEEP:
|
||||
buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
|
||||
break;
|
||||
#endif
|
||||
case SSTOP:
|
||||
buf->state = GLIBTOP_PROCESS_STOPPED;
|
||||
break;
|
||||
case SZOMB:
|
||||
buf->state = GLIBTOP_PROCESS_ZOMBIE;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
#else
|
||||
switch (pinfo [0].PROC_STAT) {
|
||||
case SIDL:
|
||||
buf->state = 'D';
|
||||
break;
|
||||
case SRUN:
|
||||
buf->state = 'R';
|
||||
break;
|
||||
#ifdef SSLEEP
|
||||
case SSLEEP:
|
||||
buf->state = 'S';
|
||||
break;
|
||||
#endif
|
||||
case SSTOP:
|
||||
buf->state = 'T';
|
||||
break;
|
||||
case SZOMB:
|
||||
buf->state = 'Z';
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
buf->flags |= (1L << GLIBTOP_PROC_STATE_STATE);
|
||||
}
|
||||
101
sysdeps/openbsd/proctime.c
Normal file
101
sysdeps/openbsd/proctime.c
Normal file
@@ -0,0 +1,101 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/proctime.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_time =
|
||||
(1L << GLIBTOP_PROC_TIME_RTIME) + (1L << GLIBTOP_PROC_TIME_FREQUENCY);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_time_user =
|
||||
(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_STIME) +
|
||||
(1L << GLIBTOP_PROC_TIME_CUTIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) +
|
||||
(1L << GLIBTOP_PROC_TIME_START_TIME);
|
||||
|
||||
#define tv2sec(tv) (((guint64) tv.tv_sec * 1000000) + (guint64) tv.tv_usec)
|
||||
|
||||
static unsigned int clockrate;
|
||||
static int mib [] = { CTL_KERN, KERN_CLOCKRATE };
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_time_p (glibtop *server)
|
||||
{
|
||||
struct clockinfo ci;
|
||||
size_t length;
|
||||
length = sizeof (ci);
|
||||
if (sysctl (mib, 2, &ci, &length, NULL, 0) == 0)
|
||||
clockrate = ci.hz;
|
||||
if (!clockrate)
|
||||
clockrate = 1; /* XXX avoid div by 0 later */
|
||||
|
||||
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time |
|
||||
_glibtop_sysdeps_proc_time_user;
|
||||
}
|
||||
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
int count;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_TIME), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_time));
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
||||
buf->rtime = pinfo[0].p_rtime_sec * clockrate
|
||||
+ pinfo[0].p_rtime_usec * clockrate / 1000000;
|
||||
buf->frequency = clockrate;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_time;
|
||||
|
||||
buf->utime = pinfo[0].p_uutime_sec * 1000000
|
||||
+ pinfo[0].p_uutime_usec;
|
||||
buf->stime = pinfo[0].p_ustime_sec * 1000000
|
||||
+ pinfo[0].p_ustime_usec;
|
||||
buf->cutime = pinfo[0].p_uctime_sec * 1000000
|
||||
+ pinfo[0].p_uctime_usec; /* XXX is u+s */
|
||||
buf->cstime = 0; /* XXX */
|
||||
buf->start_time = pinfo[0].p_ustart_sec;
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_proc_time_user;
|
||||
}
|
||||
|
||||
102
sysdeps/openbsd/procuid.c
Normal file
102
sysdeps/openbsd/procuid.c
Normal file
@@ -0,0 +1,102 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/procuid.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_uid =
|
||||
(1L << GLIBTOP_PROC_UID_UID) + (1L << GLIBTOP_PROC_UID_EUID) +
|
||||
(1L << GLIBTOP_PROC_UID_GID) +
|
||||
(1L << GLIBTOP_PROC_UID_EGID) + (1L << GLIBTOP_PROC_UID_PID) +
|
||||
(1L << GLIBTOP_PROC_UID_PPID) + (1L << GLIBTOP_PROC_UID_PGRP) +
|
||||
(1L << GLIBTOP_PROC_UID_TPGID) + (1L << GLIBTOP_PROC_UID_PRIORITY) +
|
||||
(1L << GLIBTOP_PROC_UID_NICE);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_uid_groups =
|
||||
0L;
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_uid_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid |
|
||||
_glibtop_sysdeps_proc_uid_groups;
|
||||
}
|
||||
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
int count = 0;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_UID), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_uid));
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
||||
#define PROC_RUID p_ruid
|
||||
#define PROC_SVUID p_svuid
|
||||
#define PROC_RGID p_rgid
|
||||
#define PROC_SVGID p_svgid
|
||||
#define PROC_PID p_pid
|
||||
#define PROC_PPID p_ppid
|
||||
#define PROC_PGID p__pgid
|
||||
#define PROC_TPGID p_tpgid
|
||||
#define PROC_NICE p_nice
|
||||
#define PROC_PRIORITY p_priority
|
||||
|
||||
buf->uid = pinfo [0].PROC_RUID;
|
||||
buf->euid = pinfo [0].PROC_SVUID;
|
||||
buf->gid = pinfo [0].PROC_RGID;
|
||||
buf->egid = pinfo [0].PROC_SVGID;
|
||||
|
||||
buf->pid = pinfo [0].PROC_PID;
|
||||
buf->ppid = pinfo [0].PROC_PPID;
|
||||
buf->pgrp = pinfo [0].PROC_PGID;
|
||||
buf->tpgid = pinfo [0].PROC_TPGID;
|
||||
|
||||
buf->nice = pinfo [0].PROC_NICE;
|
||||
buf->priority = pinfo [0].PROC_PRIORITY;
|
||||
|
||||
/* Set the flags for the data we're about to return*/
|
||||
buf->flags = _glibtop_sysdeps_proc_uid;
|
||||
|
||||
/* Use LibGTop conditionals here so we can more easily merge this
|
||||
* code into the LIBGTOP_STABLE_1_0 branch. */
|
||||
}
|
||||
47
sysdeps/openbsd/procwd.c
Normal file
47
sysdeps/openbsd/procwd.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Copyright (C) 2007 Joe Marcus Clarke
|
||||
This file is part of LibGTop 2.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop/procwd.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#include <glibtop_private.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/param.h>
|
||||
#include <string.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_wd =
|
||||
(1 << GLIBTOP_PROC_WD_EXE) |
|
||||
(1 << GLIBTOP_PROC_WD_ROOT) |
|
||||
(1 << GLIBTOP_PROC_WD_NUMBER);
|
||||
|
||||
void
|
||||
_glibtop_init_proc_wd_s(glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd;
|
||||
}
|
||||
|
||||
char**
|
||||
glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid)
|
||||
{
|
||||
/* TODO */
|
||||
return NULL;
|
||||
}
|
||||
94
sysdeps/openbsd/sem_limits.c
Normal file
94
sysdeps/openbsd/sem_limits.c
Normal file
@@ -0,0 +1,94 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, August 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/sem_limits.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
/* #define _KERNEL to get declaration of `struct seminfo'. */
|
||||
|
||||
#define _KERNEL 1
|
||||
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
|
||||
static unsigned long _glibtop_sysdeps_sem_limits =
|
||||
(1L << GLIBTOP_IPC_SEMMNI) +
|
||||
(1L << GLIBTOP_IPC_SEMMNS) + (1L << GLIBTOP_IPC_SEMMNU) +
|
||||
(1L << GLIBTOP_IPC_SEMMSL) + (1L << GLIBTOP_IPC_SEMOPM) +
|
||||
(1L << GLIBTOP_IPC_SEMUME) + (1L << GLIBTOP_IPC_SEMUSZ) +
|
||||
(1L << GLIBTOP_IPC_SEMVMX) + (1L << GLIBTOP_IPC_SEMAEM);
|
||||
|
||||
/* The values in this structure never change at runtime, so we only
|
||||
* read it once during initialization. We have to use the name `_seminfo'
|
||||
* since `seminfo' is already declared external in <sys/sem.h>. */
|
||||
static struct seminfo _seminfo;
|
||||
|
||||
/* nlist structure for kernel access */
|
||||
static struct nlist nlst [] = {
|
||||
{ "_seminfo" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_sem_limits_p (glibtop *server)
|
||||
{
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (sem_limits)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (kvm_read (server->machine.kd, nlst [0].n_value,
|
||||
&_seminfo, sizeof (_seminfo)) != sizeof (_seminfo)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (seminfo)");
|
||||
return;
|
||||
}
|
||||
|
||||
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
|
||||
}
|
||||
|
||||
/* Provides information about sysv sem limits. */
|
||||
|
||||
void
|
||||
glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
|
||||
{
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_sem_limits));
|
||||
|
||||
if (server->sysdeps.sem_limits == 0)
|
||||
return;
|
||||
|
||||
buf->semmni = _seminfo.semmni;
|
||||
buf->semmns = _seminfo.semmns;
|
||||
buf->semmnu = _seminfo.semmnu;
|
||||
buf->semmsl = _seminfo.semmsl;
|
||||
buf->semopm = _seminfo.semopm;
|
||||
buf->semvmx = _seminfo.semvmx;
|
||||
buf->semaem = _seminfo.semaem;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_sem_limits;
|
||||
}
|
||||
86
sysdeps/openbsd/shm_limits.c
Normal file
86
sysdeps/openbsd/shm_limits.c
Normal file
@@ -0,0 +1,86 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, August 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/shm_limits.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
static unsigned long _glibtop_sysdeps_shm_limits =
|
||||
(1L << GLIBTOP_IPC_SHMMAX) + (1L << GLIBTOP_IPC_SHMMIN) +
|
||||
(1L << GLIBTOP_IPC_SHMMNI) + (1L << GLIBTOP_IPC_SHMSEG) +
|
||||
(1L << GLIBTOP_IPC_SHMALL);
|
||||
|
||||
/* The values in this structure never change at runtime, so we only
|
||||
* read it once during initialization. We have to use the name `_shminfo'
|
||||
* since `shminfo' is already declared external in <sys/shm.h>. */
|
||||
static struct shminfo _shminfo;
|
||||
|
||||
/* nlist structure for kernel access */
|
||||
static struct nlist nlst [] = {
|
||||
{ "_shminfo" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_shm_limits_p (glibtop *server)
|
||||
{
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (shm_limits)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (kvm_read (server->machine.kd, nlst [0].n_value,
|
||||
&_shminfo, sizeof (_shminfo)) != sizeof (_shminfo)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (shminfo)");
|
||||
return;
|
||||
}
|
||||
|
||||
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
|
||||
}
|
||||
|
||||
/* Provides information about sysv ipc limits. */
|
||||
|
||||
void
|
||||
glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
|
||||
{
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_shm_limits));
|
||||
|
||||
if (server->sysdeps.shm_limits == 0)
|
||||
return;
|
||||
|
||||
buf->shmmax = _shminfo.shmmax;
|
||||
buf->shmmin = _shminfo.shmmin;
|
||||
buf->shmmni = _shminfo.shmmni;
|
||||
buf->shmseg = _shminfo.shmseg;
|
||||
buf->shmall = _shminfo.shmall;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_shm_limits;
|
||||
}
|
||||
60
sysdeps/openbsd/siglist.c
Normal file
60
sysdeps/openbsd/siglist.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/signal.h>
|
||||
|
||||
const glibtop_signame glibtop_sys_siglist [] =
|
||||
{ { 1, "SIGHUP", "Hangup" },
|
||||
{ 2, "SIGINT", "Interrupt" },
|
||||
{ 3, "SIGQUIT", "Quit" },
|
||||
{ 4, "SIGILL", "Illegal Instruction" },
|
||||
{ 5, "SIGTRAP", "Trace/Breakpoint Trap" },
|
||||
{ 6, "SIGABRT", "Abort" },
|
||||
{ 7, "SIGEMT", "Emulation Trap" },
|
||||
{ 8, "SIGFPE", "Arithmetic Exception" },
|
||||
{ 9, "SIGKILL", "Killed" },
|
||||
{ 10, "SIGBUS", "Bus Error" },
|
||||
{ 11, "SIGSEGV", "Segmentation Fault" },
|
||||
{ 12, "SIGSYS", "Bad System Call" },
|
||||
{ 13, "SIGPIPE", "Broken Pipe" },
|
||||
{ 14, "SIGALRM", "Alarm Clock" },
|
||||
{ 15, "SIGTERM", "Terminated" },
|
||||
{ 16, "SIGURG", "Urgent Condition Present On Socket" },
|
||||
{ 17, "SIGSTOP", "Stop (cannot be caught or ignored)" },
|
||||
{ 18, "SIGTSTP", "Stop Signal Generated From Keyboard" },
|
||||
{ 19, "SIGCONT", "Continue After Stop" },
|
||||
{ 20, "SIGCHLD", "Child Status Has Changed" },
|
||||
{ 21, "SIGTTIN", "Background Read Attempted From Control Terminal" },
|
||||
{ 22, "SIGTTOU", "Background Write Attempted To Control Terminal" },
|
||||
{ 23, "SIGIO", "I/O Is Possible On A Descriptor" },
|
||||
{ 24, "SIGXCPU", "CPU Time Limit Exceeded" },
|
||||
{ 25, "SIGXFSZ", "File Size Limit Exceeded" },
|
||||
{ 26, "SIGVTALRM","Virtual Time Alarm" },
|
||||
{ 27, "SIGPROF", "Profiling Timer Alarm" },
|
||||
{ 28, "SIGWINCH","Window Size Change" },
|
||||
{ 29, "SIGINFO", "Status Request From Keyboard" },
|
||||
{ 30, "SIGUSR1", "User Defined Signal 1" },
|
||||
{ 31, "SIGUSR2", "User Defined Signal 2" },
|
||||
{ 32, "SIGTHR", "Thread Interrupt" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
92
sysdeps/openbsd/suid_open.c
Normal file
92
sysdeps/openbsd/suid_open.c
Normal file
@@ -0,0 +1,92 @@
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/cpu.h>
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/init_hooks.h>
|
||||
|
||||
|
||||
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
|
||||
|
||||
void
|
||||
glibtop_init_p (glibtop *server, const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
const _glibtop_init_func_t *init_fkt;
|
||||
|
||||
if (server == NULL)
|
||||
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
|
||||
|
||||
/* Do the initialization, but only if not already initialized. */
|
||||
|
||||
if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
|
||||
glibtop_open_p (server, "glibtop", features, flags);
|
||||
|
||||
for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++)
|
||||
(*init_fkt) (server);
|
||||
|
||||
server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_open_p (glibtop *server, const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
char errbuf[_POSIX2_LINE_MAX];
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "DEBUG (%d): glibtop_open_p ()\n", getpid ());
|
||||
#endif
|
||||
|
||||
/* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */
|
||||
server->machine.uid = getuid ();
|
||||
server->machine.euid = geteuid ();
|
||||
server->machine.gid = getgid ();
|
||||
server->machine.egid = getegid ();
|
||||
/* Setup machine-specific data */
|
||||
server->machine.kd = kvm_openfiles (NULL, NULL, NULL, O_RDONLY, errbuf);
|
||||
|
||||
if (server->machine.kd == NULL)
|
||||
glibtop_error_io_r (server, "kvm_open");
|
||||
|
||||
/* Drop priviledges. */
|
||||
|
||||
if (setreuid (server->machine.euid, server->machine.uid))
|
||||
_exit (1);
|
||||
|
||||
if (setregid (server->machine.egid, server->machine.gid))
|
||||
_exit (1);
|
||||
|
||||
/* !!! END OF SUID ROOT PART !!! */
|
||||
|
||||
/* Our effective uid is now those of the user invoking the server,
|
||||
* so we do no longer have any priviledges. */
|
||||
|
||||
/* NOTE: On OpenBSD, we do not need to be suid root, we just need to
|
||||
* be sgid kmem.
|
||||
*
|
||||
* The server will only use setegid() to get back it's priviledges,
|
||||
* so it will fail if it is suid root and not sgid kmem. */
|
||||
}
|
||||
129
sysdeps/openbsd/swap.c
Normal file
129
sysdeps/openbsd/swap.c
Normal file
@@ -0,0 +1,129 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/swap.h>
|
||||
|
||||
#include <glibtop_suid.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_swap =
|
||||
(1L << GLIBTOP_SWAP_TOTAL) + (1L << GLIBTOP_SWAP_USED) +
|
||||
(1L << GLIBTOP_SWAP_FREE) + (1L << GLIBTOP_SWAP_PAGEIN) +
|
||||
(1L << GLIBTOP_SWAP_PAGEOUT);
|
||||
|
||||
#include <sys/vmmeter.h>
|
||||
#include <uvm/uvm_extern.h>
|
||||
#include <sys/swap.h>
|
||||
|
||||
static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_swap_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.swap = _glibtop_sysdeps_swap;
|
||||
}
|
||||
|
||||
/* Provides information about swap usage. */
|
||||
|
||||
/*
|
||||
* This function is based on a program called swapinfo written
|
||||
* by Kevin Lahey <kml@rokkaku.atl.ga.us>.
|
||||
*/
|
||||
|
||||
void
|
||||
glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
|
||||
{
|
||||
struct swapent *swaplist;
|
||||
|
||||
int nswap, i;
|
||||
guint64 avail = 0, inuse = 0;
|
||||
|
||||
int blocksize = 512; /* Default blocksize, use getbize() ? */
|
||||
int blockdiv = blocksize / DEV_BSIZE;
|
||||
|
||||
struct uvmexp uvmexp;
|
||||
size_t length_uvmexp;
|
||||
static int swappgsin = -1;
|
||||
static int swappgsout = -1;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SWAP), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_swap));
|
||||
|
||||
if (server->sysdeps.swap == 0)
|
||||
return;
|
||||
|
||||
length_uvmexp = sizeof (uvmexp);
|
||||
if (sysctl (mib_uvmexp, 2, &uvmexp, &length_uvmexp, NULL, 0)) {
|
||||
glibtop_warn_io_r (server, "sysctl (vm.uvmexp)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (swappgsin < 0) {
|
||||
buf->pagein = 0;
|
||||
buf->pageout = 0;
|
||||
} else {
|
||||
buf->pagein = uvmexp.pgswapin - swappgsin;
|
||||
buf->pageout = uvmexp.pgswapout - swappgsout;
|
||||
}
|
||||
|
||||
swappgsin = uvmexp.pgswapin;
|
||||
swappgsout = uvmexp.pgswapout;
|
||||
|
||||
nswap = swapctl (SWAP_NSWAP, 0, 0);
|
||||
if (nswap < 0) {
|
||||
glibtop_warn_io_r (server, "swapctl (SWAP_NSWAP)");
|
||||
return;
|
||||
}
|
||||
|
||||
swaplist = g_malloc (nswap * sizeof (struct swapent));
|
||||
|
||||
if (swapctl (SWAP_STATS, swaplist, nswap) != nswap) {
|
||||
glibtop_warn_io_r (server, "swapctl (SWAP_STATS)");
|
||||
g_free (swaplist);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Total things up, returns in 512 bytes blocks! */
|
||||
for (i = 0; i < nswap; i++) {
|
||||
if (swaplist[i].se_flags & SWF_ENABLE) {
|
||||
avail += (swaplist[i].se_nblks / blockdiv);
|
||||
inuse += (swaplist[i].se_inuse / blockdiv);
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert back to bytes, the libgtop2 is not clear about unites... */
|
||||
avail *= 512;
|
||||
inuse *= 512;
|
||||
|
||||
g_free (swaplist);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_swap;
|
||||
|
||||
buf->used = inuse;
|
||||
buf->free = avail;
|
||||
|
||||
buf->total = inuse + avail;
|
||||
}
|
||||
114
sysdeps/openbsd/sysinfo.c
Normal file
114
sysdeps/openbsd/sysinfo.c
Normal file
@@ -0,0 +1,114 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/cpu.h>
|
||||
#include <glibtop/sysinfo.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_sysinfo =
|
||||
(1L << GLIBTOP_SYSINFO_CPUINFO);
|
||||
|
||||
static glibtop_sysinfo sysinfo = { .flags = 0 };
|
||||
|
||||
static void
|
||||
init_sysinfo (glibtop *server)
|
||||
{
|
||||
char *model = NULL;
|
||||
int mib[2];
|
||||
guint ncpus = 1;
|
||||
guint mhz = 0;
|
||||
size_t len;
|
||||
|
||||
if (G_LIKELY (sysinfo.flags))
|
||||
return;
|
||||
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
|
||||
|
||||
mib[0] = CTL_HW;
|
||||
|
||||
/* Get the number of CPU's present */
|
||||
mib[1] = HW_NCPU;
|
||||
|
||||
len = sizeof(ncpus);
|
||||
if (sysctl(mib, 2, &ncpus, &len, NULL, 0) != 0)
|
||||
printf("Couldn't determine hw.ncpu.\n");
|
||||
|
||||
/* Get the CPU model */
|
||||
mib[1] = HW_MODEL;
|
||||
len = 0;
|
||||
|
||||
if (sysctl(mib, 2, NULL, &len, NULL, 0) != -1) {
|
||||
model = g_malloc (len);
|
||||
sysctl(mib, 2, model, &len, NULL, 0);
|
||||
} else {
|
||||
printf("Couldn't determine hw.model.\n");
|
||||
}
|
||||
|
||||
/* Get the clockrate */
|
||||
mib[1] = HW_CPUSPEED;
|
||||
len = sizeof(mhz);
|
||||
|
||||
if (sysctl(mib, 2, &mhz, &len, NULL, 0) != 0)
|
||||
printf("Couldn't determine hw.cpuspeed.\n");
|
||||
|
||||
for (sysinfo.ncpu = 0;
|
||||
sysinfo.ncpu < GLIBTOP_NCPU && sysinfo.ncpu < ncpus;
|
||||
sysinfo.ncpu++) {
|
||||
glibtop_entry * const cpuinfo = &sysinfo.cpuinfo[sysinfo.ncpu];
|
||||
|
||||
cpuinfo->labels = g_ptr_array_new ();
|
||||
|
||||
cpuinfo->values = g_hash_table_new_full(g_str_hash,
|
||||
g_str_equal,
|
||||
NULL, g_free);
|
||||
|
||||
g_ptr_array_add (cpuinfo->labels, "processor");
|
||||
g_hash_table_insert (cpuinfo->values, "processor",
|
||||
g_strdup_printf("%u", (guint)sysinfo.ncpu));
|
||||
|
||||
g_ptr_array_add (cpuinfo->labels, "vendor_id");
|
||||
g_hash_table_insert (cpuinfo->values, "vendor_id",
|
||||
g_strdup(model));
|
||||
|
||||
g_ptr_array_add (cpuinfo->labels, "model name");
|
||||
g_hash_table_insert (cpuinfo->values, "model name",
|
||||
g_strdup(model));
|
||||
|
||||
g_ptr_array_add (cpuinfo->labels, "cpu MHz");
|
||||
g_hash_table_insert (cpuinfo->values, "cpu MHz",
|
||||
g_strdup_printf("%d", mhz));
|
||||
}
|
||||
|
||||
g_free (model);
|
||||
|
||||
sysinfo.flags = _glibtop_sysdeps_sysinfo;
|
||||
}
|
||||
|
||||
const glibtop_sysinfo *
|
||||
glibtop_get_sysinfo_s (glibtop *server)
|
||||
{
|
||||
init_sysinfo (server);
|
||||
return &sysinfo;
|
||||
}
|
||||
73
sysdeps/openbsd/uptime.c
Normal file
73
sysdeps/openbsd/uptime.c
Normal file
@@ -0,0 +1,73 @@
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/uptime.h>
|
||||
|
||||
#include <glibtop/cpu.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_uptime =
|
||||
(1L << GLIBTOP_UPTIME_UPTIME) + (1L << GLIBTOP_UPTIME_IDLETIME) +
|
||||
(1UL << GLIBTOP_UPTIME_BOOT_TIME);
|
||||
|
||||
static const unsigned long _required_cpu_flags =
|
||||
(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_IDLE) +
|
||||
(1L << GLIBTOP_CPU_FREQUENCY);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_uptime_s (glibtop *server)
|
||||
{
|
||||
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
|
||||
}
|
||||
|
||||
/* Provides uptime and idle time. */
|
||||
|
||||
void
|
||||
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
||||
{
|
||||
time_t now;
|
||||
int mib[2];
|
||||
struct timeval boottime;
|
||||
size_t size;
|
||||
glibtop_cpu cpu;
|
||||
|
||||
mib[0] = CTL_KERN;
|
||||
mib[1] = KERN_BOOTTIME;
|
||||
size = sizeof(boottime);
|
||||
if (sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 &&
|
||||
boottime.tv_sec != 0) {
|
||||
time(&now);
|
||||
buf->uptime = now - boottime.tv_sec;
|
||||
buf->boot_time = boottime.tv_sec;
|
||||
}
|
||||
|
||||
glibtop_get_cpu_s (server, &cpu);
|
||||
|
||||
/* Put something clever in buf->idletime: CP_IDLE. */
|
||||
buf->idletime = (double) cpu.idle / (double) cpu.frequency;
|
||||
buf->idletime /= (double) (server->ncpu + 1);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_uptime;
|
||||
}
|
||||
Reference in New Issue
Block a user