Compare commits

..

56 Commits

Author SHA1 Message Date
Martin Baulig
ee153445f0 1.0.4. 1999-09-24 06:08:35 +00:00
Martin Baulig
50b43a0f41 Released LibGTop 1.0.4.
1999-09-24  Martin Baulig  <martin@home-of-linux.org>

	Released LibGTop 1.0.4.
1999-09-24 05:53:40 +00:00
Kjartan Maraas
25c26a6620 doh 1999-09-21 22:55:09 +00:00
Kjartan Maraas
0438b9d69a Added Danish translation from Kenneth Christiansen <kenneth@ripen.dk>.
1999-09-22  Kjartan Maraas  <kmaraas@online.no>

	* da.po: Added Danish translation from Kenneth
	Christiansen <kenneth@ripen.dk>.
1999-09-21 22:54:44 +00:00
Vincent Renardias
90c01f24fe Updated.
* Updated.
1999-09-20 14:00:34 +00:00
Martin Baulig
dc0f442247 **** Merged from HEAD ****
1999-09-19  Martin Baulig  <martin@home-of-linux.org>

	* libgtopConf.sh.in: Added MODULE_VERSION on Miguel's
	request (set it to "libgtop-@LIBGTOP_VERSION@").
1999-09-18 23:09:05 +00:00
Pablo Saratxaga
017f4d20c7 merged files from head cvs for translations 1999-09-18 17:09:00 +00:00
Chyla Zbigniew
c021ce7851 Added pl to ALL_LINGUAS 1999-09-17 03:37:44 +00:00
Chyla Zbigniew
93ab9882c3 Added Polish translation 1999-09-17 03:35:23 +00:00
Martin Baulig
a0477c6212 **** Merged from HEAD **** 1999-09-17 00:37:41 +00:00
Martin Baulig
6780e78a6b Set version number to 1.0.4 binary age 3, interface age 3.
1999-09-17  Martin Baulig  <martin@home-of-linux.org>

	* LIBGTOP-VERSION: Set version number to 1.0.4 binary age 3,
	interface age 3.
1999-09-16 22:25:54 +00:00
Martin Baulig
d8871029eb Merged everything since May 31 from HEAD and released LibGTop 1.0.3.
1999-09-16  Martin Baulig  <martin@home-of-linux.org>

	Merged everything since May 31 from HEAD and released
 	LibGTop 1.0.3.
1999-09-16 21:49:18 +00:00
Martin Baulig
6799ce187b **** Merged from HEAD **** 1999-09-16 21:38:03 +00:00
Tomas Ogren
2b6b2578be Synced
1999-09-16  Tomas Ogren  <stric@ing.umu.se>

* sv.po: Synced
1999-09-16 21:37:45 +00:00
Martin Baulig
1b0a9fd291 Should be ok now. 1999-09-16 21:37:20 +00:00
Martin Baulig
43e070dd8b make update-po. 1999-09-16 21:33:27 +00:00
Martin Baulig
b0d18119ff **** Merged from HEAD **** 1999-09-16 21:31:36 +00:00
Kjartan Maraas
be05f8163a Updated translation.
1999-07-11  Kjartan Maraas  <kmaraas@online.no>

		* no.po: Updated translation.
1999-07-11 12:27:13 +00:00
Tomas Ogren
d6cdf95d83 New file
1999-07-11  Tomas Ogren  <stric@ing.umu.se>

* sv.po: New file
1999-07-11 01:41:44 +00:00
Tomas Ögren
2256a9127f darn typo 1999-07-11 01:41:01 +00:00
Tomas Ögren
e6507a80be 1999-07-11 Tomas Ogren <stric@ing.umu.se>e
* configure.in: Added sv to ALL_LINGUAS
1999-07-11 01:40:47 +00:00
Tomas Ogren
8411e566b4 Fixed a tyop
1999-07-11  Tomas Ogren  <stric@ing.umu.se>

* sysdeps/names/procmem.c: Fixed a tyop
1999-07-11 01:35:40 +00:00
Martin Baulig
40854f4179 Set version number to 1.0.3 binary age 2, interface age 2.
1999-05-31  Martin Baulig  <martin@home-of-linux.org>

	* LIBGTOP-VERSION: Set version number to 1.0.3 binary age 2,
	interface age 2.
1999-05-31 14:11:07 +00:00
Martin Baulig
41062d0262 Released LibGTop 1.0.2. 1999-05-31 13:34:18 +00:00
Martin Baulig
58c882a860 Enable Timur's BSDI port by default. 1999-05-28 00:43:40 +00:00
Martin Baulig
789d156972 1.0.2. 1999-05-28 00:26:38 +00:00
Martin Baulig
19c24da036 **** Merged from HEAD ****
1999-05-07  Martin Baulig  <martin@home-of-linux.org>

	* server.c (main): There's some problem with uname () - some systems
	like Solaris or Digital Unix return a nonnegative value on success,
	some others like Linux return 0. Since all known systems seem to return
	a negative value on failure, we simply check whether the return value is
	not negative here.
1999-05-27 23:30:48 +00:00
Martin Baulig
929a025f53 **** Merged from HEAD ****
Use `(1L << feature)' instead of `(1 << feature)' to avoid problems
with integer overflows when we add more fields.
1999-05-27 23:30:11 +00:00
Martin Baulig
6a7c289305 *** empty log message *** 1999-05-27 23:26:43 +00:00
Martin Baulig
b65a4a7dcb **** Merged from HEAD **** 1999-05-27 23:23:30 +00:00
Martin Baulig
39b2fffe83 **** Merged from HEAD ****
1999-05-07  Martin Baulig  <martin@home-of-linux.org>

	* timings.c (timersub): Renamed this to `libgtop_timersub' and define
	it on all systems.
1999-05-27 23:19:38 +00:00
Martin Baulig
efb913acff **** Merged from HEAD ****
1999-05-28  Martin Baulig  <martin@home-of-linux.org>

	* first.c, second.c, sysdeps.c: Use LibGTop version conditionals
 	so we can more easily merge the code into LIBGTOP_STABLE_1_0.
1999-05-27 22:34:24 +00:00
Martin Baulig
79e756a2f7 **** Merged from HEAD ****
1999-03-17  Martin Baulig  <martin@home-of-linux.org>

	* first.c, second.c: Fixed a bug that caused a core dump when
	the sysdeps code does not return all data.
1999-05-27 21:42:13 +00:00
Martin Baulig
b08968e644 **** Merged from HEAD **** 1999-05-27 21:23:18 +00:00
Martin Baulig
dff497d2fa **** Merged from HEAD ****
Use `(1L << feature)' instead of `(1 << feature)' to avoid problems
with integer overflows when we add more fields.
1999-05-27 19:30:30 +00:00
Martin Baulig
38de742ca4 **** Merged from HEAD ****
Merged everything from HEAD for the upcoming release.
1999-05-27 18:56:53 +00:00
Martin Baulig
e0d3401bc4 Only #include <sys/param.h> when inside LibGTop. 1999-05-27 18:41:50 +00:00
Martin Baulig
aae2b5a94d *** empty log message *** 1999-05-27 18:39:32 +00:00
Martin Baulig
a5bd38fc19 **** Merged from HEAD ****
Use `(1L << feature)' instead of `(1 << feature)' to avoid problems
with integer overflows when we add more fields.
1999-05-27 14:04:16 +00:00
Martin Baulig
931b8f065e Merged from HEAD. 1999-05-26 15:31:35 +00:00
Martin Baulig
f7885e488f Merged this from HEAD.
1999-05-26  Martin Baulig  <martin@home-of-linux.org>

	* configure.in (INCLUDES): Define `LIBGTOP_VERSION_CODE' here so we
	can use version conditionals in the sysdeps code.
1999-05-26 13:19:03 +00:00
Martin Baulig
8122db69ee Merged I4B fixes for NetBSD from the HEAD. 1999-05-25 17:32:08 +00:00
Martin Baulig
ab13d4919d Make that "dc" think a bit more clean. 1999-05-21 08:19:58 +00:00
Martin Baulig
1d955fbf1f *** empty log message *** 1999-05-20 10:10:32 +00:00
Martin Baulig
8af25a2003 Merged the LibGTop Manual from the HEAD.
1999-05-16  Martin Baulig  <martin@home-of-linux.org>

	* doc: Merged the LibGTop Manual from the HEAD.
1999-05-16 13:48:14 +00:00
Martin Baulig
12eb6a25ec Applied a patch from David Kaelbling:
some compilers (like the SGI IRIX 6.x native one) enfore the
  "casts are not lvalues" maxim.
1999-05-06 22:09:26 +00:00
Martin Baulig
77ced087a1 This is the `LIBGTOP_STABLE_1_0' branch in CVS; please do only commit bug
1999-05-03  Martin Baulig  <martin@home-of-linux.org>

	This is the `LIBGTOP_STABLE_1_0' branch in CVS; please do only
	commit bug fixes here.

	* LIBGTOP-VERSION: Set version number to 1.0.2 binary age 1,
	interface age 0.
1999-05-03 20:31:51 +00:00
Martin Baulig
983475d0c1 Minor Alpha fixes. 1999-05-03 20:27:25 +00:00
Martin Baulig
70b65c05e5 Merged a few bug fixes from the HEAD. 1999-05-03 20:06:40 +00:00
Martin Baulig
293995a277 Released LibGTop 1.0.1.
1999-03-01  Martin Baulig  <martin@home-of-linux.org>

	Released LibGTop 1.0.1.

	* LIBGTOP-VERSION: Set version number to 1.0.1 binary age 0,
	interface age 0.
1999-03-01 20:58:12 +00:00
Martin Baulig
991da49977 Last-minute removal for 1.0.1. 1999-03-01 20:57:36 +00:00
Martin Baulig
cbf3bc895e s/AC_CHECK_PROG/AC_CHECK_PROGS/ (in check for perl). 1999-03-01 20:41:26 +00:00
Pablo Saratxaga
75c105d65d updated spanish language file 1999-03-01 18:33:58 +00:00
Martin Baulig
e83cb0acf7 Added a missing #endif. 1999-03-01 15:33:30 +00:00
Martin Baulig
db4d801792 Move `-lgtop_common' last to make it work with static-only libs. Thanks to
1999-03-01  Martin Baulig  <martin@home-of-linux.org>

	* configure.in (LIBGTOP_LIBS): Move `-lgtop_common' last to
	make it work with static-only libs. Thanks to Roderik Muit
	for pointing this out.
	(PERL): First check for `perl5', then for `perl'. Thanks again
	to Roderik Muit.
1999-03-01 13:27:10 +00:00
Martin Baulig
f17e45bcc3 Released LibGTop 1.0.0.
1999-02-24  Martin Baulig  <martin@home-of-linux.org>

	Released LibGTop 1.0.0.
1999-03-01 13:01:34 +00:00
158 changed files with 12428 additions and 1382 deletions

View File

@@ -1,241 +0,0 @@
[Posted to the Gnome Mailing List on Fri Aug 21 1998]
About this release:
------------------
LibGTop 0.25 is a stable release.
Of cause it has its bug like any software has, I'm planning
to fix as many bugs as possible in _this_ release and then
re-release it as libgtop-0.26 or even libgtop-0.30.
Especially portings to new operating systems should be made
in this release.
This also means that we can safely use this version of LibGTop
all over the GNOME project.
Currently LibGTop-Apps is still a little bit under development -
especially the LibGTop-Apps GTop does not yet have the full
functionallity of the real GTop.
We should test this extensively and then decide whether to continue
with the `libgtop-apps' module or whether to merge all its code
back into the modules it came from. I'd like to hear some comments
about this from you !
Please look at the release notes below for more details about this
release.
Where to get the sources
------------------------
The sources can be found at:
ftp://ftp.home-of-linux.org/pub/
Tarballs:
libgtop-0.25.0.tar.gz
libgtop-apps-0.25.0.tar.gz
Source RPM:
libgtop-0.25.0-REL.src.rpm
libgtop-apps-0.25.0-REL.src.rpm
Binary RPMS:
libgtop-0.25.0-REL.i386.rpm
libgtop-devel-0.25.0-REL.i386.rpm
libgtop-examples-0.25.0-REL.i386.rpm
libgtop-apps-0.25.0-REL.i386.rpm
There is some little problem with the binary RPMS of `libgtop-apps':
Most of its files will conflict with ones from `gnome-core' and `gnome-utils',
so you'll need to use the `--force' parameter to install it.
Getting the sources from CVS:
----------------------------
You can also fetch the sources from the GNOME CVS tree
(see http://www.gnome.org/ for details).
To get the latest sources:
$ cvs checkout libgtop
$ cvs checkout libgtop-apps
To get the sources of *this* release:
$ cvs checkout -r LIBGTOP_0_25 libgtop
$ cvs checkout -r LIBGTOP_0_25 libgtop-apps
To get the sources of this release with all bug-fixes applied:
$ cvs checkout -r LIBGTOP_0_25_PATCHES libgtop
$ cvs checkout -r LIBGTOP_0_25_PATCHES libgtop-apps
To get a patch to apply to the tarballs to get all bug-fixes:
$ cvs rdiff -r LIBGTOP_0_25 -r LIBGTOP_0_25_PATCHES libgtop
$ cvs rdiff -r LIBGTOP_0_25 -r LIBGTOP_0_25_PATCHES libgtop-apps
[Note for people having write access to the GNOME CVS tree:
Please apply bug fixes to the `LIBGTOP_0_25_PATCHES' branch and
merge them into the main trunk.
After merging, please re-tag the branch `libgtop_0_25_after_merge'.
This will help us to re-release this package when all bugs are
fixed.
]
RELEASE NOTES FOR LIBGTOP 0.25 STABLE
=====================================
OVERVIEW
--------
LibGTop is a library that read information about processes and the running
systems. This information include:
General System Information
cpu - CPU Usage
mem - Memory Usage
swap - Swap Usage (including paging activity)
loadavg - Load average (including nr_running, nr_tasks, last_pid)
uptime - Uptime and Idle time, can be calculated from CPU usage
SYS V IPC Limits:
shm_limits - Shared Memory Limits
msg_limits - Message Queue Limits
sem_limits - Semaphore Set Limits
Process List:
proclist - List of processes
Process information:
proc_state - cmd, state, uid, gid
proc_uid - uid,euid,gid,egid,pid,ppid,pgrp
session,tty,tpgid,priority,nice
proc_mem - size,vsize,resident,share,rss,rss_rlim
proc_time - start_time,rtime,utime,stime,cutime,cstime
timeout,it_real_value,frequency
proc_signal - signal,blocked,sigignore,sigcatch
proc_kernel - k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt
kstk_esp,kstk_eip,nwchan,wchan
proc_segment - text_rss,shlib_rss,data_rss,stack_rss,dirty_size
start_code,end_code,start_stack
Process maps:
proc_map - Process map (/proc/<pid>/maps under Linux)
File system usage:
mountlist - List of currently mounted filesystems
fsusage - File system usage
PORTABILITY:
-----------
LibGtop is designed to be as portable as possible. None of the functions
and retrieved information should be specific to a specific operating
system. So you only need to port the system dependent part of the library
to a new system and all application programs can then use libgtop on this
new system.
CLIENT/SERVER MODEL:
-------------------
Some systems like DEC OSF/1 or BSD require special priviledges for the calling
proces to fetch the required information (SUID root/SGID kmem). To solve this
problem, I designed a client/server model which makes a call to a SUID/SGID
server which fetches the required information whenever it is required. This
server is only called for features that really require priviledges, otherwise
the sysdeps code is called directory (every user can get the CPU usage on
DEC OSF/1, but only root can get information about processes other than the
current one).
There is also some kind of daemon which can be used to fetch information from
remote systems (still experimental). This daemon normally runs as nobody and
calls the SUID/SGID itself when needed.
GNOME APPLETS:
--------------
There are some applets and applications which already use LibGTop. They can
be found in the `libgtop-apps' module in the GNOME CVS tree:
* Applets: cpuload, cpumemusage - they need LibGTop to get their information
on all systems other than Linux.
* Applets: diskusage - just uses the mountlist/fsusage features of LibGTop,
the one in gnome-core also works on other systems.
* Applets: multiload - I enhanced the cpuload applet a little bit, it is
now a multi applet and can display CPU, Memory and
Swap usages.
GTOP:
----
This cool GNOME app has been ported to use LibGTop. It can be found in
`libgtop-apps/gtop' in the GNOME CVS tree.
You can now use nearly the full functionality of GTop on FreeBSD !
PLATTFORM SPECIFIC NOTES FOR LINUX:
==================================
Under Linux, LibGTop should work without problems and read everything
from /proc.
There is also an experimental kernel interface to read this information
directly from the kernel with a system call - but this is still experimental
and not well tested while I made this release.
PLATTFORM SPECIFIC NOTES FOR FREEBSD:
====================================
LibGTop should now work under FreeBSD and give you the full functionality
of GTop.
There are a few caveats:
* You need to manually make the `$(prefix)/bin/libgtop_server' SGID to kmem
after installation and mount the /proc filesystem of FreeBSD
(/proc/<pid>/mem is used withing kvm_uread ()).
* To get the filenames of the process maps displayed in GTop, you need to
configure with the `--with-libgtop-inodedb' option (you need GDBM for this
to work).
* You have then to create an inode database which is used to look up to
filenames. This is done using the `mkinodedb' program which comes along
with libgtop.
See the file src/inodedb/README for details:
The `mkinodedb' program which is build in this directory takes two
command line arguments: the full pathname of the database to be created
and the name of a configuration file consisting of directory and file names
each on a line by itself - see `/etc/ld.so.conf' for an example.
Putting a directory name in this file means all regular files found in this
directory are included in the database, but it will not recursively descend
into subdirectories (for instance, we want everythink in `/usr/lib' but not
every single file in `/usr/lib/sgml'). You can also use filenames to include
a single file.
Have fun,
Martin <martin@home-of-linux.org>

View File

@@ -1,69 +0,0 @@
[Will be posted to the Gnome Announce List after the release is made]
About this release:
------------------
LibGTop 1.0 is a stable release that will be released together with
GNOME 1.0.
Please look at the release notes below for more details about this
release.
Where to get the sources
------------------------
The sources can be found at:
ftp://ftp.home-of-linux.org/pub/
and at:
ftp://ftp.gnome.org/pub/GNOME/sources/libgtop/
Tarballs:
libgtop-1.0.0.tar.gz
Source RPM:
libgtop-1.0.0-REL.src.rpm
Binary RPMS:
libgtop-1.0.0-REL.i386.rpm
libgtop-devel-1.0.0-REL.i386.rpm
libgtop-examples-1.0.0-REL.i386.rpm
Getting the sources from CVS:
----------------------------
You can also fetch the sources from the GNOME CVS tree
(see http://www.gnome.org/ for details).
To get the latest sources:
$ cvs checkout libgtop
To get the sources of *this* release:
$ cvs checkout -r LIBGTOP_1_0 libgtop
To get the sources of this release with all bug-fixes applied:
$ cvs checkout -r LIBGTOP_1_0_PATCHES libgtop
To get a patch to apply to the tarballs to get all bug-fixes:
$ cvs rdiff -r LIBGTOP_1_0 -r LIBGTOP_1_0_PATCHES libgtop
[Note for people having write access to the GNOME CVS tree:
Please apply bug fixes to the `LIBGTOP_1_0_PATCHES' branch and
merge them into the main trunk.
After merging, please re-tag the branch `libgtop_1_0_after_merge'.
This will help us to re-release this package when all bugs are
fixed.
]

View File

@@ -1,2 +1,2 @@
Martin Baulig (martin@home-of-linux.org)
Josh Sled <jsled@scam.XCF.Berkeley.EDU>
Drazen Kacar (dave@srce.hr)

View File

@@ -1,5 +1,91 @@
1999-09-24 Martin Baulig <martin@home-of-linux.org>
Released LibGTop 1.0.4.
1999-09-22 Kjartan Maraas <kmaraas@online.no>
* configure.in: Added "da" to ALL_LINGUAS.
1999-09-19 Martin Baulig <martin@home-of-linux.org>
* libgtopConf.sh.in: Added MODULE_VERSION on Miguel's
request (set it to "libgtop-@LIBGTOP_VERSION@").
1999-09-18 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in, po/*.po: merged *.po files from HEAD CVS
1999-09-17 Martin Baulig <martin@home-of-linux.org>
* configure.in: Make it work if we have GNOME and the user
gave use --without-gnome (fixes bug #1735).
1999-09-17 Martin Baulig <martin@home-of-linux.org>
* LIBGTOP-VERSION: Set version number to 1.0.4 binary age 3,
interface age 3.
1999-09-16 Martin Baulig <martin@home-of-linux.org>
Merged everything since May 31 from HEAD and released
LibGTop 1.0.3.
1999-07-29 Martin Baulig <martin@home-of-linux.org>
* include/glibtop/error.h: Use G_GNUC_UNUSED.
* configure.in (ENABLE_STATIC, ENABLE_SHARED): New automake
conditionals.
1999-07-11 Tomas Ogren <stric@ing.umu.se>
* configure.in: Added sv to ALL_LINGUAS
1999-07-11 Tomas Ogren <stric@ing.umu.se>
* sysdeps/names/procmem.c: Fixed a tyop
1999-05-31 Martin Baulig <martin@home-of-linux.org>
* LIBGTOP-VERSION: Set version number to 1.0.3 binary age 2,
interface age 2.
1999-05-31 Martin Baulig <martin@home-of-linux.org>
Released LibGTop 1.0.2.
1999-05-26 Martin Baulig <martin@home-of-linux.org>
* configure.in (INCLUDES): Define `LIBGTOP_VERSION_CODE' here so we
can use version conditionals in the sysdeps code.
1999-05-25 Martin Baulig <martin@home-of-linux.org>
* libgtop-sysdeps.m4: Make the I4B check work for NetBSD.
1999-05-16 Martin Baulig <martin@home-of-linux.org>
* doc: Merged the LibGTop Manual from the HEAD.
1999-03-01 Martin Baulig <martin@home-of-linux.org>
Released LibGTop 1.0.1.
* LIBGTOP-VERSION: Set version number to 1.0.1 binary age 0,
interface age 0.
1999-03-01 Martin Baulig <martin@home-of-linux.org>
* configure.in (LIBGTOP_LIBS): Move `-lgtop_common' last to
make it work with static-only libs. Thanks to Roderik Muit
for pointing this out.
(PERL): First check for `perl5', then for `perl'. Thanks again
to Roderik Muit.
1999-02-24 Martin Baulig <martin@home-of-linux.org>
Released LibGTop 1.0.0.
* LIBGTOP-VERSION: Set version number to 1.0.0 binary age 0,
interface age 0.

View File

@@ -8,13 +8,13 @@
#
LIBGTOP_MAJOR_VERSION=1
LIBGTOP_MINOR_VERSION=0
LIBGTOP_MICRO_VERSION=0
LIBGTOP_MICRO_VERSION=4
LIBGTOP_INTERFACE_AGE=0
LIBGTOP_BINARY_AGE=0
LIBGTOP_INTERFACE_AGE=3
LIBGTOP_BINARY_AGE=3
# Increase each time you change the client/server protocol.
LIBGTOP_SERVER_VERSION=4
LIBGTOP_SERVER_VERSION=5
# Don't change this
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION

View File

@@ -11,14 +11,13 @@ support = support
endif
SUBDIRS = po intl $(support) macros misc include sysdeps lib src \
$(examples_SUBDIRS)
$(examples_SUBDIRS) doc
include_HEADERS = glibtop.h
EXTRA_DIST = autogen.sh libgtop.spec.in copyright.txt libgtopConf.sh.in \
LIBGTOP-VERSION features.def libgtop-config.in RELNOTES-0.25 \
RELNOTES-1.0 libgtop-sysdeps.m4 ANNOUNCE-0.25 ANNOUNCE-1.0 \
README NEWS.old libgtop-mirror.sh
RELNOTES-1.0 libgtop-sysdeps.m4 README NEWS.old libgtop-mirror.sh
dist-hook:
cp libgtop.spec $(distdir)
@@ -32,6 +31,8 @@ confexecdir = $(libdir)
confexec_DATA = $(top_builddir)/libgtopConf.sh \
$(top_builddir)/libgtop-features.def
CLEANFILES=libgtopConf.sh
bin_SCRIPTS = $(top_builddir)/libgtop-config
## to automatically rebuild aclocal.m4 if any of the macros in

View File

