Compare commits

..

60 Commits

Author SHA1 Message Date
Frédéric Péters
f66324f84d Release: 2.28.4 2011-08-30 13:29:29 +02:00
Frédéric Péters
138889c4d6 build: roll tarballs as tar.xz 2011-08-30 13:28:56 +02:00
Jasper Lievisse Adriaanse
cac71bf6c4 Revert "Expand to support ifmedia(4) types as found on BSD."
This reverts commit 5144c3e127.

It wasn't meant to be pushed yet..
2011-07-29 11:02:23 +02:00
Jasper Lievisse Adriaanse
2ea3da9da5 Fix makeinfo(1) warning in reference.texi
doc/reference.texi:746: warning: @strong{Note...} produces a
spurious cross-reference in Info; reword to avoid that.

https://bugzilla.gnome.org/show_bug.cgi?id=653180
2011-07-28 14:19:37 +02:00
Jasper Lievisse Adriaanse
5144c3e127 Expand to support ifmedia(4) types as found on BSD.
https://bugzilla.gnome.org/show_bug.cgi?id=652713
2011-07-28 14:19:37 +02:00
Ihar Hrachyshka
c4907672cd Updated Belarusian translation. 2011-07-24 19:42:36 +03:00
Jasper Lievisse Adriaanse
4c9a161eb5 ansify function declaration, no binary change. 2011-07-11 15:05:06 +02:00
Jasper Lievisse Adriaanse
32833323d9 Some OpenBSD cleaning:
- decrease stack usage when retrieving memory stats
- use consistent warnings when failing sysctl(3) calls

https://bugzilla.gnome.org/show_bug.cgi?id=654344
2011-07-11 14:57:55 +02:00
Jasper Lievisse Adriaanse
0de702b142 - implement GLIBTOP_MEM_CACHED on OpenBSD by retrieving buffercache stats 2011-07-10 16:44:42 +02:00
Jasper Lievisse Adriaanse
4e24854dbf Two small tweaks to the OpenBSD backend:
- correct sysctl names in two warning messages
- rename a few variables for clarity
2011-07-09 10:19:18 +02:00
Joe Marcus Clarke
08fd95d253 Fix numerous bigs in the FreeBSD backend
* Correct calculation of CPU time.
* Fix a bug on newer versions of FreeBSD where computing the process map leads
to a tight error loop.
* Add support for the new procstat API to obtain the list of open files and
cwd.
* Use kvm_openfiles instead of kvm_open to better handle error messages.
* Split some modules out into non-suid modules.
* Properly determine the number of CPUs.

https://bugzilla.gnome.org/show_bug.cgi?id=605431
2011-06-27 16:32:20 +02:00
Jasper Lievisse Adriaanse
aa1a6766f2 Fix hardware address retrieval on OpenBSD.
https://bugzilla.gnome.org/show_bug.cgi?id=652997
2011-06-22 17:26:55 +02:00
Jasper Lievisse Adriaanse
537dc1bff1 Fix scope6 and prefix6 retrieval on OpenBSD.
https://bugzilla.gnome.org/show_bug.cgi?id=652997
2011-06-22 17:26:38 +02:00
Jasper Lievisse Adriaanse
93829c8cbb Fix filesystem read/write accounting on OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=652980
2011-06-22 17:24:37 +02:00
Jasper Lievisse Adriaanse
cecf53394b Use a more portable construct for doing substitutions.
https://bugzilla.gnome.org/show_bug.cgi?id=652981
2011-06-22 17:22:26 +02:00
Jasper Lievisse Adriaanse
62239cfe50 Explain why we undef STAT_STATVFS on OpenBSD 2011-06-16 13:14:22 +02:00
Jasper Lievisse Adriaanse
15ffb2d039 Revert vmmap-based procmap.c for OpenBSD.
vmmap was reverted in OpenBSD, so stick to the old algorithm for now.
2011-06-16 13:03:24 +02:00
Jasper Lievisse Adriaanse
7f14f4409d Various tweaks for OpenBSD uptime calculation
- implement uptime.boot_time
- put CP_IDLE instead of 0 in uptime->idletime
2011-06-16 13:02:11 +02:00
Jasper Lievisse Adriaanse
f8c573b78c Silence various warnings in the OpenBSD code 2011-06-16 13:00:47 +02:00
Jasper Lievisse Adriaanse
49641cc363 Make CPU load retrieval work.
It would sort of work on 64 bits arches, and not work at all no 32 bit arches.
Now works on both, and take CP_INTR correctly into account.
2011-06-16 12:57:43 +02:00
Jasper Lievisse Adriaanse
46706961ac Split off OpenBSD code into a separate implementation
Move OpenBSD code into its own sysdeps directory. The changes from
bsd/ were becoming to hard to maintain as a #ifdef tree. This is
what's currently being distributed as part of OpenBSD ports.
2011-06-16 12:27:00 +02:00
Kristjan SCHMIDT
edda30a4ad Updated Esperanto translation 2011-06-08 11:52:37 +02:00
Arash Mousavi
c775a536c8 Updated Persian translation 2011-04-24 17:49:20 +04:30
Jordi Serratosa
84a697a826 [l10n]Fixes on Catalan translation 2011-04-04 22:04:24 +02:00
Abduxukur Abdurixit
07c04634bc Added UG translation 2011-03-27 21:32:09 +02:00
Chris Kühl
78a4292fb4 Release: Post-release bump to 2.28.4 2011-03-25 16:09:16 +01:00
Chris Kühl
7bdc92f325 Release: 2.28.3 2011-03-25 16:04:20 +01:00
Chris Kühl
b40f210d03 Fix build issue for strict linkers.
Closes Bug #644599.
2011-03-14 16:35:09 +01:00
Maxim Ermilov
50bb0d51b3 Add Introspection support
https://bugzilla.gnome.org/show_bug.cgi?id=630915
2011-03-01 13:54:53 +01:00
Fran Diéguez
3d0dc2b36e QA of Galician translations 2011-01-27 03:18:46 +01:00
Gheyret T.Kenji
33f0825b3c Added UG translation 2010-12-23 19:26:01 +01:00
Yaakov Selkowitz
3cc7b3aecb Cygwin: Add private mountlist support.
https://bugzilla.gnome.org/show_bug.cgi?id=621820
2010-11-28 15:46:33 +01:00
Yaakov Selkowitz
f7e1ab5a0e Cygwin: Don't printf a string directly but use %s instead
Based on commit f41ab3beed for Linux.

https://bugzilla.gnome.org/show_bug.cgi?id=621820
2010-11-28 15:39:34 +01:00
Gheyret T.Kenji
f6edec8c76 Added UG translation 2010-11-20 12:02:41 +01:00
Gheyret T.Kenji
ccf85794e2 Added UG translation 2010-11-13 22:45:50 +01:00
Carles Ferrando
9bd7b581cd Updated Catalan (Valencian) translation 2010-10-29 21:31:26 +01:00
Sahran
825c28e04f Added UG translation 2010-10-16 20:32:37 +02:00
Alexander Kojevnikov
f787bfa0c7 freebsd: Fix get_mem() on 64-bit systems (bgo#630128) 2010-10-03 10:17:58 +11:00
Vincent Untz
93ceca1af2 release: post-release bump to 2.28.3 2010-09-28 11:39:49 +02:00
Vincent Untz
a1bc181e96 release: 2.28.2 2010-09-28 11:39:38 +02:00
Takayuki KUSANO
3db7ab8ddd Updated Japanese translation 2010-09-20 19:18:28 +09:00
Kristjan Schmidt
5b64ff7b6e Updated Esperanto translation 2010-06-27 15:25:37 +02:00
Thomas Thurman
f6347e796d Updated Shavian translation 2010-05-13 18:14:50 -04:00
Thomas Thurman
26adc05a52 Updated Shavian transliteration 2010-05-12 18:41:00 -04:00
Matej Urbančič
6a2464c4ad Updated Slovenian translation 2010-05-11 15:26:26 +02:00
Matej Urbančič
178420d1f7 Updated Slovenian translation 2010-05-11 15:25:42 +02:00
Peteris Krisjanis
81c1f668d1 Updated Latvian translation. 2010-04-26 12:20:57 +03:00
Andika Triwidada
2924b470ea Updated Indonesian translation 2010-04-18 14:58:57 +07:00
Vincent Untz
c36239c8ea [release] post-release bump to 2.28.2 2010-03-30 17:14:23 +02:00
Vincent Untz
8337a4af31 [release] 2.28.1 2010-03-30 17:13:55 +02:00
Petr Kovar
a2cdb07c27 Fix Czech translation by Lucas Lommer 2010-03-29 17:38:53 +02:00
Piotr Drąg
2fa17f308d Updated Polish translation 2010-02-25 12:52:10 +01:00
Fran Diéguez
b57703888f Updated Galician Translation 2010-02-15 17:53:12 +01:00
Jamil Ahmed
85a793f117 Updated Bengali translation 2010-01-22 12:29:13 +06:00
Xandru Armesto Fernandez
ed1d6cd9e7 Updated asturian translation 2010-01-07 19:40:02 +01:00
Xandru Armesto Fernandez
4a17d9fef5 Added asturian language 2010-01-07 19:39:48 +01:00
Thomas Thurman
f2d748162e Shavian translation 2009-11-12 10:51:56 +00:00
Åsmund Skjæveland
363a6f9088 Updated Norwegian Nynorsk translation 2009-10-17 18:30:06 +02:00
Matej Urbančič
e2686446bb Updated Slovenian translation 2009-10-08 14:25:24 +02:00
Takeshi AIHANA
1c01f08117 Updated Japanese translation 2009-10-04 18:00:34 +09:00
79 changed files with 5502 additions and 913 deletions

View File

@@ -1,3 +1,4 @@
ACLOCAL_AMFLAGS = -I m4
if EXAMPLES
EXAMPLES_DIR = examples
@@ -17,7 +18,8 @@ EXTRA_DIST = autogen.sh libgtop.spec.in copyright.txt \
intltool-extract.in \
intltool-merge.in \
libgtop.doap \
intltool-update.in
intltool-update.in \
m4/introspection.m4
DISTCLEANFILES = \
intltool-extract \
@@ -33,4 +35,4 @@ pkgconfig_DATA = libgtop-2.0.pc
libgtop-features.def: features.def
@LN_S@ $< $@
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-introspection

22
NEWS
View File

@@ -1,3 +1,25 @@
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.
* Add Introspection support
* Cygwin fixes.
* FreeBSD: Fix get_mem() on 64-bit systems.
* Updated translations.
28 September 2010: Overview of changes in 2.28.2
================================================
* Updated translations.
30 March 2010: Overview of changes in 2.28.1
============================================
* Updated translations.
21 September 2009: Overview of changes in 2.28.0
================================================
* Updated translations.

View File

@@ -4,7 +4,7 @@ dnl
m4_define([libgtop_major_version], [2])
m4_define([libgtop_minor_version], [28])
m4_define([libgtop_micro_version], [0])
m4_define([libgtop_micro_version], [4])
m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version])
dnl increment if the interface has additions, changes, removals.
@@ -25,7 +25,7 @@ m4_define([libgtop_server_version], [5])
# Version code calculation
m4_define([libgtop_version_code], [m4_eval(libgtop_major_version * 1000000 + libgtop_minor_version * 1000 + libgtop_micro_version)])
AC_PREREQ(2.59)
AC_PREREQ(2.62)
AC_INIT([libgtop], [libgtop_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=libgtop])
AC_CONFIG_SRCDIR(copyright.txt)
@@ -33,7 +33,10 @@ AC_CONFIG_HEADERS(config.h)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE([-Wno-portability tar-ustar no-dist-gzip dist-xz])
AC_CONFIG_MACRO_DIR([m4])
GOBJECT_INTROSPECTION_CHECK([0.6.7])
AC_SUBST(ACLOCAL_AMFLAGS, [\${ACLOCAL_FLAGS}])
AC_SUBST(LIBGTOP_MAJOR_VERSION, [libgtop_major_version])
@@ -382,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

View File

@@ -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.

View File

@@ -6,6 +6,8 @@ INCLUDES = @INCLUDES@
DEFS = @DEFS@
LDFLAGS = $(LIBGTOP_EXTRA_LIBS)
noinst_PROGRAMS = first second pprint procargs df netlist \
mountlist procmap netload sysdeps timings \
openfiles smp proclist mem wd affinity

View File