@@ -13,6 +13,12 @@ AC_MSG_ERROR([
*** The "dc" utility was not found on your system.
***
*** When using RedHat Linux, you need to install the "bc" package.
***
*** It is now part of the "bc" package, so you should look at
*** ftp://ftp.gnu.org/pub/gnu/bc/ if you want to compile it yourself.
***
*** Other systems and distributions may also have it in their "bc" package,
*** so if there's no "dc" one, please look for "bc".
***])
fi
@@ -53,7 +59,7 @@ AC_CHECK_PROGS(AWK, gawk awk, )
test -z "$AWK" && AC_MSG_ERROR([Sorry, you need a working awk interpreter.])
dnl Most people should have a working perl interpreter on their system
AC_PATH_PROG(PERL,perl)
AC_CHECK_PROGS(PERL, perl5 perl)
test -z "$PERL" && AC_MSG_ERROR([You need to have a working perl interpreter.])
AC_CHECK_TOOL(CC,gcc)
@@ -91,10 +97,15 @@ if test "x$gnome_found" != xyes; then
fi
GNOME_SUPPORT_CHECKS
else
AM_CONDITIONAL(BUILD_GNOME_SUPPORT, false)
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
if test "x$want_gnome" != xno ; then
AM_CONDITIONAL(BUILD_GNOME_SUPPORT, false)
else
GNOME_SUPPORT_CHECKS
fi
fi
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
GNOME_LIBGTOP_SYSDEPS
GNOME_LIBGTOP_TYPES
@@ -147,11 +158,14 @@ else
fi
if test "x$enable_static" != xno; then
static_targets="first_static second_static mountlist_static procmap_static netload_static sysdeps_static $guile_static_examples $smp_static_examples"
static_targets="first_static second_static mountlist_static procmap_static netload_static sysdeps_static timings_static $guile_static_examples $smp_static_examples"
else
static_targets=""
fi
AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
AM_CONDITIONAL(ENABLE_SHARED, test x$enable_static = xyes)
AC_SUBST(static_targets)
AC_SUBST(smp_examples)
AC_SUBST(guile_examples)
@@ -220,7 +234,7 @@ AC_FUNC_STRFTIME
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
dnl ## all 'es_??' are only needed for format numbers different of 'es'
ALL_LINGUAS="de es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fr ko no ja"
ALL_LINGUAS="da de es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fi fr ja ko nl no pl sv"
AM_GNOME_GETTEXT
AC_PATH_XTRA
@@ -326,8 +340,8 @@ fi
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS"
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_common -lgtop -lgtop_sysdeps"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_common -lgtop -lgtop_sysdeps"
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop -lgtop_sysdeps -lgtop_common"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop -lgtop_sysdeps -lgtop_common"
LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names"
LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names -lgtop_names"
@@ -354,7 +368,7 @@ else
guile_def=""
fi
INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_srcdir)/intl $SUPPORTINCS $GLIB_CFLAGS $CFLAGS $X_CFLAGS $guile_def "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\"'
INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_srcdir)/intl $SUPPORTINCS $GLIB_CFLAGS $CFLAGS $X_CFLAGS $guile_def "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_VERSION_CODE='$LIBGTOP_VERSION_CODE' -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\"'
AC_SUBST(INCLUDES)
@@ -406,5 +420,6 @@ src/daemon/Makefile
src/inodedb/Makefile
lib/Makefile
examples/Makefile
doc/Makefile
support/Makefile
macros/Makefile])

View File

@@ -11,4 +11,6 @@ third_linux
third_static
second_static
second_linux
smp_static sysdeps_static netload_static procmap_static mountlist_static
smp sysdeps netload procmap mountlist
timings timings_static

View File

@@ -1,3 +1,27 @@
1999-05-28 Martin Baulig <martin@home-of-linux.org>
* first.c, second.c, sysdeps.c: Use LibGTop version conditionals
so we can more easily merge the code into LIBGTOP_STABLE_1_0.
1999-05-07 Martin Baulig <martin@home-of-linux.org>
* timings.c (timersub): Renamed this to `libgtop_timersub' and define
it on all systems.
Fri Apr 9 00:14:52 1999 Timur Bakeyev <timur@gnu.org>
* timings.c: Added timersub defenition, to make code compilable on
BSDI.
1999-03-24 Martin Baulig <martin@home-of-linux.org>
* timings.c: New example.
1999-03-17 Martin Baulig <martin@home-of-linux.org>
* first.c, second.c: Fixed a bug that caused a core dump when
the sysdeps code does not return all data.
1998-11-22 Martin Baulig <baulig@taurus.uni-trier.de>
* netload.c: Call inet_ntoa () to get address and subnet

View File

@@ -12,13 +12,14 @@ DEFS = @DEFS@
libgtopdir = $(libexecdir)/libgtop
libgtop_PROGRAMS = first second\
mountlist procmap netload sysdeps\
mountlist procmap netload sysdeps timings \
@static_targets@ @guile_examples@ @smp_examples@
EXTRA_PROGRAMS = first_static second_static \
mountlist_static procmap_static \
third third_static smp smp_static \
netload_static sysdeps_static
netload_static sysdeps_static \
timings_static
first_SOURCES = first.c
first_LDADD = $(top_builddir)/lib/libgtop.la \
@@ -108,3 +109,13 @@ smp_static_SOURCES = $(smp_SOURCES)
smp_static_LDADD = $(smp_LDADD)
smp_static_LDFLAGS = -static
timings_SOURCES = timings.c
timings_LDADD = $(top_builddir)/lib/libgtop.la \
$(top_builddir)/sysdeps/common/libgtop_common.la \
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
@LIBSUPPORT@ @INTLLIBS@
timings_static_SOURCES = $(timings_SOURCES)
timings_static_LDADD = $(timings_LDADD)
timings_static_LDFLAGS = -static

View File

@@ -116,9 +116,16 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_uptime (&data.uptime);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Uptime (0x%08lx): %f, %f, %lu\n",
(unsigned long) data.uptime.flags,
data.uptime.uptime, data.uptime.idletime,
(unsigned long) data.uptime.boot_time);
#else
printf ("Uptime (0x%08lx): %f, %f\n",
(unsigned long) data.uptime.flags,
data.uptime.uptime, data.uptime.idletime);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_loadavg (&data.loadavg);
@@ -242,15 +249,52 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_state (&data.proc_state, pid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_State PID %5d (0x%08lx): '%s', %u - "
"%u, %u, %u, %u - %u, %u, %u\n", (int) pid,
(unsigned long) data.proc_state.flags,
data.proc_state.cmd, data.proc_state.state,
data.proc_state.uid, data.proc_state.gid,
data.proc_state.ruid, data.proc_state.rgid,
data.proc_state.has_cpu, data.proc_state.processor,
data.proc_state.last_processor);
#else
printf ("Proc_State PID %5d (0x%08lx): '%s', %c, %lu, %lu\n",
(int) pid, (unsigned long) data.proc_state.flags,
data.proc_state.cmd, data.proc_state.state,
(unsigned long) data.proc_state.uid,
(unsigned long) data.proc_state.gid);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_uid (&data.proc_uid, pid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Uid PID %5d (0x%08lx): "
"%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d - %d",
(int) pid, (unsigned long) data.proc_uid.flags,
data.proc_uid.uid, data.proc_uid.euid,
data.proc_uid.gid, data.proc_uid.egid,
data.proc_uid.suid, data.proc_uid.sgid,
data.proc_uid.fsuid, data.proc_uid.fsgid,
data.proc_uid.pid, data.proc_uid.ppid,
data.proc_uid.pgrp, data.proc_uid.session,
data.proc_uid.tty, data.proc_uid.tpgid,
data.proc_uid.priority, data.proc_uid.nice,
data.proc_uid.ngroups);
if (data.proc_uid.ngroups) {
for (i = 0; i < data.proc_uid.ngroups; i++) {
if (i)
printf (" %d", data.proc_uid.groups [i]);
else
printf (" (%d", data.proc_uid.groups [i]);
}
printf (")");
}
printf ("\n");
#else
printf ("Proc_Uid PID %5d (0x%08lx): "
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) pid,
(unsigned long) data.proc_uid.flags,
@@ -260,6 +304,7 @@ main (int argc, char *argv [])
data.proc_uid.pgrp, data.proc_uid.session,
data.proc_uid.tty, data.proc_uid.tpgid,
data.proc_uid.priority, data.proc_uid.nice);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_mem (&data.proc_mem, pid);
@@ -277,6 +322,30 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_segment (&data.proc_segment, pid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Segment PID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx "
"0x%lx 0x%lx 0x%lx 0x%lx 0x%lx "
"0x%lx 0x%lx 0x%lx 0x%lx\n", (int) pid,
(unsigned long) data.proc_segment.flags,
(unsigned long) data.proc_segment.text_rss,
(unsigned long) data.proc_segment.shlib_rss,
(unsigned long) data.proc_segment.data_rss,
(unsigned long) data.proc_segment.stack_rss,
(unsigned long) data.proc_segment.dirty_size,
(unsigned long) data.proc_segment.start_code,
(unsigned long) data.proc_segment.end_code,
(unsigned long) data.proc_segment.start_data,
(unsigned long) data.proc_segment.end_data,
(unsigned long) data.proc_segment.start_brk,
(unsigned long) data.proc_segment.end_brk,
(unsigned long) data.proc_segment.start_stack,
(unsigned long) data.proc_segment.start_mmap,
(unsigned long) data.proc_segment.arg_start,
(unsigned long) data.proc_segment.arg_end,
(unsigned long) data.proc_segment.env_start,
(unsigned long) data.proc_segment.env_end);
#else
printf ("Proc_Segment PID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid,
(unsigned long) data.proc_segment.flags,
@@ -288,6 +357,7 @@ main (int argc, char *argv [])
(unsigned long) data.proc_segment.start_code,
(unsigned long) data.proc_segment.end_code,
(unsigned long) data.proc_segment.start_stack);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_time (&data.proc_time, pid);
@@ -308,6 +378,19 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_signal (&data.proc_signal, pid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Signal PID %5d (0x%08lx): "
"%lx %lx %lx %lx %lx %lx %lx %lx\n", (int) pid,
(unsigned long) data.proc_signal.flags,
(unsigned long) data.proc_signal.signal [0],
(unsigned long) data.proc_signal.signal [1],
(unsigned long) data.proc_signal.blocked [0],
(unsigned long) data.proc_signal.blocked [1],
(unsigned long) data.proc_signal.sigignore [0],
(unsigned long) data.proc_signal.sigignore [1],
(unsigned long) data.proc_signal.sigcatch [0],
(unsigned long) data.proc_signal.sigcatch [1]);
#else
printf ("Proc_Signal PID %5d (0x%08lx): "
"%lu %lu %lu %lu\n", (int) pid,
(unsigned long) data.proc_signal.flags,
@@ -315,12 +398,13 @@ main (int argc, char *argv [])
(unsigned long) data.proc_signal.blocked,
(unsigned long) data.proc_signal.sigignore,
(unsigned long) data.proc_signal.sigcatch);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_kernel (&data.proc_kernel, pid);
printf ("Proc_Kernel PID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu (%s)\n", (int) pid,
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx (%s)\n", (int) pid,
(unsigned long) data.proc_kernel.flags,
(unsigned long) data.proc_kernel.k_flags,
(unsigned long) data.proc_kernel.min_flt,
@@ -344,7 +428,7 @@ main (int argc, char *argv [])
printf ("Proc_Args PID %5d (0x%08lx): %lu - '%s'\n", (int) pid,
(unsigned long) data.proc_args.flags,
(unsigned long) data.proc_args.size,
args);
args ? args : "");
glibtop_free (args);
@@ -353,15 +437,52 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_state (&data.proc_state, ppid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_State PPID %5d (0x%08lx): '%s', %u - "
"%u, %u, %u, %u - %u, %u, %u\n", (int) ppid,
(unsigned long) data.proc_state.flags,
data.proc_state.cmd, data.proc_state.state,
data.proc_state.uid, data.proc_state.gid,
data.proc_state.ruid, data.proc_state.rgid,
data.proc_state.has_cpu, data.proc_state.processor,
data.proc_state.last_processor);
#else
printf ("Proc_State PPID %5d (0x%08lx): '%s', %c, %lu, %lu\n",
(int) ppid, (unsigned long) data.proc_state.flags,
data.proc_state.cmd, data.proc_state.state,
(unsigned long) data.proc_state.uid,
(unsigned long) data.proc_state.gid);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_uid (&data.proc_uid, ppid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Uid PPID %5d (0x%08lx): "
"%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d - %d",
(int) ppid, (unsigned long) data.proc_uid.flags,
data.proc_uid.uid, data.proc_uid.euid,
data.proc_uid.gid, data.proc_uid.egid,
data.proc_uid.suid, data.proc_uid.sgid,
data.proc_uid.fsuid, data.proc_uid.fsgid,
data.proc_uid.pid, data.proc_uid.ppid,
data.proc_uid.pgrp, data.proc_uid.session,
data.proc_uid.tty, data.proc_uid.tpgid,
data.proc_uid.priority, data.proc_uid.nice,
data.proc_uid.ngroups);
if (data.proc_uid.ngroups) {
for (i = 0; i < data.proc_uid.ngroups; i++) {
if (i)
printf (" %d", data.proc_uid.groups [i]);
else
printf (" (%d", data.proc_uid.groups [i]);
}
printf (")");
}
printf ("\n");
#else
printf ("Proc_Uid PPID %5d (0x%08lx): "
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) ppid,
(unsigned long) data.proc_uid.flags,
@@ -371,6 +492,7 @@ main (int argc, char *argv [])
data.proc_uid.pgrp, data.proc_uid.session,
data.proc_uid.tty, data.proc_uid.tpgid,
data.proc_uid.priority, data.proc_uid.nice);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_mem (&data.proc_mem, ppid);
@@ -388,6 +510,30 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_segment (&data.proc_segment, ppid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Segment PPID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx "
"0x%lx 0x%lx 0x%lx 0x%lx 0x%lx "
"0x%lx 0x%lx 0x%lx 0x%lx\n", (int) ppid,
(unsigned long) data.proc_segment.flags,
(unsigned long) data.proc_segment.text_rss,
(unsigned long) data.proc_segment.shlib_rss,
(unsigned long) data.proc_segment.data_rss,
(unsigned long) data.proc_segment.stack_rss,
(unsigned long) data.proc_segment.dirty_size,
(unsigned long) data.proc_segment.start_code,
(unsigned long) data.proc_segment.end_code,
(unsigned long) data.proc_segment.start_data,
(unsigned long) data.proc_segment.end_data,
(unsigned long) data.proc_segment.start_brk,
(unsigned long) data.proc_segment.end_brk,
(unsigned long) data.proc_segment.start_stack,
(unsigned long) data.proc_segment.start_mmap,
(unsigned long) data.proc_segment.arg_start,
(unsigned long) data.proc_segment.arg_end,
(unsigned long) data.proc_segment.env_start,
(unsigned long) data.proc_segment.env_end);
#else
printf ("Proc_Segment PPID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) ppid,
(unsigned long) data.proc_segment.flags,
@@ -399,6 +545,7 @@ main (int argc, char *argv [])
(unsigned long) data.proc_segment.start_code,
(unsigned long) data.proc_segment.end_code,
(unsigned long) data.proc_segment.start_stack);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_time (&data.proc_time, ppid);
@@ -419,18 +566,32 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_signal (&data.proc_signal, ppid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Signal PPID %5d (0x%08lx): "
"%lx %lx %lx %lx %lx %lx %lx %lx\n",
(int) ppid, (unsigned long) data.proc_signal.flags,
(unsigned long) data.proc_signal.signal [0],
(unsigned long) data.proc_signal.signal [1],
(unsigned long) data.proc_signal.blocked [0],
(unsigned long) data.proc_signal.blocked [1],
(unsigned long) data.proc_signal.sigignore [0],
(unsigned long) data.proc_signal.sigignore [1],
(unsigned long) data.proc_signal.sigcatch [0],
(unsigned long) data.proc_signal.sigcatch [1]);
#else
printf ("Proc_Signal PPID %5d (0x%08lx): %lu %lu %lu %lu\n",
(int) ppid, (unsigned long) data.proc_signal.flags,
(unsigned long) data.proc_signal.signal,
(unsigned long) data.proc_signal.blocked,
(unsigned long) data.proc_signal.sigignore,
(unsigned long) data.proc_signal.sigcatch);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_kernel (&data.proc_kernel, ppid);
printf ("Proc_Kernel PPID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu (%s)\n", (int) ppid,
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx (%s)\n", (int) ppid,
(unsigned long) data.proc_kernel.flags,
(unsigned long) data.proc_kernel.k_flags,
(unsigned long) data.proc_kernel.min_flt,
@@ -454,7 +615,7 @@ main (int argc, char *argv [])
printf ("Proc_Args PID %5d (0x%08lx): %lu - '%s'\n", (int) ppid,
(unsigned long) data.proc_args.flags,
(unsigned long) data.proc_args.size,
args);
args ? args : "");
glibtop_free (args);
@@ -463,15 +624,52 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_state (&data.proc_state, 1);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_State INIT %5d (0x%08lx): '%s', %u - "
"%u, %u, %u, %u - %u, %u, %u\n", 1,
(unsigned long) data.proc_state.flags,
data.proc_state.cmd, data.proc_state.state,
data.proc_state.uid, data.proc_state.gid,
data.proc_state.ruid, data.proc_state.rgid,
data.proc_state.has_cpu, data.proc_state.processor,
data.proc_state.last_processor);
#else
printf ("Proc_State INIT %5d (0x%08lx): '%s', %c, %lu, %lu\n", 1,
(unsigned long) data.proc_state.flags,
data.proc_state.cmd, data.proc_state.state,
(unsigned long) data.proc_state.uid,
(unsigned long) data.proc_state.gid);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_uid (&data.proc_uid, 1);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Uid INIT %5d (0x%08lx): "
"%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d - %d", 1,
(unsigned long) data.proc_uid.flags,
data.proc_uid.uid, data.proc_uid.euid,
data.proc_uid.gid, data.proc_uid.egid,
data.proc_uid.suid, data.proc_uid.sgid,
data.proc_uid.fsuid, data.proc_uid.fsgid,
data.proc_uid.pid, data.proc_uid.ppid,
data.proc_uid.pgrp, data.proc_uid.session,
data.proc_uid.tty, data.proc_uid.tpgid,
data.proc_uid.priority, data.proc_uid.nice,
data.proc_uid.ngroups);
if (data.proc_uid.ngroups) {
for (i = 0; i < data.proc_uid.ngroups; i++) {
if (i)
printf (" %d", data.proc_uid.groups [i]);
else
printf (" (%d", data.proc_uid.groups [i]);
}
printf (")");
}
printf ("\n");
#else
printf ("Proc_Uid INIT %5d (0x%08lx): "
"%d %d %d %d %d %d %d %d %d %d %d %d\n", 1,
(unsigned long) data.proc_uid.flags,
@@ -481,6 +679,7 @@ main (int argc, char *argv [])
data.proc_uid.pgrp, data.proc_uid.session,
data.proc_uid.tty, data.proc_uid.tpgid,
data.proc_uid.priority, data.proc_uid.nice);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_mem (&data.proc_mem, 1);
@@ -498,6 +697,30 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_segment (&data.proc_segment, 1);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Segment INIT %5d (0x%08lx): "
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx "
"0x%lx 0x%lx 0x%lx 0x%lx 0x%lx "
"0x%lx 0x%lx 0x%lx 0x%lx\n", 1,
(unsigned long) data.proc_segment.flags,
(unsigned long) data.proc_segment.text_rss,
(unsigned long) data.proc_segment.shlib_rss,
(unsigned long) data.proc_segment.data_rss,
(unsigned long) data.proc_segment.stack_rss,
(unsigned long) data.proc_segment.dirty_size,
(unsigned long) data.proc_segment.start_code,
(unsigned long) data.proc_segment.end_code,
(unsigned long) data.proc_segment.start_data,
(unsigned long) data.proc_segment.end_data,
(unsigned long) data.proc_segment.start_brk,
(unsigned long) data.proc_segment.end_brk,
(unsigned long) data.proc_segment.start_stack,
(unsigned long) data.proc_segment.start_mmap,
(unsigned long) data.proc_segment.arg_start,
(unsigned long) data.proc_segment.arg_end,
(unsigned long) data.proc_segment.env_start,
(unsigned long) data.proc_segment.env_end);
#else
printf ("Proc_Segment INIT %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu\n", 1,
(unsigned long) data.proc_segment.flags,
@@ -509,6 +732,7 @@ main (int argc, char *argv [])
(unsigned long) data.proc_segment.start_code,
(unsigned long) data.proc_segment.end_code,
(unsigned long) data.proc_segment.start_stack);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_time (&data.proc_time, 1);
@@ -529,6 +753,19 @@ main (int argc, char *argv [])
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_signal (&data.proc_signal, 1);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Signal INIT %5d (0x%08lx): "
"%lx %lx %lx %lx %lx %lx %lx %lx\n", 1,
(unsigned long) data.proc_signal.flags,
(unsigned long) data.proc_signal.signal [0],
(unsigned long) data.proc_signal.signal [1],
(unsigned long) data.proc_signal.blocked [0],
(unsigned long) data.proc_signal.blocked [1],
(unsigned long) data.proc_signal.sigignore [0],
(unsigned long) data.proc_signal.sigignore [1],
(unsigned long) data.proc_signal.sigcatch [0],
(unsigned long) data.proc_signal.sigcatch [1]);
#else
printf ("Proc_Signal INIT %5d (0x%08lx): "
"%lu %lu %lu %lu\n", 1,
(unsigned long) data.proc_signal.flags,
@@ -536,12 +773,13 @@ main (int argc, char *argv [])
(unsigned long) data.proc_signal.blocked,
(unsigned long) data.proc_signal.sigignore,
(unsigned long) data.proc_signal.sigcatch);
#endif
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_kernel (&data.proc_kernel, 1);
printf ("Proc_Kernel INIT %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu (%s)\n", 1,
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx (%s)\n", 1,
(unsigned long) data.proc_kernel.flags,
(unsigned long) data.proc_kernel.k_flags,
(unsigned long) data.proc_kernel.min_flt,
@@ -565,7 +803,7 @@ main (int argc, char *argv [])
printf ("Proc_Args PID %5d (0x%08lx): %lu - '%s'\n", 1,
(unsigned long) data.proc_args.flags,
(unsigned long) data.proc_args.size,
args);
args ? args : "");
glibtop_free (args);

View File

@@ -43,7 +43,7 @@ int
main (int argc, char *argv [])
{
glibtop_netload netload;
unsigned method, count, port, i;
unsigned method, count, port;
struct in_addr addr, subnet;
char *address_string, *subnet_string;
char buffer [BUFSIZ];

View File

@@ -97,7 +97,7 @@ main (int argc, char *argv [])
unsigned device, device_major, device_minor;
char perm [5];
if (maps [i].flags & (1 << GLIBTOP_MAP_ENTRY_FILENAME))
if (maps [i].flags & (1L << GLIBTOP_MAP_ENTRY_FILENAME))
filename = maps [i].filename;
#ifdef GLIBTOP_INODEDB
@@ -116,24 +116,41 @@ main (int argc, char *argv [])
device_minor = (device & 255);
device_major = ((device >> 8) & 255);
if (filename)
fprintf (stderr, "%08lx-%08lx %08lx - "
"%02x:%02x %08lu - %4s - %s\n",
if (filename) {
char *format;
if (sizeof (void*) == 8)
format = "%016lx-%016lx %016lx - "
"%02x:%02x %08lu - %4s - %s\n";
else
format = "%08lx-%08lx %08lx - "
"%02x:%02x %08lu - %4s - %s\n";
fprintf (stderr, format,
(unsigned long) maps [i].start,
(unsigned long) maps [i].end,
(unsigned long) maps [i].offset,
device_major, device_minor,
(unsigned long) maps [i].inode,
perm, filename);
else
fprintf (stderr, "%08lx-%08lx %08lx - "
"%02x:%02x %08lu - %4s\n",
} else {
char * format;
if (sizeof (void*) == 8)
format = "%016lx-%016lx %016lx - "
"%02x:%02x %08lu - %4s\n";
else
format = "%08lx-%08lx %08lx - "
"%02x:%02x %08lu - %4s\n";
fprintf (stderr, format,
(unsigned long) maps [i].start,
(unsigned long) maps [i].end,
(unsigned long) maps [i].offset,
device_major, device_minor,
(unsigned long) maps [i].inode,
perm);
}
if (filename && (filename != maps [i].filename))
glibtop_free (filename);

View File

@@ -31,8 +31,6 @@
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
#include <math.h>
static void
output (pid_t pid)
{
@@ -52,16 +50,53 @@ output (pid_t pid)
printf ("\n");
glibtop_get_proc_state (&data.proc_state, pid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_State PID %5d (0x%08lx): '%s', %u - "
"%u, %u, %u, %u - %u, %u, %u\n", (int) pid,
(unsigned long) data.proc_state.flags,
data.proc_state.cmd, data.proc_state.state,
data.proc_state.uid, data.proc_state.gid,
data.proc_state.ruid, data.proc_state.rgid,
data.proc_state.has_cpu, data.proc_state.processor,
data.proc_state.last_processor);
#else
printf ("Proc_State PID %5d (0x%08lx): "
"'%s', %c, %lu, %lu\n", (int) pid,
(unsigned long) data.proc_state.flags,
data.proc_state.cmd, data.proc_state.state,
(unsigned long) data.proc_state.uid,
(unsigned long) data.proc_state.gid);
#endif
glibtop_get_proc_uid (&data.proc_uid, pid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Uid PID %5d (0x%08lx): "
"%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d - %d",
(int) pid, (unsigned long) data.proc_uid.flags,
data.proc_uid.uid, data.proc_uid.euid,
data.proc_uid.gid, data.proc_uid.egid,
data.proc_uid.suid, data.proc_uid.sgid,
data.proc_uid.fsuid, data.proc_uid.fsgid,
data.proc_uid.pid, data.proc_uid.ppid,
data.proc_uid.pgrp, data.proc_uid.session,
data.proc_uid.tty, data.proc_uid.tpgid,
data.proc_uid.priority, data.proc_uid.nice,
data.proc_uid.ngroups);
if (data.proc_uid.ngroups) {
for (i = 0; i < data.proc_uid.ngroups; i++) {
if (i)
printf (" %d", data.proc_uid.groups [i]);
else
printf (" (%d", data.proc_uid.groups [i]);
}
printf (")");
}
printf ("\n");
#else
printf ("Proc_Uid PID %5d (0x%08lx): "
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) pid,
(unsigned long) data.proc_uid.flags,
@@ -71,7 +106,8 @@ output (pid_t pid)
data.proc_uid.pgrp, data.proc_uid.session,
data.proc_uid.tty, data.proc_uid.tpgid,
data.proc_uid.priority, data.proc_uid.nice);
#endif
glibtop_get_proc_mem (&data.proc_mem, pid);
printf ("Proc_Mem PID %5d (0x%08lx): "
@@ -86,6 +122,30 @@ output (pid_t pid)
glibtop_get_proc_segment (&data.proc_segment, pid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Segment PID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx "
"0x%lx 0x%lx 0x%lx 0x%lx 0x%lx "
"0x%lx 0x%lx 0x%lx 0x%lx\n", (int) pid,
(unsigned long) data.proc_segment.flags,
(unsigned long) data.proc_segment.text_rss,
(unsigned long) data.proc_segment.shlib_rss,
(unsigned long) data.proc_segment.data_rss,
(unsigned long) data.proc_segment.stack_rss,
(unsigned long) data.proc_segment.dirty_size,
(unsigned long) data.proc_segment.start_code,
(unsigned long) data.proc_segment.end_code,
(unsigned long) data.proc_segment.start_data,
(unsigned long) data.proc_segment.end_data,
(unsigned long) data.proc_segment.start_brk,
(unsigned long) data.proc_segment.end_brk,
(unsigned long) data.proc_segment.start_stack,
(unsigned long) data.proc_segment.start_mmap,
(unsigned long) data.proc_segment.arg_start,
(unsigned long) data.proc_segment.arg_end,
(unsigned long) data.proc_segment.env_start,
(unsigned long) data.proc_segment.env_end);
#else
printf ("Proc_Segment PID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid,
(unsigned long) data.proc_segment.flags,
@@ -97,6 +157,7 @@ output (pid_t pid)
(unsigned long) data.proc_segment.start_code,
(unsigned long) data.proc_segment.end_code,
(unsigned long) data.proc_segment.start_stack);
#endif
glibtop_get_proc_time (&data.proc_time, pid);
@@ -115,6 +176,19 @@ output (pid_t pid)
glibtop_get_proc_signal (&data.proc_signal, pid);
#if LIBGTOP_VERSION_CODE > 1001000
printf ("Proc_Signal PID %5d (0x%08lx): "
"%lx %lx %lx %lx %lx %lx %lx %lx\n", (int) pid,
(unsigned long) data.proc_signal.flags,
(unsigned long) data.proc_signal.signal [0],
(unsigned long) data.proc_signal.signal [1],
(unsigned long) data.proc_signal.blocked [0],
(unsigned long) data.proc_signal.blocked [1],
(unsigned long) data.proc_signal.sigignore [0],
(unsigned long) data.proc_signal.sigignore [1],
(unsigned long) data.proc_signal.sigcatch [0],
(unsigned long) data.proc_signal.sigcatch [1]);
#else
printf ("Proc_Signal PID %5d (0x%08lx): "
"%lu %lu %lu %lu\n", (int) pid,
(unsigned long) data.proc_signal.flags,
@@ -122,11 +196,12 @@ output (pid_t pid)
(unsigned long) data.proc_signal.blocked,
(unsigned long) data.proc_signal.sigignore,
(unsigned long) data.proc_signal.sigcatch);
#endif
glibtop_get_proc_kernel (&data.proc_kernel, pid);
printf ("Proc_Kernel PID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu (%s)\n", (int) pid,
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx (%s)\n", (int) pid,
(unsigned long) data.proc_kernel.flags,
(unsigned long) data.proc_kernel.k_flags,
(unsigned long) data.proc_kernel.min_flt,
@@ -150,7 +225,7 @@ output (pid_t pid)
printf ("Proc_Args PID %5d (0x%08lx): %lu - '%s'\n", (int) pid,
(unsigned long) data.proc_args.flags,
(unsigned long) data.proc_args.size,
args);
args ? args : "");
glibtop_free (args);

View File

@@ -27,8 +27,6 @@
#include <glibtop/cpu.h>
#include <glibtop/xmalloc.h>
#include <math.h>
int
main (int argc, char *argv [])
{
@@ -67,7 +65,7 @@ main (int argc, char *argv [])
memset (separator, '-', 91);
separator [92] = '\0';
sprintf (buffer, _("Ticks (%d per second):"), frequency);
sprintf (buffer, _("Ticks (%ld per second):"), frequency);
printf ("\n\n%-26s %12s %12s %12s %12s %12s\n%s\n", buffer,
_("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator);

View File

@@ -38,7 +38,7 @@ int
main (int argc, char *argv [])
{
glibtop_sysdeps sysdeps;
unsigned method, count, port, i;
unsigned method, count, port;
char buffer [BUFSIZ];
count = PROFILE_COUNT;
@@ -69,10 +69,13 @@ main (int argc, char *argv [])
glibtop_get_sysdeps (&sysdeps);
#define FEATURE_CHECK(f) ((sysdeps.features & (1 << GLIBTOP_SYSDEPS_##f##)) ? 1 : 0)
#define FEATURE_CHECK(f) ((sysdeps.features & (1L << GLIBTOP_SYSDEPS_##f##)) ? 1 : 0)
printf ("Sysdeps (0x%08lx):\n\n"
"\tfeatures:\t\t0x%08lx\n\n"
#if LIBGTOP_VERSION_CODE > 1001000
"\tpointer_size:\t\t0x%08lx\n\n"
#endif
"\tcpu:\t\t%d\t0x%08lx\n"
"\tmem:\t\t%d\t0x%08lx\n"
"\tswap:\t\t%d\t0x%08lx\n\n"
@@ -97,6 +100,9 @@ main (int argc, char *argv [])
"\tppp:\t\t%d\t0x%08lx\n\n",
(unsigned long) sysdeps.flags,
(unsigned long) sysdeps.features,
#if LIBGTOP_VERSION_CODE > 1001000
(unsigned long) sysdeps.pointer_size,
#endif
FEATURE_CHECK(CPU),
(unsigned long) sysdeps.cpu,
FEATURE_CHECK(MEM),

357
examples/timings.c Normal file
View File

@@ -0,0 +1,357 @@
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
LibGTop is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
LibGTop is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LibGTop; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <locale.h>
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
#include <glibtop/xmalloc.h>
#include <glibtop/parameter.h>
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
#include <sys/times.h>
#include <sys/resource.h>
#ifndef PROFILE_COUNT
#define PROFILE_COUNT 100000L
#endif
#ifndef PROFILE_COUNT_EXPENSIVE
#define PROFILE_COUNT_EXPENSIVE 10000L
#endif
#define ELAPSED_UTIME ((unsigned long) elapsed_utime.tv_sec * 1000000 + (unsigned long) elapsed_utime.tv_usec)
#define ELAPSED_STIME ((unsigned long) elapsed_stime.tv_sec * 1000000 + (unsigned long) elapsed_stime.tv_usec)
#define libgtop_timeradd(tvp, uvp, vvp) \
do { \
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
if ((vvp)->tv_usec >= 1000000) { \
(vvp)->tv_sec++; \
(vvp)->tv_usec -= 1000000; \
} \
} while (0)
#define libgtop_timersub(tvp, uvp, vvp) \
do { \
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
if ((vvp)->tv_usec < 0) { \
(vvp)->tv_sec--; \
(vvp)->tv_usec += 1000000; \
} \
} while (0)
int
main (int argc, char *argv [])
{
glibtop_union data;
unsigned c, count, *ptr;
struct rusage total_start, total_end;
struct rusage rusage_start, rusage_end;
struct timeval elapsed_utime, elapsed_stime;
pid_t pid;
count = PROFILE_COUNT;
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
textdomain (PACKAGE);
printf ("%-12s (%-10s): %7s - %9s - %9s\n",
"Feature", "Flags", "Count", "utime", "stime");
printf ("-------------------------------------------"
"---------------\n");
glibtop_init_r (&glibtop_global_server, 0, 0);
getrusage (RUSAGE_SELF, &total_start);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_cpu (&data.cpu);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("CPU (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.cpu.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT_EXPENSIVE; c++)
glibtop_get_mem (&data.mem);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Memory (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.mem.flags, PROFILE_COUNT_EXPENSIVE,
(long double) ELAPSED_UTIME / PROFILE_COUNT_EXPENSIVE,
(long double) ELAPSED_STIME / PROFILE_COUNT_EXPENSIVE);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT_EXPENSIVE; c++)
glibtop_get_swap (&data.swap);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Swap (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.swap.flags, PROFILE_COUNT_EXPENSIVE,
(long double) ELAPSED_UTIME / PROFILE_COUNT_EXPENSIVE,
(long double) ELAPSED_STIME / PROFILE_COUNT_EXPENSIVE);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_uptime (&data.uptime);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Uptime (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.uptime.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_loadavg (&data.loadavg);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Loadavg (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.loadavg.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
printf ("\n");
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT_EXPENSIVE; c++) {
ptr = glibtop_get_proclist (&data.proclist, 0, 0);
glibtop_free (ptr);
}
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Proclist (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.proclist.flags,
PROFILE_COUNT_EXPENSIVE,
(long double) ELAPSED_UTIME / PROFILE_COUNT_EXPENSIVE,
(long double) ELAPSED_STIME / PROFILE_COUNT_EXPENSIVE);
pid = getpid ();
printf ("\n");
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_state (&data.proc_state, pid);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Proc_State (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.proc_state.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_uid (&data.proc_uid, pid);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Proc_Uid (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.proc_uid.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_mem (&data.proc_mem, pid);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Proc_Mem (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.proc_mem.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_segment (&data.proc_segment, pid);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Proc_Segment (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.proc_segment.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_time (&data.proc_time, pid);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Proc_Time (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.proc_time.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_signal (&data.proc_signal, pid);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Proc_Signal (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.proc_signal.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &rusage_start);
for (c = 0; c < PROFILE_COUNT; c++)
glibtop_get_proc_kernel (&data.proc_kernel, pid);
getrusage (RUSAGE_SELF, &rusage_end);
libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
&elapsed_stime);
printf ("Proc_Kernel (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
(unsigned long) data.proc_kernel.flags, PROFILE_COUNT,
(long double) ELAPSED_UTIME / PROFILE_COUNT,
(long double) ELAPSED_STIME / PROFILE_COUNT);
getrusage (RUSAGE_SELF, &total_end);
libgtop_timersub (&total_end.ru_utime, &total_start.ru_utime,
&elapsed_utime);
libgtop_timersub (&total_end.ru_stime, &total_start.ru_stime,
&elapsed_stime);
printf ("-------------------------------------------"
"---------------\n");
printf ("%-36s %9lu - %9lu\n\n", "TOTAL",
ELAPSED_UTIME, ELAPSED_STIME);
printf ("All timings are in clock ticks "
"(1000000 ticks per second).\n\n");
glibtop_close ();
exit (0);
}

View File

@@ -28,13 +28,22 @@
BEGIN_LIBGTOP_DECLS
#ifndef G_GNUC_UNUSED
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#define G_GNUC_UNUSED \
__attribute__((unused))
#else /* !__GNUC__ */
#define G_GNUC_UNUSED
#endif /* !__GNUC__ */
#endif /* defined G_GNUC_UNUSED */
void glibtop_error_vr (glibtop *server, char *format, va_list args);
void glibtop_warn_vr (glibtop *server, char *format, va_list args);
void glibtop_error_io_vr (glibtop *server, char *format, int, va_list args);
void glibtop_warn_io_vr (glibtop *server, char *format, int, va_list args);
static void
static void G_GNUC_UNUSED
glibtop_error_r (glibtop *server, char *format, ...)
{
va_list args;
@@ -44,7 +53,7 @@ glibtop_error_r (glibtop *server, char *format, ...)
va_end (args);
}
static void
static void G_GNUC_UNUSED
glibtop_warn_r (glibtop *server, char *format, ...)
{
va_list args;
@@ -54,7 +63,7 @@ glibtop_warn_r (glibtop *server, char *format, ...)
va_end (args);
}
static void
static void G_GNUC_UNUSED
glibtop_error_io_r (glibtop *server, char *format, ...)
{
va_list args;
@@ -64,7 +73,7 @@ glibtop_error_io_r (glibtop *server, char *format, ...)
va_end (args);
}
static void
static void G_GNUC_UNUSED
glibtop_warn_io_r (glibtop *server, char *format, ...)
{
va_list args;

38
include/glibtop/limits.h Normal file
View File

@@ -0,0 +1,38 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
LibGTop is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
LibGTop is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LibGTop; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __GLIBTOP_LIMITS_H__
#define __GLIBTOP_LIMITS_H__
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
/* Nobody should really be using more than 64 processors. */
#define GLIBTOP_NCPU 64
END_LIBGTOP_DECLS
#endif

1
kernel/sysctl/.cvsignore Normal file
View File

@@ -0,0 +1 @@
*.flags

22
kernel/sysctl/Makefile Normal file
View File

@@ -0,0 +1,22 @@
#
# Makefile for the LibGTop linux sysctl interface.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := kernel.o
ifeq ($(CONFIG_LIBGTOP),y)
O_OJBS := main.o libgtop.o
else
O_OBJS := main.o
endif
OX_OBJS := libgtop_syms.o
ifeq ($(CONFIG_LIBGTOP),m)
M_OBJS := libgtop.o
endif
include $(TOPDIR)/Rules.make

1268
kernel/sysctl/libgtop.c Normal file

File diff suppressed because it is too large Load Diff

242
kernel/sysctl/libgtop.h Normal file
View File

@@ -0,0 +1,242 @@
#ifndef _LINUX_LIBGTOP_H
#define _LINUX_LIBGTOP_H 1
#include <linux/tasks.h>
enum {
LIBGTOP_VERSION = 1,
LIBGTOP_UPDATE_EXPENSIVE,
LIBGTOP_STAT = 101,
LIBGTOP_MEM,
LIBGTOP_SWAP,
LIBGTOP_PROCLIST = 201,
LIBGTOP_PROC_STATE = 211,
LIBGTOP_PROC_KERNEL,
LIBGTOP_PROC_SEGMENT,
LIBGTOP_PROC_MEM,
LIBGTOP_PROC_SIGNAL,
LIBGTOP_PROC_ARGS = 251,
LIBGTOP_PROC_MAPS,
LIBGTOP_NETLOAD = 301
};
enum {
LIBGTOP_PROCLIST_ALL = 0,
LIBGTOP_PROCLIST_PID,
LIBGTOP_PROCLIST_PGRP,
LIBGTOP_PROCLIST_SESSION,
LIBGTOP_PROCLIST_TTY,
LIBGTOP_PROCLIST_UID,
LIBGTOP_PROCLIST_RUID
};
#define LIBGTOP_NSIG 4
#define LIBGTOP_PROCLIST_MASK 15
#define LIBGTOP_MAX_GROUPS 32
#define LIBGTOP_EXCLUDE_IDLE 0x1000
#define LIBGTOP_EXCLUDE_SYSTEM 0x2000
#define LIBGTOP_EXCLUDE_NOTTY 0x4000
#define LIBGTOP_TASK_RUNNING 1
#define LIBGTOP_TASK_INTERRUPTIBLE 2
#define LIBGTOP_TASK_UNINTERRUPTIBLE 4
#define LIBGTOP_TASK_ZOMBIE 8
#define LIBGTOP_TASK_STOPPED 16
#define LIBGTOP_TASK_SWAPPING 32
#define LIBGTOP_VM_READ 0x0001 /* currently active flags */
#define LIBGTOP_VM_WRITE 0x0002
#define LIBGTOP_VM_EXEC 0x0004
#define LIBGTOP_VM_SHARED 0x0008
#define LIBGTOP_VM_MAYREAD 0x0010 /* limits for mprotect() etc */
#define LIBGTOP_VM_MAYWRITE 0x0020
#define LIBGTOP_VM_MAYEXEC 0x0040
#define LIBGTOP_VM_MAYSHARE 0x0080
#define LIBGTOP_VM_GROWSDOWN 0x0100 /* general info on the segment */
#define LIBGTOP_VM_GROWSUP 0x0200
#define LIBGTOP_VM_SHM 0x0400 /* shared memory area, don't swap out */
#define LIBGTOP_VM_DENYWRITE 0x0800 /* ETXTBSY on write attempts.. */
#define LIBGTOP_VM_EXECUTABLE 0x1000
#define LIBGTOP_VM_LOCKED 0x2000
#define LIBGTOP_VM_IO 0x4000 /* Memory mapped I/O or similar */
#define LIBGTOP_MAP_PATH_LEN (PAGE_SIZE - sizeof (libgtop_proc_maps_header_t))
#ifndef min
#define min(a,b) ((a < b) ? a : b)
#endif
typedef struct libgtop_stat libgtop_stat_t;
typedef struct libgtop_cpu libgtop_cpu_t;
typedef struct libgtop_mem libgtop_mem_t;
typedef struct libgtop_swap libgtop_swap_t;
typedef struct libgtop_proclist libgtop_proclist_t;
typedef struct libgtop_proc_state libgtop_proc_state_t;
typedef struct libgtop_proc_kernel libgtop_proc_kernel_t;
typedef struct libgtop_proc_segment libgtop_proc_segment_t;
typedef struct libgtop_proc_mem libgtop_proc_mem_t;
typedef struct libgtop_proc_signal libgtop_proc_signal_t;
typedef struct libgtop_proc_maps_header libgtop_proc_maps_header_t;
typedef struct libgtop_proc_maps libgtop_proc_maps_t;
typedef struct libgtop_netload libgtop_netload_t;
struct libgtop_cpu
{
unsigned long total; /* Total CPU Time */
unsigned long user; /* CPU Time in User Mode */
unsigned long nice; /* CPU Time in User Mode (nice) */
unsigned long sys; /* CPU Time in System Mode */
unsigned long idle; /* CPU Time in the Idle Task */
};
struct libgtop_mem
{
unsigned long totalram; /* Total usable main memory size */
unsigned long freeram; /* Available memory size */
unsigned long sharedram; /* Amount of shared memory */
unsigned long bufferram; /* Memory used by buffers */
unsigned long cachedram;
};
struct libgtop_swap
{
unsigned long totalswap; /* Total swap space size */
unsigned long freeswap; /* swap space still available */
};
struct libgtop_proclist
{
int count;
int nr_running, nr_tasks, last_pid;
unsigned pids [NR_TASKS];
};
struct libgtop_stat
{
int ncpu; /* Number of CPUs */
unsigned long frequency; /* Tick frequency (HZ) */
libgtop_cpu_t cpu; /* CPU statistics */
libgtop_cpu_t xcpu [NR_CPUS]; /* SMP per-CPU statistics */
double loadavg [3]; /* Load average */
unsigned long total_forks; /* Total # of forks */
unsigned int context_swtch; /* Total # of context switches */
unsigned long boot_time; /* Boot time (seconds s. epoch) */
unsigned int pgpgin, pgpgout; /* # of pages paged in/out */
unsigned int pswpin, pswpout; /* # of swap pgs brought in/out */
};
struct libgtop_proc_state
{
long state;
unsigned long flags;
char comm [16];
int uid, euid, suid, fsuid;
int gid, egid, sgid, fsgid;
int pid, pgrp, ppid;
int session;
unsigned int tty;
int tpgid;
long priority, counter, def_priority;
long utime, stime, cutime, cstime, start_time;
long per_cpu_utime [NR_CPUS], per_cpu_stime [NR_CPUS];
int has_cpu, processor, last_processor;
unsigned long context;
unsigned long start_code, end_code, start_data, end_data;
unsigned long start_brk, brk, start_stack, start_mmap;
unsigned long arg_start, arg_end, env_start, env_end;
unsigned long rss, rlim, total_vm, locked_vm;
unsigned long policy, rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
unsigned long it_real_incr, it_prof_incr, it_virt_incr;
unsigned long keip, kesp;
unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
unsigned long nswap, cnswap;
int ngroups, groups [LIBGTOP_MAX_GROUPS];
};
struct libgtop_proc_kernel
{
unsigned long wchan;
};
struct libgtop_proc_segment
{
unsigned long vsize, data, exec, stack, lib;
};
struct libgtop_proc_mem
{
libgtop_proc_segment_t segment;
int size, resident, share, trs, lrs, drs, dt;
unsigned long rss, rlim;
};
struct libgtop_proc_signal
{
unsigned long signal [LIBGTOP_NSIG];
unsigned long blocked [LIBGTOP_NSIG];
unsigned long ignore [LIBGTOP_NSIG];
unsigned long catch [LIBGTOP_NSIG];
};
struct libgtop_proc_maps_header
{
unsigned long start, end, offset, perm;
off_t filename_offset;
ino_t inode;
dev_t device;
} __attribute__ ((aligned (64)));
struct libgtop_proc_maps
{
libgtop_proc_maps_header_t header;
char filename [LIBGTOP_MAP_PATH_LEN];
};
struct libgtop_netload
{
unsigned long rx_packets; /* total packets received */
unsigned long tx_packets; /* total packets transmitted */
unsigned long rx_bytes; /* total bytes received */
unsigned long tx_bytes; /* total bytes transmitted */
unsigned long rx_errors; /* bad packets received */
unsigned long tx_errors; /* packet transmit problems */
unsigned long rx_dropped; /* no space in linux buffers */
unsigned long tx_dropped; /* no space available in linux */
unsigned long multicast; /* multicast packets received */
unsigned long collisions;
/* detailed rx_errors: */
unsigned long rx_length_errors;
unsigned long rx_over_errors; /* receiver ring buff overflow */
unsigned long rx_crc_errors; /* recved pkt with crc error */
unsigned long rx_frame_errors; /* recv'd frame alignment error */
unsigned long rx_fifo_errors; /* recv'r fifo overrun */
unsigned long rx_missed_errors; /* receiver missed packet */
/* detailed tx_errors */
unsigned long tx_aborted_errors;
unsigned long tx_carrier_errors;
unsigned long tx_fifo_errors;
unsigned long tx_heartbeat_errors;
unsigned long tx_window_errors;
/* for cslip etc */
unsigned long rx_compressed;
unsigned long tx_compressed;
};
#endif

View File

@@ -0,0 +1,30 @@
/*
* linux/libgtop/libgtop_syms.c
* Copyright (C) 1999 Martin Baulig
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
extern unsigned long total_forks;
EXPORT_SYMBOL(task);
EXPORT_SYMBOL(init_mm);
EXPORT_SYMBOL(pidhash);
EXPORT_SYMBOL(avenrun);
EXPORT_SYMBOL(nr_running);
EXPORT_SYMBOL(nr_tasks);
EXPORT_SYMBOL(last_pid);
EXPORT_SYMBOL(total_forks);
EXPORT_SYMBOL(si_swapinfo);
extern void scheduling_functions_start_here(void);
extern void scheduling_functions_end_here(void);
EXPORT_SYMBOL(scheduling_functions_start_here);
EXPORT_SYMBOL(scheduling_functions_end_here);

4
kernel/sysctl/main.c Normal file
View File

@@ -0,0 +1,4 @@
/*
* linux/libgtop/main.c
* Copyright (C) 1999 Martin Baulig
*/

81
kernel/sysctl/patch-2.2.1 Normal file
View File

@@ -0,0 +1,81 @@
diff -ru linux-2.2.1/Makefile hacker/Makefile
--- linux-2.2.1/Makefile Sun Jan 31 22:45:42 1999
+++ hacker/Makefile Sun Mar 21 16:10:41 1999
@@ -109,6 +109,7 @@
DRIVERS =drivers/block/block.a \
drivers/char/char.a \
drivers/misc/misc.a
+EXTRAS =
LIBS =$(TOPDIR)/lib/lib.a
SUBDIRS =kernel drivers mm fs net ipc lib
@@ -186,6 +187,11 @@
DRIVERS := $(DRIVERS) drivers/net/irda/irda_drivers.a
endif
+ifdef CONFIG_LIBGTOP
+SUBDIRS := $(SUBDIRS) libgtop
+EXTRAS := $(EXTRAS) libgtop/kernel.o
+endif
+
include arch/$(ARCH)/Makefile
.S.s:
@@ -206,6 +212,7 @@
$(FILESYSTEMS) \
$(NETWORKS) \
$(DRIVERS) \
+ $(EXTRAS) \
$(LIBS) \
--end-group \
-o vmlinux
diff -ru linux-2.2.1/arch/i386/config.in hacker/arch/i386/config.in
--- linux-2.2.1/arch/i386/config.in Sun Jan 31 22:25:25 1999
+++ hacker/arch/i386/config.in Sat Mar 20 18:26:18 1999
@@ -84,6 +84,9 @@
bool 'System V IPC' CONFIG_SYSVIPC
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
bool 'Sysctl support' CONFIG_SYSCTL
+if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+ tristate 'LibGTop support' CONFIG_LIBGTOP
+fi
tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
diff -ru linux-2.2.1/include/linux/sysctl.h hacker/include/linux/sysctl.h
--- linux-2.2.1/include/linux/sysctl.h Sun Jan 31 22:24:14 1999
+++ hacker/include/linux/sysctl.h Sat Mar 20 19:12:54 1999
@@ -56,7 +56,8 @@
CTL_PROC=4, /* Process info */
CTL_FS=5, /* Filesystems */
CTL_DEBUG=6, /* Debugging */
- CTL_DEV=7 /* Devices */
+ CTL_DEV=7, /* Devices */
+ CTL_LIBGTOP=408 /* LibGTop */
};
diff -ru linux-2.2.1/kernel/sysctl.c hacker/kernel/sysctl.c
--- linux-2.2.1/kernel/sysctl.c Sun Jan 31 22:24:43 1999
+++ hacker/kernel/sysctl.c Sat Mar 20 19:24:34 1999
@@ -82,7 +82,9 @@
static ctl_table fs_table[];
static ctl_table debug_table[];
static ctl_table dev_table[];
-
+#ifdef CONFIG_LIBGTOP
+extern ctl_table libgtop_table[];
+#endif
/* /proc declarations: */
@@ -148,6 +150,9 @@
{CTL_FS, "fs", NULL, 0, 0555, fs_table},
{CTL_DEBUG, "debug", NULL, 0, 0555, debug_table},
{CTL_DEV, "dev", NULL, 0, 0555, dev_table},
+#ifdef CONFIG_LIBGTOP
+ {CTL_LIBGTOP, "libgtop", NULL, 0, 0555, libgtop_table},
+#endif
{0}
};

View File

@@ -36,20 +36,26 @@ print 'static void';
print '_glibtop_missing_feature (glibtop *server, const char *feature,';
print "\t\t\t const u_int64_t present, u_int64_t *required)";
print '{';
print "\tu_int64_t old_required = *required;\n";
print "\t/* Return if we have all required fields. */";
print "\tif ((~present & old_required) == 0)";
print "\t\treturn;\n";
print "\tswitch (server->error_method) {";
print "\tcase GLIBTOP_ERROR_METHOD_WARN_ONCE:";
print "\t\t*required &= present;";
print "\tcase GLIBTOP_ERROR_METHOD_WARN:";
print "\t\tglibtop_warn_r (server,";
print "\t\t\t\t_(\"glibtop_get_%s (): Client requested \"";
print "\t\t\t\t \"field mask %05Lx, but only have %05Lx.\"),";
print "\t\t\t\t feature, required, present);";
print "\t\t\t\t \"field mask %05lx, but only have %05lx.\"),";
print "\t\t\t\t feature, (unsigned long) old_required,";
print "\t\t\t\t (unsigned long) present);";
print "\t\tbreak;";
print "\tcase GLIBTOP_ERROR_METHOD_ABORT:";
print "\t\tglibtop_error_r (server,";
print "\t\t\t\t _(\"glibtop_get_%s (): Client requested \"";
print "\t\t\t\t \"field mask %05x, but only have %05x.\"),";
print "\t\t\t\t feature, required, present);";
print "\t\t\t\t \"field mask %05lx, but only have %05lx.\"),";
print "\t\t\t\t feature, (unsigned long) old_required,";
print "\t\t\t\t (unsigned long) present);";
print "\t\tbreak;";
print "\t}";
print '}';

View File

@@ -30,6 +30,7 @@ do_read (int s, void *ptr, size_t total_size)
{
int nread;
size_t already_read = 0, remaining = total_size;
char *tmp_ptr;
while (already_read < total_size) {
nread = recv (s, ptr, remaining, 0);
@@ -46,7 +47,10 @@ do_read (int s, void *ptr, size_t total_size)
already_read += nread;
remaining -= nread;
(char *) ptr += nread;
/* (char *) ptr += nread; */
tmp_ptr = ptr;
tmp_ptr += nread;
ptr = tmp_ptr;
}
}

View File

@@ -40,6 +40,7 @@ GLIBTOP_SUID_PROC_TIME +
GLIBTOP_SUID_PROC_SIGNAL +
GLIBTOP_SUID_PROC_KERNEL +
GLIBTOP_SUID_PROC_SEGMENT +
GLIBTOP_SUID_PROC_ARGS +
GLIBTOP_SUID_PROC_MAP +
GLIBTOP_SUID_NETLOAD +
GLIBTOP_SUID_PPP;

View File

@@ -118,7 +118,7 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
fi
libgtop_need_server=no
;;
freebsd*|netbsd*|openbsd*)
freebsd*|netbsd*|openbsd*|bsdi*)
libgtop_sysdeps_dir=freebsd
libgtop_use_machine_h=yes
libgtop_need_server=yes
@@ -177,7 +177,7 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
#include <net/netisr.h>
#include <net/route.h>
#ifdef __FreeBSD__
#if (defined __FreeBSD__) || (defined __NetBSD__)
#include <net/if_sppp.h>
#else
#include <i4b/sppp/if_sppp.h>
@@ -203,7 +203,7 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
#include <net/netisr.h>
#include <net/route.h>
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <net/if_sppp.h>
#else
#include <i4b/sppp/if_sppp.h>

View File

@@ -1,6 +1,7 @@
# Note that this is NOT a relocatable package
%define ver @VERSION@
%define rel SNAP
%define RELEASE SNAP
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
%define prefix /usr
Summary: LibGTop library
@@ -103,7 +104,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-, root, root)
%doc RELNOTES-0.25 RELNOTES-1.0 AUTHORS ChangeLog NEWS README
%doc ANNOUNCE-0.25 ANNOUNCE-1.0 TODO NEWS.old copyright.txt
%doc TODO NEWS.old copyright.txt
%doc src/inodedb/README.inodedb
%{prefix}/lib/lib*.so.*
@@ -118,8 +119,9 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/lib/*.sh
%{prefix}/lib/*.def
%{prefix}/include/*
%{prefix}/lib/libgtop
%files examples
%defattr(-,root,root)
%{prefix}/libexec/libgtop/*
%{prefix}/libexec/libgtop

View File

@@ -31,6 +31,8 @@ LIBGTOP_MICRO_VERSION="@LIBGTOP_MICRO_VERSION@"
LIBGTOP_VERSION="@LIBGTOP_VERSION@"
LIBGTOP_VERSION_CODE="@LIBGTOP_VERSION_CODE@"
MODULE_VERSION="libgtop-@LIBGTOP_VERSION@"
LIBGTOP_SERVER_VERSION="@LIBGTOP_SERVER_VERSION@"
libgtop_sysdeps_dir="@libgtop_sysdeps_dir@"

View File

@@ -0,0 +1,26 @@
This statistics were made on a PPRO 200 running Linux 2.2.1
reading everything from /proc while the system was idle.
Feature (Flags ): Count - utime - stime
----------------------------------------------------------
CPU (0x000007ff): 100000 - 13.90 - 181.80
Memory (0x0000007f): 10000 - 32.00 - 8061.00
Swap (0x0000001f): 10000 - 46.00 - 8130.00
Uptime (0x00000003): 100000 - 19.60 - 72.20
Loadavg (0x0000000f): 100000 - 32.40 - 77.10
Proclist (0x00000007): 10000 - 2250.00 - 4419.00
Proc_State (0x0000000f): 100000 - 40.70 - 221.00
Proc_Uid (0x00000fff): 100000 - 72.40 - 327.30
Proc_Mem (0x0000003f): 100000 - 65.70 - 283.90
Proc_Segment (0x000000f5): 100000 - 76.50 - 281.10
Proc_Time (0x000001ff): 100000 - 37.00 - 160.90
Proc_Signal (0x0000000f): 100000 - 52.50 - 148.50
Proc_Kernel (0x0000017f): 100000 - 56.70 - 153.50
----------------------------------------------------------
TOTAL 70030000 - 396830000
All timings are in clock ticks (1000000 ticks per second).

View File

@@ -0,0 +1,27 @@
This statistics were made on a PPRO 200 running Linux 2.2.1
(the same machine I made the timings.linux-proc on) with my
new sysctl () based kernel module.
Feature (Flags ): Count - utime - stime
----------------------------------------------------------
CPU (0x0000003f): 100000 - 3.50 - 5.40
Memory (0x0000003f): 10000 - 3.00 - 6.00
Swap (0x0000001f): 10000 - 10.00 - 7.00
Uptime (0x00000003): 100000 - 2.30 - 7.00
Loadavg (0x00000001): 100000 - 3.00 - 5.60
Proclist (0x00000007): 10000 - 13.00 - 46.00
Proc_State (0x0000000d): 100000 - 3.20 - 7.70
Proc_Uid (0x00000fff): 100000 - 3.60 - 7.40
Proc_Mem (0x0000003f): 100000 - 4.10 - 34.30
Proc_Segment (0x000000ff): 100000 - 5.90 - 41.50
Proc_Time (0x0000013d): 100000 - 3.50 - 7.50
Proc_Signal (0x0000000f): 100000 - 2.70 - 8.80
Proc_Kernel (0x000000fe): 100000 - 4.00 - 13.30
----------------------------------------------------------
TOTAL 3840000 - 14440000
All timings are in clock ticks (1000000 ticks per second).

View File

@@ -1,3 +1,28 @@
1999-09-22 Kjartan Maraas <kmaraas@online.no>
* da.po: Added Danish translation from Kenneth
Christiansen <kenneth@ripen.dk>.
1999-09-20 Vincent Renardias <vincent@ldsol.com>
* fr.po: 100% complete. removed ~40 old translations.
1999-09-17 Zbigniew Chyla <chyla@alice.ci.pwr.wroc.pl>
* pl.po: Added translation.
1999-09-16 Tomas Ogren <stric@ing.umu.se>
* sv.po: Synced
1999-07-11 Kjartan Maraas <kmaraas@online.no>
* no.po: Updated translation.
1999-07-11 Tomas Ogren <stric@ing.umu.se>
* sv.po: New file
1999-01-27 Kjartan Maraas <kmaraas@fib.hl.no>
* no.po: Updated translation

1064
po/da.po Normal file

File diff suppressed because it is too large Load Diff

281
po/de.po
View File

@@ -1,12 +1,11 @@
# libgtop de.po
# Copyright (C) 1998 Free Software Foundation, Inc.
# Martin Baulig <martin@home-of-linux.org>, 1998.
#
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
msgid ""
msgstr ""
"Project-Id-Version: libgtop VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1999-07-11 12:44+02:00\n"
"Last-Translator: Martin Baulig <martin@home-of-linux.org>\n"
"Language-Team: Martin Baulig <martin@home-of-linux.org>\n"
"MIME-Version: 1.0\n"
@@ -297,6 +296,17 @@ msgid ""
"\n"
"The math bit should be a decimal 4, and the traced bit is decimal 10."
msgstr ""
"Kernelflags des Prozesses.\n"
"\n"
"Auf Linux hat momentan jedes Flag ein gesetztes Math-Bit, da crt0.s\n"
"auf Mathematikemulation prüft, also wird dies in der Ausgabe nicht\n"
"ausgegeben.\n"
"\n"
"Dies ist wahrscheinlich ein Fehler, da nicht jeder Prozess ein\n"
"compiliertes C-Programm ist.\n"
"\n"
"Das Math-Bit sollte eine dezimale 4 sein, und das Traced-Bit ist\n"
"dezimal 10. "
#. Min_Flt
#: sysdeps/names/prockernel.c:59
@@ -396,8 +406,8 @@ msgid "Number of pages of virtual memory"
msgstr "Anzahl virtueller Speicherseiten"
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgstr "Anzahl nichtausgelagerter Speicherseiten"
msgid "Number of resident set (non-swapped) pages"
msgstr "Anzahl residenter (nicht ausgelagerter) Speicherseiten"
#: sysdeps/names/procmem.c:56
msgid "Number of pages of shared (mmap'd) memory"
@@ -544,11 +554,11 @@ msgstr "Prozessstatus (S=schl
#: sysdeps/names/procstate.c:47
msgid "UID of process"
msgstr "UID des Prozesses"
msgstr "echte UID des Prozesses"
#: sysdeps/names/procstate.c:48
msgid "GID of process"
msgstr "GID des Prozesses"
msgstr "echte GID des Prozesses"
#: sysdeps/names/proctime.c:44
msgid "Start_Time"
@@ -588,11 +598,11 @@ msgstr "Frequenz"
#: sysdeps/names/proctime.c:46
msgid "XCPU_UTime"
msgstr ""
msgstr "XCPU_UTime"
#: sysdeps/names/proctime.c:46
msgid "XCPU_STime"
msgstr ""
msgstr "XCPU_STime"
#: sysdeps/names/proctime.c:51
msgid "Start time of process in seconds since the epoch"
@@ -745,63 +755,63 @@ msgstr "Standard UNIX 'nice' Wert des Prozesses"
#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
msgid "Number of entries in semaphore map"
msgstr ""
msgstr "Anzahl Einträge in der Semaphortabelle"
#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
msgid "Max number of arrays"
msgstr ""
msgstr "Maximale Anzahl Arrays"
#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
msgid "Max semaphores system wide"
msgstr ""
msgstr "Maximale Anzahl Semaphore im System"
#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
msgid "Number of undo structures system wide"
msgstr ""
msgstr "Anzahl Undo-Strukturen im System"
#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
msgid "Max semaphores per array"
msgstr ""
msgstr "Maximale Anzahl Semaphore pro Array"
#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
msgid "Max ops per semop call"
msgstr ""
msgstr "Maximale Anzahl Operationen pro semop-Aufruf"
#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
msgid "Max number of undo entries per process"
msgstr ""
msgstr "Maximale Anzahl Undo-Einträge pro Prozess"
#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
msgid "sizeof struct sem_undo"
msgstr ""
msgstr "sizeof struct sem_undo"
#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
msgid "Semaphore max value"
msgstr ""
msgstr "Semaphor-Maximalwert"
#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
msgid "Adjust on exit max value"
msgstr ""
msgstr "Maximaler Adjust-on-Exit-Wert"
#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
msgid "Max segment size"
msgstr ""
msgstr "Maximale Segmentgröße"
#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
msgid "Min segment size"
msgstr ""
msgstr "Minimale Segmentgröße"
#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
msgid "Max number of segments"
msgstr ""
msgstr "Maximale Anzahl Segmente"
#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
msgid "Max shared segments per process"
msgstr ""
msgstr "Maximale Anzahl gemeinsame Segmente pro Prozess"
#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
msgid "Max total shared memory"
msgstr ""
msgstr "Maximaler gesamter gemeinsamer Speicher"
#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
msgid "Total Swap Space"
@@ -869,7 +879,7 @@ msgstr "Limits f
#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
msgid "Semaphore Set Limits"
msgstr ""
msgstr "Semaphor-Setzbegrenzungen"
#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
msgid "List of running Processes"
@@ -889,36 +899,35 @@ msgstr "Speicherbelegung des Prozesses"
#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
msgid "Process Time information"
msgstr ""
msgstr "Prozess-Zeitinformation"
#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
msgid "Process Signal information"
msgstr ""
msgstr "Prozess-Signalinformation"
#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
msgid "Process Kernel Data information"
msgstr ""
msgstr "Prozess-Kerneldateninformation"
#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
msgid "Process Segment information"
msgstr ""
msgstr "Prozess-Segmentinformation"
#: sysdeps/names/sysdeps.c:66
#, fuzzy
msgid "Process Arguments"
msgstr "Prozessgruppen-ID"
msgstr "Prozessargumente"
#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
msgid "Process Memory Map"
msgstr ""
msgstr "Prozess-Speicherplan"
#: sysdeps/names/sysdeps.c:68
msgid "Mount List"
msgstr ""
msgstr "Mountliste"
#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96
msgid "File System Usage"
msgstr ""
msgstr "Dateisystemnutzung"
#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
msgid "Network Load"
@@ -938,7 +947,7 @@ msgstr "Liste gegenw
#: sysdeps/names/uptime.c:38
msgid "Uptime"
msgstr ""
msgstr "Uptime"
#: sysdeps/names/uptime.c:39
msgid "Idletime"
@@ -951,6 +960,7 @@ msgstr "Zeit in Sekunden seit System-Boot"
#: sysdeps/names/uptime.c:45
msgid "Time in seconds the system spent in the idle task since system boot"
msgstr ""
"Zeit in Sekunden, die das System seit dem Booten im Leerlauf verbracht hat"
#: support/error.c:109
msgid "Unknown system error"
@@ -959,116 +969,245 @@ msgstr "Unbekannter Systemfehler"
#: support/getopt.c:669
#, c-format
msgid "%s: option `%s' is ambiguous\n"
msgstr ""
msgstr "%s: option `%s' ist mehrdeutig\n"
#: support/getopt.c:693
#, c-format
msgid "%s: option `--%s' doesn't allow an argument\n"
msgstr ""
msgstr "%s: option `--%s' erlaubt kein Argument\n"
#: support/getopt.c:698
#, c-format
msgid "%s: option `%c%s' doesn't allow an argument\n"
msgstr ""
msgstr "%s: option `%c%s' erlaubt kein Argument\n"
#: support/getopt.c:715 support/getopt.c:888
#, c-format
msgid "%s: option `%s' requires an argument\n"
msgstr ""
msgstr "%s: option `%s' benötigt ein Argument\n"
#. --option
#: support/getopt.c:744
#, c-format
msgid "%s: unrecognized option `--%s'\n"
msgstr ""
msgstr "%s: unbekannte Option: `--%s'\n"
#. +option or -option
#: support/getopt.c:748
#, c-format
msgid "%s: unrecognized option `%c%s'\n"
msgstr ""
msgstr "%s: unbekannte Option: `%c%s'\n"
#. 1003.2 specifies the format of this message.
#: support/getopt.c:774
#, c-format
msgid "%s: illegal option -- %c\n"
msgstr ""
msgstr "%s: illegale Option -- %c\n"
#: support/getopt.c:777
#, c-format
msgid "%s: invalid option -- %c\n"
msgstr ""
msgstr "%s: ungültige Option -- %c\n"
#. 1003.2 specifies the format of this message.
#: support/getopt.c:807 support/getopt.c:937
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr ""
msgstr "%s: option benötigt ein Argument -- %c\n"
#: support/getopt.c:854
#, c-format
msgid "%s: option `-W %s' is ambiguous\n"
msgstr ""
msgstr "%s: Option `-W %s' ist mehrdeutig\n"
#: support/getopt.c:872
#, c-format
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
msgstr "%s: Option `-W %s' erlaubt kein Argument\n"
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
msgstr "%d bytes gelesen"
#: lib/read_data.c:49
msgid "read data size"
msgstr ""
msgstr "lese Datenmenge"
#: lib/read_data.c:66
#, c-format
msgid "read data %d bytes"
msgstr ""
msgstr "%d Datenbytes gelesen"
#: lib/write.c:48
#, c-format
msgid "write %d bytes"
msgstr ""
msgstr "schreibe %d bytes"
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
msgstr "Fehlerdiagnose einschalten"
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
msgstr "DIAGNOSE"
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
msgstr "Gesprächige Ausgabe einschalten"
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
msgstr "GESPRAECHIG"
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
msgstr "Nicht in den Hintergrund abforken"
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
msgstr "KEIN-DÄMON"
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
msgstr "Durch inetd aufgerufen"
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
msgstr "INETD"
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"
"Run '%s --help' to see a full list of available command line options.\n"
msgstr ""
"Fehler bei Option %s: %s.\n"
"Führen Sie `%s --help' aus, um eine volle Liste der verfügbaren Optionen zu "
"sehen.\n"
#~ msgid "Boot time (seconds sice epoch)"
#~ msgstr "Startzeit (Sekunden seit Epoche)"
#~ msgid "Boot time"
#~ msgstr "Startzeit"
#~ msgid "Pointer Size on the Server (in bits)"
#~ msgstr "Zeigergröße auf dem Server (in Bits)"
#~ msgid "Pointer Size"
#~ msgstr "Zeigergröße"
#~ msgid "Additional process groups"
#~ msgstr "Zusätzliche Prozessgruppen"
#~ msgid "Number of additional process groups"
#~ msgstr "Anzahl zusätzlicher Prozeßgruppen"
#~ msgid "Filesystem Group ID"
#~ msgstr "Dateisystem-Gruppen-ID"
#~ msgid "Filesystem User ID"
#~ msgstr "Dateisystem-Benutzer-ID"
#~ msgid "Saved Group ID"
#~ msgstr "Gespeicherte Gruppen-ID"
#~ msgid "Saved User ID"
#~ msgstr "Gespeicherte Benutzer-ID"
#~ msgid "Groups"
#~ msgstr "Gruppen"
#~ msgid "NGroups"
#~ msgstr "NGruppen"
#~ msgid "FsGid"
#~ msgstr "FsGid"
#~ msgid "FsUid"
#~ msgstr "FsUid"
#~ msgid "SGid"
#~ msgstr "SGid"
#~ msgid "SUid"
#~ msgstr "SUid"
#~ msgid "XCPU_Flags"
#~ msgstr "XCPU_Flags"
#~ msgid "last_processor"
#~ msgstr "last_processor"
#~ msgid "processor"
#~ msgstr "processor"
#~ msgid "has_cpu"
#~ msgstr "has_cpu"
#~ msgid "effective GID of process"
#~ msgstr "effektive GID des Prozesses"
#~ msgid "effective UID of process"
#~ msgstr "effektive UID des Prozesses"
#~ msgid "Last Processor"
#~ msgstr "Letzter Prozessor"
#~ msgid "Processor"
#~ msgstr "Prozessor"
#~ msgid "Has CPU"
#~ msgstr "Hat CPU"
#~ msgid "RGID"
#~ msgstr "RGID"
#~ msgid "RUID"
#~ msgstr "RUID"
#~ msgid "Start of mmap()ed areas"
#~ msgstr "Start der mmap()-Zonen"
#~ msgid "Brk_End"
#~ msgstr "Brk_Ende"
#~ msgid "Brk_Start"
#~ msgstr "Brk_Start"
#~ msgid "Address of end of data segment"
#~ msgstr "Addresse, an der das Datensegment aufhört"
#~ msgid "Address of beginning of data segment"
#~ msgstr "Adresse, an der das Datensegment anfängt"
#~ msgid "Env_End"
#~ msgstr "Env_Ende"
#~ msgid "Env_Start"
#~ msgstr "Env_Start"
#~ msgid "Arg_End"
#~ msgstr "Arg_Ende"
#~ msgid "Arg_Start"
#~ msgstr "Arg_Start"
#~ msgid "Start_MMap"
#~ msgstr "Start_MMap"
#~ msgid "Brk"
#~ msgstr "Brk"
#~ msgid "Start_Brk"
#~ msgstr "Start_Brk"
#~ msgid "End_Data"
#~ msgstr "Ende_Daten"
#~ msgid "Start_Data"
#~ msgstr "Start_Daten"
#~ msgid "SMP CPU Flags"
#~ msgstr "SMP-CPU-Flags"