@@ -20,3 +20,36 @@ EXTRA_DIST = lib.pl libgtop.sym
CLEANFILES = lib.c
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --accept-unprefixed
INTROSPECTION_COMPILER_ARGS =
if HAVE_INTROSPECTION
introspection_sources = $(libgtop_2_0_la_SOURCES) lib.c ../glibtop.h \
../include/glibtop/close.h ../include/glibtop/loadavg.h ../include/glibtop/prockernel.h ../include/glibtop/procstate.h \
../include/glibtop/sem_limits.h ../include/glibtop/uptime.h ../include/glibtop/command.h ../include/glibtop/mem.h ../include/glibtop/proclist.h \
../include/glibtop/proctime.h ../include/glibtop/shm_limits.h ../include/glibtop/version.h ../include/glibtop/cpu.h ../include/glibtop/msg_limits.h \
../include/glibtop/procmem.h ../include/glibtop/procuid.h ../include/glibtop/swap.h \
../include/glibtop/procsegment.h ../include/glibtop/sysdeps.h ../include/glibtop/global.h \
../include/glibtop/procsignal.h ../include/glibtop/union.h ../include/glibtop/gnuserv.h \
../include/glibtop/parameter.h ../include/glibtop/mountlist.h ../include/glibtop/fsusage.h ../include/glibtop/procmap.h ../include/glibtop/signal.h \
../include/glibtop/sysinfo.h ../include/glibtop/ppp.h ../include/glibtop/procargs.h ../include/glibtop/netload.h \
../include/glibtop/procwd.h ../include/glibtop/procaffinity.h \
../include/glibtop/netlist.h ../include/glibtop/procopenfiles.h ../include/glibtop/open.h
GTop-2.0.gir: libgtop-2.0.la
GTop_2_0_gir_INCLUDES = GObject-2.0
GTop_2_0_gir_CFLAGS = $(INCLUDES)
GTop_2_0_gir_LIBS = libgtop-2.0.la
GTop_2_0_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += GTop-2.0.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif

View File

@@ -69,12 +69,18 @@ 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_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2555 $(bindir)/libgtop_server2'
;;
freebsd*|kfreebsd*)
libgtop_sysdeps_dir=freebsd
libgtop_use_machine_h=yes
@@ -108,6 +114,7 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
libgtop_use_machine_h=no
libgtop_need_server=no
libgtop_have_sysinfo=yes
libgtop_sysdeps_private_mountlist=yes
;;
*)
if test x$hacker_mode = xyes ; then

96
m4/introspection.m4 Normal file
View File

@@ -0,0 +1,96 @@
dnl -*- mode: autoconf -*-
dnl Copyright 2009 Johan Dahlin
dnl
dnl This file is free software; the author(s) gives unlimited
dnl permission to copy and/or distribute it, with or without
dnl modifications, as long as this notice is preserved.
dnl
# serial 1
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
[
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
dnl enable/disable introspection
m4_if([$2], [require],
[dnl
enable_introspection=yes
],[dnl
AC_ARG_ENABLE(introspection,
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
[Enable introspection for this build]),,
[enable_introspection=auto])
])dnl
AC_MSG_CHECKING([for gobject-introspection])
dnl presence/version checking
AS_CASE([$enable_introspection],
[no], [dnl
found_introspection="no (disabled, use --enable-introspection to enable)"
],dnl
[yes],[dnl
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
found_introspection=yes,
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
],dnl
[auto],[dnl
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
],dnl
[dnl
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
])dnl
AC_MSG_RESULT([$found_introspection])
INTROSPECTION_SCANNER=
INTROSPECTION_COMPILER=
INTROSPECTION_GENERATE=
INTROSPECTION_GIRDIR=
INTROSPECTION_TYPELIBDIR=
if test "x$found_introspection" = "xyes"; then
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
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=`echo ${INTROSPECTION_GIRDIR} | sed -e "s|${datadir}|\\\$(datadir)|"`
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
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
fi
AC_SUBST(INTROSPECTION_SCANNER)
AC_SUBST(INTROSPECTION_COMPILER)
AC_SUBST(INTROSPECTION_GENERATE)
AC_SUBST(INTROSPECTION_GIRDIR)
AC_SUBST(INTROSPECTION_TYPELIBDIR)
AC_SUBST(INTROSPECTION_CFLAGS)
AC_SUBST(INTROSPECTION_LIBS)
AC_SUBST(INTROSPECTION_MAKEFILE)
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
])
dnl Usage:
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
[
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
])
dnl Usage:
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
[
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
])

View File

@@ -3,6 +3,7 @@
am
ar
as
ast
az
be
bg
@@ -19,6 +20,7 @@ dz
el
en_CA
en_GB
en@shaw
eo
es
et
@@ -75,6 +77,7 @@ ta
te
th
tr
ug
uk
vi
xh

220
po/ast.po Normal file
View File

@@ -0,0 +1,220 @@
# Asturian translation for libgtop.
# Copyright (C) 2010 libgtop's COPYRIGHT HOLDER
# This file is distributed under the same license as the libgtop package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
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: 2009-11-12 10:53+0000\n"
"PO-Revision-Date: 2010-01-06 18:12+0100\n"
"Last-Translator: astur <malditoastur@gmail.com>\n"
"Language-Team: Asturian <alministradores@softastur.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-Poedit-Language: asturian\n"
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
msgstr[0] "lleíu %d byte"
msgstr[1] "lleíos %d bytes"
#: ../lib/read_data.c:51
msgid "read data size"
msgstr "lleíu tamañu de datos"
#: ../lib/read_data.c:70
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "lleíu %lu byte de datos"
msgstr[1] "lleíos %lu bytes de datos"
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "escritu %d byte"
msgstr[1] "escritos %d bytes"
#: ../src/daemon/gnuserv.c:455
msgid "Enable debugging"
msgstr "Activar depuración"
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "Activa salida detallada"
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "Nun se pudo abrir un procesu en segundu planu"
#: ../src/daemon/gnuserv.c:461
msgid "Invoked from inetd"
msgstr "Invocáu dende inetd"
#: ../src/daemon/gnuserv.c:495
#, c-format
msgid "Run '%s --help' to see a full list of available command line options.\n"
msgstr "Executa '%s --help' pa ver una llista ensembre de les opciones de llinia de comandos disponibles.\n"
#: ../sysdeps/osf1/siglist.c:27
#: ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
msgstr "Terminar"
#: ../sysdeps/osf1/siglist.c:28
#: ../sysdeps/sun4/siglist.c:28
msgid "Interrupt"
msgstr "Interrupción"
#: ../sysdeps/osf1/siglist.c:29
#: ../sysdeps/sun4/siglist.c:29
msgid "Quit"
msgstr "Colar"
#: ../sysdeps/osf1/siglist.c:30
#: ../sysdeps/sun4/siglist.c:30
msgid "Illegal instruction"
msgstr "Instrucción illegal"
#: ../sysdeps/osf1/siglist.c:31
#: ../sysdeps/sun4/siglist.c:31
msgid "Trace trap"
msgstr "Atrapar traza"
#: ../sysdeps/osf1/siglist.c:32
#: ../sysdeps/sun4/siglist.c:32
msgid "Abort"
msgstr "Encaboxar"
#: ../sysdeps/osf1/siglist.c:33
#: ../sysdeps/sun4/siglist.c:33
msgid "EMT error"
msgstr "Fallu EMT"
#: ../sysdeps/osf1/siglist.c:34
#: ../sysdeps/sun4/siglist.c:34
msgid "Floating-point exception"
msgstr "Esceición de coma flotante"
#: ../sysdeps/osf1/siglist.c:35
#: ../sysdeps/sun4/siglist.c:35
msgid "Kill"
msgstr "Matar"
#: ../sysdeps/osf1/siglist.c:36
#: ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "Fallu de bus"
#: ../sysdeps/osf1/siglist.c:37
#: ../sysdeps/sun4/siglist.c:37
msgid "Segmentation violation"
msgstr "Violación de segmentu"
#: ../sysdeps/osf1/siglist.c:38
#: ../sysdeps/sun4/siglist.c:38
msgid "Bad argument to system call"
msgstr "Argumentu malu na llamada al sistema"
#: ../sysdeps/osf1/siglist.c:39
#: ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "Tubería rota"
#: ../sysdeps/osf1/siglist.c:40
#: ../sysdeps/sun4/siglist.c:40
msgid "Alarm clock"
msgstr "Alarma de reló"
#: ../sysdeps/osf1/siglist.c:41
#: ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "Terminación"
#: ../sysdeps/osf1/siglist.c:42
#: ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"
msgstr "Condición urxente en socket"
#: ../sysdeps/osf1/siglist.c:43
#: ../sysdeps/sun4/siglist.c:43
msgid "Stop"
msgstr "Parar"
#: ../sysdeps/osf1/siglist.c:44
#: ../sysdeps/sun4/siglist.c:44
msgid "Keyboard stop"
msgstr "Parada de tecláu"
#: ../sysdeps/osf1/siglist.c:45
#: ../sysdeps/sun4/siglist.c:45
msgid "Continue"
msgstr "Siguir"
#: ../sysdeps/osf1/siglist.c:46
#: ../sysdeps/sun4/siglist.c:46
msgid "Child status has changed"
msgstr "Cambiu d'estáu de fíu"
#: ../sysdeps/osf1/siglist.c:47
#: ../sysdeps/sun4/siglist.c:47
msgid "Background read from tty"
msgstr "Llectura en segundu planu de tty"
#: ../sysdeps/osf1/siglist.c:48
#: ../sysdeps/sun4/siglist.c:48
msgid "Background write to tty"
msgstr "Escritura en segundu planu a tty"
#: ../sysdeps/osf1/siglist.c:49
#: ../sysdeps/sun4/siglist.c:49
msgid "I/O now possible"
msgstr "E/S agora puédese"
#: ../sysdeps/osf1/siglist.c:50
#: ../sysdeps/sun4/siglist.c:50
msgid "CPU limit exceeded"
msgstr "Perpaseste la llende del CPU"
#: ../sysdeps/osf1/siglist.c:51
#: ../sysdeps/sun4/siglist.c:51
msgid "File size limit exceeded"
msgstr "Tamañu llende de ficheru perpasáu"
#: ../sysdeps/osf1/siglist.c:52
#: ../sysdeps/sun4/siglist.c:52
msgid "Virtual alarm clock"
msgstr "Alarma de reló virtual"
#: ../sysdeps/osf1/siglist.c:53
#: ../sysdeps/sun4/siglist.c:53
msgid "Profiling alarm clock"
msgstr "Alarma de reló perfilada"
#: ../sysdeps/osf1/siglist.c:54
#: ../sysdeps/sun4/siglist.c:54
msgid "Window size change"
msgstr "Cambéu del tamañu de ventana"
#: ../sysdeps/osf1/siglist.c:55
#: ../sysdeps/sun4/siglist.c:55
msgid "Information request"
msgstr "Solicitú d'información"
#: ../sysdeps/osf1/siglist.c:56
#: ../sysdeps/sun4/siglist.c:56
msgid "User defined signal 1"
msgstr "Señal 1 definida pol usuariu"
#: ../sysdeps/osf1/siglist.c:57
#: ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "Señal 2 definida pol usuariu"

206
po/be.po
View File

@@ -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)"

146
po/bn.po
View File