272
po/es.po
View File

@@ -1,7 +1,12 @@
# Translation into spanish of glibtop
#
# FIXME: the strings still left empty are the ones I've no idea how
# to translate them; if anyone has a suggestion...
#
msgid ""
msgstr ""
"Project-Id-Version: glibtop 0.99.3\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"Project-Id-Version: glibtop 1.1.1\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
@@ -9,50 +14,6 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Date: 1998-12-13 01:56:01+0100\n"
"From: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Xgettext-Options: --default-domain=libgtop --directory=.. --add-comments "
"--keyword=_ --keyword=N_ --files-from=./POTFILES.in\n"
"Files: sysdeps/names/cpu.c sysdeps/names/fsusage.c sysdeps/names/loadavg.c "
"sysdeps/names/mem.c sysdeps/names/mountlist.c sysdeps/names/msg_limits.c "
"sysdeps/names/prockernel.c sysdeps/names/proclist.c sysdeps/names/procmap.c "
"sysdeps/names/procmem.c sysdeps/names/procsegment.c "
"sysdeps/names/procsignal.c sysdeps/names/procstate.c "
"sysdeps/names/proctime.c sysdeps/names/procuid.c sysdeps/names/sem_limits.c "
"sysdeps/names/shm_limits.c sysdeps/names/swap.c sysdeps/names/sysdeps.c "
"sysdeps/names/uptime.c support/argp-fmtstream.h support/argp-parse.c "
"support/argp.h support/easy-vsnprintf.c support/error.c support/error.h "
"support/getopt.c lib/close.c lib/command.c lib/init.c lib/open.c "
"lib/parameter.c lib/read.c lib/read_data.c lib/sysdeps.c lib/write.c "
"include/glibtop/close.h include/glibtop/command.h include/glibtop/cpu.h "
"include/glibtop/error.h include/glibtop/fsusage.h include/glibtop/global.h "
"include/glibtop/gnuserv.h include/glibtop/inodedb.h "
"include/glibtop/loadavg.h include/glibtop/mem.h include/glibtop/mountlist.h "
"include/glibtop/msg_limits.h include/glibtop/open.h "
"include/glibtop/parameter.h include/glibtop/prockernel.h "
"include/glibtop/proclist.h include/glibtop/procmap.h "
"include/glibtop/procmem.h include/glibtop/procsegment.h "
"include/glibtop/procsignal.h include/glibtop/procstate.h "
"include/glibtop/proctime.h include/glibtop/procuid.h include/glibtop/read.h "
"include/glibtop/read_data.h include/glibtop/sem_limits.h "
"include/glibtop/shm_limits.h include/glibtop/signal.h include/glibtop/swap.h "
"include/glibtop/sysdeps.h include/glibtop/sysinfo.h include/glibtop/types.h "
"include/glibtop/union.h include/glibtop/uptime.h include/glibtop/version.h "
"include/glibtop/write.h include/glibtop/xmalloc.h "
"src/inodedb/file_by_inode.c src/inodedb/mkinodedb.c src/daemon/gnuserv.c "
"src/daemon/io.c src/daemon/main.c src/daemon/server.c src/daemon/slave.c "
"src/daemon/version.c sysdeps/common/error.c sysdeps/common/fsusage.c "
"sysdeps/common/gnuslib.c sysdeps/common/inodedb.c sysdeps/common/mountlist.c "
"sysdeps/common/sysdeps_suid.c sysdeps/common/xmalloc.c "
"sysdeps/common/fsusage.h sysdeps/common/mountlist.h sysdeps/linux/close.c "
"sysdeps/linux/cpu.c sysdeps/linux/loadavg.c sysdeps/linux/mem.c "
"sysdeps/linux/msg_limits.c sysdeps/linux/open.c sysdeps/linux/prockernel.c "
"sysdeps/linux/proclist.c sysdeps/linux/procmap.c sysdeps/linux/procmem.c "
"sysdeps/linux/procsegment.c sysdeps/linux/procsignal.c "
"sysdeps/linux/procstate.c sysdeps/linux/proctime.c sysdeps/linux/procuid.c "
"sysdeps/linux/sem_limits.c sysdeps/linux/shm_limits.c "
"sysdeps/linux/siglist.c sysdeps/linux/swap.c sysdeps/linux/sysinfo.c "
"sysdeps/linux/uptime.c sysdeps/linux/glibtop_machine.h "
"sysdeps/linux/glibtop_server.h\n"
#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
@@ -292,39 +253,39 @@ msgstr "Cantidad de cabeceras de mensajes sistema"
#: sysdeps/names/prockernel.c:42
msgid "K_Flags"
msgstr ""
msgstr "K_Flags"
#: sysdeps/names/prockernel.c:42
msgid "Min_Flt"
msgstr ""
msgstr "Min_Flt"
#: sysdeps/names/prockernel.c:42
msgid "Maj_Flt"
msgstr ""
msgstr "Maj_Flt"
#: sysdeps/names/prockernel.c:42
msgid "CMin_Flt"
msgstr ""
msgstr "CMin_Flt"
#: sysdeps/names/prockernel.c:43
msgid "CMaj_Flt"
msgstr ""
msgstr "CMaj_Flt"
#: sysdeps/names/prockernel.c:43
msgid "KStk_ESP"
msgstr ""
msgstr "KStk_ESP"
#: sysdeps/names/prockernel.c:43
msgid "KStk_EIP"
msgstr ""
msgstr "KStk_EIP"
#: sysdeps/names/prockernel.c:43
msgid "NWChan"
msgstr ""
msgstr "NWChan"
#: sysdeps/names/prockernel.c:44
msgid "WChan"
msgstr ""
msgstr "WChan"
#. K_Flags
#: sysdeps/names/prockernel.c:50
@@ -442,8 +403,8 @@ msgid "Number of pages of virtual memory"
msgstr "Cantidad de páginas de memoria virtual"
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgstr "Cantidad de páginas de conjuntos compartidos (que no estan en swap)"
msgid "Number of resident set (non-swapped) pages"
msgstr "Cantidad de páginas de conjuntos residentes (que no estan en swap)"
#: sysdeps/names/procmem.c:56
msgid "Number of pages of shared (mmap'd) memory"
@@ -470,19 +431,19 @@ msgstr ""
#: sysdeps/names/procsegment.c:42
msgid "Text_RSS"
msgstr ""
msgstr "Text_RSS"
#: sysdeps/names/procsegment.c:42
msgid "ShLib_RSS"
msgstr ""
msgstr "ShLib_RSS"
#: sysdeps/names/procsegment.c:42
msgid "Data_RSS"
msgstr ""
msgstr "Data_RSS"
#: sysdeps/names/procsegment.c:42
msgid "Stack_RSS"
msgstr ""
msgstr "Stack_RSS"
#: sysdeps/names/procsegment.c:43
msgid "Dirty Size"
@@ -490,15 +451,15 @@ msgstr ""
#: sysdeps/names/procsegment.c:43
msgid "Start_Code"
msgstr ""
msgstr "Inicio_Código"
#: sysdeps/names/procsegment.c:43
msgid "End_Code"
msgstr ""
msgstr "Fin_Código"
#: sysdeps/names/procsegment.c:43
msgid "Start_Stack"
msgstr ""
msgstr "Inicio_Pila"
#: sysdeps/names/procsegment.c:48
msgid "Text resident set size"
@@ -566,7 +527,7 @@ msgstr "M
#: sysdeps/names/procstate.c:40
msgid "Cmd"
msgstr ""
msgstr "Cmd"
#: sysdeps/names/procstate.c:40
msgid "State"
@@ -574,11 +535,11 @@ msgstr "Estado"
#: sysdeps/names/procstate.c:40
msgid "UID"
msgstr ""
msgstr "UID"
#: sysdeps/names/procstate.c:40
msgid "GID"
msgstr ""
msgstr "GID"
#: sysdeps/names/procstate.c:45
msgid "Basename of executable file in call to exec()"
@@ -598,7 +559,7 @@ msgstr "GID del proceso"
#: sysdeps/names/proctime.c:44
msgid "Start_Time"
msgstr ""
msgstr "Tiempo_inicio"
#: sysdeps/names/proctime.c:44
msgid "RTime"
@@ -690,27 +651,27 @@ msgstr "Tiempo CPU multi procesador en modo n
#: sysdeps/names/procuid.c:56
msgid "Uid"
msgstr ""
msgstr "Uid"
#: sysdeps/names/procuid.c:56
msgid "EUid"
msgstr ""
msgstr "EUid"
#: sysdeps/names/procuid.c:56
msgid "Gid"
msgstr ""
msgstr "Gid"
#: sysdeps/names/procuid.c:56
msgid "EGid"
msgstr ""
msgstr "EGid"
#: sysdeps/names/procuid.c:56
msgid "Pid"
msgstr ""
msgstr "Pid"
#: sysdeps/names/procuid.c:57
msgid "PPid"
msgstr ""
msgstr "PPid"
#: sysdeps/names/procuid.c:57
msgid "PGrp"
@@ -722,7 +683,7 @@ msgstr "Sesi
#: sysdeps/names/procuid.c:57
msgid "Tty"
msgstr ""
msgstr "Tty"
#: sysdeps/names/procuid.c:58
msgid "TPGid"
@@ -806,7 +767,7 @@ msgstr "Cantidad m
#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
msgid "Max ops per semop call"
msgstr ""
msgstr "Cantidad máxima de ops por llamada semop"
#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
msgid "Max number of undo entries per process"
@@ -986,7 +947,7 @@ msgstr ""
#: sysdeps/names/uptime.c:44
msgid "Time in seconds since system boot"
msgstr "Tiempo en segungos desde el inicio del sistema"
msgstr "Tiempo en segundos desde el inicio del sistema"
#: sysdeps/names/uptime.c:45
msgid "Time in seconds the system spent in the idle task since system boot"
@@ -1057,7 +1018,7 @@ msgstr "%s: la opci
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr "%s: la opción `-W %s' no admite argumentos\n"
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr "leídos %d bytes"
@@ -1076,39 +1037,39 @@ msgstr "le
msgid "write %d bytes"
msgstr "escritos %d bytes"
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr "Activar depuración"
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr "DEPURACIÓN"
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr "Activa salida detallada"
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
msgstr "DETALLADO"
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr "No abrir un proceso de fondo"
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
msgstr "NO-DAEMON"
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr "Invocado desde inetd"
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
msgstr "INETD"
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"
@@ -1117,26 +1078,125 @@ msgstr ""
"Error con la opción %s: %s.\n"
"Lance '%s --help' para ver una lista completa de las opciones disponibles.\n"
#~ msgid "(PROGRAM ERROR) Option should have been recognized!?"
#~ msgstr "(ERROR PROGRAMA) ¿¡La opción debería haber sido reconocida!?"
#~ msgid "SMP CPU Flags"
#~ msgstr "Banderas de CPU SMP"
#~ msgid "%s: Too many arguments\n"
#~ msgstr "%s: Demasiados argumentos\n"
#~ msgid "Brk"
#~ msgstr "Brk"
#~ msgid "(PROGRAM ERROR) No version known!?"
#~ msgstr "(ERROR PROGRAMA) ¿¡ Sin versión !?"
#~ msgid "End_Data"
#~ msgstr "Fin_Datos"
#~ msgid "Print program version"
#~ msgstr "Muestra la versión del programa"
#~ msgid "Start_Brk"
#~ msgstr "Inicio_Brk"
#~ msgid "Hang for SECS seconds (default 3600)"
#~ msgstr "Colgar por SECS segundos (3600 por omisión)"
#~ msgid "Start_Data"
#~ msgstr "Inicio_Datos"
#~ msgid "Set the program name"
#~ msgstr "Define el nombre del programa"
#~ msgid "Arg_Start"
#~ msgstr "Inicio_Arg"
#~ msgid "Give a short usage message"
#~ msgstr "Muestra una síntesis del uso de la memoria"
#~ msgid "Start_MMap"
#~ msgstr "Inicio_MMap"
#~ msgid "Give this help list"
#~ msgstr "Muestra esta lista de ayuda"
#~ msgid "Arg_End"
#~ msgstr "Fin_Arg"
#~ msgid "Env_End"
#~ msgstr "Fin_Entorno"
#~ msgid "Env_Start"
#~ msgstr "Inicio_Entorno"
#~ msgid "Address of beginning of data segment"
#~ msgstr "Dirección de inicio del segmento de datos"
#~ msgid "Address of end of data segment"
#~ msgstr "Dirección de fin del segmento de datos"
#~ msgid "Brk_Start"
#~ msgstr "Inicio_Brk"
#~ msgid "Brk_End"
#~ msgstr "Fin_Brk"
#~ msgid "Start of mmap()ed areas"
#~ msgstr "Inicio de las areas mmap()eadas"
#~ msgid "RUID"
#~ msgstr "RUID"
#~ msgid "Has CPU"
#~ msgstr "Tiene CPU"
#~ msgid "Processor"
#~ msgstr "Procesador"
#~ msgid "RGID"
#~ msgstr "RGID"
#~ msgid "Last Processor"
#~ msgstr "Último procesador"
#~ msgid "effective UID of process"
#~ msgstr "UID efectivo del proceso"
#~ msgid "effective GID of process"
#~ msgstr "GID efectivo del proceso"
#~ msgid "has_cpu"
#~ msgstr "tiene_cpu"
#~ msgid "processor"
#~ msgstr "procesador"
#~ msgid "last_processor"
#~ msgstr "último_procesador"
#~ msgid "SUid"
#~ msgstr "SUid"
#~ msgid "FsGid"
#~ msgstr "FsGid"
#~ msgid "FsUid"
#~ msgstr "FsUid"
#~ msgid "SGid"
#~ msgstr "SGid"
#~ msgid "NGroups"
#~ msgstr "NGrupos"
#~ msgid "Groups"
#~ msgstr "Grupos"
#~ msgid "Saved User ID"
#~ msgstr "ID de usuario guardado"
#~ msgid "Saved Group ID"
#~ msgstr "ID de grupo guardado"
#~ msgid "Filesystem User ID"
#~ msgstr "ID de usuario del sistema de archivos"
#~ msgid "Filesystem Group ID"
#~ msgstr "ID de grupo del sistema de archivos"
#~ msgid "Number of additional process groups"
#~ msgstr "Cantidad de grupos de procesos adicionales"
#~ msgid "Additional process groups"
#~ msgstr "Grupos de procesos adicionales"
#~ msgid "Pointer Size"
#~ msgstr "Tamaño del puntero"
#~ msgid "Pointer Size on the Server (in bits)"
#~ msgstr "Tamaño del puntero en el servidor (en bits)"
#~ msgid "Boot time"
#~ msgstr "Momento de arranque"
#~ msgid "Boot time (seconds sice epoch)"
#~ msgstr "Momento de arranque (en segundos des \"la Época\")"

View File

@@ -2,17 +2,16 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Project-Id-Version: glibtop cvs\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
@@ -380,7 +379,7 @@ msgid "Number of pages of virtual memory"
msgstr ""
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgid "Number of resident set (non-swapped) pages"
msgstr ""
#: sysdeps/names/procmem.c:56
@@ -992,7 +991,7 @@ msgstr ""
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -1011,39 +1010,39 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

View File

@@ -2,17 +2,16 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Project-Id-Version: glibtop cvs\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
@@ -380,7 +379,7 @@ msgid "Number of pages of virtual memory"
msgstr ""
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgid "Number of resident set (non-swapped) pages"
msgstr ""
#: sysdeps/names/procmem.c:56
@@ -992,7 +991,7 @@ msgstr ""
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -1011,39 +1010,39 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

View File

@@ -2,17 +2,16 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Project-Id-Version: glibtop cvs\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
@@ -380,7 +379,7 @@ msgid "Number of pages of virtual memory"
msgstr ""
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgid "Number of resident set (non-swapped) pages"
msgstr ""
#: sysdeps/names/procmem.c:56
@@ -992,7 +991,7 @@ msgstr ""
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -1011,39 +1010,39 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

View File

@@ -2,17 +2,16 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Project-Id-Version: glibtop cvs\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
@@ -380,7 +379,7 @@ msgid "Number of pages of virtual memory"
msgstr ""
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgid "Number of resident set (non-swapped) pages"
msgstr ""
#: sysdeps/names/procmem.c:56
@@ -992,7 +991,7 @@ msgstr ""
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -1011,39 +1010,39 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

View File

@@ -2,17 +2,16 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Project-Id-Version: glibtop cvs\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
@@ -380,7 +379,7 @@ msgid "Number of pages of virtual memory"
msgstr ""
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgid "Number of resident set (non-swapped) pages"
msgstr ""
#: sysdeps/names/procmem.c:56
@@ -992,7 +991,7 @@ msgstr ""
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -1011,39 +1010,39 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

View File

@@ -2,17 +2,16 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Project-Id-Version: glibtop cvs\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
@@ -380,7 +379,7 @@ msgid "Number of pages of virtual memory"
msgstr ""
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgid "Number of resident set (non-swapped) pages"
msgstr ""
#: sysdeps/names/procmem.c:56
@@ -992,7 +991,7 @@ msgstr ""
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -1011,39 +1010,39 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

View File

@@ -2,17 +2,16 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Project-Id-Version: glibtop cvs\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
@@ -380,7 +379,7 @@ msgid "Number of pages of virtual memory"
msgstr ""
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgid "Number of resident set (non-swapped) pages"
msgstr ""
#: sysdeps/names/procmem.c:56
@@ -992,7 +991,7 @@ msgstr ""
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -1011,39 +1010,39 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

1078
po/fi.po Normal file

File diff suppressed because it is too large Load Diff

445
po/fr.po

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libgtop VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1998-12-11 06:53+09:00\n"
"Last-Translator: Eiichiro ITANI <emu@ceres.dti.ne.jp>\n"
"Language-Team: <gnome@lists.hypercore.co.jp>\n"
@@ -396,7 +396,8 @@ msgid "Number of pages of virtual memory"
msgstr "仮想メモリのページ数"
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
#, fuzzy
msgid "Number of resident set (non-swapped) pages"
msgstr "常駐セット(スワップされない)ページ数"
#: sysdeps/names/procmem.c:56
@@ -1004,7 +1005,7 @@ msgstr ""
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -1023,39 +1024,39 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

211
po/ko.po
View File

@@ -4,9 +4,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop VERSION\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: 1999-02-04 14:31:38+0900\n"
"Project-Id-Version: libgtop 1.0.2\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1999-03-30 10:40:01+0900\n"
"Last-Translator: Sung-Hyun Nam <namsh@lgic.co.kr>\n"
"Language-Team: Korean <ko@li.org>\n"
"MIME-Version: 1.0\n"
@@ -295,6 +295,15 @@ msgid ""
"\n"
"The math bit should be a decimal 4, and the traced bit is decimal 10."
msgstr ""
"프로세스의 커널 플래그.\n"
"\n"
"리눅스에서는 현재 모든 플래그의 수학 비트가 켜져있습니다. crt0.s가 수학 "
"에뮬레이션을 체크하기 때문인 데, 그래서 출력결과에는 포함되지 않습니다.\n"
"\n"
"이것은 버그라고 생각하는 데, 그것은 모든 프로세스가 C 언어로 짜여지는 건 "
"아니기 때문입니다.\n"
"\n"
"수학 비트는 십진수 4이어야 하며, 추적(trace) 비트는 십진수 10이어야 합니다."
#. Min_Flt
#: sysdeps/names/prockernel.c:59
@@ -302,6 +311,8 @@ msgid ""
"The number of minor faults the process has made, those which have not "
"required loading a memory page from disk."
msgstr ""
"디스크로부터 메모리 페이지 적재를 필요로 하지 않는 프로세스로부터 발생된 "
"사소한 폴트 갯수"
#. Maj_Flt
#: sysdeps/names/prockernel.c:62
@@ -309,16 +320,18 @@ msgid ""
"The number of major faults the process has made, those which have required "
"loading a memory page from disk."
msgstr ""
"디스크로부터 메모리 페이지 적재를 필요로 하는 프로세스로부터 발생된 중대한 "
"폴트 갯수"
#. CMin_Flt
#: sysdeps/names/prockernel.c:65
msgid "The number of minor faults that the process and its children have made."
msgstr ""
msgstr "프로세스와 그 자식으로부터 발생된 사소한 폴트 갯수"
#. CMaj_Flt
#: sysdeps/names/prockernel.c:68
msgid "The number of major faults that the process and its children have made."
msgstr ""
msgstr "프로세스와 그 자식으로부터 발생된 중대한 폴트 갯수"
#. KStk_ESP
#: sysdeps/names/prockernel.c:71
@@ -326,11 +339,12 @@ msgid ""
"The current value of esp (32-bit stack pointer), as found in the kernel "
"stack page for the process."
msgstr ""
"프로세스의 커널 스택 페이지에서 찾아진 esp (32비트 스택 포인터)의 현재 값"
#. KStk_EIP
#: sysdeps/names/prockernel.c:74
msgid "The current EIP (32-bit instruction pointer)."
msgstr ""
msgstr "현재의 EIP (32비트 전산명령 포인터)."
#. NWChan
#: sysdeps/names/prockernel.c:76
@@ -340,51 +354,56 @@ msgid ""
"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to "
"see the WCHAN field in action)"
msgstr ""
"프로세스가 기다리고 있는 \"채널\". 시스템 콜의 주소이며, 당신의 문자로 된 "
"이름이 필요할 경우 이름 목록으로 부터 찾아질 수도 있습니다. (만약 "
"/etc/psdatabase가 최근에 갱신되었다면 ps -l을 통해 WCHAN 필드를 볼 수 있을 "
"겁니다."
#. WChan
#: sysdeps/names/prockernel.c:81
msgid "This is the textual name of the `nwchan' field."
msgstr ""
msgstr "이것은 `nwchan' 필드의 문자로 된 이름입니다."
#: sysdeps/names/procmem.c:47
msgid "Size"
msgstr ""
msgstr "크기"
#: sysdeps/names/procmem.c:47
msgid "Virtual"
msgstr ""
msgstr "가상"
#: sysdeps/names/procmem.c:47
msgid "Resident"
msgstr ""
msgstr "상주"
#: sysdeps/names/procmem.c:47
msgid "Share"
msgstr ""
msgstr "공유"
#: sysdeps/names/procmem.c:48
msgid "Resident Set Size"
msgstr ""
msgstr "상주 세트 크기"
#: sysdeps/names/procmem.c:48
msgid "Resident Set Size Limit"
msgstr ""
msgstr "상주 세트 크기 제한"
#: sysdeps/names/procmem.c:53
msgid "Total # of pages of memory"
msgstr ""
msgstr "메모리에서의 총 페이지 수"
#: sysdeps/names/procmem.c:54
msgid "Number of pages of virtual memory"
msgstr ""
msgstr "가상 메모리에서의 페이지 수"
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgstr ""
#, fuzzy
msgid "Number of resident set (non-swapped) pages"
msgstr "상주 세트 (스왑않된) 페이지 수"
#: sysdeps/names/procmem.c:56
msgid "Number of pages of shared (mmap'd) memory"
msgstr ""
msgstr "공유 (mmap'd) 메모리의 페이지 수"
#: sysdeps/names/procmem.c:57
msgid ""
@@ -393,11 +412,15 @@ msgid ""
"space. This does not include pages which have not been demand-loaded in, or "
"which are swapped out."
msgstr ""
"프로세스가 실제 메모리에 가지고 있는 페이지 수로서 관리목적으로 3을 뺀 "
"것입니다. 단지 코드, 데이타 혹은 스택 영역을 합한 페이지 수이며 요구에 의해 "
"얻어지거나 스왑된 페이지는 포함되지 않았습니다."
#: sysdeps/names/procmem.c:62
msgid ""
"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
msgstr ""
"프로세스의 상주 세트 크기를 바이트로 나타낸 현재 제한치 (보통 2,147,483,647)."
#: sysdeps/names/procsegment.c:42
msgid "Text_RSS"
@@ -433,39 +456,39 @@ msgstr ""
#: sysdeps/names/procsegment.c:48
msgid "Text resident set size"
msgstr ""
msgstr "코드 상주 세트 크기"
#: sysdeps/names/procsegment.c:49
msgid "Shared-Lib resident set size"
msgstr ""
msgstr "공유 라이브러리 상주 세트 크기"
#: sysdeps/names/procsegment.c:50
msgid "Data resident set size"
msgstr ""
msgstr "데이타 상주 세트 크기"
#: sysdeps/names/procsegment.c:51
msgid "Stack resident set size"
msgstr ""
msgstr "스택 상주 세트 크기"
#: sysdeps/names/procsegment.c:52
msgid "Total size of dirty pages"
msgstr ""
msgstr "더티(dirty) 페이지의 총 크기"
#: sysdeps/names/procsegment.c:53
msgid "Address of beginning of code segment"
msgstr ""
msgstr "코드 세그먼트의 시작 주소"
#: sysdeps/names/procsegment.c:54
msgid "Address of end of code segment"
msgstr ""
msgstr "코드 세그먼트의 끝 주소"
#: sysdeps/names/procsegment.c:55
msgid "Address of the bottom of stack segment"
msgstr ""
msgstr "스택 세그먼트의 바닥 주소"
#: sysdeps/names/procsignal.c:40
msgid "Signal"
msgstr ""
msgstr "시그널"
#: sysdeps/names/procsignal.c:40
msgid "Blocked"
@@ -513,19 +536,21 @@ msgstr ""
#: sysdeps/names/procstate.c:45
msgid "Basename of executable file in call to exec()"
msgstr ""
msgstr "exec()으로 호출된 실행 파일의 이름"
#: sysdeps/names/procstate.c:46
msgid "Single-Char code for process state (S=sleeping)"
msgstr ""
msgstr "프로세스 상태의 단일문자 코드 (S=sleeping)"
#: sysdeps/names/procstate.c:47
#, fuzzy
msgid "UID of process"
msgstr ""
msgstr "프로세스의 UID"
#: sysdeps/names/procstate.c:48
#, fuzzy
msgid "GID of process"
msgstr ""
msgstr "프로세스의 GID"
#: sysdeps/names/proctime.c:44
msgid "Start_Time"
@@ -573,19 +598,19 @@ msgstr ""
#: sysdeps/names/proctime.c:51
msgid "Start time of process in seconds since the epoch"
msgstr ""
msgstr "시스템이 시작된 이후 초로 나타낸 프로세스의 시작 시간"
#: sysdeps/names/proctime.c:52
msgid "Real time accumulated by process (should be utime + stime)"
msgstr ""
msgstr "프로세스가 사용한 실제 시간 (utime + stime이어야 함)"
#: sysdeps/names/proctime.c:53
msgid "user-mode CPU time accumulated by process"
msgstr ""
msgstr "프로세스가 사용한 사용자 모드 CPU 시간"
#: sysdeps/names/proctime.c:54
msgid "kernel-mode CPU time accumulated by process"
msgstr ""
msgstr "프로세스가 사용한 커널 모드 CPU 시간"
#: sysdeps/names/proctime.c:55
msgid "cumulative utime of process and reaped children"
@@ -607,7 +632,7 @@ msgstr ""
#: sysdeps/names/proctime.c:60
msgid "Tick frequency"
msgstr ""
msgstr "틱 주파수"
#: sysdeps/names/proctime.c:61
msgid "SMP user-mode CPU time accumulated by process"
@@ -647,7 +672,7 @@ msgstr ""
#: sysdeps/names/procuid.c:57
msgid "Session"
msgstr ""
msgstr "세션"
#: sysdeps/names/procuid.c:57
msgid "Tty"
@@ -667,35 +692,35 @@ msgstr ""
#: sysdeps/names/procuid.c:63
msgid "User ID"
msgstr ""
msgstr "사용자 ID"
#: sysdeps/names/procuid.c:64
msgid "Effective User ID"
msgstr ""
msgstr "유효한 사용자 ID"
#: sysdeps/names/procuid.c:65
msgid "Group ID"
msgstr ""
msgstr "그룹 ID"
#: sysdeps/names/procuid.c:66
msgid "Effective Group ID"
msgstr ""
msgstr "유효한 그룹 ID"
#: sysdeps/names/procuid.c:67
msgid "Process ID"
msgstr ""
msgstr "프로세스 ID"
#: sysdeps/names/procuid.c:68
msgid "PID of parent process"
msgstr ""
msgstr "부모 프로세스의 PID"
#: sysdeps/names/procuid.c:69
msgid "Process group ID"
msgstr ""
msgstr "프로세스 그룹 ID"
#: sysdeps/names/procuid.c:70
msgid "Session ID"
msgstr ""
msgstr "세션 ID"
#: sysdeps/names/procuid.c:71
msgid "Full device number of controlling terminal"
@@ -703,15 +728,15 @@ msgstr ""
#: sysdeps/names/procuid.c:72
msgid "Terminal process group ID"
msgstr ""
msgstr "터미널 프로세스 그룹 ID"
#: sysdeps/names/procuid.c:73
msgid "Kernel scheduling priority"
msgstr ""
msgstr "커널 스케쥴링 우선순위"
#: sysdeps/names/procuid.c:74
msgid "Standard unix nice level of process"
msgstr ""
msgstr "프로세스의 표준 유닉스 나이스 레벨"
#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
msgid "Number of entries in semaphore map"
@@ -719,11 +744,11 @@ msgstr ""
#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
msgid "Max number of arrays"
msgstr ""
msgstr "배열의 최대 갯수"
#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
msgid "Max semaphores system wide"
msgstr ""
msgstr "시스템 전체에서의 최대 세마포어수"
#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
msgid "Number of undo structures system wide"
@@ -731,7 +756,7 @@ msgstr ""
#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
msgid "Max semaphores per array"
msgstr ""
msgstr "배열당 최대 세마포어수"
#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
msgid "Max ops per semop call"
@@ -980,7 +1005,7 @@ msgstr "%s: `-W %s'
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr "%s: `-W %s' 옵션은 인자가 필요없습니다\n"
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr ""
@@ -999,41 +1024,105 @@ msgstr ""
msgid "write %d bytes"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr ""
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr ""
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr ""
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr ""
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr ""
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"
"Run '%s --help' to see a full list of available command line options.\n"
msgstr ""
#, fuzzy
#~ msgid "Address of beginning of data segment"
#~ msgstr "코드 세그먼트의 시작 주소"
#, fuzzy
#~ msgid "Address of end of data segment"
#~ msgstr "코드 세그먼트의 끝 주소"
#, fuzzy
#~ msgid "Processor"
#~ msgstr "프로세스 ID"
#, fuzzy
#~ msgid "effective UID of process"
#~ msgstr "프로세스의 UID"
#, fuzzy
#~ msgid "effective GID of process"
#~ msgstr "프로세스의 GID"
#, fuzzy
#~ msgid "processor"
#~ msgstr "프로세스 ID"
#, fuzzy
#~ msgid "NGroups"
#~ msgstr "그룹 ID"
#, fuzzy
#~ msgid "Groups"
#~ msgstr "그룹 ID"
#, fuzzy
#~ msgid "Saved User ID"
#~ msgstr "사용자 ID"
#, fuzzy
#~ msgid "Saved Group ID"
#~ msgstr "그룹 ID"
#, fuzzy
#~ msgid "Filesystem User ID"
#~ msgstr "파일 시스템 사용"
#, fuzzy
#~ msgid "Filesystem Group ID"
#~ msgstr "유효한 그룹 ID"
#, fuzzy
#~ msgid "Number of additional process groups"
#~ msgstr "터미널 프로세스 그룹 ID"
#, fuzzy
#~ msgid "Additional process groups"
#~ msgstr "터미널 프로세스 그룹 ID"
#, fuzzy
#~ msgid "Pointer Size"
#~ msgstr "상주 세트 크기"
#, fuzzy
#~ msgid "Boot time (seconds sice epoch)"
#~ msgstr "시스템이 시작된 이후 초로 나타낸 프로세스의 시작 시간"