@@ -4,21 +4,23 @@
# Vat <vatzcar@yahoo.co.in>, 2003.
# Mahay Alam Khan <makl10n@yahoo.com>, 2005.
# Samia Niamatullah <mailsamia2001@yahoo.com>, 2005.
# Israt Jahan <israt@ankur.org.bd>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-10-01 06:02+0200\n"
"PO-Revision-Date: 2005-10-01 01:05+0600\n"
"Last-Translator: Mahay Alam Khan <makl10n@yahoo.com>\n"
"Language-Team: Bengali <gnome-translation@bengalinux.org>\n"
"Project-Id-Version: bn\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=libgtop&component=general\n"
"POT-Creation-Date: 2009-04-17 10:17+0000\n"
"PO-Revision-Date: 2010-01-21 16:02+0600\n"
"Last-Translator: Israt Jahan <israt@ankur.org.bd>\n"
"Language-Team: Bengali <ankur-bd-l10n@googlegroups.com>\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=0;\n"
#: ../lib/read.c:65
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
@@ -29,11 +31,11 @@ msgstr[1] "%d বাইট পড়েছি"
# #########################################
# দয়া করে "গেছে" এর পরিবর্তে "গিয়েছে" লিখেন
# #########################################
#: ../lib/read_data.c:53
#: ../lib/read_data.c:51
msgid "read data size"
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"
@@ -42,7 +44,7 @@ msgstr[1] "%lu বাইট তথ্য পড়েছি"
# msgstr "%d বাইট তথ্য পড়া গেছে"
# msgstr "%d বাইট তথ্য পড়া হোক"
#: ../lib/write.c:52
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
@@ -50,195 +52,189 @@ msgstr[0] "%d বাইট লিখেছি"
msgstr[1] "%d বাইট লিখেছি"
# msgstr "%d বাইট লেখা হয়েছে"
#: ../src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:455
msgid "Enable debugging"
msgstr "ডিবাগিং চালু করুন"
# msgstr "ডিবাগ প্রক্রিয়া সক্রিয় করা হোক"
# ২ এটা কি বিবেচনা করা যায় না? অন্যান্য জায়গায় "ডিবাগ" লেখা হইছে, তাই এখানে অন্য রকম হয়ে যায়।
# আপনার আপত্তি থাকলে অবশ্য কোন কথা নাই।
#: ../src/daemon/gnuserv.c:460
msgid "DEBUG"
msgstr "ডিবাগ"
# msgstr "ডিবাগ"
#: ../src/daemon/gnuserv.c:462
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "বর্ণনাযুক্ত আউটপুট সক্রিয় করো"
# msgstr "ভার্বোস (Verbose) ফলাফল চালু করুন"
# 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
#, c-format
msgid ""
"Error on option %s: %s.\n"
"Run '%s --help' to see a full list of available command line options.\n"
msgstr ""
"অপশন %s এ ভুল হয়েছে: %s।\n"
"কমান্ড লাইন অপশনের সম্পূর্ণ তালিকা দেখার জন্য '%s --help' লিখুন।\n"
#: ../src/daemon/gnuserv.c:495
#| 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 --help' লিখুন।\n"
# msgstr "সিস্টেম বুট হবার পর থেকে নিষ্ক্রিয় কাজে অতিবাহিত সময় (সেকেন্ডে)"
#: ../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 "প্রস্থান"
# 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 "অবৈধ ইনস্ট্রাকশন"
# msgstr "অবৈধ ইনস্ট্রাকশন"
# Instruction এখানে Technical term।
#: ../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 "বাতিল করো"
# 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 "কিল"
# msgstr "শেষ করা (Kill)"
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "বাস সংক্রান্ত ভুল"
# msgstr "বাস (Bus) সংক্রান্ত সমস্যা"
#: ../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 "সিস্টেম call এ ভুল মান প্রেরিত হয়েছে"
# msgstr "সিস্টেম call এ ভুল মান প্রেরিত হয়েছে"
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "অচল পাইপ"
# 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 "Child এর অবস্থা পরিবর্তিত হয়েছে"
#: ../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 "এখন I/O সম্ভব"
#: ../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 "কাল্পনিক এলার্ম ঘড়ি"
# 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 "উইন্ডোর সাইজ পরিবর্তন"
# msgstr "উইন্ডো'র আয়তন পরিবর্তন"
# Window এর বাংলা করার দরকার নাই
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
msgid "Information request"
msgstr "তথ্যের আবেদন"
# 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 "ব্যবহারকারী নির্ধারিত সিগনাল ২"
# msgstr "ডিবাগ প্রক্রিয়া সক্রিয় করা হোক"
# ২ এটা কি বিবেচনা করা যায় না? অন্যান্য জায়গায় "ডিবাগ" লেখা হইছে, তাই এখানে অন্য রকম হয়ে যায়।
# আপনার আপত্তি থাকলে অবশ্য কোন কথা নাই।
#~ msgid "DEBUG"
#~ msgstr "ডিবাগ"
# msgstr "ভার্বোস (Verbose) ফলাফল চালু করুন"
# msgstr "বর্ণনাযুক্ত ফলাফল দেখানো হোক"
#~ msgid "VERBOSE"
#~ msgstr "বর্ণনাযুক্ত"
#~ msgid "NO-DAEMON"
#~ msgstr "NO-DAEMON"
#~ msgid "INETD"
#~ msgstr "INETD"
#~ msgid "Ticks (%ld per second):"
#~ msgstr "টিক (প্রতি সেকেন্ডে %ld সংখ্যক):"

View File

@@ -8,7 +8,7 @@ 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"
"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"
@@ -61,7 +61,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'ordres.\n"
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
@@ -86,7 +86,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"

View File

@@ -1,23 +1,21 @@
# translation of libgtop.gnome-2-26.po to catalan
# Catalan translation of libgtop.
# Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
#
# 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.
# Carles Ferrando Garcia <carles.ferrando@gmail.com>, 2009.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop.gnome-2-26\n"
"Project-Id-Version: libgtop 2.9.91\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-09-02 18:32+0200\n"
"PO-Revision-Date: 2009-08-29 10:37+0200\n"
"Last-Translator: Carles Ferrando Garcia <carles.ferrando@gmail.com>\n"
"Language-Team: catalan <tradgnome@softcatala.org>\n"
"POT-Creation-Date: 2010-10-29 21:31+0100\n"
"PO-Revision-Date: 2005-09-04 01:16+0200\n"
"Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
"Language: ca\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"
#: ../lib/read.c:51
#, c-format
@@ -50,11 +48,11 @@ msgstr "Activa la depuració"
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "Activa l'eixida detallada"
msgstr "Activa la eixida detallada"
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "No bifurques al segon pla"
msgstr "No bifurquis al segon pla"
#: ../src/daemon/gnuserv.c:461
msgid "Invoked from inetd"
@@ -190,3 +188,15 @@ msgstr "Senyal 1 definit per l'usuari"
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "Senyal 2 definit per l'usuari"
#~ msgid "DEBUG"
#~ msgstr "DEPURACIÓ"
#~ msgid "VERBOSE"
#~ msgstr "DETALLA"
#~ msgid "NO-DAEMON"
#~ msgstr "SENSE DIMONI"
#~ msgid "INETD"
#~ msgstr "INETD"

View File

@@ -2,15 +2,15 @@
# This file is distributed under the same license as the libgtop package.
# Copyright (C) 2004 Miloslav Trmac <mitr@volny.cz>.
# Miloslav Trmac <mitr@volny.cz>, 2002, 2003, 2004.
# Lucas Lommer <llommer@svn.gnome.org>, 2008.
# Lucas Lommer <llommer@svn.gnome.org>, 2008, 2010.
# Petr Kovar <pknbe@volny.cz>, 2008.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-02-11 19:20+0100\n"
"PO-Revision-Date: 2008-02-11 19:17+0100\n"
"POT-Creation-Date: 2010-03-29 17:38+0200\n"
"PO-Revision-Date: 2010-03-28 17:19+0100\n"
"Last-Translator: Petr Kovar <pknbe@volny.cz>\n"
"Language-Team: Czech <gnome-cs-list@gnome.org>\n"
"MIME-Version: 1.0\n"
@@ -46,27 +46,27 @@ msgstr[0] "zapsán %d bajt"
msgstr[1] "zapsány %d bajty"
msgstr[2] "zapsáno %d bajtů"
#: ../src/daemon/gnuserv.c:458
#: ../src/daemon/gnuserv.c:455
msgid "Enable debugging"
msgstr "Povolit ladění"
#: ../src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "Povolit podrobný výstup"
#: ../src/daemon/gnuserv.c:462
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "Nevětvit do pozadí"
#: ../src/daemon/gnuserv.c:464
#: ../src/daemon/gnuserv.c:461
msgid "Invoked from inetd"
msgstr "Spuštěno z 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 ""
"Spusťte prosím \"%s --help\", chcete-li zobrazit všechny dostupné přepínače "
"Spusťte prosím %s --help, chcete-li zobrazit všechny dostupné přepínače "
"příkazové řádky.\n"
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27

187
po/en@shaw.po Normal file
View File

@@ -0,0 +1,187 @@
# Shavian translation for libgtop.
# Copyright (C) 2010 The Gnome Foundation.
# Thomas Thurman <tthurman@gnome.org>, 2009.
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-11 13:26+0000\n"
"PO-Revision-Date: 2010-05-12 18:37 -0400\n"
"Last-Translator: Thomas Thurman <tthurman@gnome.org>\n"
"Language-Team: Shavian <ubuntu-l10n-en-shaw@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"
#, c-format
#: ../lib/read.c:51
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 "𐑮𐑧𐑛 𐑛𐑱𐑑𐑩 𐑕𐑲𐑟"
#, c-format
#: ../lib/read_data.c:70
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "𐑮𐑧𐑛 %lu 𐑚𐑲𐑑 𐑝 𐑛𐑱𐑑𐑩"
msgstr[1] "𐑮𐑧𐑛 %lu 𐑚𐑲𐑑𐑕 𐑝 𐑛𐑱𐑑𐑩"
#, c-format
#: ../lib/write.c:51
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"
#, c-format
#: ../src/daemon/gnuserv.c:495
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"

181
po/eo.po
View File

@@ -1,208 +1,193 @@
# Esperanto translation of libgtop
# Copyright (C) 2006 THE libgtop'S COPYRIGHT HOLDER
# 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, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-06-08 00:34+0530\n"
"PO-Revision-Date: 2006-06-06 21:30+1200\n"
"Last-Translator: Dominique PELLE <dominique.pelle@free.fr>\n"
"Language-Team: Esperanto <eo-tradukado@lists.tuxfamily.org>\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=libgtop&component=general\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"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Launchpad-Export-Date: 2011-06-08 09:44+0000\n"
"X-Generator: Launchpad (build 13144)\n"
#: ../lib/read.c:65
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
msgstr[0] "legis %d bajton"
msgstr[1] "legis %d bajtojn"
#: ../lib/read_data.c:53
#: ../lib/read_data.c:51
msgid "read data size"
msgstr "grandeco de legita datumo"
msgstr "grando de legita datumo"
#: ../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] "legis %lu bajton da datumo"
msgstr[1] "legis %lu bajtojn da datumo"
#: ../lib/write.c:53
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "skribis %d bajton"
msgstr[1] "skribis %d bajtojn"
#: ../src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:455
msgid "Enable debugging"
msgstr "Ebligu sencimigon"
msgstr "Enŝalti sencimigon"
#: ../src/daemon/gnuserv.c:460
msgid "DEBUG"
msgstr "SENCIMIGO"
#: ../src/daemon/gnuserv.c:462
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "Ebligu babileman eligon"
msgstr "Enŝalti babileman eligon"
#: ../src/daemon/gnuserv.c:462
msgid "VERBOSE"
msgstr "BABILEMA"
#: ../src/daemon/gnuserv.c:464
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "Ne forku fone"
msgstr "Ne forki fonen"
#: ../src/daemon/gnuserv.c:464
msgid "NO-DAEMON"
msgstr "NE-DEMONO"
#: ../src/daemon/gnuserv.c:466
#: ../src/daemon/gnuserv.c:461
msgid "Invoked from inetd"
msgstr "Alvokita de inetd"
msgstr "Alvokita de \"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 ""
"Eraro en opcio %s: %s.\n"
"Lanĉu '%s --help' por vidi plenan liston de uzeblaj opcioj de komanda "
"linio.\n"
"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 "Malkonekti"
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
msgid "Interrupt"
msgstr "Interrompi"
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
msgid "Hangup"
msgstr "Malkontaktu"
msgid "Quit"
msgstr "Ĉesi"
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
msgid "Interrupt"
msgstr "Interrompu"
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
msgid "Quit"
msgstr "Adiaŭu"
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
msgid "Illegal instruction"
msgstr "Nevalida komando"
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
msgid "Trace trap"
msgstr "Spura escepto"
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
msgid "Abort"
msgstr "Ĉesigu"
msgstr "Ĉesigi"
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
msgid "EMT error"
msgstr "EMT eraro"
msgstr "EMT-eraro"
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
msgid "Floating-point exception"
msgstr "Glitpunkta escepto"
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
msgid "Kill"
msgstr "Mortigu"
msgstr "Mortigi"
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "Busa eraro"
msgstr "Bus-eraro"
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
msgid "Segmentation violation"
msgstr "Aliro al nerezervita memoro"
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
#: ../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:41 ../sysdeps/sun4/siglist.c:41
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "Rompita dukto"
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
msgid "Alarm clock"
msgstr "Vekhorloĝo"
msgstr "Alarm-takto"
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "Ĉesigo"
msgstr "Finiĝo"
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"
msgstr "Urĝa kondiĉo ĉe kontaktoskatolo"
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
#: ../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 halto"
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
msgid "Continue"
msgstr "Daŭrigi"
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
msgid "Keyboard stop"
msgstr "Klavara ĉesigo"
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
msgid "Continue"
msgstr "Daŭrigu"
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
msgid "Child status has changed"
msgstr "Stato de ido ŝanĝiĝis"
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
#: ../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:50 ../sysdeps/sun4/siglist.c:50
#: ../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:51 ../sysdeps/sun4/siglist.c:51
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
msgid "I/O now possible"
msgstr "Eneligo nun eblas"
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
msgid "CPU limit exceeded"
msgstr "Limo de procesilo superitas"
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
#: ../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:54 ../sysdeps/sun4/siglist.c:54
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
msgid "Virtual alarm clock"
msgstr "Virtuala alarm-takto"
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
msgid "Profiling alarm clock"
msgstr "Profila alarm-takto"
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
#: ../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:57 ../sysdeps/sun4/siglist.c:57
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
msgid "Information request"
msgstr "Informpeto"
#: ../sysdeps/osf1/siglist.c:58 ../sysdeps/sun4/siglist.c:58
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
msgid "User defined signal 1"
msgstr "Uzant-difinita signalo 1"
#: ../sysdeps/osf1/siglist.c:59 ../sysdeps/sun4/siglist.c:59
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "Uzant-difinita signalo 2"