1083
po/nl.po Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
# Norwegian translation for Libgtop (bokmål dialect)
# Copyright (C) 1998 Free Software Foundation, Inc.
# Kjartan Maraas <kmaraas@fib.hl.no>, 1998,1999.
# Kjartan Maraas <kmaraas@online.no>, 1998,1999.
#
msgid ""
msgstr ""
"Project-Id-Version: libgtop 0.99.3\n"
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
"PO-Revision-Date: 1999-01-27 23:22+0100\n"
"Last-Translator: Kjartan Maraas <kmaraas@fib.hl.no>\n"
"POT-Creation-Date: 1999-09-16 23:16+0200\n"
"PO-Revision-Date: 1999-07-11 14:25+0200\n"
"Last-Translator: Kjartan Maraas <kmaraas@online.no>\n"
"Language-Team: Norwegian <no@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -397,7 +397,7 @@ msgid "Number of pages of virtual memory"
msgstr "Antall sider virtuelt minne"
#: sysdeps/names/procmem.c:55
msgid "Number of residnet set (non-swapped) pages"
msgid "Number of resident set (non-swapped) pages"
msgstr "Antallet resident sett (ikke swappete) sider"
#: sysdeps/names/procmem.c:56
@@ -1004,7 +1004,7 @@ msgstr "%s: flagget `-W %s' er flertydig\n"
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr "%s: flagget `-W %s' tar ikke argumenter\n"
#: lib/read.c:71
#: lib/read.c:75
#, c-format
msgid "read %d bytes"
msgstr "les %d bytes"
@@ -1023,39 +1023,39 @@ msgstr "les data %d bytes"
msgid "write %d bytes"
msgstr "skriv %d bytes"
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "Enable debugging"
msgstr "Slå på avlusing"
#: src/daemon/gnuserv.c:445
#: src/daemon/gnuserv.c:446
msgid "DEBUG"
msgstr "DEBUG"
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "Enable verbose output"
msgstr "Slå på utfyllende utskrift"
#: src/daemon/gnuserv.c:447
#: src/daemon/gnuserv.c:448
msgid "VERBOSE"
msgstr "VERBOSE"
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "Don't fork into background"
msgstr "Ikke forgren til bakgrunnen"
#: src/daemon/gnuserv.c:449
#: src/daemon/gnuserv.c:450
msgid "NO-DAEMON"
msgstr "NO-DAEMON"
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "Invoked from inetd"
msgstr "Kalt fra inetd"
#: src/daemon/gnuserv.c:451
#: src/daemon/gnuserv.c:452
msgid "INETD"
msgstr "INETD"
#: src/daemon/gnuserv.c:485
#: src/daemon/gnuserv.c:486
#, c-format
msgid ""
"Error on option %s: %s.\n"

1046
po/pl.po Normal file

File diff suppressed because it is too large Load Diff

1068
po/sv.po Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,7 @@
Makefile.in
Makefile
libgtop_daemon
libgtop_server
server.conf
.libs
.deps

View File

@@ -1,3 +1,16 @@
1999-07-29 Martin Baulig <martin@home-of-linux.org>
* Makefile.am: Link the `libgtop_daemon' and the `libgtop_server'
statically if possible.
1999-05-07 Martin Baulig <martin@home-of-linux.org>
* server.c (main): There's some problem with uname () - some systems
like Solaris or Digital Unix return a nonnegative value on success,
some others like Linux return 0. Since all known systems seem to return
a negative value on failure, we simply check whether the return value is
not negative here.
1999-02-19 Martin Baulig <martin@home-of-linux.org>
* Makefile.am (LIBGTOP_COMPILE_SYSTEM): Hardcoded system name.

View File

@@ -41,11 +41,19 @@ libgtop_daemon_LDADD = $(top_builddir)/lib/libgtop.la \
$(GLIB_LIBS)\
@LIBSUPPORT@ @INTLLIBS@ @libs_xauth@
if ENABLE_STATIC
libgtop_daemon_LDFLAGS = -static
endif
libgtop_server_SOURCES = server.c slave.c io.c version.c daemon.h
libgtop_server_LDADD = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid.la \
$(top_builddir)/sysdeps/common/libgtop_suid_common.la \
@LIBSUPPORT@
if ENABLE_STATIC
libgtop_server_LDFLAGS = -static
endif
EXTRA_DIST = server_config.h.in server_config.pl
install-exec-hook:

View File

@@ -219,7 +219,7 @@ permitted (u_long host_addr, int fd)
* GNU_SECURE protocol....
*/
if (verbose_output)
if (verbose_output) {
if (changed_uid || invoked_from_inetd)
syslog_message (LOG_WARNING,
"Xauth authentication not allowed, "
@@ -228,6 +228,7 @@ permitted (u_long host_addr, int fd)
syslog_message (LOG_WARNING,
"Xauth authentication failed, "
"trying GNU_SECURE auth...");
}
}
/* Other auth protocols go here, and should execute only if
@@ -243,7 +244,7 @@ permitted (u_long host_addr, int fd)
if (enable_debug)
syslog_message (LOG_DEBUG, "Trying %lx - %lx",
host_addr, permitted_hosts [i]);
if (permitted_hosts [i] == NULL)
if (permitted_hosts [i] == 0L)
return (FALSE);
if (host_addr == permitted_hosts [i])
return (TRUE);

View File

@@ -62,6 +62,7 @@ int
do_read (int s, void *ptr, size_t total_size)
{
int nread;
char *tmp_ptr;
size_t already_read = 0, remaining = total_size;
while (already_read < total_size) {
@@ -82,7 +83,10 @@ do_read (int s, void *ptr, size_t total_size)
already_read += nread;
remaining -= nread;
(char *) ptr += nread;
/* (char *) ptr += nread; */
tmp_ptr = ptr;
tmp_ptr += nread;
ptr = tmp_ptr;
#ifdef REAL_DEBUG
fprintf (stderr, "READ (%d): %d - %d - %d\n",

View File

@@ -68,7 +68,7 @@ main(int argc, char *argv[])
uid = getuid (); euid = geteuid ();
gid = getgid (); egid = getegid ();
if (uname (&uts)) _exit (1);
if (uname (&uts) < 0) _exit (1);
if (strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) ||
strcmp (uts.release, LIBGTOP_COMPILE_RELEASE) ||

View File

@@ -26,12 +26,12 @@
void
handle_slave_connection (int input, int output)
{
glibtop *server = glibtop_global_server;
int64_t *param_ptr;
const void *ptr;
glibtop *server G_GNUC_UNUSED = glibtop_global_server;
int64_t *param_ptr G_GNUC_UNUSED;
const void *ptr G_GNUC_UNUSED;
unsigned short max_len;
pid_t pid;
unsigned short max_len G_GNUC_UNUSED;
pid_t pid G_GNUC_UNUSED;
glibtop_response _resp, *resp = &_resp;
glibtop_command _cmnd, *cmnd = &_cmnd;
@@ -119,8 +119,8 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
const void *parameter)
{
glibtop *server = glibtop_global_server;
unsigned device;
pid_t pid;
unsigned device G_GNUC_UNUSED;
pid_t pid G_GNUC_UNUSED;
switch (cmnd->command) {
case GLIBTOP_CMND_SYSDEPS:
@@ -128,7 +128,7 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
sizeof (glibtop_sysdeps));
resp->u.sysdeps.features = glibtop_server_features;
resp->u.sysdeps.flags = glibtop_server_features |
(1 << GLIBTOP_SYSDEPS_FEATURES);
(1L << GLIBTOP_SYSDEPS_FEATURES);
resp->offset = _offset_union (sysdeps);
break;
#if GLIBTOP_SUID_CPU

View File

@@ -2,24 +2,5 @@
.libs
Makefile
Makefile.in
close.lo
cpu.lo
init.lo
libgtop_sysdeps.la
loadavg.lo
mem.lo
msg_limits.lo
open.lo
prockernel.lo
proclist.lo
procmem.lo
procsegment.lo
procsignal.lo
procstate.lo
proctime.lo
procuid.lo
sem_limits.lo
shm_limits.lo
swap.lo
sysdeps.lo
uptime.lo
*.lo
*.la

View File

@@ -1 +1,2 @@
Josh Sled <jsled@scam.XCF.Berkeley.EDU>
Martin Baulig (martin@home-of-linux.org)
Josh Sled (jsled@scam.XCF.Berkeley.EDU)

View File

@@ -1,3 +1,60 @@
1999-07-29 Martin Baulig <martin@home-of-linux.org>
* proctime.c (glibtop_get_proc_time_p): Fix bug reported by
Takis Psarogiannakopoulos: `start_time' are seconds since the
epoch as it is stated in the manual.
Tue Jun 15 16:04:10 1999 Timur Bakeyev <mc@bat.ru>
* procuid.c: A fix to a ommitted case, when nor NetBSD, nor
LibGTop >= 1.1.0. This should be investigated closely to cover
more cases....
1999-05-26 Martin Baulig <martin@home-of-linux.org>
More NetBSD 1.4 fixes.
* mem.c, procmap.c, procmem.c: Make this work with the new UVM code.
[FIXME: This following most likely works on all BSD systems, but
this needs to be tested; I made it conditional to NetBSD 1.4 at
the moment. Please extend the conditionals to any other systems
where this works ...]
* procstate.c: Added `ruid' and `rgid' for LibGTop >= 1.1.0.
* procuid.c: Added `ngroups' and `groups' for LibGTop >= 1.1.0.
1999-05-25 Martin Baulig <martin@home-of-linux.org>
* ppp.c: Make this work on NetBSD.
Thu Apr 8 23:47:29 1999 Timur Bakeyev <timur@gnu.org>
* cpu.c, mem.c, netload.c, procargs.c, procstate.c, proctime.c,
sem_limits.c, shm_limits.c, swap.c: Added initial port for BSD/OS
(aka BSDI) 2.x and 3.x. 4.x should also(?) work.
Still, this port require more close look and extended check.
1999-03-19 Martin Baulig <martin@home-of-linux.org>
Added basic support for BSDI. It compiles without problems on
BSDI 2.1 and 3.1, but it is *untested* - I'm neither root on
the machine nor have I access to /dev/kmem, so I don't know
whether it will work.
You need to give configure the `--enable-hacker-mode' parameter
to use the code.
If someone can verify whether it actually works, please let me
know.
1999-03-18 Martin Baulig <martin@home-of-linux.org>
* ppp.c: Don't use `sppp.pp_phase' if we don't HAVE_I4B_ACCT.
This is an ugly hack until someone tells me which versions have
this field and which not.
1999-02-25 Martin Baulig <martin@home-of-linux.org>
* prockernel.c, proctime.c: Applied patch Stanislav Grozev for

View File

@@ -28,13 +28,17 @@
#include <glibtop_suid.h>
static const unsigned long _glibtop_sysdeps_cpu =
(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) +
(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) +
(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY);
(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
(1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) +
(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY);
/* nlist structure for kernel access */
static struct nlist nlst [] = {
#ifdef __bsdi__
{ "_cpustats" },
#else
{ "_cp_time" },
#endif
{ 0 }
};
@@ -66,7 +70,7 @@ glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
struct clockinfo ci;
size_t length;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_CPU), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_CPU), 0);
memset (buf, 0, sizeof (glibtop_cpu));

View File

@@ -26,6 +26,10 @@
BEGIN_LIBGTOP_DECLS
#if _IN_LIBGTOP
#include <sys/param.h>
#endif
#define KI_PROC(ki) (&(ki))->kp_proc)
#define KI_EPROC(ki) (&(ki))->kp_eproc)

View File

@@ -28,7 +28,7 @@
#include <glibtop_suid.h>
static const unsigned long _glibtop_sysdeps_loadavg =
(1 << GLIBTOP_LOADAVG_LOADAVG);
(1L << GLIBTOP_LOADAVG_LOADAVG);
/* Init function. */
@@ -46,7 +46,7 @@ glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
double ldavg[3];
int i;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_LOADAVG), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_LOADAVG), 0);
memset (buf, 0, sizeof (glibtop_loadavg));

View File

@@ -31,14 +31,19 @@
#include <sys/vmmeter.h>
#include <vm/vm_param.h>
static const unsigned long _glibtop_sysdeps_mem =
(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) +
(1 << GLIBTOP_MEM_FREE) + (1 << GLIBTOP_MEM_SHARED) +
(1 << GLIBTOP_MEM_BUFFER) +
#ifdef __FreeBSD__
(1 << GLIBTOP_MEM_CACHED) +
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
#include <uvm/uvm_extern.h>
#endif
(1 << GLIBTOP_MEM_USER) + (1 << GLIBTOP_MEM_LOCKED);
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) +
#ifdef __FreeBSD__
(1L << GLIBTOP_MEM_CACHED) +
#endif
(1L << GLIBTOP_MEM_USER) + (1L << GLIBTOP_MEM_LOCKED);
#ifndef LOG1024
#define LOG1024 10
@@ -52,18 +57,33 @@ static int pageshift; /* log base 2 of the pagesize */
/* nlist structure for kernel access */
static struct nlist nlst [] = {
{ "_cnt" },
#ifdef __FreeBSD__
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
{ "_bufpages" },
{ 0 }
#else
#if defined(__bsdi__)
{ "_bufcachemem" },
#elif defined(__FreeBSD__)
{ "_bufspace" },
#else
{ "_bufpages" },
#endif
{ "_cnt" },
{ 0 }
#endif
};
/* MIB array for sysctl */
/* static int mib_length=2; */
static int mib_length=2;
#ifdef __bsdi__
static int mib [] = { CTL_VM, VM_TOTAL };
#else
static int mib [] = { CTL_VM, VM_METER };
#endif
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
#endif
/* Init function. */
@@ -97,12 +117,18 @@ glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
{
struct vmtotal vmt;
size_t length_vmt;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
struct uvmexp uvmexp;
size_t length_uvmexp;
#else
struct vmmeter vmm;
#endif
u_int v_used_count;
u_int v_total_count;
u_int v_free_count;
int bufspace;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MEM), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MEM), 0);
memset (buf, 0, sizeof (glibtop_mem));
@@ -116,18 +142,26 @@ glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
/* Get the data from sysctl */
length_vmt = sizeof (vmt);
if (sysctl (mib, 2, &vmt, &length_vmt, NULL, 0)) {
glibtop_warn_io_r (server, "sysctl");
glibtop_warn_io_r (server, "sysctl (vmt)");
return;
}
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
length_uvmexp = sizeof (uvmexp);
if (sysctl (mib_uvmexp, 2, &uvmexp, &length_uvmexp, NULL, 0)) {
glibtop_warn_io_r (server, "sysctl (uvmexp)");
return;
}
#else
/* Get the data from kvm_* */
if (kvm_read (server->machine.kd, nlst[0].n_value,
if (kvm_read (server->machine.kd, nlst[1].n_value,
&vmm, sizeof (vmm)) != sizeof (vmm)) {
glibtop_warn_io_r (server, "kvm_read (cnt)");
return;
}
#endif
if (kvm_read (server->machine.kd, nlst[1].n_value,
if (kvm_read (server->machine.kd, nlst[0].n_value,
&bufspace, sizeof (bufspace)) != sizeof (bufspace)) {
glibtop_warn_io_r (server, "kvm_read (bufspace)");
return;
@@ -135,25 +169,43 @@ glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
/* convert memory stats to Kbytes */
#ifdef __FreeBSD__
#if defined(__FreeBSD__)
v_total_count = vmm.v_page_count;
#else
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
v_total_count = uvmexp.reserve_kernel +
uvmexp.reserve_pagedaemon +
uvmexp.free + uvmexp.wired + uvmexp.active +
uvmexp.inactive;
#else
v_total_count = vmm.v_kernel_pages +
vmm.v_free_count + vmm.v_wire_count +
vmm.v_active_count + vmm.v_inactive_count;
#endif
#endif
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
v_used_count = uvmexp.active + uvmexp.inactive;
v_free_count = uvmexp.free;
#else
v_used_count = vmm.v_active_count + vmm.v_inactive_count;
v_free_count = vmm.v_free_count;
#endif
buf->total = (u_int64_t) pagetok (v_total_count) << LOG1024;
buf->used = (u_int64_t) pagetok (v_used_count) << LOG1024;
buf->free = (u_int64_t) pagetok (vmm.v_free_count) << LOG1024;
buf->free = (u_int64_t) pagetok (v_free_count) << LOG1024;
#ifdef __FreeBSD__
buf->cached = (u_int64_t) pagetok (vmm.v_cache_count) << LOG1024;
#endif
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
buf->locked = (u_int64_t) pagetok (uvmexp.wired) << LOG1024;
#else
buf->locked = (u_int64_t) pagetok (vmm.v_wire_count) << LOG1024;
#endif
buf->shared = (u_int64_t) pagetok (vmt.t_rmshr) << LOG1024;
#if __FreeBSD__

View File

@@ -27,9 +27,26 @@
#include <glibtop_suid.h>
#if (defined __bsdi__) && (_BSDI_VERSION < 199700)
/* Older versions of BSDI don't seem to have this. */
void
glibtop_init_msg_limits_p (glibtop *server)
{ }
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));
}
#else
/* #define KERNEL to get declaration of `struct msginfo'. */
#ifdef __FreeBSD__
#if (defined __FreeBSD__) || (defined __bsdi__)
#define KERNEL 1
#else
#define _KERNEL 1
@@ -39,9 +56,9 @@
#include <sys/msg.h>
static const unsigned long _glibtop_sysdeps_msg_limits =
(1 << GLIBTOP_IPC_MSGMAX) + (1 << GLIBTOP_IPC_MSGMNI) +
(1 << GLIBTOP_IPC_MSGMNB) + (1 << GLIBTOP_IPC_MSGTQL) +
(1 << GLIBTOP_IPC_MSGSSZ);
(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'
@@ -78,7 +95,7 @@ glibtop_init_msg_limits_p (glibtop *server)
void
glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
{
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MSG_LIMITS), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0);
memset (buf, 0, sizeof (glibtop_msg_limits));
@@ -93,3 +110,6 @@ glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
buf->flags = _glibtop_sysdeps_msg_limits;
}
#endif /* either a newer BSDI or no BSDI at all. */

View File

@@ -39,20 +39,20 @@
#include <netinet/in_var.h>
static const unsigned long _glibtop_sysdeps_netload =
(1 << GLIBTOP_NETLOAD_IF_FLAGS) +
(1 << GLIBTOP_NETLOAD_MTU) +
(1 << GLIBTOP_NETLOAD_SUBNET) +
(1 << GLIBTOP_NETLOAD_ADDRESS) +
(1 << GLIBTOP_NETLOAD_PACKETS_IN) +
(1 << GLIBTOP_NETLOAD_PACKETS_OUT) +
(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
(1 << GLIBTOP_NETLOAD_BYTES_IN) +
(1 << GLIBTOP_NETLOAD_BYTES_OUT) +
(1 << GLIBTOP_NETLOAD_BYTES_TOTAL) +
(1 << GLIBTOP_NETLOAD_ERRORS_IN) +
(1 << GLIBTOP_NETLOAD_ERRORS_OUT) +
(1 << GLIBTOP_NETLOAD_ERRORS_TOTAL) +
(1 << GLIBTOP_NETLOAD_COLLISIONS);
(1L << GLIBTOP_NETLOAD_IF_FLAGS) +
(1L << GLIBTOP_NETLOAD_MTU) +
(1L << GLIBTOP_NETLOAD_SUBNET) +
(1L << GLIBTOP_NETLOAD_ADDRESS) +
(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);
/* nlist structure for kernel access */
static struct nlist nlst [] = {
@@ -87,7 +87,7 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
struct in_ifaddr in;
} ifaddr;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_NETLOAD), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_NETLOAD), 0);
memset (buf, 0, sizeof (glibtop_netload));
@@ -107,7 +107,7 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
sizeof (ifnet)) != sizeof (ifnet))
glibtop_error_io_r (server, "kvm_read (ifnetaddr)");
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__bsdi__)
if (kvm_read (server->machine.kd, (u_long) ifnet.if_name,
tname, 16) != 16)
glibtop_error_io_r (server, "kvm_read (if_name)");
@@ -116,9 +116,9 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
tname [15] = 0;
#endif
#if (defined __FreeBSD__) && (__FreeBSD_version >= 300000)
#if defined(__FreeBSD__) && (__FreeBSD_version >= 300000)
ifaddraddr = (u_long) ifnet.if_addrhead.tqh_first;
#elif (defined __FreeBSD__)
#elif defined(__FreeBSD__) || defined(__bsdi__)
ifaddraddr = (u_long) ifnet.if_addrlist;
#else
ifaddraddr = (u_long) ifnet.if_addrlist.tqh_first;
@@ -194,18 +194,18 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
return;
}
#if (defined __FreeBSD__) && (__FreeBSD_version >= 300000)
#if defined(__FreeBSD__) && (__FreeBSD_version >= 300000)
ifaddraddr = (u_long)ifaddr.ifa.ifa_link.tqe_next;
#elif (defined __FreeBSD__)
#elif defined(__FreeBSD__) || defined(__bsdi__)
ifaddraddr = (u_long)ifaddr.ifa.ifa_next;
#else
ifaddraddr = (u_long)ifaddr.ifa.ifa_list.tqe_next;
#endif
}
#if (defined __FreeBSD__) && (__FreeBSD_version >= 300000)
#if defined(__FreeBSD__) && (__FreeBSD_version >= 300000)
ifnetaddr = (u_long) ifnet.if_link.tqe_next;
#elif (defined __FreeBSD__)
#elif defined(__FreeBSD__) || defined(__bsdi__)
ifnetaddr = (u_long) ifnet.if_next;
#else
ifnetaddr = (u_long) ifnet.if_list.tqe_next;

View File

@@ -39,7 +39,7 @@
#include <net/netisr.h>
#include <net/route.h>
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <net/if_sppp.h>
#else
#include <i4b/sppp/if_sppp.h>
@@ -51,11 +51,11 @@
#endif
static const unsigned long _glibtop_sysdeps_ppp =
(1 << GLIBTOP_PPP_STATE);
(1L << GLIBTOP_PPP_STATE);
#ifdef HAVE_I4B_ACCT
static const unsigned long _glibtop_sysdeps_ppp_acct =
(1 << GLIBTOP_PPP_BYTES_IN) + (1 << GLIBTOP_PPP_BYTES_OUT);
(1L << GLIBTOP_PPP_BYTES_IN) + (1L << GLIBTOP_PPP_BYTES_OUT);
#endif
#endif /* HAVE_I4B */
@@ -99,7 +99,7 @@ glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
#endif
int phase;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PPP), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PPP), 0);
memset (buf, 0, sizeof (glibtop_ppp));
@@ -110,10 +110,15 @@ glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
#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;
@@ -122,6 +127,7 @@ glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
case PHASE_NETWORK:
buf->state = GLIBTOP_PPP_STATE_ONLINE;
break;
#endif
default:
buf->state = GLIBTOP_PPP_STATE_UNKNOWN;
break;

View File

@@ -33,7 +33,7 @@
#include <sys/proc.h>
static const unsigned long _glibtop_sysdeps_proc_args =
(1 << GLIBTOP_PROC_ARGS_SIZE);
(1L << GLIBTOP_PROC_ARGS_SIZE);
/* Init function. */
@@ -54,18 +54,22 @@ glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
unsigned size = 0, pos = 0;
int count;
#ifndef __bsdi__
char filename [BUFSIZ];
struct stat statb;
#endif
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_ARGS), 0);
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;
#ifndef __bsdi__
sprintf (filename, "/proc/%d/mem", pid);
if (stat (filename, &statb)) return NULL;
#endif
glibtop_suid_enter (server);

View File

@@ -28,7 +28,7 @@
#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z)
#define BIT_SHIFT(x) (1 << (x % 32))
#define BIT_SHIFT(x) (1L << (x % 64))
static const unsigned long _glibtop_sysdeps_procdata_0 =
BIT_SHIFT(GLIBTOP_PROCDATA_CMD) +

View File

@@ -31,10 +31,12 @@
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/proc.h>
#ifndef __OpenBSD__
#if (!defined __OpenBSD__) && (!defined __bsdi__)
#include <sys/user.h>
#endif
#ifndef __bsdi__
#include <machine/pcb.h>
#endif
#ifdef __FreeBSD__
#include <machine/tss.h>
#endif
@@ -47,18 +49,18 @@
#endif
static const unsigned long _glibtop_sysdeps_proc_kernel_pstats =
(1 << GLIBTOP_PROC_KERNEL_MIN_FLT) +
(1 << GLIBTOP_PROC_KERNEL_MAJ_FLT) +
(1 << GLIBTOP_PROC_KERNEL_CMIN_FLT) +
(1 << GLIBTOP_PROC_KERNEL_CMAJ_FLT);
(1L << GLIBTOP_PROC_KERNEL_MIN_FLT) +
(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) +
(1L << GLIBTOP_PROC_KERNEL_CMIN_FLT) +
(1L << GLIBTOP_PROC_KERNEL_CMAJ_FLT);
static const unsigned long _glibtop_sysdeps_proc_kernel_pcb =
(1 << GLIBTOP_PROC_KERNEL_KSTK_EIP) +
(1 << GLIBTOP_PROC_KERNEL_KSTK_ESP);
(1L << GLIBTOP_PROC_KERNEL_KSTK_EIP) +
(1L << GLIBTOP_PROC_KERNEL_KSTK_ESP);
static const unsigned long _glibtop_sysdeps_proc_kernel_wchan =
(1 << GLIBTOP_PROC_KERNEL_NWCHAN) +
(1 << GLIBTOP_PROC_KERNEL_WCHAN);
(1L << GLIBTOP_PROC_KERNEL_NWCHAN) +
(1L << GLIBTOP_PROC_KERNEL_WCHAN);
/* Init function. */
@@ -84,7 +86,7 @@ glibtop_get_proc_kernel_p (glibtop *server,
char filename [BUFSIZ];
struct stat statb;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_KERNEL), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0);
memset (buf, 0, sizeof (glibtop_proc_kernel));
@@ -100,13 +102,13 @@ glibtop_get_proc_kernel_p (glibtop *server,
glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
buf->nwchan = (unsigned long) pinfo [0].kp_proc.p_wchan &~ KERNBASE;
buf->flags |= (1 << GLIBTOP_PROC_KERNEL_NWCHAN);
buf->flags |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN);
if (pinfo [0].kp_proc.p_wchan && pinfo [0].kp_proc.p_wmesg) {
strncpy (buf->wchan, pinfo [0].kp_eproc.e_wmesg,
sizeof (buf->wchan) - 1);
buf->wchan [sizeof (buf->wchan) - 1] = 0;
buf->flags |= (1 << GLIBTOP_PROC_KERNEL_WCHAN);
buf->flags |= (1L << GLIBTOP_PROC_KERNEL_WCHAN);
} else {
buf->wchan [0] = 0;
}
@@ -122,7 +124,7 @@ glibtop_get_proc_kernel_p (glibtop *server,
/* NOTE: You need to mount the /proc filesystem to make
* `kvm_uread' work. */
sprintf (filename, "/proc/%d/mem", pid);
sprintf (filename, "/proc/%d/mem", (int) pid);
if (stat (filename, &statb)) return;
glibtop_suid_enter (server);
@@ -162,7 +164,11 @@ glibtop_get_proc_kernel_p (glibtop *server,
#endif
#else
buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0;
#ifdef __bsdi__
buf->kstk_eip = (u_int64_t) pcb.pcb_tss.tss_eip;
#else
buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip;
#endif
buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;
#endif

View File

@@ -29,8 +29,8 @@
#include <glibtop_suid.h>
static const unsigned long _glibtop_sysdeps_proclist =
(1 << GLIBTOP_PROCLIST_TOTAL) + (1 << GLIBTOP_PROCLIST_NUMBER) +
(1 << GLIBTOP_PROCLIST_SIZE);
(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:
@@ -67,7 +67,7 @@ glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
int which, count;
int i,j;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROCLIST), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROCLIST), 0);
memset (buf, 0, sizeof (glibtop_proclist));

View File

@@ -42,20 +42,28 @@
#include <ufs/ufs/inode.h>
#include <sys/ucred.h>
#ifndef __OpenBSD__
#if (!defined __OpenBSD__) && (!defined __bsdi__)
#include <sys/user.h>
#endif
#include <sys/sysctl.h>
#include <vm/vm.h>
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
/* Fixme ... */
#undef _KERNEL
#define _UVM_UVM_AMAP_I_H_ 1
#define _UVM_UVM_MAP_I_H_ 1
#include <uvm/uvm.h>
#endif
static const unsigned long _glibtop_sysdeps_proc_map =
(1 << GLIBTOP_PROC_MAP_TOTAL) + (1 << GLIBTOP_PROC_MAP_NUMBER) +
(1 << GLIBTOP_PROC_MAP_SIZE);
(1L << GLIBTOP_PROC_MAP_TOTAL) + (1L << GLIBTOP_PROC_MAP_NUMBER) +
(1L << GLIBTOP_PROC_MAP_SIZE);
static const unsigned long _glibtop_sysdeps_map_entry =
(1 << GLIBTOP_MAP_ENTRY_START) + (1 << GLIBTOP_MAP_ENTRY_END) +
(1 << GLIBTOP_MAP_ENTRY_OFFSET) + (1 << GLIBTOP_MAP_ENTRY_PERM) +
(1 << GLIBTOP_MAP_ENTRY_INODE) + (1 << GLIBTOP_MAP_ENTRY_DEVICE);
(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. */
@@ -74,15 +82,22 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
struct kinfo_proc *pinfo;
struct vm_map_entry entry, *first;
struct vmspace vmspace;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
struct vnode vnode;
struct inode inode;
#else
struct vm_object object;
#endif
glibtop_map_entry *maps;
#if defined __FreeBSD__
struct vnode vnode;
struct inode inode;
struct mount mount;
#endif
int count, i = 0;
int update = 0;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MAP), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MAP), 0);
memset (buf, 0, sizeof (glibtop_proc_map));
@@ -147,9 +162,14 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
if (entry.eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP))
continue;
#endif
#else
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
if (UVM_ET_ISSUBMAP (&entry))
continue;
#else
if (entry.is_a_map || entry.is_sub_map)
continue;
#endif
#endif
maps [i].flags = _glibtop_sysdeps_map_entry;
@@ -169,6 +189,19 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
i++;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
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 NULL;
}
#else
if (!entry.object.vm_object)
continue;
@@ -178,6 +211,24 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
(unsigned long) entry.object.vm_object,
&object, sizeof (object)) != sizeof (object))
glibtop_error_io_r (server, "kvm_read (object)");
#endif
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID)
continue;
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)");
maps [i-1].inode = inode.i_number;
maps [i-1].device = inode.i_dev;
#endif
#ifdef __FreeBSD__
/* If the object is of type vnode, add its size */

View File

@@ -39,19 +39,35 @@
#include <ufs/ufs/inode.h>
#include <sys/ucred.h>
#ifndef __OpenBSD__
#if (!defined __OpenBSD__) && (!defined __bsdi__)
#include <sys/user.h>
#endif
#include <sys/sysctl.h>
#include <vm/vm.h>
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
/* Fixme ... */
#undef _KERNEL
#define _UVM_UVM_AMAP_I_H_ 1
#define _UVM_UVM_MAP_I_H_ 1
#include <uvm/uvm.h>
#endif
static const unsigned long _glibtop_sysdeps_proc_mem =
(1 << GLIBTOP_PROC_MEM_SIZE) +
(1 << GLIBTOP_PROC_MEM_VSIZE) +
(1 << GLIBTOP_PROC_MEM_SHARE) +
(1 << GLIBTOP_PROC_MEM_RESIDENT) +
(1 << GLIBTOP_PROC_MEM_RSS) +
(1 << GLIBTOP_PROC_MEM_RSS_RLIM);
(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 =
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
(1L << GLIBTOP_PROC_MEM_SHARE);
#elif defined(__FreeBSD__)
(1L << GLIBTOP_PROC_MEM_SHARE);
#else
0;
#endif
#ifndef LOG1024
#define LOG1024 10
@@ -82,7 +98,8 @@ glibtop_init_proc_mem_p (glibtop *server)
/* we only need the amount of log(2)1024 for our conversion */
pageshift -= LOG1024;
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem |
_glibtop_sysdeps_proc_mem_share;
}
/* Provides detailed information about a process. */
@@ -94,11 +111,16 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
struct kinfo_proc *pinfo;
struct vm_map_entry entry, *first;
struct vmspace *vms, vmspace;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
struct vnode vnode;
struct inode inode;
#else
struct vm_object object;
#endif
struct plimit plimit;
int count;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MEM), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MEM), 0);
memset (buf, 0, sizeof (glibtop_proc_mem));
@@ -173,11 +195,29 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
if (entry.eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP))
continue;
#endif
#else
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
if (UVM_ET_ISSUBMAP (&entry))
continue;
#else
if (entry.is_a_map || entry.is_sub_map)
continue;
#endif
#endif
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
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;
}
#else
if (!entry.object.vm_object)
continue;
@@ -189,18 +229,31 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
glibtop_warn_io_r (server, "kvm_read (object)");
return;
}
#endif
/* If the object is of type vnode, add its size */
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID)
continue;
if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) ||
!vnode.v_data) continue;
/* Reference count must be at least two. */
if (vnode.v_uvm.u_obj.uo_refs <= 1)
continue;
buf->share += pagetok (vnode.v_uvm.u_obj.uo_npages) << LOG1024;
#endif
#ifdef __FreeBSD__
if (object.type != OBJT_VNODE)
continue;
buf->share += object.un_pager.vnp.vnp_size;
#else
buf->share += object.size;
#endif
}
buf->flags = _glibtop_sysdeps_proc_mem;
buf->flags = _glibtop_sysdeps_proc_mem |
_glibtop_sysdeps_proc_mem_share;
}

View File

@@ -48,7 +48,7 @@ glibtop_get_proc_segment_p (glibtop *server,
glibtop_proc_segment *buf,
pid_t pid)
{
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0);
memset (buf, 0, sizeof (glibtop_proc_segment));

View File

@@ -28,10 +28,10 @@
#include <glibtop_suid.h>
static const unsigned long _glibtop_sysdeps_proc_signal =
(1 << GLIBTOP_PROC_SIGNAL_SIGNAL) +
(1 << GLIBTOP_PROC_SIGNAL_BLOCKED) +
(1 << GLIBTOP_PROC_SIGNAL_SIGIGNORE) +
(1 << GLIBTOP_PROC_SIGNAL_SIGCATCH);
(1L << GLIBTOP_PROC_SIGNAL_SIGNAL) +
(1L << GLIBTOP_PROC_SIGNAL_BLOCKED) +
(1L << GLIBTOP_PROC_SIGNAL_SIGIGNORE) +
(1L << GLIBTOP_PROC_SIGNAL_SIGCATCH);
/* Init function. */
@@ -49,7 +49,7 @@ glibtop_get_proc_signal_p (glibtop *server,
struct kinfo_proc *pinfo;
int count = 0;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0);
memset (buf, 0, sizeof (glibtop_proc_signal));

View File

@@ -27,20 +27,29 @@
#include <glibtop_suid.h>
#ifndef __OpenBSD__
#if !defined(__OpenBSD__)
//&& (!defined __bsdi__)
#include <sys/user.h>
#endif
static const unsigned long _glibtop_sysdeps_proc_state =
(1 << GLIBTOP_PROC_STATE_CMD) + (1 << GLIBTOP_PROC_STATE_STATE) +
(1 << GLIBTOP_PROC_STATE_UID) + (1 << GLIBTOP_PROC_STATE_GID);
(1L << GLIBTOP_PROC_STATE_CMD) + (1L << GLIBTOP_PROC_STATE_UID) +
(1L << GLIBTOP_PROC_STATE_GID);
static const unsigned long _glibtop_sysdeps_proc_state_new =
#if LIBGTOP_VERSION_CODE >= 1001000
(1L << GLIBTOP_PROC_STATE_RUID) + (1L << GLIBTOP_PROC_STATE_RGID);
#else
0;
#endif
/* Init function. */
void
glibtop_init_proc_state_p (glibtop *server)
{
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state |
_glibtop_sysdeps_proc_state_new;
}
/* Provides detailed information about a process. */
@@ -53,7 +62,7 @@ glibtop_get_proc_state_p (glibtop *server,
struct kinfo_proc *pinfo;
int count = 0;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_STATE), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_STATE), 0);
memset (buf, 0, sizeof (glibtop_proc_state));
@@ -73,27 +82,34 @@ glibtop_get_proc_state_p (glibtop *server,
buf->uid = pinfo [0].kp_eproc.e_pcred.p_svuid;
buf->gid = pinfo [0].kp_eproc.e_pcred.p_svgid;
switch (pinfo [0].kp_proc.p_stat) {
case SIDL:
buf->state = 'I';
break;
case SRUN:
buf->state = 'R';
break;
case SSLEEP:
buf->state = 'S';
break;
case SSTOP:
buf->state = 'T';
break;
case SZOMB:
buf->state = 'Z';
break;
default:
buf->state = '?';
break;
}
#if LIBGTOP_VERSION_CODE >= 1001000
buf->ruid = pinfo [0].kp_eproc.e_pcred.p_ruid;
buf->rgid = pinfo [0].kp_eproc.e_pcred.p_rgid;
#endif
/* Set the flags for the data we're about to return*/
buf->flags = _glibtop_sysdeps_proc_state;
buf->flags = _glibtop_sysdeps_proc_state |
_glibtop_sysdeps_proc_state_new;
switch (pinfo [0].kp_proc.p_stat) {
case SIDL:
buf->state = 0;
break;
case SRUN:
buf->state = GLIBTOP_PROCESS_RUNNING;
break;
case SSLEEP:
buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
break;
case SSTOP:
buf->state = GLIBTOP_PROCESS_STOPPED;
break;
case SZOMB:
buf->state = GLIBTOP_PROCESS_ZOMBIE;
break;
default:
return;
}
buf->flags |= (1L << GLIBTOP_PROC_STATE_STATE);
}

View File

@@ -32,11 +32,12 @@
#endif
static const unsigned long _glibtop_sysdeps_proc_time =
(1 << GLIBTOP_PROC_TIME_RTIME) + (1 << GLIBTOP_PROC_TIME_FREQUENCY);
(1L << GLIBTOP_PROC_TIME_RTIME) + (1L << GLIBTOP_PROC_TIME_FREQUENCY);
static const unsigned long _glibtop_sysdeps_proc_time_user =
(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_STIME) +
(1 << GLIBTOP_PROC_TIME_CUTIME) + (1 << GLIBTOP_PROC_TIME_CSTIME);
(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) (((u_int64_t) tv.tv_sec * 1000000) + (u_int64_t) tv.tv_usec)
@@ -123,31 +124,74 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
struct kinfo_proc *pinfo;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
register struct rusage *rup;
#else
struct user *u_addr = (struct user *)USRSTACK;
#endif
struct pstats pstats;
int count;
char filename [BUFSIZ];
struct stat statb;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_TIME), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_TIME), 0);
memset (buf, 0, sizeof (glibtop_proc_time));
if (server->sysdeps.proc_time == 0)
return;
/* It does not work for the swapper task. */
if (pid == 0) return;
sprintf (filename, "/proc/%d/mem", pid);
#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
if (server->sysdeps.proc_time == 0)
return;
#ifndef __bsdi__
sprintf (filename, "/proc/%d/mem", (int) pid);
if (stat (filename, &statb)) return;
#endif
#endif
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
if ((pinfo == NULL) || (count != 1))
glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003)
buf->rtime = pinfo [0].kp_proc.p_runtime;
#else
buf->rtime = tv2sec (pinfo [0].kp_proc.p_rtime);
#endif
buf->frequency = 1000000;
buf->flags = _glibtop_sysdeps_proc_time;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
glibtop_suid_enter (server);
if (kvm_read (server->machine.kd,
(unsigned long) pinfo [0].kp_proc.p_stats,
&pstats, sizeof (pstats)) != sizeof (pstats)) {
glibtop_warn_io_r (server, "kvm_read (pstats)");
return;
}
glibtop_suid_leave (server);
rup = &pstats.p_ru;
calcru(&(pinfo [0]).kp_proc,
&rup->ru_utime, &rup->ru_stime, NULL);
buf->utime = tv2sec (pstats.p_ru.ru_utime);
buf->stime = tv2sec (pstats.p_ru.ru_stime);
buf->cutime = tv2sec (pstats.p_cru.ru_utime);
buf->cstime = tv2sec (pstats.p_cru.ru_stime);
buf->start_time = (u_int64_t) pstats.p_start.tv_sec;
buf->flags |= _glibtop_sysdeps_proc_time_user;
#else
glibtop_suid_enter (server);
if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
@@ -180,15 +224,6 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
}
glibtop_suid_leave (server);
#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003)
buf->rtime = pinfo [0].kp_proc.p_runtime;
#else
buf->rtime = tv2sec (pinfo [0].kp_proc.p_rtime);
#endif
buf->frequency = 1000000;
buf->flags |= _glibtop_sysdeps_proc_time;
}

View File

@@ -28,18 +28,30 @@
#include <glibtop_suid.h>
static const unsigned long _glibtop_sysdeps_proc_uid =
(1 << GLIBTOP_PROC_UID_UID) + (1 << GLIBTOP_PROC_UID_EUID) +
(1 << GLIBTOP_PROC_UID_EGID) + (1 << GLIBTOP_PROC_UID_PID) +
(1 << GLIBTOP_PROC_UID_PPID) + (1 << GLIBTOP_PROC_UID_PGRP) +
(1 << GLIBTOP_PROC_UID_TPGID) + (1 << GLIBTOP_PROC_UID_PRIORITY) +
(1 << GLIBTOP_PROC_UID_NICE);
(1L << GLIBTOP_PROC_UID_UID) + (1L << GLIBTOP_PROC_UID_EUID) +
(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 =
#if LIBGTOP_VERSION_CODE >= 1001000
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
(1L << GLIBTOP_PROC_UID_NGROUPS) + (1L << GLIBTOP_PROC_UID_GROUPS);
#else
0L;
#endif
#else /* LIBGTOP_VERSION_CODE < 1001000 */
0L;
#endif
/* Init function. */
void
glibtop_init_proc_uid_p (glibtop *server)
{
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid |
_glibtop_sysdeps_proc_uid_groups;
}
/* Provides detailed information about a process. */
@@ -51,7 +63,14 @@ glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
struct kinfo_proc *pinfo;
int count = 0;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_UID), 0);
#if LIBGTOP_VERSION_CODE >= 1001000
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
struct ucred ucred;
void *ucred_ptr;
#endif
#endif
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_UID), 0);
memset (buf, 0, sizeof (glibtop_proc_uid));
@@ -80,4 +99,30 @@ glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
/* 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. */
#if LIBGTOP_VERSION_CODE >= 1001000
/* This probably also works with other versions, but not yet
* tested. Please remove the conditional if this is true. */
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
ucred_ptr = (void *) pinfo [0].kp_eproc.e_pcred.pc_ucred;
if (ucred_ptr) {
if (kvm_read (server->machine.kd, (unsigned long) ucred_ptr,
&ucred, sizeof (ucred)) != sizeof (ucred)) {
glibtop_warn_io_r (server, "kvm_read (ucred)");
} else {
int count = (ucred.cr_ngroups < GLIBTOP_MAX_GROUPS) ?
ucred.cr_ngroups : GLIBTOP_MAX_GROUPS;
int i;
for (i = 0; i < count; i++)
buf->groups [i] = ucred.cr_groups [i];
buf->ngroups = count;
buf->flags |= _glibtop_sysdeps_proc_uid_groups;
}
}
#endif
#endif
}

View File

@@ -27,9 +27,26 @@
#include <glibtop_suid.h>
#if defined(__bsdi__) && (_BSDI_VERSION < 199700)
/* Older versions of BSDI don't seem to have this. */
void
glibtop_init_sem_limits_p (glibtop *server)
{ }
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));
}
#else
/* #define KERNEL to get declaration of `struct seminfo'. */
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__bsdi__)
#define KERNEL 1
#else
#define _KERNEL 1
@@ -39,11 +56,11 @@
#include <sys/sem.h>
static unsigned long _glibtop_sysdeps_sem_limits =
(1 << GLIBTOP_IPC_SEMMAP) + (1 << GLIBTOP_IPC_SEMMNI) +
(1 << GLIBTOP_IPC_SEMMNS) + (1 << GLIBTOP_IPC_SEMMNU) +
(1 << GLIBTOP_IPC_SEMMSL) + (1 << GLIBTOP_IPC_SEMOPM) +
(1 << GLIBTOP_IPC_SEMUME) + (1 << GLIBTOP_IPC_SEMUSZ) +
(1 << GLIBTOP_IPC_SEMVMX) + (1 << GLIBTOP_IPC_SEMAEM);
(1L << GLIBTOP_IPC_SEMMAP) + (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'
@@ -80,7 +97,7 @@ glibtop_init_sem_limits_p (glibtop *server)
void
glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
{
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SEM_LIMITS), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0);
memset (buf, 0, sizeof (glibtop_sem_limits));
@@ -98,3 +115,6 @@ glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
buf->flags = _glibtop_sysdeps_sem_limits;
}
#endif /* either a newer BSDI or no BSDI at all. */

View File

@@ -27,9 +27,26 @@
#include <glibtop_suid.h>
#if defined(__bsdi__) && (_BSDI_VERSION < 199700)
/* Older versions of BSDI don't seem to have this. */
void
glibtop_init_shm_limits_p (glibtop *server)
{ }
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));
}
#else
/* #define KERNEL to get declaration of `struct shminfo'. */
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__bsdi__)
#define KERNEL 1
#else
#define _KERNEL 1
@@ -39,9 +56,9 @@
#include <sys/shm.h>
static unsigned long _glibtop_sysdeps_shm_limits =
(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) +
(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) +
(1 << GLIBTOP_IPC_SHMALL);
(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'
@@ -78,7 +95,7 @@ glibtop_init_shm_limits_p (glibtop *server)
void
glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
{
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
memset (buf, 0, sizeof (glibtop_shm_limits));
@@ -93,3 +110,6 @@ glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
buf->flags = _glibtop_sysdeps_shm_limits;
}
#endif /* either a newer BSDI or no BSDI at all. */

View File

@@ -30,19 +30,28 @@
#include <glibtop_suid.h>
static const unsigned long _glibtop_sysdeps_swap =
(1 << GLIBTOP_SWAP_TOTAL) + (1 << GLIBTOP_SWAP_USED) +
(1 << GLIBTOP_SWAP_FREE) + (1 << GLIBTOP_SWAP_PAGEIN) +
(1 << GLIBTOP_SWAP_PAGEOUT);
(1L << GLIBTOP_SWAP_TOTAL) + (1L << GLIBTOP_SWAP_USED) +
(1L << GLIBTOP_SWAP_FREE) + (1L << GLIBTOP_SWAP_PAGEIN) +
(1L << GLIBTOP_SWAP_PAGEOUT);
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__bsdi__)
#include <sys/conf.h>
#ifdef __bsdi__
#include <vm/swap_pager.h>
#else
#include <sys/rlist.h>
#endif
#include <sys/vmmeter.h>
#if __FreeBSD__ < 4
/* nlist structure for kernel access */
#if defined(__bsdi__)
static struct nlist nlst [] = {
{ "_swapstats" }, /* general swap info */
{ 0 }
};
#elif __FreeBSD__ < 4
static struct nlist nlst [] = {
#define VM_SWAPLIST 0
{ "_swaplist" },/* list of free swap areas */
@@ -56,28 +65,36 @@ static struct nlist nlst [] = {
{ "_dmmax" }, /* maximum size of a swap block */
{ 0 }
};
#endif
#elif (defined __NetBSD__)
#elif defined(__NetBSD__)
#if (__NetBSD_Version__ >= 104000000)
#include <uvm/uvm_extern.h>
#include <sys/swap.h>
#else
#include <vm/vm_swap.h>
#endif
#endif
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
#else
/* nlist structure for kernel access */
static struct nlist nlst2 [] = {
{ "_cnt" },
{ 0 }
};
#endif
/* Init function. */
void
glibtop_init_swap_p (glibtop *server)
{
#ifdef __FreeBSD__
#if __FreeBSD__ < 4
#if defined(__FreeBSD__) || defined(__bsdi__)
#if __FreeBSD__ < 4 || defined(__bsdi__)
if (kvm_nlist (server->machine.kd, nlst) != 0) {
glibtop_warn_io_r (server, "kvm_nlist (swap)");
return;
@@ -86,15 +103,18 @@ glibtop_init_swap_p (glibtop *server)
struct kvm_swap dummy;
if (kvm_getswapinfo (server->machine.kd, &dummy, 1, 0) != 0) {
glibtop_warn_io_r (server, "kvm_nlist (swap)");
glibtop_warn_io_r (server, "kvm_swap (swap)");
return;
}
#endif
#endif
#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
if (kvm_nlist (server->machine.kd, nlst2) != 0) {
glibtop_warn_io_r (server, "kvm_nlist (swap)");
glibtop_warn_io_r (server, "kvm_nlist (cnt)");
return;
}
#endif
server->sysdeps.swap = _glibtop_sysdeps_swap;
}
@@ -109,8 +129,9 @@ glibtop_init_swap_p (glibtop *server)
void
glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
{
#ifdef __FreeBSD__
#if __FreeBSD__ < 4
#if defined(__FreeBSD__)
# if __FreeBSD__ < 4
char *header;
int hlen, nswdev, dmmax;
int div, nfree, npfree;
@@ -121,29 +142,44 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
struct rlist *swapptr;
size_t sw_size;
u_long ptr;
#else
# else
int nswdev;
struct kvm_swap kvmsw[16];
#endif
#elif (defined __NetBSD__)
# endif
#elif defined(__bsdi__)
struct swapstats swap;
#elif defined(__NetBSD__)
struct swapent *swaplist;
#endif
int nswap, i;
int avail = 0, inuse = 0;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
struct uvmexp uvmexp;
size_t length_uvmexp;
#else
/* To get `pagein' and `pageout'. */
struct vmmeter vmm;
#endif
static int swappgsin = -1;
static int swappgsout = -1;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SWAP), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SWAP), 0);
memset (buf, 0, sizeof (glibtop_swap));
if (server->sysdeps.swap == 0)
return;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
length_uvmexp = sizeof (uvmexp);
if (sysctl (mib_uvmexp, 2, &uvmexp, &length_uvmexp, NULL, 0)) {
glibtop_warn_io_r (server, "sysctl (uvmexp)");
return;
}
#else
/* This is used to get the `pagein' and `pageout' members. */
if (kvm_read (server->machine.kd, nlst2[0].n_value,
@@ -151,6 +187,7 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
glibtop_warn_io_r (server, "kvm_read (cnt)");
return;
}
#endif
if (swappgsin < 0) {
buf->pagein = 0;
@@ -159,21 +196,31 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
#ifdef __FreeBSD__
buf->pagein = vmm.v_swappgsin - swappgsin;
buf->pageout = vmm.v_swappgsout - swappgsout;
#else
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
buf->pagein = uvmexp.swapins - swappgsin;
buf->pageout = uvmexp.swapouts - swappgsout;
#else
buf->pagein = vmm.v_swpin - swappgsin;
buf->pageout = vmm.v_swpout - swappgsout;
#endif
#endif
}
#ifdef __FreeBSD__
swappgsin = vmm.v_swappgsin;
swappgsout = vmm.v_swappgsout;
#else
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
swappgsin = uvmexp.swapins;
swappgsout = uvmexp.swapouts;
#else
swappgsin = vmm.v_swpin;
swappgsout = vmm.v_swpout;
#endif
#endif
#ifdef __FreeBSD__
#if defined(__FreeBSD__)
#if __FreeBSD__ < 4
@@ -213,7 +260,7 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
if (kvm_read (server->machine.kd, nlst[VM_SWDEVT].n_value,
&ptr, sizeof (ptr)) != sizeof (ptr)) {
glibtop_warn_io_r (server, "kvm_read (swaplist)");
glibtop_warn_io_r (server, "kvm_read (swdevt)");
return;
}
@@ -327,7 +374,24 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
#endif
#elif (defined __NetBSD__)
#elif defined(__bsdi__)
/* General info about swap devices. */
if (kvm_read (server->machine.kd, nlst[0].n_value,
&swap, sizeof (swap)) != sizeof (swap)) {
glibtop_warn_io_r (server, "kvm_read (swap)");
return;
}
buf->flags = _glibtop_sysdeps_swap;
buf->used = swap.swap_total - swap.swap_free;
buf->free = swap.swap_free;
buf->total = swap.swap_total;
#elif defined(__NetBSD__)
nswap = swapctl (SWAP_NSWAP, NULL, 0);
if (nswap < 0) {

View File

@@ -30,11 +30,11 @@
#include <glibtop_suid.h>
static const unsigned long _glibtop_sysdeps_uptime =
(1 << GLIBTOP_UPTIME_UPTIME) + (1 << GLIBTOP_UPTIME_IDLETIME);
(1L << GLIBTOP_UPTIME_UPTIME) + (1L << GLIBTOP_UPTIME_IDLETIME);
static const unsigned long _required_cpu_flags =
(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_IDLE) +
(1 << GLIBTOP_CPU_FREQUENCY);
(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_IDLE) +
(1L << GLIBTOP_CPU_FREQUENCY);
/* Init function. */
@@ -51,7 +51,7 @@ glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
{
glibtop_cpu cpu;
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_UPTIME), 0);
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_UPTIME), 0);
memset (buf, 0, sizeof (glibtop_uptime));