173
po/fa.po
View File

@@ -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"

View File

@@ -14,18 +14,19 @@
# Ignacio Casal Quinteiro <nacho.resa@gmail.com>, 2005.
# Ignacio Casal Quinteiro <icq@svn.gnome.org>, 2007.
# Mancomún - Centro de Referencia e Servizos de Software Libre <g11n@mancomun.org>, 2009.
# Fran Diéguez <frandieguez@ubuntu.com>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: gl\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-03-16 23:15+0100\n"
"PO-Revision-Date: 2009-03-10 20:17+0000\n"
"Last-Translator: Suso Baleato <suso.baleato@xunta.es>\n"
"Language-Team: Galego <proxecto@trasno.net>\n"
"POT-Creation-Date: 2011-01-27 03:18+0100\n"
"PO-Revision-Date: 2010-01-10 03:46+0100\n"
"Last-Translator: Fran Diéguez <frandieguez@ubuntu.com>\n"
"Language-Team: Galician <proxecto@trasno.net>\n"
"Language: gl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../lib/read.c:51
@@ -63,7 +64,7 @@ msgstr "Activar a saída detallada"
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "Non facer fork na tarefa de fondo"
msgstr "Non facer fork nunha tarefa de fondo"
#: ../src/daemon/gnuserv.c:461
msgid "Invoked from inetd"
@@ -73,8 +74,8 @@ msgstr "Invocado desde inetd"
#, c-format
msgid "Run '%s --help' to see a full list of available command line options.\n"
msgstr ""
"Execute '%s --help' para ver a lista completa das opcións de liña de "
"comandos dispoñíbeis.\n"
"Execute '%s --help' para ver a lista completa das opcións de liña de ordes "
"dispoñíbeis.\n"
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
@@ -138,7 +139,7 @@ msgstr "Finalización"
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"
msgstr "Condición urxente no conectador"
msgstr "Condición urxente no socket"
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
msgid "Stop"

177
po/id.po
View File

@@ -1,207 +1,218 @@
# SOME DESCRIPTIVE TITLE.
# Translation of libtop into Indonesian
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# This file is distributed under the same license as the libgtop package.
# Mohammad DAMT <mdamt@bisnisweb.com>, 2003.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop libgtop-GNOME-2-0-port\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-09-25 18:15+0200\n"
"PO-Revision-Date: 2003-02-10 18:01+0700\n"
"Last-Translator: Mohammad DAMT <mdamt@bisnisweb.com>\n"
"Language-Team: Indonesia <id@li.org>\n"
"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-03-30 15:14+0000\n"
"PO-Revision-Date: 2010-04-18 14:46+0700\n"
"Last-Translator: Andika Triwidada <andika@gmail.com>\n"
"Language-Team: GNOME Indonesian Translation Team <gnome@i15n.org>\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: Indonesian\n"
"X-Poedit-Country: Indonesia\n"
#: lib/read.c:65
#, fuzzy, c-format
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
msgstr[0] "baca %d byte"
msgstr[1] "baca %d byte"
#: lib/read_data.c:53
#: ../lib/read_data.c:51
msgid "read data size"
msgstr "ukuran data saat membaca"
#: 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] "baca %d byte"
msgstr[1] "baca %d byte"
msgstr[0] "baca data %lu byte"
#: lib/write.c:52
#, fuzzy, c-format
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "tulis %d byte"
msgstr[1] "tulis %d byte"
#: src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:455
msgid "Enable debugging"
msgstr "Aktifkan debuging"
#: src/daemon/gnuserv.c:460
msgid "DEBUG"
msgstr "DEBUG"
#: src/daemon/gnuserv.c:462
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "Aktifkan output yang lengkap"
#: src/daemon/gnuserv.c:462
msgid "VERBOSE"
msgstr "VERBOSE"
#: src/daemon/gnuserv.c:464
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "Jangan fork ke background"
#: 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 "Diaktifkan dari 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 ""
"Error pada pilihan %s: %s.\n"
"Jalankan '%s --help' untuk melihat daftar penuh pilihan perintah yang "
"tersedia\n"
msgid "Run '%s --help' to see a full list of available command line options.\n"
msgstr "Jalankan '%s --help' untuk melihat daftar penuh pilihan perintah yang tersedia.\n"
#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
#: ../sysdeps/osf1/siglist.c:27
#: ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
msgstr "Hangup"
#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
#: ../sysdeps/osf1/siglist.c:28
#: ../sysdeps/sun4/siglist.c:28
msgid "Interrupt"
msgstr "Interupsi"
#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
#: ../sysdeps/osf1/siglist.c:29
#: ../sysdeps/sun4/siglist.c:29
msgid "Quit"
msgstr "Keluar"
#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
#: ../sysdeps/osf1/siglist.c:30
#: ../sysdeps/sun4/siglist.c:30
msgid "Illegal instruction"
msgstr "Instruksi ilegal"
#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
#: ../sysdeps/osf1/siglist.c:31
#: ../sysdeps/sun4/siglist.c:31
msgid "Trace trap"
msgstr "Jebakan trace"
#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
#: ../sysdeps/osf1/siglist.c:32
#: ../sysdeps/sun4/siglist.c:32
msgid "Abort"
msgstr "Batal"
#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
#: ../sysdeps/osf1/siglist.c:33
#: ../sysdeps/sun4/siglist.c:33
msgid "EMT error"
msgstr "Error 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 "Eksepsi Floating-point"
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
#: ../sysdeps/osf1/siglist.c:35
#: ../sysdeps/sun4/siglist.c:35
msgid "Kill"
msgstr "Matikan"
#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
#: ../sysdeps/osf1/siglist.c:36
#: ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "Error bus"
#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
#: ../sysdeps/osf1/siglist.c:37
#: ../sysdeps/sun4/siglist.c:37
msgid "Segmentation violation"
msgstr "Pelanggaran segmentasi"
#: 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 "Parameter ke sistem call salah"
#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
#: ../sysdeps/osf1/siglist.c:39
#: ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "Pipa rusak"
#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
#: ../sysdeps/osf1/siglist.c:40
#: ../sysdeps/sun4/siglist.c:40
msgid "Alarm clock"
msgstr "Jam alarm"
#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
#: ../sysdeps/osf1/siglist.c:41
#: ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "Penghentian"
#: 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 "Kondisi gawat pada soket"
#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
#: ../sysdeps/osf1/siglist.c:43
#: ../sysdeps/sun4/siglist.c:43
msgid "Stop"
msgstr "Stop"
msgstr "Berhenti"
#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
#: ../sysdeps/osf1/siglist.c:44
#: ../sysdeps/sun4/siglist.c:44
msgid "Keyboard stop"
msgstr "Stop keyboard"
msgstr "Hentikan papan tik"
#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
#: ../sysdeps/osf1/siglist.c:45
#: ../sysdeps/sun4/siglist.c:45
msgid "Continue"
msgstr "Lanjutkan"
#: 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 "Status anak telah berubah"
#: 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 "Baca diam-diam dari 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 "Tulis diam-diam ke 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 "I/O dimungkinkan"
#: 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 "Batasan CPU terlampaui"
msgstr "Batas CPU terlampaui"
#: 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 "Batasan ukuran file terlampaui"
msgstr "Batas ukuran file terlampaui"
#: 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 "Jam alarm virtual"
#: 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 "Melakukan profil jam alarm"
#: 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 "Ukuran window berubah"
#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
#: ../sysdeps/osf1/siglist.c:55
#: ../sysdeps/sun4/siglist.c:55
msgid "Information request"
msgstr "Permintaan informasi"
#: 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 "Sinyal 1 milik user"
#: 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 "Sinyal 2 milik user"

View File

@@ -1,30 +1,30 @@
# libgtop ja.po.
# Copyright (C) 1998,2000,2002-2007 Free Software Foundation, Inc.
# Copyright (C) 1998,2000,2002-2007,2009-2010 Free Software Foundation, Inc.
# Eiichiro ITANI <emu@ceres.dti.ne.jp>, 1998
# Takayuki KUSANO <AE5T-KSN@asahi-net.or.jp>, 2000, 2002.
# Takayuki KUSANO <AE5T-KSN@asahi-net.or.jp>, 2000, 2002, 2010.
# Yukihiro Nakai <nakai@gnome.gr.jp>, 2000.
# KAMAGASAKO Masatoshi <emerald@gnome.gr.jp>, 2003.
# Takeshi AIHANA <takeshi.aihana@gmail.com>, 2004-2007.
# Takeshi AIHANA <takeshi.aihana@gmail.com>, 2004-2007,2009.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop trunk\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-07-08 01:03+0900\n"
"PO-Revision-Date: 2007-07-08 01:03+0900\n"
"Last-Translator: Takeshi AIHANA <takeshi.aihana@gmail.com>\n"
"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"
"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\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=1; plural=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バイト読み込み"
#: ../lib/read_data.c:51
msgid "read data size"
@@ -34,38 +34,36 @@ msgstr "データの読み込みサイズ"
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] " %luバイトデータの読み込み"
msgstr[1] " %luバイトデータの読み込み"
msgstr[0] "%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バイトの書き込み"
#: ../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"
"してください\n"
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
@@ -157,7 +155,7 @@ 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"
@@ -185,8 +183,8 @@ msgstr "情報リクエスト"
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
msgid "User defined signal 1"
msgstr "ユーザ定義シグナル"
msgstr "ユーザ定義シグナル1"
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "ユーザ定義シグナル"
msgstr "ユーザ定義シグナル2"

View File

@@ -4,19 +4,22 @@
#
# Peteris Krisjanis <peteris.krisjanis@os.lv>, 2002.
# Raivis Dejus <orvils@gmail.com>, 2006, 2009.
# Peteris Krisjanis <pecisk@gmail.com>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: lv\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-11-07 14:35+0100\n"
"PO-Revision-Date: 2009-01-25 17:52+0200\n"
"Last-Translator: Raivis Dejus <orvils@gmail.com>\n"
"Language-Team: Latvian <locale@laka.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"
"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: KBabel 1.11.4\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
"2);\n"
"X-Generator: Lokalize 1.0\n"
#: ../lib/read.c:51
#, c-format
@@ -42,27 +45,27 @@ msgstr[2] "lasīt %lu baitu datus"
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "ierakstīju %d baitu"
msgstr[1] "ierakstīju %d baitus"
msgstr[2] "ierakstīju %d baitu"
msgstr[0] "ierakstīts %d baits"
msgstr[1] "ierakstīti %d baiti"
msgstr[2] "ierakstīti %d baitu"
#: ../src/daemon/gnuserv.c:458
#: ../src/daemon/gnuserv.c:455
msgid "Enable debugging"
msgstr "Aktivizēt atkļūdošanu"
#: ../src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "Aktivizēt vārdisku izvadi"
#: ../src/daemon/gnuserv.c:462
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "Nesadalīties fona"
#: ../src/daemon/gnuserv.c:464
#: ../src/daemon/gnuserv.c:461
msgid "Invoked from inetd"
msgstr "Izsaukts no 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 ""
@@ -127,7 +130,7 @@ msgstr "Modinātājs"
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "Pātraukšana"
msgstr "Pārtraukšana"
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"

View File

@@ -1,22 +1,24 @@
# translation of nn.po to Norwegian Nynorsk
# Norwegian (nynorsk) translation of libgtop.
# Copyright (C) 2001 Roy-Magne Mo
#
# Kjartan Maraas <kmaraas@gnome.org>, 2001.
# Roy-Magne Mo <rmo@sunnmore.net>, 2001.
# Åsmund Skjæveland <aasmunds@fys.uio.no>, 2004.
#
# Åsmund Skjæveland <aasmunds@ulrik.uio.no>, 2009.
msgid ""
msgstr ""
"Project-Id-Version: nn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-04-04 13:45+0200\n"
"PO-Revision-Date: 2008-04-04 13:45+0200\n"
"Last-Translator: Eskild Hustvedt <eskildh@gnome.org>\n"
"Language-Team: Norwegian Nynorsk <i18n-no@lister.ping.uio.no>\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
"cgi?product=libgtop&component=general\n"
"POT-Creation-Date: 2009-05-25 20:29+0000\n"
"PO-Revision-Date: 2009-10-17 18:26+0200\n"
"Last-Translator: Åsmund Skjæveland <aasmunds@ulrik.uio.no>\n"
"Language-Team: Norsk (nynorsk) <i18n-nn@lister.ping.uio.no>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: VIM\n"
"X-Generator: Lokalize 1.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../lib/read.c:51
@@ -34,33 +36,33 @@ msgstr "lesestorleik på data"
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "las %d byte data"
msgstr[1] "las %d byte data"
msgstr[0] "las %lu byte data"
msgstr[1] "las %lu byte data"
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "skriv %d byte"
msgstr[1] "skriv %d byte"
msgstr[0] "skreiv %d byte"
msgstr[1] "skreiv %d byte"
#: ../src/daemon/gnuserv.c:458
#: ../src/daemon/gnuserv.c:455
msgid "Enable debugging"
msgstr "Skru på feilsøking"
#: ../src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "Skru på ordrike utdata"
#: ../src/daemon/gnuserv.c:462
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "Ikkje fork av inn i bakgrunnen"
msgstr "Ikkje fork av i bakgrunnen"
#: ../src/daemon/gnuserv.c:464
#: ../src/daemon/gnuserv.c:461
msgid "Invoked from inetd"
msgstr "Starta frå 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 ""
@@ -80,7 +82,7 @@ msgstr "Avslutt"
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
msgid "Illegal instruction"
msgstr "Ulovleg instruksjon."
msgstr "Ulovleg instruksjon"
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
msgid "Trace trap"
@@ -96,7 +98,7 @@ msgstr "EMT-feil"
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
msgid "Floating-point exception"
msgstr "Flyttaluttrykk"
msgstr "Flyttalunntak"
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
msgid "Kill"
@@ -124,7 +126,7 @@ msgstr "Alarmklokke"
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "Avlustting"
msgstr "Avslutting"
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"
@@ -140,11 +142,11 @@ msgstr "Tastaturstopp"
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
msgid "Continue"
msgstr "Fortset"
msgstr "Hald fram"
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
msgid "Child status has changed"
msgstr "Status på born er endra"
msgstr "Status på barn er endra"
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
msgid "Background read from tty"
@@ -168,7 +170,7 @@ msgstr "Filstorleikgrense passert"
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
msgid "Virtual alarm clock"
msgstr "Virtuel alarmklokke"
msgstr "Virtuell alarmklokke"
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
msgid "Profiling alarm clock"
@@ -176,7 +178,7 @@ msgstr "Profilerer alarmklokke"
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
msgid "Window size change"
msgstr "Endring i vindaugsstorleik"
msgstr "Endring i vindaugestorleik"
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
msgid "Information request"

View File

@@ -1,17 +1,24 @@
# Copyright (C) 2001-2005 Free Software Foundation, Inc.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Aviary.pl
# Jeśli masz jakiekolwiek uwagi odnoszące się do tłumaczenia lub chcesz
# pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas:
# gnomepl@aviary.pl
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
msgid ""
msgstr ""
"Project-Id-Version: libgtop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-17 21:16+0200\n"
"PO-Revision-Date: 2002-07-05 19:13+0200\n"
"Last-Translator: GNOME PL Team <translators@gnomepl.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\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"
"Language-Team: Polish <gnomepl@aviary.pl>\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==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
"X-Poedit-Language: Polish\n"
"X-Poedit-Country: Poland\n"
#: ../lib/read.c:51
#, c-format
@@ -41,26 +48,27 @@ msgstr[0] "zapisano jeden bajt"
msgstr[1] "zapisano %d bajty"
msgstr[2] "zapisano %d bajtów"
#: ../src/daemon/gnuserv.c:458
#: ../src/daemon/gnuserv.c:455
msgid "Enable debugging"
msgstr "Uaktywnia śledzenie"
msgstr "Włącza debugowanie"
#: ../src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:457
msgid "Enable verbose output"
msgstr "Uaktywnia informowanie o przebiegu"
msgstr "Wyświetla więcej informacji"
#: ../src/daemon/gnuserv.c:462
#: ../src/daemon/gnuserv.c:459
msgid "Don't fork into background"
msgstr "Uruchamia program bez przechodzenia w tło"
#: ../src/daemon/gnuserv.c:464
#: ../src/daemon/gnuserv.c:461
msgid "Invoked from inetd"
msgstr "Wywołanie przez 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 "Uruchom \"%s --help\" aby wyświetlić pełną listę dostępnych opcji.\n"
msgstr ""
"Proszę wykonać \"%s --help\", aby wyświetlić pełną listę dostępnych opcji.\n"
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
@@ -68,7 +76,7 @@ msgstr "Zawieszenie"
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
msgid "Interrupt"
msgstr "Przerwanie (Interrupt)"
msgstr "Przerwanie"
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
msgid "Quit"
@@ -84,7 +92,7 @@ msgstr "Trace trap"
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
msgid "Abort"
msgstr "Przerwanie (Abort)"
msgstr "Przerwanie"
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
msgid "EMT error"
@@ -96,23 +104,23 @@ msgstr "Wyjątek związany z liczbą zmiennoprzecinkową"
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
msgid "Kill"
msgstr "Usunięcie (Kill)"
msgstr "Wymuszenie zakończenia"
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "Błąd szyny"
msgstr "Błąd magistrali"
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
msgid "Segmentation violation"
msgstr "Naruszenie segmentacji"
msgstr "Naruszenie ochrony pamięci"
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
msgid "Bad argument to system call"
msgstr "Niepoprawny parametr wywołania systemowego"
msgstr "Błędny parametr dla wywołania systemowego"
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "Przerwany potok"
msgstr "Uszkodzony potok"
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
msgid "Alarm clock"
@@ -128,7 +136,7 @@ msgstr "Pilny warunek związany z gniazdem"
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
msgid "Stop"
msgstr "Zatrzymanie (Stop)"
msgstr "Zatrzymanie"
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
msgid "Keyboard stop"
@@ -140,27 +148,27 @@ msgstr "Kontynuacja"
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
msgid "Child status has changed"
msgstr "Zmiana statusu proc. potomnego"
msgstr "Zmiana stanu procesu potomnego"
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
msgid "Background read from tty"
msgstr "Odczyt w tle z urządzenia tty"
msgstr "Odczyt w tle z urządzenia TTY"
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
msgid "Background write to tty"
msgstr "Zapis w tle do urządzenia tty"
msgstr "Zapis w tle do urządzenia TTY"
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
msgid "I/O now possible"
msgstr "Wejście/wyjście teraz dostępne"
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 limitu CPU"
msgstr "Przekroczenie ograniczenia procesora"
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
msgid "File size limit exceeded"
msgstr "Przekroczenie limitu rozm. plików"
msgstr "Przekroczono ograniczenie rozmiaru plików"
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
msgid "Virtual alarm clock"
@@ -180,20 +188,8 @@ msgstr "Żądanie informacji"
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
msgid "User defined signal 1"
msgstr "1. sygnał zdefiniowany przez użytkownika"
msgstr "1. sygnał określony przez użytkownika"
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "2. sygnał zdefiniowany przez użytkownika"
#~ msgid "DEBUG"
#~ msgstr "ŚLEDZENIE"
#~ msgid "VERBOSE"
#~ msgstr "PRZEBIEG"
#~ msgid "NO-DAEMON"
#~ msgstr "NIE-DEMON"
#~ msgid "INETD"
#~ msgstr "INETD"
msgstr "2. sygnał określony przez użytkownika"

465
po/sl.po
View File