View File

@@ -113,7 +113,6 @@ sub output {
print 'static SCM';
print 'glibtop_guile_types_' . $feature . ' (void)';
print '{';
print "\tint i;";
print "\tSCM list;";
print '';

View File

@@ -0,0 +1,89 @@
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
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_PRIVATE_H__
#define __GLIBTOP_PRIVATE_H__
#include <glibtop.h>
#include <glibtop/error.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/user.h>
#undef LIBGTOP_VERSION
#include <linux/libgtop.h>
BEGIN_LIBGTOP_DECLS
int
glibtop_get_proc_data_stat_s (glibtop *server, libgtop_stat_t *stat);
int
glibtop_get_proc_data_mem_s (glibtop *server, libgtop_mem_t *mem);
int
glibtop_get_proc_data_swap_s (glibtop *server, libgtop_swap_t *swap);
int
glibtop_get_proc_data_proclist_s (glibtop *server,
libgtop_proclist_t *proclist,
u_int64_t which, u_int64_t arg);
int
glibtop_get_proc_data_proc_state_s (glibtop *server,
libgtop_proc_state_t *proc_state,
pid_t pid);
int
glibtop_get_proc_data_proc_mem_s (glibtop *server,
libgtop_proc_mem_t *proc_mem,
pid_t pid);
int
glibtop_get_proc_data_proc_signal_s (glibtop *server,
libgtop_proc_signal_t *proc_signal,
pid_t pid);
int
glibtop_get_proc_data_proc_kernel_s (glibtop *server,
libgtop_proc_kernel_t *proc_kernel,
pid_t pid);
int
glibtop_get_proc_data_proc_args_s (glibtop *server, pid_t pid,
char *result, size_t max_len);
int
glibtop_get_proc_data_proc_maps_s (glibtop *server, pid_t pid,
libgtop_proc_maps_t *result,
size_t max_len);
int
glibtop_get_proc_data_netload_s (glibtop *server,
libgtop_netload_t *netload,
const char *device);
END_LIBGTOP_DECLS
#endif __GLIBTOP_PRIVATE_H__

94
sysdeps/kernel/sysinfo.c Normal file
View File

@@ -0,0 +1,94 @@
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
LibGTop is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
LibGTop is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LibGTop; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <glibtop/cpu.h>
#include <glibtop/sysinfo.h>
static const unsigned long _glibtop_sysdeps_sysinfo =
(1 << GLIBTOP_SYSINFO_CPUINFO);
static glibtop_sysinfo sysinfo;
static void
init_sysinfo (glibtop *server)
{
char buffer [BUFSIZ];
static int init = 0;
glibtop_entry *cpuinfo = NULL;
FILE *f;
if (init) return;
init = TRUE;
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
memset (&sysinfo, 0, sizeof (glibtop_sysinfo));
g_return_if_fail (f = fopen ("/proc/cpuinfo", "r"));
while (fgets (buffer, BUFSIZ, f)) {
char *p, *start, *key, *value;
if (cpuinfo == NULL) {
cpuinfo = &sysinfo.cpuinfo [sysinfo.ncpu++];
cpuinfo->labels = g_ptr_array_new ();
cpuinfo->values = g_hash_table_new (NULL, NULL);
if (sysinfo.ncpu > GLIBTOP_NCPU)
sysinfo.ncpu = GLIBTOP_NCPU;
}
p = strchr (buffer, ':');
if (!p) continue;
/* Remove leading spaces from `p'. */
*p = '\0'; start = p; p++;
while (isspace (*p)) p++;
/* Remove trailing spaces from `buffer'. */
while ((start > buffer) && (*start) && isspace (*start))
*start-- = '\0';
key = g_strdup (buffer);
value = g_strdup (p);
g_ptr_array_add (cpuinfo->labels, key);
g_hash_table_insert (cpuinfo->values, key, value);
}
fclose (f);
sysinfo.flags = _glibtop_sysdeps_sysinfo;
}
glibtop_sysinfo *
glibtop_get_sysinfo_s (glibtop *server)
{
init_sysinfo (server);
return &sysinfo;
}

View File

@@ -1,3 +1,8 @@
1999-07-29 Martin Baulig <martin@home-of-linux.org>
* proctime.c (glibtop_get_proctime_s): Don't provide `rtime'
any longer since we must not use `rtime = utime + stime'.
1999-02-20 Martin Baulig <martin@home-of-linux.org>
* netload.c: Don't include <linux/ip_fw.h> for libc5 systems

View File

@@ -26,14 +26,14 @@
#include <glibtop/cpu.h>
static const unsigned long _glibtop_sysdeps_cpu =
(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) +
(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) +
(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY);
(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
(1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) +
(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY);
static const unsigned long _glibtop_sysdeps_cpu_smp =
(1 << GLIBTOP_XCPU_TOTAL) + (1 << GLIBTOP_XCPU_USER) +
(1 << GLIBTOP_XCPU_NICE) + (1 << GLIBTOP_XCPU_SYS) +
(1 << GLIBTOP_XCPU_IDLE);
(1L << GLIBTOP_XCPU_TOTAL) + (1L << GLIBTOP_XCPU_USER) +
(1L << GLIBTOP_XCPU_NICE) + (1L << GLIBTOP_XCPU_SYS) +
(1L << GLIBTOP_XCPU_IDLE);
/* Init function. */
@@ -55,6 +55,7 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
char buffer [BUFSIZ], *p;
int fd, len, i;
u_int64_t total;
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
@@ -79,7 +80,11 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
buf->sys = strtoul (p, &p, 0);
buf->idle = strtoul (p, &p, 0);
buf->total = buf->user + buf->nice + buf->sys + buf->idle;
total = buf->user;
total += buf->nice;
total += buf->sys;
total += buf->idle;
buf->total = total;
buf->frequency = 100;
buf->flags = _glibtop_sysdeps_cpu;
@@ -94,8 +99,12 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
buf->xcpu_sys [i] = strtoul (p, &p, 0);
buf->xcpu_idle [i] = strtoul (p, &p, 0);
buf->xcpu_total [i] = buf->xcpu_user [i] + buf->xcpu_nice [i] +
buf->xcpu_sys [i] + buf->xcpu_idle [i];
total = buf->xcpu_user [i];
total += buf->xcpu_nice [i];
total += buf->xcpu_sys [i];
total += buf->xcpu_idle [i];
buf->xcpu_total [i] = total;
}
buf->flags |= _glibtop_sysdeps_cpu_smp;

View File

@@ -26,12 +26,12 @@
#include <glibtop/loadavg.h>
static const unsigned long _glibtop_sysdeps_loadavg =
(1 << GLIBTOP_LOADAVG_LOADAVG);
(1L << GLIBTOP_LOADAVG_LOADAVG);
static const unsigned long _glibtop_sysdeps_loadavg_tasks =
(1 << GLIBTOP_LOADAVG_NR_RUNNING) +
(1 << GLIBTOP_LOADAVG_NR_TASKS) +
(1 << GLIBTOP_LOADAVG_LAST_PID);
(1L << GLIBTOP_LOADAVG_NR_RUNNING) +
(1L << GLIBTOP_LOADAVG_NR_TASKS) +
(1L << GLIBTOP_LOADAVG_LAST_PID);
/* Init function. */

View File

@@ -26,10 +26,10 @@
#include <glibtop/mem.h>
static const unsigned long _glibtop_sysdeps_mem =
(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) +
(1 << GLIBTOP_MEM_FREE) + (1 << GLIBTOP_MEM_SHARED) +
(1 << GLIBTOP_MEM_BUFFER) + (1 << GLIBTOP_MEM_CACHED) +
(1 << GLIBTOP_MEM_USER);
(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);
/* Init function. */

View File

@@ -27,10 +27,10 @@
#include <sys/msg.h>
static const unsigned long _glibtop_sysdeps_msg_limits =
(1 << GLIBTOP_IPC_MSGPOOL) + (1 << GLIBTOP_IPC_MSGMAP) +
(1 << GLIBTOP_IPC_MSGMAX) + (1 << GLIBTOP_IPC_MSGMNB) +
(1 << GLIBTOP_IPC_MSGMNI) + (1 << GLIBTOP_IPC_MSGSSZ) +
(1 << GLIBTOP_IPC_MSGTQL);
(1L << GLIBTOP_IPC_MSGPOOL) + (1L << GLIBTOP_IPC_MSGMAP) +
(1L << GLIBTOP_IPC_MSGMAX) + (1L << GLIBTOP_IPC_MSGMNB) +
(1L << GLIBTOP_IPC_MSGMNI) + (1L << GLIBTOP_IPC_MSGSSZ) +
(1L << GLIBTOP_IPC_MSGTQL);
/* Init function. */

View File

@@ -51,40 +51,40 @@
#define _GLIBTOP_IP_FW_ACCTOUT 0x2000 /* Account outgoing packets only. */
static const unsigned long _glibtop_sysdeps_netload =
(1 << GLIBTOP_NETLOAD_ERRORS_IN) +
(1 << GLIBTOP_NETLOAD_ERRORS_OUT) +
(1 << GLIBTOP_NETLOAD_COLLISIONS);
(1L << GLIBTOP_NETLOAD_ERRORS_IN) +
(1L << GLIBTOP_NETLOAD_ERRORS_OUT) +
(1L << GLIBTOP_NETLOAD_COLLISIONS);
static const unsigned long _glibtop_sysdeps_netload_data =
(1 << GLIBTOP_NETLOAD_ADDRESS) +
(1 << GLIBTOP_NETLOAD_SUBNET) +
(1 << GLIBTOP_NETLOAD_MTU);
(1L << GLIBTOP_NETLOAD_ADDRESS) +
(1L << GLIBTOP_NETLOAD_SUBNET) +
(1L << GLIBTOP_NETLOAD_MTU);
static const unsigned long _glibtop_sysdeps_netload_bytes =
(1 << GLIBTOP_NETLOAD_BYTES_IN) +
(1 << GLIBTOP_NETLOAD_BYTES_OUT) +
(1 << GLIBTOP_NETLOAD_BYTES_TOTAL);
(1L << GLIBTOP_NETLOAD_BYTES_IN) +
(1L << GLIBTOP_NETLOAD_BYTES_OUT) +
(1L << GLIBTOP_NETLOAD_BYTES_TOTAL);
static const unsigned long _glibtop_sysdeps_netload_packets =
(1 << GLIBTOP_NETLOAD_PACKETS_IN) +
(1 << GLIBTOP_NETLOAD_PACKETS_OUT) +
(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL);
(1L << GLIBTOP_NETLOAD_PACKETS_IN) +
(1L << GLIBTOP_NETLOAD_PACKETS_OUT) +
(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL);
static const unsigned long _glibtop_sysdeps_netload_total =
(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
(1 << GLIBTOP_NETLOAD_BYTES_TOTAL);
(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
(1L << GLIBTOP_NETLOAD_BYTES_TOTAL);
static const unsigned long _glibtop_sysdeps_netload_in =
(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
(1 << GLIBTOP_NETLOAD_BYTES_TOTAL) +
(1 << GLIBTOP_NETLOAD_PACKETS_IN) +
(1 << GLIBTOP_NETLOAD_BYTES_IN);
(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
(1L << GLIBTOP_NETLOAD_BYTES_TOTAL) +
(1L << GLIBTOP_NETLOAD_PACKETS_IN) +
(1L << GLIBTOP_NETLOAD_BYTES_IN);
static const unsigned long _glibtop_sysdeps_netload_out =
(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
(1 << GLIBTOP_NETLOAD_BYTES_TOTAL) +
(1 << GLIBTOP_NETLOAD_PACKETS_OUT) +
(1 << GLIBTOP_NETLOAD_BYTES_OUT);
(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
(1L << GLIBTOP_NETLOAD_BYTES_TOTAL) +
(1L << GLIBTOP_NETLOAD_PACKETS_OUT) +
(1L << GLIBTOP_NETLOAD_BYTES_OUT);
/* Init function. */
@@ -112,53 +112,51 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
skfd = socket (AF_INET, SOCK_DGRAM, 0);
if (skfd) {
struct ifreq ifr;
struct sockaddr_in addr;
char *address;
unsigned flags;
strcpy (ifr.ifr_name, interface);
if (!ioctl (skfd, SIOCGIFFLAGS, &ifr)) {
buf->flags |= (1 << GLIBTOP_NETLOAD_IF_FLAGS);
buf->flags |= (1L << GLIBTOP_NETLOAD_IF_FLAGS);
flags = ifr.ifr_flags;
} else
flags = 0;
if (flags & IFF_UP)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_UP);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
if (flags & IFF_BROADCAST)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_BROADCAST);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
if (flags & IFF_DEBUG)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_DEBUG);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
if (flags & IFF_LOOPBACK)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_LOOPBACK);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
if (flags & IFF_POINTOPOINT)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_POINTOPOINT);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
if (flags & IFF_RUNNING)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_RUNNING);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
if (flags & IFF_NOARP)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_NOARP);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
if (flags & IFF_PROMISC)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_PROMISC);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
if (flags & IFF_ALLMULTI)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_ALLMULTI);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
if (flags & IFF_MULTICAST)
buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_MULTICAST);
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
strcpy (ifr.ifr_name, interface);
if (!ioctl (skfd, SIOCGIFADDR, &ifr)) {
struct sockaddr_in addr =
*(struct sockaddr_in *) &ifr.ifr_addr;
buf->address = addr.sin_addr.s_addr;
buf->flags |= (1 << GLIBTOP_NETLOAD_ADDRESS);
buf->flags |= (1L << GLIBTOP_NETLOAD_ADDRESS);
}
strcpy (ifr.ifr_name, interface);
@@ -166,13 +164,13 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
struct sockaddr_in addr =
*(struct sockaddr_in *) &ifr.ifr_addr;
buf->subnet = addr.sin_addr.s_addr;
buf->flags |= (1 << GLIBTOP_NETLOAD_SUBNET);
buf->flags |= (1L << GLIBTOP_NETLOAD_SUBNET);
}
strcpy (ifr.ifr_name, interface);
if (!ioctl (skfd, SIOCGIFMTU, &ifr)) {
buf->mtu = ifr.ifr_mtu;
buf->flags |= (1 << GLIBTOP_NETLOAD_MTU);
buf->flags |= (1L << GLIBTOP_NETLOAD_MTU);
}
close (skfd);

View File

@@ -31,11 +31,13 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <glib.h>
static const unsigned long _glibtop_sysdeps_ppp =
(1 << GLIBTOP_PPP_STATE) + (1 << GLIBTOP_PPP_BYTES_IN) +
(1 << GLIBTOP_PPP_BYTES_OUT);
(1L << GLIBTOP_PPP_STATE) + (1L << GLIBTOP_PPP_BYTES_IN) +
(1L << GLIBTOP_PPP_BYTES_OUT);
/* Init function. */
@@ -187,13 +189,13 @@ glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
if (is_ISDN_on (server, &online)) {
buf->state = online ? GLIBTOP_PPP_STATE_ONLINE :
GLIBTOP_PPP_STATE_HANGUP;
buf->flags |= (1 << GLIBTOP_PPP_STATE);
buf->flags |= (1L << GLIBTOP_PPP_STATE);
}
if (get_ISDN_stats (server, &in, &out)) {
buf->bytes_in = in;
buf->bytes_out = out;
buf->flags |= (1 << GLIBTOP_PPP_BYTES_IN) |
(1 << GLIBTOP_PPP_BYTES_OUT);
buf->flags |= (1L << GLIBTOP_PPP_BYTES_IN) |
(1L << GLIBTOP_PPP_BYTES_OUT);
}
}

View File

@@ -27,7 +27,7 @@
#include <glibtop/procargs.h>
static const unsigned long _glibtop_sysdeps_proc_args =
(1 << GLIBTOP_PROC_ARGS_SIZE);
(1L << GLIBTOP_PROC_ARGS_SIZE);
/* Init function. */

View File

@@ -26,10 +26,10 @@
#include <glibtop/prockernel.h>
static const unsigned long _glibtop_sysdeps_proc_kernel =
(1 << GLIBTOP_PROC_KERNEL_K_FLAGS) + (1 << GLIBTOP_PROC_KERNEL_MIN_FLT) +
(1 << GLIBTOP_PROC_KERNEL_MAJ_FLT) + (1 << GLIBTOP_PROC_KERNEL_CMIN_FLT) +
(1 << GLIBTOP_PROC_KERNEL_CMAJ_FLT) + (1 << GLIBTOP_PROC_KERNEL_KSTK_ESP) +
(1 << GLIBTOP_PROC_KERNEL_KSTK_EIP) + (1 << GLIBTOP_PROC_KERNEL_WCHAN);
(1L << GLIBTOP_PROC_KERNEL_K_FLAGS) + (1L << GLIBTOP_PROC_KERNEL_MIN_FLT) +
(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) + (1L << GLIBTOP_PROC_KERNEL_CMIN_FLT) +
(1L << GLIBTOP_PROC_KERNEL_CMAJ_FLT) + (1L << GLIBTOP_PROC_KERNEL_KSTK_ESP) +
(1L << GLIBTOP_PROC_KERNEL_KSTK_EIP) + (1L << GLIBTOP_PROC_KERNEL_WCHAN);
/* Init function. */

View File

@@ -34,8 +34,8 @@
#include <ctype.h>
static const unsigned long _glibtop_sysdeps_proclist =
(1 << GLIBTOP_PROCLIST_TOTAL) + (1 << GLIBTOP_PROCLIST_NUMBER) +
(1 << GLIBTOP_PROCLIST_SIZE);
(1L << GLIBTOP_PROCLIST_TOTAL) + (1L << GLIBTOP_PROCLIST_NUMBER) +
(1L << GLIBTOP_PROCLIST_SIZE);
/* Init function. */
@@ -122,28 +122,28 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
case GLIBTOP_KERN_PROC_PGRP:
/* Do you really, really need this ? */
glibtop_get_proc_uid_s (server, &procuid, pid);
if (procuid.flags & (1 << GLIBTOP_PROC_UID_PGRP))
if (procuid.flags & (1L << GLIBTOP_PROC_UID_PGRP))
if ((int) arg != procuid.pgrp)
continue;
break;
case GLIBTOP_KERN_PROC_SESSION:
/* Do you really, really need this ? */
glibtop_get_proc_uid_s (server, &procuid, pid);
if (procuid.flags & (1 << GLIBTOP_PROC_UID_SESSION))
if (procuid.flags & (1L << GLIBTOP_PROC_UID_SESSION))
if ((int) arg != procuid.session)
continue;
break;
case GLIBTOP_KERN_PROC_TTY:
/* Do you really, really need this ? */
glibtop_get_proc_uid_s (server, &procuid, pid);
if (procuid.flags & (1 << GLIBTOP_PROC_UID_TTY))
if (procuid.flags & (1L << GLIBTOP_PROC_UID_TTY))
if ((int) arg != procuid.tty)
continue;
break;
case GLIBTOP_KERN_PROC_RUID:
/* Do you really, really need this ? */
glibtop_get_proc_uid_s (server, &procuid, pid);
if (procuid.flags & (1 << GLIBTOP_PROC_UID_EUID))
if (procuid.flags & (1L << GLIBTOP_PROC_UID_EUID))
if ((int) arg != procuid.euid)
continue;
break;
@@ -151,19 +151,19 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
if (which & GLIBTOP_EXCLUDE_NOTTY) {
glibtop_get_proc_uid_s (server, &procuid, pid);
if (procuid.flags & (1 << GLIBTOP_PROC_UID_TTY))
if (procuid.flags & (1L << GLIBTOP_PROC_UID_TTY))
if (procuid.tty == -1) continue;
}
if (which & GLIBTOP_EXCLUDE_IDLE) {
glibtop_get_proc_state_s (server, &procstate, pid);
if (procstate.flags & (1 << GLIBTOP_PROC_STATE_STATE))
if (procstate.flags & (1L << GLIBTOP_PROC_STATE_STATE))
if (procstate.state != 'R') continue;
}
if (which & GLIBTOP_EXCLUDE_SYSTEM) {
glibtop_get_proc_uid_s (server, &procuid, pid);
if (procuid.flags & (1 << GLIBTOP_PROC_UID_UID))
if (procuid.flags & (1L << GLIBTOP_PROC_UID_UID))
if (procuid.uid == 0) continue;
}

View File

@@ -27,14 +27,14 @@
#include <glibtop/procmap.h>
static const unsigned long _glibtop_sysdeps_proc_map =
(1 << GLIBTOP_PROC_MAP_NUMBER) + (1 << GLIBTOP_PROC_MAP_TOTAL) +
(1 << GLIBTOP_PROC_MAP_SIZE);
(1L << GLIBTOP_PROC_MAP_NUMBER) + (1L << GLIBTOP_PROC_MAP_TOTAL) +
(1L << GLIBTOP_PROC_MAP_SIZE);
static const unsigned long _glibtop_sysdeps_map_entry =
(1 << GLIBTOP_MAP_ENTRY_START) + (1 << GLIBTOP_MAP_ENTRY_END) +
(1 << GLIBTOP_MAP_ENTRY_OFFSET) + (1 << GLIBTOP_MAP_ENTRY_PERM) +
(1 << GLIBTOP_MAP_ENTRY_INODE) + (1 << GLIBTOP_MAP_ENTRY_DEVICE) +
(1 << GLIBTOP_MAP_ENTRY_FILENAME);
(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) +
(1L << GLIBTOP_MAP_ENTRY_FILENAME);
/* Init function. */
@@ -66,11 +66,15 @@ glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
do {
short dev_major, dev_minor;
unsigned long start, end, offset, inode, perm;
char flags [5];
char flags [5], *format;
size_t size;
rv = fscanf (maps,
"%08lx-%08lx %4c\n %08lx %02hx:%02hx %ld",
if (sizeof (void*) == 8)
format = "%16lx-%16lx %4c\n %16lx %02hx:%02hx %ld";
else
format = "%08lx-%08lx %4c\n %08lx %02hx:%02hx %ld";
rv = fscanf (maps, format,
&start, &end, flags, &offset,
&dev_major, &dev_minor, &inode);

View File

@@ -26,12 +26,12 @@
#include <glibtop/procmem.h>
static const unsigned long _glibtop_sysdeps_proc_mem =
(1 << GLIBTOP_PROC_MEM_VSIZE) + (1 << GLIBTOP_PROC_MEM_RSS) +
(1 << GLIBTOP_PROC_MEM_RSS_RLIM);
(1L << GLIBTOP_PROC_MEM_VSIZE) + (1L << GLIBTOP_PROC_MEM_RSS) +
(1L << GLIBTOP_PROC_MEM_RSS_RLIM);
static const unsigned long _glibtop_sysdeps_proc_mem_statm =
(1 << GLIBTOP_PROC_MEM_SIZE) + (1 << GLIBTOP_PROC_MEM_RESIDENT) +
(1 << GLIBTOP_PROC_MEM_SHARE);
(1L << GLIBTOP_PROC_MEM_SIZE) + (1L << GLIBTOP_PROC_MEM_RESIDENT) +
(1L << GLIBTOP_PROC_MEM_SHARE);
#ifndef LOG1024
#define LOG1024 10

Some files were not shown because too many files have changed in this diff Show More