@@ -1,234 +1,231 @@
# Andraz Tori <andraz.tori1@guest.arnes.si>, 2000.
# Matic Žgur <mr.zgur@gmail.com>, 2006.
# Matej Urbančič <matej.urban@gmail.com>, 2007.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-05-14 03:41+0100\n"
"PO-Revision-Date: 2007-10-18 16:10+0100\n"
"Last-Translator: Matej Urbančič <matej.urban@gmail.com>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
"X-Poedit-Language: Slovenian\n"
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
msgstr[0] "prebranih %d bajtov"
msgstr[1] "prebran %d bajt"
msgstr[2] "prebrana %d bajta"
msgstr[3] "prebrani %d bajti"
#: ../lib/read_data.c:51
msgid "read data size"
msgstr "prebrana velikost podatkov"
#: ../lib/read_data.c:70
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "prebranih %lu bajtov podatkov"
msgstr[1] "prebran %lu bajt podatkov"
msgstr[2] "prebrana %lu bajta podatkov"
msgstr[3] "prebrani %lu bajti podatkov"
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "zapisanih %d bajtov"
msgstr[1] "zapisan %d bajt"
msgstr[2] "zapisana %d bajta"
msgstr[3] "zapisani %d bajti"
#: ../src/daemon/gnuserv.c:458
msgid "Enable debugging"
msgstr "Vključi razhroščevanje"
#: ../src/daemon/gnuserv.c:460
msgid "Enable verbose output"
msgstr "Vključi podroben izpis"
#: ../src/daemon/gnuserv.c:462
msgid "Don't fork into background"
msgstr "Ne razveji se v ozadje"
#: ../src/daemon/gnuserv.c:464
msgid "Invoked from inetd"
msgstr "Poklican iz programa inetd"
#: ../src/daemon/gnuserv.c:498
#, c-format
msgid "Run '%s --help' to see a full list of available command line options.\n"
msgstr "Z zastavico '%s --help' se izpiše popoln seznam možnosti ukaza.\n"
#: ../sysdeps/osf1/siglist.c:27
#: ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
msgstr "Odloži"
#: ../sysdeps/osf1/siglist.c:28
#: ../sysdeps/sun4/siglist.c:28
msgid "Interrupt"
msgstr "Prekinitev"
#: ../sysdeps/osf1/siglist.c:29
#: ../sysdeps/sun4/siglist.c:29
msgid "Quit"
msgstr "Izhod"
#: ../sysdeps/osf1/siglist.c:30
#: ../sysdeps/sun4/siglist.c:30
msgid "Illegal instruction"
msgstr "Neveljaven ukaz"
#: ../sysdeps/osf1/siglist.c:31
#: ../sysdeps/sun4/siglist.c:31
msgid "Trace trap"
msgstr "Past sledenja"
#: ../sysdeps/osf1/siglist.c:32
#: ../sysdeps/sun4/siglist.c:32
msgid "Abort"
msgstr "Prekini"
#: ../sysdeps/osf1/siglist.c:33
#: ../sysdeps/sun4/siglist.c:33
msgid "EMT error"
msgstr "Napaka EMT"
#: ../sysdeps/osf1/siglist.c:34
#: ../sysdeps/sun4/siglist.c:34
msgid "Floating-point exception"
msgstr "Izjema plavajoče vejice"
#: ../sysdeps/osf1/siglist.c:35
#: ../sysdeps/sun4/siglist.c:35
msgid "Kill"
msgstr "Ubij"
#: ../sysdeps/osf1/siglist.c:36
#: ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "Napaka vodila"
#: ../sysdeps/osf1/siglist.c:37
#: ../sysdeps/sun4/siglist.c:37
msgid "Segmentation violation"
msgstr "Segmentacijska napaka"
#: ../sysdeps/osf1/siglist.c:38
#: ../sysdeps/sun4/siglist.c:38
msgid "Bad argument to system call"
msgstr "Nepravilen argument za sistemski klic"
#: ../sysdeps/osf1/siglist.c:39
#: ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "Pretrgana cev"
#: ../sysdeps/osf1/siglist.c:40
#: ../sysdeps/sun4/siglist.c:40
msgid "Alarm clock"
msgstr "Budilka"
#: ../sysdeps/osf1/siglist.c:41
#: ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "Zaključek"
#: ../sysdeps/osf1/siglist.c:42
#: ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"
msgstr "Nujno stanje na vtiču"
#: ../sysdeps/osf1/siglist.c:43
#: ../sysdeps/sun4/siglist.c:43
msgid "Stop"
msgstr "Ustavi"
#: ../sysdeps/osf1/siglist.c:44
#: ../sysdeps/sun4/siglist.c:44
msgid "Keyboard stop"
msgstr "Zaustavitev tipkovnice"
#: ../sysdeps/osf1/siglist.c:45
#: ../sysdeps/sun4/siglist.c:45
msgid "Continue"
msgstr "Nadaljuj"
#: ../sysdeps/osf1/siglist.c:46
#: ../sysdeps/sun4/siglist.c:46
msgid "Child status has changed"
msgstr "Stanje podrejenega procesa se je spremenilo"
#: ../sysdeps/osf1/siglist.c:47
#: ../sysdeps/sun4/siglist.c:47
msgid "Background read from tty"
msgstr "Branje s tty v ozadju"
#: ../sysdeps/osf1/siglist.c:48
#: ../sysdeps/sun4/siglist.c:48
msgid "Background write to tty"
msgstr "Pisanje na tty v ozadju"
#: ../sysdeps/osf1/siglist.c:49
#: ../sysdeps/sun4/siglist.c:49
msgid "I/O now possible"
msgstr "V/I sedaj mogoč"
#: ../sysdeps/osf1/siglist.c:50
#: ../sysdeps/sun4/siglist.c:50
msgid "CPU limit exceeded"
msgstr "Prekoračena omejitev procesorja"
#: ../sysdeps/osf1/siglist.c:51
#: ../sysdeps/sun4/siglist.c:51
msgid "File size limit exceeded"
msgstr "Prekoračena omejitev dolžine datoteke"
#: ../sysdeps/osf1/siglist.c:52
#: ../sysdeps/sun4/siglist.c:52
msgid "Virtual alarm clock"
msgstr "Navidezna budilka"
#: ../sysdeps/osf1/siglist.c:53
#: ../sysdeps/sun4/siglist.c:53
msgid "Profiling alarm clock"
msgstr "Budilka profiliranja"
#: ../sysdeps/osf1/siglist.c:54
#: ../sysdeps/sun4/siglist.c:54
msgid "Window size change"
msgstr "Sprememba velikosti okna"
#: ../sysdeps/osf1/siglist.c:55
#: ../sysdeps/sun4/siglist.c:55
msgid "Information request"
msgstr "Zahteva po podatkih"
#: ../sysdeps/osf1/siglist.c:56
#: ../sysdeps/sun4/siglist.c:56
msgid "User defined signal 1"
msgstr "Uporabniško določen signal 1"
#: ../sysdeps/osf1/siglist.c:57
#: ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "Uporabniško določen signal 2"
#~ msgid "DEBUG"
#~ msgstr "RAZHROŠČUJ"
#~ msgid "VERBOSE"
#~ msgstr "ZGOVOREN"
#~ msgid "NO-DAEMON"
#~ msgstr "NI-DEAMON"
#~ msgid "INETD"
#~ msgstr "INETD"
# Slovenian translation of libgtop.
# Copyright (C) 2005-2006 Free Software Foundation, Inc.
# This file is distributed under the same license as the libgtop package.
#
# Andraž Tori <andraz.tori1@guest.arnes.si>, 2000.
# Matic Žgur <mr.zgur@gmail.com>, 2006.
# Matej Urbančič <mateju@svn.gnome.org>, 2007 - 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop master\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-05-14 03:41+0100\n"
"PO-Revision-Date: 2010-05-11 15:26+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
"X-Poedit-Country: SLOVENIA\n"
"X-Poedit-Language: Slovenian\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
msgstr[0] "prebranih %d bajtov"
msgstr[1] "prebran %d bajt"
msgstr[2] "prebrana %d bajta"
msgstr[3] "prebrani %d bajti"
#: ../lib/read_data.c:51
msgid "read data size"
msgstr "prebrana velikost podatkov"
#: ../lib/read_data.c:70
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "prebranih %lu bajtov podatkov"
msgstr[1] "prebran %lu bajt podatkov"
msgstr[2] "prebrana %lu bajta podatkov"
msgstr[3] "prebrani %lu bajti podatkov"
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "zapisanih %d bajtov"
msgstr[1] "zapisan %d bajt"
msgstr[2] "zapisana %d bajta"
msgstr[3] "zapisani %d bajti"
#: ../src/daemon/gnuserv.c:458
msgid "Enable debugging"
msgstr "Omogoči razhroščevanje"
#: ../src/daemon/gnuserv.c:460
msgid "Enable verbose output"
msgstr "Omogoči podroben izpis"
#: ../src/daemon/gnuserv.c:462
msgid "Don't fork into background"
msgstr "Ne razveji v ozadje"
#: ../src/daemon/gnuserv.c:464
msgid "Invoked from inetd"
msgstr "Poklican s programom inetd"
#: ../src/daemon/gnuserv.c:498
#, c-format
msgid "Run '%s --help' to see a full list of available command line options.\n"
msgstr "Za popoln seznam možnosti ukazne vrstice zaženite '%s --help'.\n"
#: ../sysdeps/osf1/siglist.c:27
#: ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
msgstr "Odloži"
#: ../sysdeps/osf1/siglist.c:28
#: ../sysdeps/sun4/siglist.c:28
msgid "Interrupt"
msgstr "Prekinitev"
#: ../sysdeps/osf1/siglist.c:29
#: ../sysdeps/sun4/siglist.c:29
msgid "Quit"
msgstr "Končaj"
#: ../sysdeps/osf1/siglist.c:30
#: ../sysdeps/sun4/siglist.c:30
msgid "Illegal instruction"
msgstr "Neveljaven ukaz"
#: ../sysdeps/osf1/siglist.c:31
#: ../sysdeps/sun4/siglist.c:31
msgid "Trace trap"
msgstr "Past sledenja"
#: ../sysdeps/osf1/siglist.c:32
#: ../sysdeps/sun4/siglist.c:32
msgid "Abort"
msgstr "Prekliči"
#: ../sysdeps/osf1/siglist.c:33
#: ../sysdeps/sun4/siglist.c:33
msgid "EMT error"
msgstr "Napaka EMT"
#: ../sysdeps/osf1/siglist.c:34
#: ../sysdeps/sun4/siglist.c:34
msgid "Floating-point exception"
msgstr "Izjema plavajoče vejice"
#: ../sysdeps/osf1/siglist.c:35
#: ../sysdeps/sun4/siglist.c:35
msgid "Kill"
msgstr "Uniči"
#: ../sysdeps/osf1/siglist.c:36
#: ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "Napaka vodila"
#: ../sysdeps/osf1/siglist.c:37
#: ../sysdeps/sun4/siglist.c:37
msgid "Segmentation violation"
msgstr "Napaka razčlenjevanja"
#: ../sysdeps/osf1/siglist.c:38
#: ../sysdeps/sun4/siglist.c:38
msgid "Bad argument to system call"
msgstr "Slab argument za sistemski klic"
#: ../sysdeps/osf1/siglist.c:39
#: ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "Pretrgana cev"
#: ../sysdeps/osf1/siglist.c:40
#: ../sysdeps/sun4/siglist.c:40
msgid "Alarm clock"
msgstr "Budilka"
#: ../sysdeps/osf1/siglist.c:41
#: ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "Zaključek"
#: ../sysdeps/osf1/siglist.c:42
#: ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"
msgstr "Nujno stanje na vtiču"
#: ../sysdeps/osf1/siglist.c:43
#: ../sysdeps/sun4/siglist.c:43
msgid "Stop"
msgstr "Zaustavi"
#: ../sysdeps/osf1/siglist.c:44
#: ../sysdeps/sun4/siglist.c:44
msgid "Keyboard stop"
msgstr "Zaustavitev tipkovnice"
#: ../sysdeps/osf1/siglist.c:45
#: ../sysdeps/sun4/siglist.c:45
msgid "Continue"
msgstr "Nadaljuj"
#: ../sysdeps/osf1/siglist.c:46
#: ../sysdeps/sun4/siglist.c:46
msgid "Child status has changed"
msgstr "Stanje podrejenega procesa se je spremenilo"
#: ../sysdeps/osf1/siglist.c:47
#: ../sysdeps/sun4/siglist.c:47
msgid "Background read from tty"
msgstr "Branje s tty v ozadju"
#: ../sysdeps/osf1/siglist.c:48
#: ../sysdeps/sun4/siglist.c:48
msgid "Background write to tty"
msgstr "Pisanje na tty v ozadju"
#: ../sysdeps/osf1/siglist.c:49
#: ../sysdeps/sun4/siglist.c:49
msgid "I/O now possible"
msgstr "V/I je sedaj mogoč"
#: ../sysdeps/osf1/siglist.c:50
#: ../sysdeps/sun4/siglist.c:50
msgid "CPU limit exceeded"
msgstr "Prekoračena omejitev CPE"
#: ../sysdeps/osf1/siglist.c:51
#: ../sysdeps/sun4/siglist.c:51
msgid "File size limit exceeded"
msgstr "Prekoračena omejitev dolžine datoteke"
#: ../sysdeps/osf1/siglist.c:52
#: ../sysdeps/sun4/siglist.c:52
msgid "Virtual alarm clock"
msgstr "Navidezna budilka"
#: ../sysdeps/osf1/siglist.c:53
#: ../sysdeps/sun4/siglist.c:53
msgid "Profiling alarm clock"
msgstr "Budilka profiliranja"
#: ../sysdeps/osf1/siglist.c:54
#: ../sysdeps/sun4/siglist.c:54
msgid "Window size change"
msgstr "Sprememba velikosti okna"
#: ../sysdeps/osf1/siglist.c:55
#: ../sysdeps/sun4/siglist.c:55
msgid "Information request"
msgstr "Zahteva po podatkih"
#: ../sysdeps/osf1/siglist.c:56
#: ../sysdeps/sun4/siglist.c:56
msgid "User defined signal 1"
msgstr "Uporabniško določen signal 1"
#: ../sysdeps/osf1/siglist.c:57
#: ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "Uporabniško določen signal 2"

185
po/ug.po Normal file
View File

@@ -0,0 +1,185 @@
# Uyghur translation for libgtop.
# Copyright (C) 2010 libgtop's COPYRIGHT HOLDER
# This file is distributed under the same license as the libgtop package.
# Gheyret Kenji <gheyret@yahoo.com>, 2010.
# Sahran <sahran@live.com>, 2010.
#
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-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"
"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"
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
msgstr[0] "%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 بايت سانلىق-مەلۇمات ئوقۇدى"
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "%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 "socket دىكى جىددىي ئەھۋال"
#: ../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"

View File

@@ -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

View File

@@ -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

View File

@@ -3,7 +3,7 @@ INCLUDES = @INCLUDES@
noinst_LTLIBRARIES = libgtop_sysdeps-2.0.la
libgtop_sysdeps_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
uptime.c loadavg.c shm_limits.c msg_limits.c \
uptime.c loadavg.c mountlist.c shm_limits.c msg_limits.c \
sem_limits.c proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \
procsegment.c procargs.c procmap.c siglist.c \

View File

@@ -124,7 +124,7 @@ int try_file_to_buffer(char *buffer, size_t bufsiz, const char *format, ...)
void
file_to_buffer(glibtop *server, char *buffer, size_t bufsiz, const char *filename)
{
switch(try_file_to_buffer(buffer, bufsiz, filename))
switch(try_file_to_buffer(buffer, bufsiz, "%s", filename))
{
case TRY_FILE_TO_BUFFER_OPEN:
glibtop_error_io_r (server, "open (%s)", filename);

164
sysdeps/cygwin/mountlist.c Normal file
View File

@@ -0,0 +1,164 @@
/* mountlist.c -- return a list of mounted filesystems
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is a fork of sysdeps/common/mountlist.c.
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. */
/*
Local Variables:
mode: C
c-file-style: "gnu"
End:
*/
#include <config.h>
#include <stdio.h>
#include <mntent.h>
#include <glibtop.h>
#include <glibtop/mountlist.h>
#include <glibtop/error.h>
/* IgnoreList */
typedef struct
{
GHashTable *table;
} IgnoreList;
static IgnoreList*
ignore_list_new(void)
{
IgnoreList* ig;
ig = g_new(IgnoreList, 1);
ig->table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
return ig;
}
static void
ignore_list_delete(IgnoreList* ig)
{
if (ig) {
g_hash_table_destroy(ig->table);
g_free(ig);
}
}
static void
ignore_list_add(IgnoreList* ig, const char* fs)
{
g_hash_table_insert(ig->table, g_strdup(fs), GINT_TO_POINTER(1));
}
static gboolean
ignore_list_has(IgnoreList* ig, const char* fs)
{
gpointer data;
data = g_hash_table_lookup(ig->table, fs);
return data != NULL;
}
/* ~IgnoreList */
static gboolean
ignore_fs(const char *fstype, IgnoreList** ig)
{
if (!*ig) {
FILE* fs;
char line[128];
*ig = ignore_list_new();
ignore_list_add(*ig, "none");
if ((fs = fopen("/proc/filesystems", "r")) != NULL) {
while (fgets(line, sizeof line, fs)) {
if (!strncmp(line, "nodev", 5)) {
char *type;
type = g_strstrip(line + 5);
ignore_list_add(*ig, type);
}
}
fclose(fs);
}
}
return ignore_list_has(*ig, fstype);
}
glibtop_mountentry *
glibtop_get_mountlist_s(glibtop *server, glibtop_mountlist *buf, int all_fs)
{
const struct mntent *mnt;
FILE *fp;
GArray* entries;
IgnoreList* ig = NULL;
memset(buf, 0, sizeof(glibtop_mountlist));
/* wild guess, preallocate 8 entries
on a desktop, almost everyone has / and a tmpfs for udev
if all_fs, there are also proc, sys, fuse, binfmt, etc */
entries = g_array_sized_new(FALSE, FALSE, sizeof(glibtop_mountentry), 8);
if (!(fp = setmntent(MOUNTED, "r"))) {
glibtop_warn_io_r(server, "Could not open %s", MOUNTED);
goto out;
}
while ((mnt = getmntent(fp)))
{
glibtop_mountentry *me;
gsize len;
if (!all_fs && ignore_fs(mnt->mnt_type, &ig))
continue;
len = entries->len;
g_array_set_size(entries, len + 1);
me = &g_array_index(entries, glibtop_mountentry, len);
g_strlcpy(me->devname, mnt->mnt_fsname, sizeof me->devname);
g_strlcpy(me->mountdir, mnt->mnt_dir, sizeof me->mountdir);
g_strlcpy(me->type, mnt->mnt_type, sizeof me->type);
}
endmntent(fp);
out:
ignore_list_delete(ig);
buf->size = sizeof(glibtop_mountentry);
buf->number = entries->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(entries, FALSE);
}

View File

@@ -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_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 \

View File

@@ -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;

View File

@@ -24,6 +24,7 @@
#include <sys/param.h>
#include <nlist.h>
#include <limits.h>
#include <kvm.h>
#include <sys/dkstat.h>
#include <time.h>

View File

@@ -79,10 +79,10 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
buffers = 0;
buf->total = memtotal;
buf->used = (memused * pagesize);
buf->used = (memused * (gulong) pagesize);
buf->free = (buf->total - buf->used);
buf->shared = 0;
buf->cached = (cached * pagesize);
buf->cached = (cached * (gulong) pagesize);
buf->buffer = buffers;
buf->user = buf->total - buf->free - buf->cached - buf->buffer;

View File

@@ -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)
{ }

View File

@@ -20,76 +20,33 @@
*/
#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. */
}

View File

@@ -85,7 +85,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 +113,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 (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;
}

View File

@@ -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;

View File

@@ -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,

View 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. */
}

View File

@@ -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);

7
sysdeps/openbsd/AUTHORS Normal file
View 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>

View File

@@ -0,0 +1,25 @@
# $OpenBSD: Makefile.am,v 1.2 2011/05/23 19:35:52 jasper Exp $
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
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 = open.c close.c cpu.c mem.c swap.c \
uptime.c loadavg.c shm_limits.c msg_limits.c \
sem_limits.c proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \
procsegment.c procargs.c procmap.c netlist.c \
netload.c ppp.c procopenfiles.c fsusage.c \
procwd.c procaffinity.c glibtop_private.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

32
sysdeps/openbsd/close.c Normal file
View File

@@ -0,0 +1,32 @@
/* $OpenBSD: close.c,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
/* 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)
{ }

103
sysdeps/openbsd/cpu.c Normal file
View File

@@ -0,0 +1,103 @@
/* $OpenBSD: cpu.c,v 1.7 2011/07/10 15:23:01 jasper Exp $ */
/* 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_p (glibtop *server)
{
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
}
/* Provides information about cpu usage. */
void
glibtop_get_cpu_p (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;
}

63
sysdeps/openbsd/fsusage.c Normal file
View File

@@ -0,0 +1,63 @@
/* $OpenBSD: fsusage.c,v 1.4 2011/05/31 19:25:31 jasper Exp $ */
#include <config.h>
/*
* statvfs is lacking various members which are present in statfs,
* like f_(a)syncreads and f_(a)syncwrites. So eventhough we have
* statvfs, undef it here untill those members are added.
*/
#undef HAVE_SYS_STATVFS_H
#undef STAT_STATVFS
#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>
#if defined (HAVE_SYS_STATVFS_H)
#include <sys/statvfs.h>
#else
#include <sys/mount.h>
#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void
_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path);
void
_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path)
{
int result;
#if defined (STAT_STATVFS)
struct statvfs sfs;
#else
struct statfs sfs;
#endif
#if defined (STAT_STATVFS)
result = statvfs (path, &sfs);
#else
result = statfs (path, &sfs);
#endif
if (result == -1) {
return;
}
buf->read = sfs.f_syncreads + sfs.f_asyncreads;
buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
}

View File

@@ -0,0 +1,55 @@
/* $OpenBSD: glibtop_machine.h,v 1.3 2011/05/23 19:35:53 jasper Exp $ */
/* 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/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__ */

View File

@@ -0,0 +1,56 @@
/* $OpenBSD: glibtop_private.c,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
#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>
char *
execute_lsof(pid_t pid) {
char *output = NULL;
char *lsof;
char *command;
int exit_status;
lsof = g_find_program_in_path("lsof");
if (lsof == NULL)
return NULL;
command = g_strdup_printf("%s -n -P -Fftn -p %d", lsof, pid);
g_free(lsof);
if (g_spawn_command_line_sync (command, &output, NULL, &exit_status, NULL)) {
if (exit_status != 0) {
g_warning("Could not execute \"%s\" (%i)\nMake sure lsof(8) is installed sgid kmem.",
command, exit_status);
output = NULL;
}
}
g_free(command);
return output;
}
/* 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;
}

View File

@@ -0,0 +1,42 @@
/* $OpenBSD: glibtop_private.h,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
/* 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
char *execute_lsof(pid_t pid);
gboolean safe_readlink(const char *path, char *buf, int bufsiz);
G_END_DECLS
#endif /* __OPENBSD__GLIBTOP_PRIVATE_H__ */

View File

@@ -0,0 +1,55 @@
/* $OpenBSD: glibtop_server.h,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
/* 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_CPU (1 << GLIBTOP_SYSDEPS_CPU)
#define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM)
#define GLIBTOP_SUID_SWAP (1 << GLIBTOP_SYSDEPS_SWAP)
#define GLIBTOP_SUID_UPTIME (1 << GLIBTOP_SYSDEPS_UPTIME)
#define GLIBTOP_SUID_LOADAVG (1 << GLIBTOP_SYSDEPS_LOADAVG)
#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_NETLIST 0
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
#define GLIBTOP_SUID_PROC_WD 0
#define GLIBTOP_SUID_PROC_AFFINITY 0
G_END_DECLS
#endif

View File

@@ -0,0 +1,58 @@
/* $OpenBSD: glibtop_suid.h,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
/* 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

61
sysdeps/openbsd/loadavg.c Normal file
View File

@@ -0,0 +1,61 @@
/* $OpenBSD: loadavg.c,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
/* 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_p (glibtop *server)
{
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
}
/* Provides load averange. */
void
glibtop_get_loadavg_p (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 */
}

152
sysdeps/openbsd/mem.c Normal file
View File

@@ -0,0 +1,152 @@
/* $OpenBSD: mem.c,v 1.11 2011/07/10 15:23:01 jasper Exp $ */
/* 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 <sys/vmmeter.h>
#include <uvm/uvm_extern.h>
#include <uvm/uvm_param.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)
/* nlist structure for kernel access */
static struct nlist nlst [] = {
{ "_bufpages" },
{ 0 }
};
/* MIB array for sysctl */
static int vmmeter_mib [] = { CTL_VM, VM_METER };
static int uvmexp_mib [] = { CTL_VM, VM_UVMEXP };
static int bcstats_mib [] = { CTL_VFS, VFS_GENERIC, VFS_BCACHESTAT };
/* Init function. */
void
_glibtop_init_mem_p (glibtop *server)
{
register int pagesize;
if (kvm_nlist (server->machine.kd, nlst) < 0) {
glibtop_warn_io_r (server, "kvm_nlist (mem)");
return;
}
/* 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_p (glibtop *server, glibtop_mem *buf)
{
struct vmtotal vmt;
struct uvmexp uvmexp;
struct bcachestats bcstats;
u_int v_used_count;
u_int v_total_count;
u_int v_free_count;
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 (vmt);
if (sysctl (vmmeter_mib, 2, &vmt, &length, NULL, 0)) {
glibtop_warn_io_r (server, "sysctl (vm.vmmeter)");
bzero(&vmt, sizeof(length));
return;
}
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;
}
/*
* t_arm = active real memory
* t_rm = total real memory in use
* t_free = free memory pages
*/
v_total_count = vmt.t_rm + vmt.t_free;
v_used_count = vmt.t_rm;
v_free_count = vmt.t_free;
/* convert memory stats to Kbytes */
buf->total = (guint64) pagetok (v_total_count) << LOG1024;
buf->used = (guint64) pagetok (v_used_count) << LOG1024;
buf->free = (guint64) pagetok (v_free_count) << LOG1024;
buf->locked = (guint64) pagetok (uvmexp.wired) << LOG1024;
buf->shared = (guint64) pagetok (vmt.t_rmshr) << 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;
}

View File

@@ -0,0 +1,96 @@
/* $OpenBSD: msg_limits.c,v 1.3 2011/05/23 19:35:54 jasper Exp $ */
/* 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;
}

68
sysdeps/openbsd/netlist.c Normal file
View File

@@ -0,0 +1,68 @@
/* $OpenBSD: netlist.c,v 1.2 2011/05/23 19:35:54 jasper Exp $ */
/*
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);
}

238
sysdeps/openbsd/netload.c Normal file
View File

@@ -0,0 +1,238 @@
/* $OpenBSD: netload.c,v 1.4 2011/06/20 09:50:04 jasper Exp $ */
/* 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>
#ifdef HAVE_NET_IF_VAR_H
#include <net/if_var.h>
#endif
#include <netinet/in.h>
#include <netinet/in_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;
}
}

38
sysdeps/openbsd/nosuid.c Normal file
View File

@@ -0,0 +1,38 @@
/* $OpenBSD: nosuid.c,v 1.2 2011/05/23 19:35:54 jasper Exp $ */
/* 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/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)
{ }

95
sysdeps/openbsd/open.c Normal file
View File

@@ -0,0 +1,95 @@
/* $OpenBSD: open.c,v 1.4 2011/05/23 19:35:54 jasper Exp $ */
/* 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/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)
{
#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 ();
server->os_version_code = OpenBSD;
/* 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. */
}

141
sysdeps/openbsd/ppp.c Normal file
View File

@@ -0,0 +1,141 @@
/* $OpenBSD: ppp.c,v 1.3 2011/05/23 19:35:54 jasper Exp $ */
/* 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 */
}

View File

@@ -0,0 +1,27 @@
/*
* $OpenBSD: procaffinity.c,v 1.1 2009/10/16 10:56:04 jasper Exp $
* 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;
}

101
sysdeps/openbsd/procargs.c Normal file
View File

@@ -0,0 +1,101 @@
/* $OpenBSD: procargs.c,v 1.3 2011/05/23 19:35:54 jasper Exp $ */
/* 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_proc2 *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));
/* swapper, init, pagedaemon, vmdaemon, update - this doen't work. */
if (pid < 5) return NULL;
glibtop_suid_enter (server);
/* Get the process data */
pinfo = kvm_getproc2 (server->machine.kd, KERN_PROC_PID, pid,
sizeof (*pinfo), &count);
if ((pinfo == NULL) || (count < 1)) {
glibtop_suid_leave (server);
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
return NULL;
}
args = kvm_getargv2 (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;
}

View File

@@ -0,0 +1,92 @@
/* $OpenBSD: prockernel.c,v 1.4 2011/05/31 14:02:26 jasper Exp $ */
/* 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_MIN_FLT) +
(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT);
static const unsigned long _glibtop_sysdeps_proc_kernel_wchan =
(1L << GLIBTOP_PROC_KERNEL_NWCHAN) +
(1L << GLIBTOP_PROC_KERNEL_WCHAN);
/* 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_proc2 *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;
/* Get the process information */
pinfo = kvm_getproc2 (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->nwchan = pinfo[0].p_wchan;
if (pinfo[0].p_wchan && pinfo[0].p_wmesg)
g_strlcpy(buf->wchan, pinfo[0].p_wmesg,
sizeof buf->wchan);
buf->min_flt = pinfo[0].p_uru_minflt;
buf->maj_flt = pinfo[0].p_uru_majflt;
buf->flags |= (_glibtop_sysdeps_proc_kernel_wchan
| _glibtop_sysdeps_proc_kernel_pstats);
}

108
sysdeps/openbsd/proclist.c Normal file
View File

@@ -0,0 +1,108 @@
/* $OpenBSD: proclist.c,v 1.3 2011/05/23 19:35:55 jasper Exp $ */
/* 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_proc2 *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_getproc2 (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;
}

202
sysdeps/openbsd/procmap.c Normal file
View File

@@ -0,0 +1,202 @@
/* $OpenBSD: procmap.c,v 1.6 2011/06/06 17:12:12 jasper Exp $ */
/* 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 <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);
/* Init function. */
void
_glibtop_init_proc_map_p (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
}
/* Provides detailed information about a process. */
glibtop_map_entry *
glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
pid_t pid)
{
struct kinfo_proc2 *pinfo;
struct vm_map_entry entry, *first;
struct vmspace vmspace;
struct vnode vnode;
struct inode inode;
GArray *maps = g_array_sized_new(FALSE, FALSE,
sizeof(glibtop_map_entry),
100);
int count, i = 0;
int update = 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_getproc2 (server->machine.kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc2), &count);
if ((pinfo == NULL) || (count < 1)) {
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_error_io_r (server, "kvm_read (vmspace)");
first = vmspace.vm_map.header.next;
if (kvm_read (server->machine.kd,
(unsigned long) vmspace.vm_map.header.next,
(char *) &entry, sizeof (entry)) != sizeof (entry))
glibtop_error_io_r (server, "kvm_read (entry)");
/* Allocate space. */
buf->number = vmspace.vm_map.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. */
do {
glibtop_map_entry *mentry;
unsigned long inum, dev;
guint len;
if (update) {
if (kvm_read (server->machine.kd,
(unsigned long) entry.next,
&entry, sizeof (entry)) != sizeof (entry))
glibtop_error_io_r (server, "kvm_read (entry)");
} else {
update = 1;
}
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)");
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_error_io_r (server, "kvm_read (inode)");
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;
} while (entry.next != first);
buf->flags = _glibtop_sysdeps_proc_map;
buf->number = maps->len;
buf->size = sizeof (glibtop_map_entry);
buf->total = buf->number * buf->size;
return (glibtop_map_entry*) g_array_free(maps, FALSE);
}

134
sysdeps/openbsd/procmem.c Normal file
View File

@@ -0,0 +1,134 @@
/* $OpenBSD: procmem.c,v 1.4 2011/05/24 10:40:47 jasper Exp $ */
/* 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_proc2 *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_getproc2 (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;
}

View File

@@ -0,0 +1,225 @@
/* $OpenBSD: procopenfiles.c,v 1.2 2011/05/23 19:35:55 jasper Exp $ */
/* Copyright (C) 1998-99 Martin Baulig
Copyright (C) 2004 Nicol\ufffds Lichtmaier
Copyright (C) 2007 Joe Marcus Clarke
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>
#include <sys/un.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);
/* Init function. */
void
_glibtop_init_proc_open_files_s (glibtop *server)
{
server->sysdeps.proc_open_files = _glibtop_sysdeps_proc_open_files;
}
static GArray *
parse_output(const char *output) {
GArray *entries;
char **lines;
char *ftype = NULL;
char *fname = NULL;
guint i;
guint len;
int fd = -1;
entries = g_array_new(FALSE, FALSE, sizeof(glibtop_open_files_entry));
lines = g_strsplit(output, "\n", 0);
len = g_strv_length(lines);
for (i = 0; i < len && lines[i]; i++) {
glibtop_open_files_entry entry = {0};
if (strlen(lines[i]) < 2)
continue;
if (!g_str_has_prefix(lines[i], "f") &&
!g_str_has_prefix(lines[i], "t") &&
!g_str_has_prefix(lines[i], "n"))
continue;
if (g_str_has_prefix(lines[i], "f")) {
if (!g_ascii_isdigit(*(lines[i] + 1)))
i += 2;
else
fd = atoi(lines[i] + 1);
continue;
}
if (g_str_has_prefix(lines[i], "t")) {
ftype = lines[i];
ftype++;
continue;
} else {
fname = lines[i];
fname++;
}
if (ftype == NULL || fname == NULL)
continue;
if (!strcmp(ftype, "unix")) {
entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET;
g_strlcpy(entry.info.localsock.name, fname,
sizeof(entry.info.localsock.name));
} else if (!strcmp(ftype, "PIPE")) {
entry.type = GLIBTOP_FILE_TYPE_PIPE;
} else if (!strcmp(ftype, "VREG") ||
!strcmp(ftype, "GDIR") ||
!strcmp(ftype, "GREG") ||
!strcmp(ftype, "VCHR") ||
!strcmp(ftype, "VBLK") ||
!strcmp(ftype, "DIR") ||
!strcmp(ftype, "LINK") ||
!strcmp(ftype, "REG") ||
!strcmp(ftype, "VDIR")) {
entry.type = GLIBTOP_FILE_TYPE_FILE;
g_strlcpy(entry.info.file.name, fname,
sizeof(entry.info.file.name));
} else if (!strcmp(ftype, "IPv4")) {
char **hosts;
char **remote_host;
if (!strstr(fname, "->")) {
remote_host = g_strsplit(fname, ":", 0);
} else {
hosts = g_strsplit(fname, "->", 0);
if (g_strv_length(hosts) < 2) {
g_strfreev(hosts);
continue;
}
remote_host = g_strsplit(hosts[1], ":", 0);
g_strfreev(hosts);
}
if (g_strv_length(remote_host) < 2) {
g_strfreev(remote_host);
continue;
}
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
if (!strcmp(remote_host[0], "*"))
g_strlcpy(entry.info.sock.dest_host, "0.0.0.0",
sizeof(entry.info.sock.dest_host));
else
g_strlcpy(entry.info.sock.dest_host,
remote_host[0],
sizeof(entry.info.sock.dest_host));
entry.info.sock.dest_port = atoi(remote_host[1]);
g_strfreev(remote_host);
} else if (!strcmp(ftype, "IPv6")) {
char **hosts;
char **remote_host;
if (!strstr(fname, "->")) {
remote_host = g_strsplit(fname, ":", 0);
} else {
hosts = g_strsplit(fname, "->", 0);
if (g_strv_length(hosts) < 2) {
g_strfreev(hosts);
continue;
}
remote_host = g_strsplit(hosts[1], "]", 0);
g_strfreev(hosts);
}
if (g_strv_length(remote_host) < 2) {
g_strfreev(remote_host);
continue;
}
entry.type = GLIBTOP_FILE_TYPE_INET6SOCKET;
if (!strcmp(remote_host[0], "*"))
g_strlcpy(entry.info.sock.dest_host, "0.0.0.0",
sizeof(entry.info.sock.dest_host));
else
g_strlcpy(entry.info.sock.dest_host,
remote_host[0] + 1,
sizeof(entry.info.sock.dest_host));
entry.info.sock.dest_port = atoi(remote_host[1] + 1);
g_strfreev(remote_host);
} else
continue;
entry.fd = fd;
fd = -1;
ftype = NULL;
fname = NULL;
g_array_append_val(entries, entry);
}
g_strfreev(lines);
return entries;
}
glibtop_open_files_entry *
glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pid_t pid)
{
char *output;
GArray *entries;
memset(buf, 0, sizeof (glibtop_proc_open_files));
output = execute_lsof(pid);
if (output == NULL) return NULL;
entries = parse_output(output);
g_free(output);
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);
}

View File

@@ -0,0 +1,83 @@
/* $OpenBSD: procsegment.c,v 1.2 2011/05/23 19:35:55 jasper Exp $ */
/* 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 = 0;
/* Init function. */
void
_glibtop_init_proc_segment_p (glibtop *server)
{
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)
{
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0);
memset (buf, 0, sizeof (glibtop_proc_segment));
#if 0
/* Get the process info from the kernel */
kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, count);
if (*count != 1) {
return; /* the zeroed-out buffer indicating no data */
}
/* trs: text resident set size
pinfo[0]->kp_eproc.e_xrssize;
*/
/* buf->trs = pinfo[0]->kp_eproc.e_xrssize; */
/* lrs: shared-lib resident set size
? */
/* drs: data resident set size
pinfo[0]->kp_eproc.e_vm.vm_map.vm_dsize;
*/
/* dt: dirty pages
*/
/* start_code: address of beginning of code segment
*/
/* end_code: address of end of code segment
*/
/* start_stack: address of the bottom of stack segment
*/
#endif
}

View File

@@ -0,0 +1,91 @@
/* $OpenBSD: procsignal.c,v 1.3 2011/05/23 19:35:55 jasper Exp $ */
/* 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_proc2 *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_getproc2 (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;
}
/* 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;
}

133
sysdeps/openbsd/procstate.c Normal file
View File

@@ -0,0 +1,133 @@
/* $OpenBSD: procstate.c,v 1.3 2011/05/23 19:35:55 jasper Exp $ */
/* 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_proc2 *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_getproc2 (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;
}
#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);
}

156
sysdeps/openbsd/proctime.c Normal file
View File

@@ -0,0 +1,156 @@
/* $OpenBSD: proctime.c,v 1.5 2011/07/10 15:29:26 jasper Exp $ */
/* 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;
}
/* Taken from /usr/src/sys/kern/kern_resource.c */
/*
* Transform the running time and tick information in proc p into user,
* system, and interrupt time usage.
*/
static void
calcru(struct proc *p, struct timeval *up, struct timeval *sp,
struct timeval *ip)
{
quad_t totusec;
u_quad_t u, st, ut, it, tot;
long sec, usec;
struct timeval tv;
st = p->p_sticks;
ut = p->p_uticks;
it = p->p_iticks;
tot = st + ut + it;
if (tot == 0) {
st = 1;
tot = 1;
}
sec = p->p_rtime.tv_sec;
usec = p->p_rtime.tv_usec;
totusec = (quad_t)sec * 1000000 + usec;
if (totusec < 0) {
/* XXX no %qd in kernel. Truncate. */
fprintf (stderr, "calcru: negative time: %ld usec\n",
(long)totusec);
totusec = 0;
}
u = totusec;
st = (u * st) / tot;
sp->tv_sec = st / 1000000;
sp->tv_usec = st % 1000000;
ut = (u * ut) / tot;
up->tv_sec = ut / 1000000;
up->tv_usec = ut % 1000000;
if (ip != NULL) {
it = (u * it) / tot;
ip->tv_sec = it / 1000000;
ip->tv_usec = it % 1000000;
}
}
/* Provides detailed information about a process. */
void
glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
struct kinfo_proc2 *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_getproc2 (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->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;
}

104
sysdeps/openbsd/procuid.c Normal file
View File

@@ -0,0 +1,104 @@
/* $OpenBSD: procuid.c,v 1.3 2011/05/23 19:35:56 jasper Exp $ */
/* 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_proc2 *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_getproc2 (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;
}
#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. */
}

124
sysdeps/openbsd/procwd.c Normal file
View File

@@ -0,0 +1,124 @@
/* $OpenBSD: procwd.c,v 1.2 2011/05/23 19:35:56 jasper Exp $ */
/* 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;
}
static GPtrArray *
parse_output(const char *output, glibtop_proc_wd *buf)
{
GPtrArray *dirs;
char **lines;
gboolean nextwd = FALSE;
gboolean nextrtd = FALSE;
gboolean havertd = FALSE;
guint i;
guint len;
dirs = g_ptr_array_sized_new(1);
lines = g_strsplit(output, "\n", 0);
len = g_strv_length(lines);
for (i = 0; i < len && lines[i]; i++) {
if (strlen(lines[i]) < 2)
continue;
if (!strcmp(lines[i], "fcwd")) {
nextwd = TRUE;
continue;
}
if (!strcmp(lines[i], "frtd")) {
nextrtd = TRUE;
continue;
}
if (!g_str_has_prefix(lines[i], "n"))
continue;
if (nextwd) {
g_ptr_array_add(dirs, g_strdup(lines[i] + 1));
nextwd = FALSE;
}
if (nextrtd && !havertd) {
g_strlcpy(buf->root, lines[i] + 1,
sizeof(buf->root));
buf->flags |= (1 << GLIBTOP_PROC_WD_ROOT);
nextrtd = FALSE;
havertd = TRUE;
}
}
g_strfreev(lines);
return dirs;
}
char**
glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid)
{
char path[MAXPATHLEN];
char *output;
memset (buf, 0, sizeof (glibtop_proc_wd));
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);
output = execute_lsof(pid);
if (output != NULL) {
GPtrArray *dirs;
dirs = parse_output(output, buf);
g_free(output);
buf->number = dirs->len;
buf->flags |= (1 << GLIBTOP_PROC_WD_NUMBER);
g_ptr_array_add(dirs, NULL);
return (char **)g_ptr_array_free(dirs, FALSE);
}
return NULL;
}

View File

@@ -0,0 +1,96 @@
/* $OpenBSD: sem_limits.c,v 1.3 2011/05/23 19:35:56 jasper Exp $ */
/* 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;
}

View File

@@ -0,0 +1,88 @@
/* $OpenBSD: shm_limits.c,v 1.3 2011/05/23 19:35:56 jasper Exp $ */
/* 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;
}

62
sysdeps/openbsd/siglist.c Normal file
View File

@@ -0,0 +1,62 @@
/* $OpenBSD: siglist.c,v 1.2 2011/05/23 19:35:56 jasper Exp $ */
/* 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 }
};

131
sysdeps/openbsd/swap.c Normal file
View File

@@ -0,0 +1,131 @@
/* $OpenBSD: swap.c,v 1.7 2011/07/10 15:23:01 jasper Exp $ */
/* 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.swapins - swappgsin;
buf->pageout = uvmexp.swapouts - swappgsout;
}
swappgsin = uvmexp.swapins;
swappgsout = uvmexp.swapouts;
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;
}

116
sysdeps/openbsd/sysinfo.c Normal file
View File

@@ -0,0 +1,116 @@
/* $OpenBSD: sysinfo.c,v 1.4 2011/05/31 14:02:26 jasper Exp $ */
/* 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;
}

75
sysdeps/openbsd/uptime.c Normal file
View File

@@ -0,0 +1,75 @@
/* $OpenBSD: uptime.c,v 1.6 2011/06/01 07:24:49 jasper Exp $ */
/* 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_p (glibtop *server)
{
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
}
/* Provides uptime and idle time. */
void
glibtop_get_uptime_p (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_p (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;
}