Compare commits
350 Commits
LIBGTOP_1_
...
libgtop-GN
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6115106a4d | ||
|
|
28150c6f27 | ||
|
|
409a6802e2 | ||
|
|
337e79db2b | ||
|
|
720768a40c | ||
|
|
636dc572d7 | ||
|
|
cd2bc3d496 | ||
|
|
0b1d58f306 | ||
|
|
4bd4d417e1 | ||
|
|
e02b1be1e2 | ||
|
|
46f8800cc8 | ||
|
|
f6df4a3f07 | ||
|
|
e94e56fa5c | ||
|
|
d096dc3e63 | ||
|
|
528c4d6362 | ||
|
|
143c3dafe1 | ||
|
|
629d9a0392 | ||
|
|
798350fcef | ||
|
|
8eaf7b99cf | ||
|
|
194c0548b5 | ||
|
|
97167e7add | ||
|
|
6a96719e58 | ||
|
|
8181cef8e3 | ||
|
|
45b8a9a361 | ||
|
|
6794524344 | ||
|
|
9840ef9650 | ||
|
|
8f1961056a | ||
|
|
60d4f03319 | ||
|
|
31ec86124b | ||
|
|
21768e8e99 | ||
|
|
ab0bfbcf3c | ||
|
|
d807950ce2 | ||
|
|
68cebe2aaf | ||
|
|
36ba38cdc4 | ||
|
|
47aad7d822 | ||
|
|
82e6de4aa2 | ||
|
|
ef825aa1c0 | ||
|
|
5516366d00 | ||
|
|
ca0915e32c | ||
|
|
594e4f0079 | ||
|
|
7163fa842b | ||
|
|
83bf982682 | ||
|
|
95fc1fb662 | ||
|
|
aafbeadcf0 | ||
|
|
5666bf9d33 | ||
|
|
3110b3d491 | ||
|
|
f80e0ea5d8 | ||
|
|
2679063df2 | ||
|
|
98b04a6165 | ||
|
|
173785bf09 | ||
|
|
bd721cf53d | ||
|
|
2b5bc90451 | ||
|
|
635eefba48 | ||
|
|
6da87f745d | ||
|
|
ed3e3212bb | ||
|
|
fb34b3bb6e | ||
|
|
fce31c179d | ||
|
|
9d43d5d272 | ||
|
|
f91299a487 | ||
|
|
1e3f2ba5d0 | ||
|
|
6066288d72 | ||
|
|
f53e526dec | ||
|
|
84b9a1e768 | ||
|
|
fcd114ff1b | ||
|
|
0fb561662e | ||
|
|
beff584d14 | ||
|
|
45a31cd564 | ||
|
|
bb0b77e0ae | ||
|
|
50e34421f7 | ||
|
|
ab60fc3dd1 | ||
|
|
2661891d6a | ||
|
|
ba096bfae2 | ||
|
|
9b56e502eb | ||
|
|
99ec1e3ff3 | ||
|
|
735102a5c1 | ||
|
|
72a46436d9 | ||
|
|
47cd681c0e | ||
|
|
1451a36a04 | ||
|
|
358b0610f5 | ||
|
|
1401fdd5bd | ||
|
|
16f6fab592 | ||
|
|
c140390f1d | ||
|
|
5a681b7bea | ||
|
|
cc2790545c | ||
|
|
a13877776b | ||
|
|
243ed7fdd0 | ||
|
|
dc8687227a | ||
|
|
d627a9a601 | ||
|
|
f84fe9edc7 | ||
|
|
6a53807bb8 | ||
|
|
2f2bbe236b | ||
|
|
8180a1936a | ||
|
|
b1b7355ea8 | ||
|
|
a105dbecdc | ||
|
|
060dd70e09 | ||
|
|
739db1b32d | ||
|
|
fd525d3fa3 | ||
|
|
78add589c6 | ||
|
|
c234586bfa | ||
|
|
8d25899dc6 | ||
|
|
b7def65c7a | ||
|
|
9939d070b9 | ||
|
|
206c620fd6 | ||
|
|
057b16ec01 | ||
|
|
ef899af6f3 | ||
|
|
730c36e1fd | ||
|
|
96f9b4f199 | ||
|
|
3dbb6f1eca | ||
|
|
52ea02ba87 | ||
|
|
1b5fe965df | ||
|
|
7b274d19e4 | ||
|
|
934c7dca93 | ||
|
|
5fe502317e | ||
|
|
0e5efea6f1 | ||
|
|
b1111e2b2a | ||
|
|
64af09a8a2 | ||
|
|
77ced38c16 | ||
|
|
8963e38a7c | ||
|
|
a8f4eec9e6 | ||
|
|
a9e9fe07ef | ||
|
|
85b34b98af | ||
|
|
ab8bd67cdf | ||
|
|
5650b49719 | ||
|
|
71426ed454 | ||
|
|
4458d6ba13 | ||
|
|
70210721e0 | ||
|
|
b81f82e9a2 | ||
|
|
4df359b9d3 | ||
|
|
1c248d7e93 | ||
|
|
b2368f46ca | ||
|
|
890398bbb5 | ||
|
|
84cc3242fc | ||
|
|
2456c458c2 | ||
|
|
a6710fbfad | ||
|
|
6dca1e55d8 | ||
|
|
1516e5e192 | ||
|
|
f659523856 | ||
|
|
6b81006d08 | ||
|
|
b70be80aca | ||
|
|
f8fb49a428 | ||
|
|
18356c6ae6 | ||
|
|
807d4bf6ae | ||
|
|
c0350d38ae | ||
|
|
d3a9e47ffb | ||
|
|
c8a3e46433 | ||
|
|
222706a0d4 | ||
|
|
2168cc5f71 | ||
|
|
08808384f4 | ||
|
|
0f1306a20f | ||
|
|
84b05c0219 | ||
|
|
6916ada308 | ||
|
|
5943c96d35 | ||
|
|
909a3e6512 | ||
|
|
ca94618e27 | ||
|
|
a478d380f4 | ||
|
|
af80d4d3d2 | ||
|
|
973dc2d37c | ||
|
|
97b32c7046 | ||
|
|
fb8184afba | ||
|
|
16643866cf | ||
|
|
aa9299f344 | ||
|
|
6f69cd863b | ||
|
|
7262bf39d8 | ||
|
|
9e773390cc | ||
|
|
54cbdb8158 | ||
|
|
c70b11ee00 | ||
|
|
965b26c926 | ||
|
|
384cd6b2db | ||
|
|
b055e3710b | ||
|
|
669c6fd670 | ||
|
|
617c4568d2 | ||
|
|
93c998cf7a | ||
|
|
46a0750736 | ||
|
|
e9227d1a2e | ||
|
|
41b7120527 | ||
|
|
0ad6ae0a12 | ||
|
|
6197e3ad47 | ||
|
|
e577717013 | ||
|
|
6b19a0090a | ||
|
|
a515242f17 | ||
|
|
a7b13c7d83 | ||
|
|
849d2da085 | ||
|
|
d4b195045a | ||
|
|
c269f0adb8 | ||
|
|
4f65ee018c | ||
|
|
8a8b975d08 | ||
|
|
64955004a0 | ||
|
|
4ef82847fe | ||
|
|
9da5658ba1 | ||
|
|
b300842f47 | ||
|
|
9a49872026 | ||
|
|
1aa7aae2f6 | ||
|
|
70ba9e2559 | ||
|
|
13323e55ee | ||
|
|
57d96878de | ||
|
|
10de82e256 | ||
|
|
29240a5a96 | ||
|
|
1baa2ef8ff | ||
|
|
0bd5a6c082 | ||
|
|
2698263164 | ||
|
|
85d53a69cf | ||
|
|
0a42a8d018 | ||
|
|
9d772e3c07 | ||
|
|
ddd9d11c71 | ||
|
|
b161b5bb72 | ||
|
|
5607fefe30 | ||
|
|
9d9aed4023 | ||
|
|
62edf91314 | ||
|
|
38e55efd2d | ||
|
|
67c9c8e3e3 | ||
|
|
013ab1841d | ||
|
|
88c5d4fd61 | ||
|
|
adbe42cda3 | ||
|
|
2e6e310a3e | ||
|
|
818e941413 | ||
|
|
dfa868ce82 | ||
|
|
dc353a4172 | ||
|
|
4da65d5d0b | ||
|
|
a2043e3aaf | ||
|
|
f03304a920 | ||
|
|
beedc57724 | ||
|
|
3049619931 | ||
|
|
ddb0c913c1 | ||
|
|
c7244ba1ba | ||
|
|
146ccb2511 | ||
|
|
91c35548e4 | ||
|
|
8705ef6b65 | ||
|
|
d5b27269d8 | ||
|
|
6915f098ca | ||
|
|
376613ddd4 | ||
|
|
6a9cd61fd9 | ||
|
|
18a3526ea7 | ||
|
|
333c85736c | ||
|
|
df5ec3c02a | ||
|
|
368e94c8e1 | ||
|
|
f5de8e4ead | ||
|
|
715975f7ed | ||
|
|
f13099194c | ||
|
|
1dd8a8e8fc | ||
|
|
d9fb27e57c | ||
|
|
dde1a2c1aa | ||
|
|
5bff21b7b4 | ||
|
|
e58c732f54 | ||
|
|
48404428a2 | ||
|
|
d009071e40 | ||
|
|
33b1fcf4f9 | ||
|
|
c0a9dedc4b | ||
|
|
7ab96d212d | ||
|
|
bd6e248adf | ||
|
|
9abfb85080 | ||
|
|
fdef2d5b38 | ||
|
|
641eb24a8b | ||
|
|
8754f434d1 | ||
|
|
f656208234 | ||
|
|
0df1594f31 | ||
|
|
1ab7936ced | ||
|
|
dcd43f8a15 | ||
|
|
7f7c5506f7 | ||
|
|
b0a4cb2379 | ||
|
|
8c06ed1516 | ||
|
|
56154e50f2 | ||
|
|
902670623f | ||
|
|
0e5d856065 | ||
|
|
35b6acfc22 | ||
|
|
0830a0b8a7 | ||
|
|
f4be080d63 | ||
|
|
a599e04eb6 | ||
|
|
0dec9a7b70 | ||
|
|
75958ce2ab | ||
|
|
20bbc17f6b | ||
|
|
19ffa1419a | ||
|
|
1e568f294e | ||
|
|
7752a312e9 | ||
|
|
23c7449898 | ||
|
|
64b3db2dc0 | ||
|
|
e94b4882b6 | ||
|
|
1e629c9a86 | ||
|
|
6b6e1261f1 | ||
|
|
bbc872138b | ||
|
|
3555a6ca0c | ||
|
|
e5928d0b13 | ||
|
|
5bb7e07e95 | ||
|
|
043f4a498f | ||
|
|
94297b8460 | ||
|
|
0f5b941b15 | ||
|
|
df6d645afd | ||
|
|
9ac47c7839 | ||
|
|
8d734d1296 | ||
|
|
7fa43bba5d | ||
|
|
e2e01a9405 | ||
|
|
5530697ab8 | ||
|
|
95f279d1a7 | ||
|
|
1904a463e2 | ||
|
|
7ce1f9e9d7 | ||
|
|
5221f6d4f8 | ||
|
|
ac175a4cbf | ||
|
|
f53d1a69bc | ||
|
|
adaa9cad97 | ||
|
|
7201ec7790 | ||
|
|
113525a7d7 | ||
|
|
d6e62e85d2 | ||
|
|
ee153445f0 | ||
|
|
50b43a0f41 | ||
|
|
25c26a6620 | ||
|
|
0438b9d69a | ||
|
|
90c01f24fe | ||
|
|
dc0f442247 | ||
|
|
017f4d20c7 | ||
|
|
c021ce7851 | ||
|
|
93ab9882c3 | ||
|
|
a0477c6212 | ||
|
|
6780e78a6b | ||
|
|
d8871029eb | ||
|
|
6799ce187b | ||
|
|
2b6b2578be | ||
|
|
1b0a9fd291 | ||
|
|
43e070dd8b | ||
|
|
b0d18119ff | ||
|
|
be05f8163a | ||
|
|
d6cdf95d83 | ||
|
|
2256a9127f | ||
|
|
e6507a80be | ||
|
|
8411e566b4 | ||
|
|
40854f4179 | ||
|
|
41062d0262 | ||
|
|
58c882a860 | ||
|
|
789d156972 | ||
|
|
19c24da036 | ||
|
|
929a025f53 | ||
|
|
6a7c289305 | ||
|
|
b65a4a7dcb | ||
|
|
39b2fffe83 | ||
|
|
efb913acff | ||
|
|
79e756a2f7 | ||
|
|
b08968e644 | ||
|
|
dff497d2fa | ||
|
|
38de742ca4 | ||
|
|
e0d3401bc4 | ||
|
|
aae2b5a94d | ||
|
|
a5bd38fc19 | ||
|
|
931b8f065e | ||
|
|
f7885e488f | ||
|
|
8122db69ee | ||
|
|
ab13d4919d | ||
|
|
1d955fbf1f | ||
|
|
8af25a2003 | ||
|
|
12eb6a25ec | ||
|
|
77ced087a1 | ||
|
|
983475d0c1 | ||
|
|
70b65c05e5 |
13
.cvsignore
13
.cvsignore
@@ -13,7 +13,6 @@ gtopConf.sh
|
|||||||
i386-bsdi
|
i386-bsdi
|
||||||
i686-pc-linux-gnu
|
i686-pc-linux-gnu
|
||||||
intl
|
intl
|
||||||
libgtop-0.01.tar.gz
|
|
||||||
libgtop-mirror.sh.swp
|
libgtop-mirror.sh.swp
|
||||||
libgtopConf.sh
|
libgtopConf.sh
|
||||||
libtool
|
libtool
|
||||||
@@ -31,12 +30,6 @@ i686-pc-linux-gnu-linux
|
|||||||
libgtop-config
|
libgtop-config
|
||||||
ABOUT-NLS
|
ABOUT-NLS
|
||||||
libgtop.spec
|
libgtop.spec
|
||||||
libgtop-0.99.*.tar.gz
|
libgtop*.tar.gz
|
||||||
libgtop-0.99.*
|
*-debstamp
|
||||||
install-sh
|
libgtop*.pc
|
||||||
mkinstalldirs
|
|
||||||
missing
|
|
||||||
INSTALL
|
|
||||||
COPYING
|
|
||||||
glibtop-config.h
|
|
||||||
stamp-gc-h
|
|
||||||
|
|||||||
2
AUTHORS
2
AUTHORS
@@ -1,2 +1,2 @@
|
|||||||
Martin Baulig (martin@home-of-linux.org)
|
Martin Baulig (martin@home-of-linux.org)
|
||||||
Josh Sled <jsled@scam.XCF.Berkeley.EDU>
|
Drazen Kacar (dave@srce.hr)
|
||||||
|
|||||||
612
ChangeLog
612
ChangeLog
@@ -1,13 +1,454 @@
|
|||||||
1999-05-28 Martin Baulig <baulig@Stud.Informatik.Uni-Trier.DE>
|
2003-09-30 Laurent Dhima <laurenti@alblinux.net>
|
||||||
|
|
||||||
* include/glibtop/sysdeps.h: Remove the `GLIBTOP_SYSDEPS_FEATURES'
|
* configure.in: Added "sq" to ALL_LINGUAS.
|
||||||
and `GLIBTOP_SYSDEPS_POINTER_SIZE' constants and let numbering
|
|
||||||
start at zero for `GLIBTOP_SYSDEPS_CPU'.
|
|
||||||
|
|
||||||
1999-05-28 Martin Baulig <martin@home-of-linux.org>
|
2003-09-17 Fatih Demir <kabalak@gtranslator.org>
|
||||||
|
|
||||||
* glibtop.h (GLIBTOP_MOUNTENTRY_LEN): Move this
|
* configure.in: Added "ta" (Tamil) to the languages' list.
|
||||||
* include/glibtop/limits.h: here.
|
|
||||||
|
2003-09-13 Carlos Perelló Marín <carlos@gnome.org>
|
||||||
|
|
||||||
|
* configure.in (ALL_LINGUAS): Removed es_ES.
|
||||||
|
|
||||||
|
2003-09-08 Kevin Vandersloot
|
||||||
|
|
||||||
|
* configure.in: release 2.0.5
|
||||||
|
|
||||||
|
2003-09-06 Taneem Ahmed <taneem@bengalinux.org>
|
||||||
|
|
||||||
|
* configure.in: Added "bn" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-08-24 Kevin Vandersloot
|
||||||
|
|
||||||
|
* configure.in: release 2.0.4
|
||||||
|
|
||||||
|
2003-08-13 Guntupalli Karunakar <karunakar@freedomink.org>
|
||||||
|
|
||||||
|
* configure.in: Added "hi" (Hindi) in ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-08-13 Andrew Sobala <aes@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: release 2.0.3
|
||||||
|
|
||||||
|
2003-08-09 Dafydd Harries <daf@parnassus.ath.cx>
|
||||||
|
|
||||||
|
* configure.in: Added "cy" (Welsh) to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-08-03 Malcolm Tredinnick <malcolm@commsecure.com.au>
|
||||||
|
|
||||||
|
* Makefile.am: Change subdirectory build order so that
|
||||||
|
'distclean' target work (and other targets remain working).
|
||||||
|
Fixes bug #84622.
|
||||||
|
|
||||||
|
2003-06-10 Kjartan Maraas <set EMAIL_ADDRESS environment variable>
|
||||||
|
|
||||||
|
* libgtop-2.0.pc.in: Fix missing build flags. Patch from
|
||||||
|
Julio Merino. Fixes bug #103086.
|
||||||
|
* sysdeps/linux/mem.c: (glibtop_get_mem_s): Fix memory calculation
|
||||||
|
under Linux. Patch from <rwahl@gmx.de>. Fixes bug #68626.
|
||||||
|
|
||||||
|
2003-06-10 Kjartan Maraas <kmaraas@gnome.org>
|
||||||
|
|
||||||
|
* sysdeps/freebsd/glibtop_machine.h:
|
||||||
|
* sysdeps/kernel/glibtop_private.h:
|
||||||
|
* sysdeps/solaris/glibtop_machine.h:
|
||||||
|
* sysdeps/solaris/glibtop_private.h: Comment out text after
|
||||||
|
#endif to make some compilers happy.
|
||||||
|
|
||||||
|
2003-05-11 Andrew Sobala <aes@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: release 2.0.2
|
||||||
|
|
||||||
|
2003-05-10 Danilo Šegan <dsegan@gmx.net>
|
||||||
|
|
||||||
|
* configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-04-17 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* configure.in: Added "mk" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-03-13 Christian Rose <menthos@menthos.com>
|
||||||
|
|
||||||
|
* configure.in: Added "ml" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-03-10 Roozbeh Pournader <roozbeh@sharif.edu>
|
||||||
|
|
||||||
|
* configure.in: Added "fa" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-03-08 Gil "Dolfin" Osher <dolfin@rpg.org.il>
|
||||||
|
|
||||||
|
* configure.in: Added he to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-02-25 T?µivo Leedj?¤rv <toivo@linux.ee>
|
||||||
|
|
||||||
|
* configure.in: Added et to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-02-16 Mohammad DAMT <mdamt@bisnisweb.com>
|
||||||
|
|
||||||
|
* po/id.po: Added Indonesian translation
|
||||||
|
* configure.in: Added "id" to ALL_LINGUAS
|
||||||
|
|
||||||
|
2003-01-31 James Henstridge <james@daa.com.au>
|
||||||
|
|
||||||
|
* acinclude.m4 (GNOME_SUPPORT_CHECKS): use AC_LIBOBJ() to set
|
||||||
|
LIBOBJS variable, since newer autoconf's barf on direct access.
|
||||||
|
This also takes care of setting LTLIBOBJS for us.
|
||||||
|
|
||||||
|
2003-01-29 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* configure.in: Added ar to ALL_LINGUAS
|
||||||
|
|
||||||
|
2003-01-25 Alessio Frusciante <algol@firenze.linux.it>
|
||||||
|
|
||||||
|
* configure.in: Added "it" (Italian) to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-01-23 Marius Andreiana <marius galuna.ro>
|
||||||
|
|
||||||
|
* configure.in: Added "ro" to ALL_LINGUAS
|
||||||
|
|
||||||
|
2003-01-22 Christian Rose <menthos@menthos.com>
|
||||||
|
|
||||||
|
* configure.in: Added "mn" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2003-01-16 Daniel Yacob <locales@geez.org>
|
||||||
|
|
||||||
|
* configure.in: added am to ALL_LINGUAS
|
||||||
|
|
||||||
|
2003-01-12 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* configure.in: release 2.0.1
|
||||||
|
|
||||||
|
2002-12-30 Bastien Nocera <hadess@hadess.net>
|
||||||
|
|
||||||
|
* Added sysdeps/aix directory that was missing
|
||||||
|
|
||||||
|
2002-10-08 Laurent Vivier <Laurent.Vivier@bull.net>
|
||||||
|
|
||||||
|
* Framework for AIX support
|
||||||
|
|
||||||
|
2002-08-07 Vincent Berger <Vincent.Berger@ext.bull.net>
|
||||||
|
|
||||||
|
* support/: Add alloca management for AIX
|
||||||
|
* configure.in: correct checking for nm
|
||||||
|
|
||||||
|
2002-11-03 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||||
|
|
||||||
|
* configure.in: Added Belarusian to ALL_LINGUAS
|
||||||
|
|
||||||
|
2002-09-26 Stanislav Brabec <sbrabec@suse.cz>
|
||||||
|
|
||||||
|
* configure.in: Added cs to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2002-09-26 jacob berkman <jacob@ximian.com>
|
||||||
|
|
||||||
|
* configure.in (ALL_LINGUAS): remove cs until the file actually
|
||||||
|
gets added
|
||||||
|
|
||||||
|
2002-09-26 Stanislav Brabec <sbrabec@suse.cz>
|
||||||
|
|
||||||
|
* configure.in: Added cs to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2002-08-20 Peteris Krisjanis <peteris.krisjanis@os.lv>
|
||||||
|
|
||||||
|
* configure.in: (ALL_LINGUAS) Added Latvian (lv).
|
||||||
|
|
||||||
|
2002-06-25 Yanko Kaneti <yaneti@declera.com>
|
||||||
|
|
||||||
|
* configure.in: (ALL_LINGUAS) Added Bulgarian (bg).
|
||||||
|
|
||||||
|
2002-05-10 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* configure.in: release 2.0.0
|
||||||
|
|
||||||
|
2002-05-28 Carlos Perello Marin <carlos@gnome-db.org>
|
||||||
|
|
||||||
|
* configure.in (ALL_LINGUAS): Removed all es_* and added only es_ES.
|
||||||
|
|
||||||
|
2002-05-08 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||||
|
|
||||||
|
* configure.in: Added Vietnamese (vi) to ALL_LINGUAS
|
||||||
|
|
||||||
|
2002-03-12 James Henstridge <james@daa.com.au>
|
||||||
|
|
||||||
|
* acinclude.m4 (LIBGTOP_HEACKER_TESTS): AM_CONDITIONAL()
|
||||||
|
statements can't be conditionally executed (automake compat fix).
|
||||||
|
(GNOME_LIBGTOP_SYSDEPS): move the conditional here so that it is
|
||||||
|
always executed.
|
||||||
|
|
||||||
|
2002-02-10 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* configure.in: bump version
|
||||||
|
|
||||||
|
* release 1.90.2
|
||||||
|
|
||||||
|
2002-02-09 Bastien Nocera <hadess@hadess.net>
|
||||||
|
|
||||||
|
reviewed by: Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* configure.in: remove need for dc, and clean up
|
||||||
|
* stamp-h.in, .cvsignore: remove
|
||||||
|
|
||||||
|
2002-02-05 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* configure.in (ALL_LINGUAS): zh_CN.GB2312 -> zh_CN
|
||||||
|
|
||||||
|
2001-01-14 Hasbullah bin Pit <sebol@ikhlas.com>
|
||||||
|
|
||||||
|
* configure.in: Added ms in ALL_LINGUAS.
|
||||||
|
* po/ms.po: Added Malay Translation.
|
||||||
|
* po/.cvsignore: Added 'libgtop-2.0.pot'.
|
||||||
|
|
||||||
|
2001-01-14 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* configure.in: Sync'ed ALL_LINGUAS with files in po directory,
|
||||||
|
and renamed GETTEXT_PACKAGE to avoid conflict with libgtop 1.0.x.
|
||||||
|
|
||||||
|
2002-01-10 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* acininclude.m4: add back the support stuf but make it really
|
||||||
|
work
|
||||||
|
|
||||||
|
* configure.in: bump version number, add back GNOME_SUPPORT
|
||||||
|
check since that was causing a build failure
|
||||||
|
|
||||||
|
* release 1.90.1
|
||||||
|
|
||||||
|
2002-01-09 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* acinclude.m4: remove gnome support check. Fixes the build
|
||||||
|
for those with automake < 1.4p5.
|
||||||
|
|
||||||
|
* configure.in: remove check for GNOME_SUPPORT
|
||||||
|
|
||||||
|
2001-14-27 Miles Lane <miles@megapathdsl.net>
|
||||||
|
|
||||||
|
* acconfig.h: Added "#undef HAVE_GETTEXT" entry.
|
||||||
|
* LIBGTOP_VERSION: Removed file.
|
||||||
|
* configure.in: added glib-gettextize support and
|
||||||
|
moved in the *VERSION* stuff from LIBGTOP_VERSION.
|
||||||
|
|
||||||
|
2001-11-27 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* acinclude.m4: copy some of the macros that were formerly
|
||||||
|
in gnome-macros
|
||||||
|
|
||||||
|
* configure.in, sysdeps/Makefile.am: comment out guile
|
||||||
|
support for now.
|
||||||
|
|
||||||
|
* release 1.90.0
|
||||||
|
|
||||||
|
2001-11-26 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* src/daemon/gnuserv.c: Apply patch fixing security issue from
|
||||||
|
intexxia labs - #1048-261101
|
||||||
|
|
||||||
|
2001-11-26 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* src/inodedb/file_by_inode.c: Rename to file_by_inode2.c
|
||||||
|
* src/inodedb/mkinodedb.c: Rename to mkinodedb2.c
|
||||||
|
|
||||||
|
* po/POTFILES.in: Reflect above change
|
||||||
|
|
||||||
|
* */.cvsignore: Add various files
|
||||||
|
|
||||||
|
2001-11-25 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* port stable libgtop to GNOME 2.0. Too much to detail.
|
||||||
|
pkgconfig is now used. Libs are named libgtop-2.0 etc for
|
||||||
|
parallel install.
|
||||||
|
|
||||||
|
2001-10-17 Abel Chueng <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* configure.in, Makefile.am, include/glibtop/Makefile.am: headers
|
||||||
|
moved to $(includedir)/libgtop-1.0/glibtop.
|
||||||
|
|
||||||
|
2001-09-16 Abel Chueng <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* configure.in: Added "zh_TW" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2001-02-13 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.12 "Gerolzhofen".
|
||||||
|
|
||||||
|
* NEWS: Added news entry to 1.0.12.
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.12, binary age 11,
|
||||||
|
interface age 11.
|
||||||
|
|
||||||
|
2001-02-19 Simos Xenitellis <simos@hellug.gr>
|
||||||
|
|
||||||
|
* configure.in: Added "el" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2001-02-15 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.11 "Jasmin".
|
||||||
|
|
||||||
|
* NEWS: Added news entry for 1.0.11.
|
||||||
|
|
||||||
|
2001-02-14 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
Merged from LIBGTOP_1_1_2_PATCHES.
|
||||||
|
|
||||||
|
* libgtop-sysdeps.m4 (GLIBTOP_SOLARIS_RELEASE): Define this on Solaris;
|
||||||
|
we use version codes like 270 for SunOS 5.7 and 251 for SunOS 2.5.1.
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION (LIBGTOP_VERSION_SUFFIX): Added this so you can
|
||||||
|
have your tarballs called `libgtop-1.x.y-snap.tar.gz' or whatever.
|
||||||
|
This only affects the `VERSION' variable and thus how the resulting
|
||||||
|
tarball will be called, but not `LIBGTOP_VERSION_CODE' etc.
|
||||||
|
|
||||||
|
* configure.in, acconfig.h: Added checks for <procfs.h>
|
||||||
|
and <sys/procfs.h>
|
||||||
|
|
||||||
|
* configure.in (DL_LIB): Check for dlopen() and AC_SUBST this.
|
||||||
|
|
||||||
|
* Makefile.am: Make `aclocal.m4' also depend on `LIBGTOP-VERSION'
|
||||||
|
when in maintainer-mode.
|
||||||
|
|
||||||
|
2001-02-14 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* include/glibtop/limits.h: Removed; this file doesn't exist
|
||||||
|
in the stable branch.
|
||||||
|
|
||||||
|
2001-02-13 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.11, binary age 10,
|
||||||
|
interface age 10.
|
||||||
|
|
||||||
|
2001-02-13 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
|
||||||
|
|
||||||
|
* configure.in: Added sk to ALL_LINGUAS
|
||||||
|
|
||||||
|
2001-02-08 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
|
||||||
|
|
||||||
|
* configure.in (ALL_LINGUAS): Added pt_BR to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2000-11-21 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* libgtop-config.h.in: Added `--cflags', `--libs' and `--extra-libs'
|
||||||
|
parameters.
|
||||||
|
|
||||||
|
2000-11-20 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.10 "November Rain".
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.10, binary age 9,
|
||||||
|
interface age 9.
|
||||||
|
|
||||||
|
2000-05-25 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.9 "Stuttgart".
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.9 binary age 8,
|
||||||
|
interface age 8.
|
||||||
|
|
||||||
|
(LibGTop 1.0.8 "Frankfurt" was not publically released.)
|
||||||
|
|
||||||
|
2000-02-20 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.8 binary age 7,
|
||||||
|
interface age 7.
|
||||||
|
|
||||||
|
2000-02-15 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.7 "Copenhagen".
|
||||||
|
|
||||||
|
1999-10-19 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.7 binary age 6,
|
||||||
|
interface age 6.
|
||||||
|
|
||||||
|
1999-10-18 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.6 "October LibGTop".
|
||||||
|
|
||||||
|
1999-10-18 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* NEWS.old: Removed obsolete file.
|
||||||
|
|
||||||
|
* RELNOTES-1.0.x: Added release notes for LibGTop 1.0.6.
|
||||||
|
|
||||||
|
* TODO: Removed obsolete file.
|
||||||
|
|
||||||
|
* NEWS: We start maintaining a NEWS file now :)
|
||||||
|
|
||||||
|
1999-10-16 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.6 binary age 5,
|
||||||
|
interface age 5.
|
||||||
|
|
||||||
|
1999-10-09 Jesus Bravo Alvarez <jba@pobox.com>
|
||||||
|
|
||||||
|
* configure.in (ALL_LINGUAS): Added Galician (gl)
|
||||||
|
|
||||||
|
1999-09-29 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.5.
|
||||||
|
|
||||||
|
1999-09-29 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* configure.in (libgtop_top_builddir): AC_SUBST this.
|
||||||
|
|
||||||
|
1999-09-24 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.5 binary age 4,
|
||||||
|
interface age 4.
|
||||||
|
|
||||||
|
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>
|
1999-05-26 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
@@ -18,162 +459,9 @@
|
|||||||
|
|
||||||
* libgtop-sysdeps.m4: Make the I4B check work for NetBSD.
|
* libgtop-sysdeps.m4: Make the I4B check work for NetBSD.
|
||||||
|
|
||||||
1999-05-15 Martin Baulig <martin@home-of-linux.org>
|
1999-05-16 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* libgtop-sysdeps.m4: Remove the `--enable-hacker-mode' requirement
|
* doc: Merged the LibGTop Manual from the HEAD.
|
||||||
for the BSDI, Solaris and Digital Unix ports.
|
|
||||||
|
|
||||||
1999-05-13 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* libgtop-sysdeps.m4 (GLIBTOP_SOLARIS_RELEASE): Define this on Solaris;
|
|
||||||
we use version codes like 270 for SunOS 5.7 and 251 for SunOS 2.5.1.
|
|
||||||
|
|
||||||
1999-05-12 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* glibtop-config.h: This is a new generated file which will be
|
|
||||||
included from <glibtop.h>. We define things like `u_int64_t' and
|
|
||||||
LIBGTOP_*_VERSION here so we can compile LibGTop applications with
|
|
||||||
`libgtop-config --cflags`.
|
|
||||||
|
|
||||||
* configure.in: Create glibtop-config.h.
|
|
||||||
(GLIBTOP_*_INCS): Added `-I $(pkglibdir)/include'.
|
|
||||||
|
|
||||||
* libgtop-config.h.in: Added `--cflags', `--libs' and `--extra-libs'
|
|
||||||
parameter so you can now use LibGTop even in no-autoconf apps.
|
|
||||||
|
|
||||||
* Makefile.am: Install `glibtop-config.h' in `$(pkglibdir)/include'.
|
|
||||||
|
|
||||||
1999-05-09 Drazen Kacar <dave@srce.hr>
|
|
||||||
|
|
||||||
* configure.in, acconfig.h: Added checks for <procfs.h>
|
|
||||||
and <sys/procfs.h>
|
|
||||||
|
|
||||||
1999-05-09 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* doc: One should ship the documentation of a package together with
|
|
||||||
the tarball, so I added this back.
|
|
||||||
|
|
||||||
1999-05-08 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* include/glibtop/limits.h (GLIBTOP_MAX_GROUPS): Define this here.
|
|
||||||
* include/glibtop/procuid.h (GLIBTOP_MAX_GROUPS): Moved to limits.h.
|
|
||||||
|
|
||||||
* features.def: We can use constants from <glibtop/limits.h> here.
|
|
||||||
|
|
||||||
1999-05-08 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* libgtop-sysdeps.m4: Use the setgid sys server for Solaris.
|
|
||||||
|
|
||||||
1999-05-06 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* include/glibtop/sysdeps.h (glibtop_sysdeps): Added `pointer_size'
|
|
||||||
which is the number of bits of a `void *'.
|
|
||||||
|
|
||||||
1999-05-03 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
Set version number to 1.1.0. Also made a `LIBGTOP_STABLE_1_0'
|
|
||||||
branch in CVS while development will go on here in the HEAD.
|
|
||||||
|
|
||||||
* LIBGTOP-VERSION: Set version number to 1.1.0 binary age 0,
|
|
||||||
interface age 0. Set LIBGTOP_SERVER_VERSION to 50.
|
|
||||||
|
|
||||||
1999-04-18 Tuomas J. Lukka <lukka@iki.fi>
|
|
||||||
|
|
||||||
* Add missing comma in sysdeps/names/proctime.c
|
|
||||||
|
|
||||||
1999-04-18 Tuomas J. Lukka <lukka@iki.fi>
|
|
||||||
|
|
||||||
* Add missing comma in sysdeps/names/cpu.c
|
|
||||||
|
|
||||||
1999-04-18 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
Thanks to Drazen Kacar for pointing out that not all processors must
|
|
||||||
be running all the time under Solaris, so we need to have some flag
|
|
||||||
to find out which processors are running.
|
|
||||||
|
|
||||||
* (glibtop_cpu): Added `xcpu_flags' bitmask of running processors.
|
|
||||||
* (glibtop_proc_time): Added `xcpu_flags'.
|
|
||||||
|
|
||||||
1999-04-18 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* include/glibtop/limits.h: New file.
|
|
||||||
(GLIBTOP_NCPU): Define this here and increase it to 64.
|
|
||||||
|
|
||||||
1999-03-30 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
Added some new features.
|
|
||||||
|
|
||||||
* (glibtop_uptime): Added `boot_time', boot time in seconds
|
|
||||||
since the epoch.
|
|
||||||
|
|
||||||
* (glibtop_proc_state): Changed `state' from char to unsigned.
|
|
||||||
`uid' and `gid' are effective uid and gid; added comment.
|
|
||||||
Added `ruid' and `rgid' for guaranteed-to-be-correct real uid/gid.
|
|
||||||
For SMP systems: added `has_cpu', `processor' and `last_processor'.
|
|
||||||
|
|
||||||
* (glibtop_proc_uid): Added suid, sgid, fsuid, fsgid, ngroups, groups.
|
|
||||||
|
|
||||||
* (glibtop_proc_segment): Added start_data, end_data, start_brk,
|
|
||||||
end_brk, start_mmap, arg_start, arg_end, env_start, env_end.
|
|
||||||
|
|
||||||
* include/glibtop/procstate.h: Define some constants for the `state'
|
|
||||||
field of glibtop_proc_state.
|
|
||||||
|
|
||||||
* include/glibtop/prockernel.h: Define some constants for the
|
|
||||||
`k_flags' field of glibtop_proc_kernel.
|
|
||||||
|
|
||||||
1999-03-24 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* configure.in: Check for getloadavg () and swapctl () for
|
|
||||||
Solaris.
|
|
||||||
|
|
||||||
1999-03-23 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* glibtop.h (glibtop): Added `wanted'. Applications can set the
|
|
||||||
features they are interested in here. This way we don't waste CPU
|
|
||||||
getting expensive data that aren't really needed.
|
|
||||||
|
|
||||||
* LIBGTOP-VERSION: This breaks backward compatibility and also
|
|
||||||
added new functions; set binary age and interface age to 0.
|
|
||||||
|
|
||||||
1999-03-21 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
Added a new sysctl () interface to the Linux Kernel.
|
|
||||||
|
|
||||||
* kernel/sysctl: Imported.
|
|
||||||
|
|
||||||
* libgtop-sysdeps.m4: If `--enable-hacker-mode' is given, check
|
|
||||||
for my new sysctl () interface.
|
|
||||||
|
|
||||||
1999-03-20 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
Removed all traces of my old table () Linux kernel hack.
|
|
||||||
|
|
||||||
* kernel: Removed.
|
|
||||||
* sysdeps/kernel: Removed.
|
|
||||||
* libgtop-sysdeps.m4: Don't check for table (); it does not
|
|
||||||
exist any longer.
|
|
||||||
|
|
||||||
1999-03-19 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
This is *untested* - please read "sysdeps/freebsd/ChangeLog" !
|
|
||||||
|
|
||||||
* libgtop-sysdeps.m4: Use the `freebsd' sysdeps directory for
|
|
||||||
BSDI as well if the `--enable-hacker-mode' parameter was given.
|
|
||||||
|
|
||||||
1999-03-18 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* LIBGTOP-VERSION: Set version number to 1.0.2 binary age 1,
|
|
||||||
intergace age 1.
|
|
||||||
|
|
||||||
1999-03-17 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
Imported first version of my Solaris port.
|
|
||||||
|
|
||||||
* configure.in: Check for `kstat_open' in `-lkstat'.
|
|
||||||
|
|
||||||
* libgtop-sysdeps.m4: Recognize the `solaris' sysdeps directory
|
|
||||||
when the `--enable-hacker-mode' parameter was given.
|
|
||||||
|
|
||||||
1999-03-01 Martin Baulig <martin@home-of-linux.org>
|
1999-03-01 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
|||||||
@@ -7,19 +7,22 @@
|
|||||||
# set LIBGTOP_BINARY_AGE and LIBGTOP_INTERFACE_AGE to 0.
|
# set LIBGTOP_BINARY_AGE and LIBGTOP_INTERFACE_AGE to 0.
|
||||||
#
|
#
|
||||||
LIBGTOP_MAJOR_VERSION=1
|
LIBGTOP_MAJOR_VERSION=1
|
||||||
LIBGTOP_MINOR_VERSION=1
|
LIBGTOP_MINOR_VERSION=90
|
||||||
LIBGTOP_MICRO_VERSION=0
|
LIBGTOP_MICRO_VERSION=0
|
||||||
|
|
||||||
LIBGTOP_INTERFACE_AGE=0
|
LIBGTOP_INTERFACE_AGE=0
|
||||||
LIBGTOP_BINARY_AGE=0
|
LIBGTOP_BINARY_AGE=0
|
||||||
|
# you can set this to `-snap' for instance to create
|
||||||
|
# a `libgtop-1.x.y-snap.tar.gz' tarball.
|
||||||
|
LIBGTOP_VERSION_SUFFIX=
|
||||||
|
|
||||||
# Increase each time you change the client/server protocol.
|
# Increase each time you change the client/server protocol.
|
||||||
LIBGTOP_SERVER_VERSION=50
|
LIBGTOP_SERVER_VERSION=5
|
||||||
|
|
||||||
# Don't change this
|
# Don't change this
|
||||||
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
|
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
|
||||||
LIBGTOP_VERSION_CODE=`echo "$LIBGTOP_MAJOR_VERSION 1000000 * $LIBGTOP_MINOR_VERSION 1000 * + $LIBGTOP_MICRO_VERSION + p q" | dc`
|
LIBGTOP_VERSION_CODE=`echo "$LIBGTOP_MAJOR_VERSION 1000000 * $LIBGTOP_MINOR_VERSION 1000 * + $LIBGTOP_MICRO_VERSION + p q" | dc`
|
||||||
|
|
||||||
# For automake.
|
# For automake.
|
||||||
VERSION=$LIBGTOP_VERSION
|
VERSION=$LIBGTOP_VERSION$LIBGTOP_VERSION_SUFFIX
|
||||||
PACKAGE=libgtop
|
PACKAGE=libgtop
|
||||||
|
|||||||
52
Makefile.am
52
Makefile.am
@@ -10,25 +10,16 @@ if BUILD_GNOME_SUPPORT
|
|||||||
support = support
|
support = support
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = po intl $(support) macros misc include sysdeps lib src \
|
SUBDIRS = . po $(support) misc include sysdeps lib src \
|
||||||
$(examples_SUBDIRS) doc
|
$(examples_SUBDIRS) doc
|
||||||
|
|
||||||
include_HEADERS = glibtop.h
|
libgtopinclude_HEADERS = glibtop.h
|
||||||
configincludedir = $(pkglibdir)/include
|
libgtopincludedir = $(includedir)/libgtop-2.0
|
||||||
|
|
||||||
EXTRA_DIST = autogen.sh libgtop.spec.in copyright.txt libgtopConf.sh.in \
|
EXTRA_DIST = autogen.sh libgtop.spec.in copyright.txt libgtopConf.sh.in \
|
||||||
LIBGTOP-VERSION features.def libgtop-config.in RELNOTES-0.25 \
|
LIBGTOP-VERSION features.def libgtop-config.in RELNOTES-0.25 \
|
||||||
RELNOTES-1.0 libgtop-sysdeps.m4 README NEWS.old libgtop-mirror.sh
|
RELNOTES-1.0 RELNOTES-1.0.x libgtop-sysdeps.m4 README \
|
||||||
|
libgtop-mirror.sh libgtop-2.0.pc.in acinclude.m4
|
||||||
configinclude_DATA = \
|
|
||||||
glibtop-config.h
|
|
||||||
|
|
||||||
BUILT_SOURCES = stamp-gc-h #note: not glibtop-config.h
|
|
||||||
glibtop-config.h: stamp-gc-h
|
|
||||||
@:
|
|
||||||
stamp-gc-h: config.status
|
|
||||||
CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibtop-config.h ./config.status
|
|
||||||
echo timestamp > stamp-gc-h
|
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
cp libgtop.spec $(distdir)
|
cp libgtop.spec $(distdir)
|
||||||
@@ -38,19 +29,24 @@ release:
|
|||||||
|
|
||||||
## Put `exec' in the name because this should be installed by
|
## Put `exec' in the name because this should be installed by
|
||||||
## `install-exec', not `install-data'.
|
## `install-exec', not `install-data'.
|
||||||
confexecdir = $(libdir)
|
## confexecdir = $(libdir)
|
||||||
confexec_DATA = $(top_builddir)/libgtopConf.sh \
|
## confexec_DATA = $(top_builddir)/libgtopConf.sh \
|
||||||
$(top_builddir)/libgtop-features.def
|
## $(top_builddir)/libgtop-features.def
|
||||||
|
|
||||||
bin_SCRIPTS = $(top_builddir)/libgtop-config
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = libgtop-2.0.pc
|
||||||
|
|
||||||
|
CLEANFILES=libgtopConf.sh
|
||||||
|
|
||||||
|
## bin_SCRIPTS = $(top_builddir)/libgtop-config
|
||||||
|
|
||||||
## to automatically rebuild aclocal.m4 if any of the macros in
|
## to automatically rebuild aclocal.m4 if any of the macros in
|
||||||
## `macros/' change
|
## `macros/' change
|
||||||
@MAINT@ include macros/macros.dep
|
## @MAINT@ include macros/macros.dep
|
||||||
@MAINT@macros/macros.dep: macros/Makefile.am
|
## @MAINT@macros/macros.dep: macros/Makefile.am
|
||||||
@MAINT@ cd macros && $(MAKE) macros.dep
|
## @MAINT@ cd macros && $(MAKE) macros.dep
|
||||||
|
|
||||||
@MAINT@$(top_srcdir)/aclocal.m4: libgtop-sysdeps.m4
|
@MAINT@$(top_srcdir)/aclocal.m4: libgtop-sysdeps.m4 LIBGTOP-VERSION
|
||||||
|
|
||||||
## We create libgtopConf.sh here and not from configure because we want
|
## We create libgtopConf.sh here and not from configure because we want
|
||||||
## to get the paths expanded correctly. Macros like srcdir are given
|
## to get the paths expanded correctly. Macros like srcdir are given
|
||||||
@@ -59,7 +55,7 @@ bin_SCRIPTS = $(top_builddir)/libgtop-config
|
|||||||
libgtopConf.sh: libgtopConf.sh.in Makefile
|
libgtopConf.sh: libgtopConf.sh.in Makefile
|
||||||
## Use sed and then mv to avoid problems if the user interrupts.
|
## Use sed and then mv to avoid problems if the user interrupts.
|
||||||
sed -e 's#\@LIBGTOP_LIBDIR\@#$(libdir)#g' \
|
sed -e 's#\@LIBGTOP_LIBDIR\@#$(libdir)#g' \
|
||||||
-e 's#\@LIBGTOP_INCLUDEDIR\@#$(includedir)#g' \
|
-e 's#\@LIBGTOP_INCLUDEDIR\@#$(includedir)/libgtop-2.0#g' \
|
||||||
-e 's#\@LIBGTOP_DATADIR\@#$(datadir)#g' \
|
-e 's#\@LIBGTOP_DATADIR\@#$(datadir)#g' \
|
||||||
-e 's#\@LIBGTOP_EXTRA_LIBS\@#$(LIBGTOP_EXTRA_LIBS)#g' \
|
-e 's#\@LIBGTOP_EXTRA_LIBS\@#$(LIBGTOP_EXTRA_LIBS)#g' \
|
||||||
-e 's#\@LIBGTOP_LIBS\@#$(LIBGTOP_LIBS)#g' \
|
-e 's#\@LIBGTOP_LIBS\@#$(LIBGTOP_LIBS)#g' \
|
||||||
@@ -86,11 +82,11 @@ libgtopConf.sh: libgtopConf.sh.in Makefile
|
|||||||
< $(srcdir)/libgtopConf.sh.in > libgtopConf.tmp \
|
< $(srcdir)/libgtopConf.sh.in > libgtopConf.tmp \
|
||||||
&& mv libgtopConf.tmp libgtopConf.sh
|
&& mv libgtopConf.tmp libgtopConf.sh
|
||||||
|
|
||||||
libgtop-config: libgtop-config.in Makefile
|
# libgtop-config: libgtop-config.in Makefile
|
||||||
sed -e 's#\@LIBGTOP_LIBDIR\@#$(libdir)#g' \
|
# sed -e 's#\@LIBGTOP_LIBDIR\@#$(libdir)#g' \
|
||||||
< $(srcdir)/libgtop-config.in > libgtop-config.tmp \
|
# < $(srcdir)/libgtop-config.in > libgtop-config.tmp \
|
||||||
&& mv libgtop-config.tmp libgtop-config && \
|
# && mv libgtop-config.tmp libgtop-config && \
|
||||||
chmod 755 libgtop-config
|
# chmod 755 libgtop-config
|
||||||
|
|
||||||
libgtop-features.def: features.def
|
libgtop-features.def: features.def
|
||||||
@LN_S@ $< $@
|
@LN_S@ $< $@
|
||||||
|
|||||||
68
NEWS
68
NEWS
@@ -0,0 +1,68 @@
|
|||||||
|
February 27, 2001:
|
||||||
|
=================
|
||||||
|
|
||||||
|
* Released LibGTop 1.0.12 "Gerolzhofen".
|
||||||
|
|
||||||
|
- fix for Solaris 8 from Laszlo PETER (msg_limits, sem_limits).
|
||||||
|
|
||||||
|
- fix for FreeBSD 4.2 from Rolf Grossmann (FreeBSD now uses
|
||||||
|
`_KERNEL' instead of `KERNEL'). Bug #51334.
|
||||||
|
|
||||||
|
- for BSDI, comment out `subnet' field in netload; this should make
|
||||||
|
it compile, but there may be other problems. Bug #13345.
|
||||||
|
|
||||||
|
This release is for GNOME 1.4 Beta2.
|
||||||
|
|
||||||
|
February 14, 2001:
|
||||||
|
=================
|
||||||
|
|
||||||
|
* Released LibGTop 1.0.11 "Jasmin":
|
||||||
|
|
||||||
|
[The release which was supposed to be called "Gerolzhofen".]
|
||||||
|
|
||||||
|
- merged in the Solaris code from LIBGTOP_1_1_2_PATCHES.
|
||||||
|
|
||||||
|
- minor OpenBSD fixes.
|
||||||
|
|
||||||
|
- again a bunch of updated translations.
|
||||||
|
|
||||||
|
Please test the Solaris stuff and report and bugs and
|
||||||
|
problems as soon as possible; I'll make a new release
|
||||||
|
for the 2nd beta of GNOME 1.4 if necessary.
|
||||||
|
|
||||||
|
November 20, 2000:
|
||||||
|
=================
|
||||||
|
|
||||||
|
* Released LibGTop 1.0.10 "November Rain":
|
||||||
|
|
||||||
|
- this release contains a bunch of updated translations.
|
||||||
|
|
||||||
|
May 25, 2000:
|
||||||
|
============
|
||||||
|
|
||||||
|
* Released LibGTop 1.0.9 "Stuttgart".
|
||||||
|
|
||||||
|
(LibGTop 1.0.8 "Frankfurt" was not publically released.)
|
||||||
|
|
||||||
|
February 15, 2000:
|
||||||
|
=================
|
||||||
|
|
||||||
|
* Released LibGTop 1.0.7 "Copenhagen":
|
||||||
|
|
||||||
|
- this is a bug fix release for the GUADEC CD-ROM;
|
||||||
|
it contains fixes in both the Linux and *BSD sysdeps
|
||||||
|
directory.
|
||||||
|
|
||||||
|
October 18, 1999:
|
||||||
|
================
|
||||||
|
|
||||||
|
* Released LibGTop 1.0.6 "October LibGTop":
|
||||||
|
|
||||||
|
- compilation fixes for FreeBSD.
|
||||||
|
- updated reference manual.
|
||||||
|
|
||||||
|
September 29, 1999:
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Released LibGTop 1.0.5.
|
||||||
|
|
||||||
|
|||||||
244
NEWS.old
244
NEWS.old
@@ -1,244 +0,0 @@
|
|||||||
$Id$
|
|
||||||
|
|
||||||
Jun/01/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* We have some new ``suffix rules'':
|
|
||||||
|
|
||||||
'__l' is a function defined in the client part;
|
|
||||||
'__s' is a function defined in the sysdeps part and
|
|
||||||
'__p' is a function that needs special priviledges.
|
|
||||||
'__r' is mapped either on '__p' or on '__s'.
|
|
||||||
the function without suffix is mapped on '__l'.
|
|
||||||
|
|
||||||
* We now decide at runtime whether or not using the server
|
|
||||||
is required for a particular function. All user programs
|
|
||||||
now call the '__l' function defined in '-lgtop' (in the lib
|
|
||||||
subdir). These functions either use 'glibtop_call__l' to
|
|
||||||
call the server or call the '__r' function.
|
|
||||||
|
|
||||||
* A function in the sysdeps directory now has the '__s' suffix
|
|
||||||
if it do not need any priviledges (and thus can be called directly
|
|
||||||
from client code) and the '__p' suffix otherwise (when it has to
|
|
||||||
be called from the server).
|
|
||||||
|
|
||||||
* If you call one of these functions:
|
|
||||||
|
|
||||||
-> use the '__p' suffix to be sure to get the SUID-safe one
|
|
||||||
(used in the server).
|
|
||||||
-> use the '__s' suffix to be sure to get a function that
|
|
||||||
doesn't need any priviledges.
|
|
||||||
-> use the '__r' suffix otherwise (it is mapped either on the
|
|
||||||
'__p' or on the '__s' one).
|
|
||||||
|
|
||||||
Only use the '__p' and '__s' functions in a 'GLIBTOP_SUID_<feature>'
|
|
||||||
conditional, otherwise you'll get undefined symbols !
|
|
||||||
|
|
||||||
* The server is now started from 'glibtop_init__r', but only when
|
|
||||||
it's really needed; for instance on DEC OSF/1 you only need it
|
|
||||||
for the proc* features - if you program only fetches the CPU usage,
|
|
||||||
now server will be started.
|
|
||||||
|
|
||||||
* Sorry, at the moment everything is a little bit unstable, I'm doing
|
|
||||||
heavy changes. I've just some great ideas which still need some work:
|
|
||||||
|
|
||||||
-> I want to have a SUID server that only implements those features
|
|
||||||
that need to be SUID; everything else uses the sysdeps code directly.
|
|
||||||
|
|
||||||
-> If a program only uses stuff that do not need the server, the
|
|
||||||
server will not be started at all.
|
|
||||||
|
|
||||||
-> I'm working on some kind of proxy server that can be used on a remote
|
|
||||||
host; in feature one can then use the MDI stuff from ghex in gtop to
|
|
||||||
have notebook pages displaying processes from different hosts.
|
|
||||||
|
|
||||||
* Well it is as much unstable that it only works under Linux at the moment.
|
|
||||||
|
|
||||||
1998-06-01 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* sysdeps/common/sysdeps.c: now using '__r' functions,
|
|
||||||
they are #defined either as the '__p' or the '__s' ones.
|
|
||||||
|
|
||||||
* sysdeps/linux/*.c: changed call of 'glibtop_init__r',
|
|
||||||
it now takes two additional arguments.
|
|
||||||
|
|
||||||
* examples/{first.c, second.c}: now using 'glibtop_init'
|
|
||||||
instead of 'glibtop_init__r'.
|
|
||||||
|
|
||||||
* include/glibtop/sysdeps.h: added 'dummy' member so
|
|
||||||
'GLIBTOP_SYSDEPS_<feature>' now start with 1.
|
|
||||||
|
|
||||||
* include/glibtop/*.h: we now #define 'glibtop_get_<feature>'
|
|
||||||
as 'glibtop_get_<feature>__l' and 'glibtop_get_<feature>__r'
|
|
||||||
either as the '__p' or the '__s' function.
|
|
||||||
|
|
||||||
* lib/*.c: removed #if's - we now decide at runtime
|
|
||||||
whether to use the server or to call the appropriate
|
|
||||||
function for the sysdeps directory.
|
|
||||||
|
|
||||||
1998-05-28 Martin Baulig <baulig@merkur.uni-trier.de>
|
|
||||||
|
|
||||||
* src/server/main.c: we now use the '__p' functions,
|
|
||||||
but only if the appropriate 'GLIBTOP_SUID_<feature>'
|
|
||||||
has a non-zero value.
|
|
||||||
|
|
||||||
* configure.in (@machine_incs@): always use
|
|
||||||
`-I$(top_srcdir)/sysdeps/@sysdeps_dir@'; it's no
|
|
||||||
longer conditional.
|
|
||||||
|
|
||||||
* examples/Makefile.am: removed the '_linux' examples.
|
|
||||||
|
|
||||||
* sysdeps/linux/*.c: renamed all functions implementing
|
|
||||||
features to '__s'.
|
|
||||||
|
|
||||||
* lib/*.c: renamed all functions implementing features
|
|
||||||
to '__l'; we only emit code for those functions if the
|
|
||||||
corresponding 'GLIBTOP_SUID_<feature>' has a positive value.
|
|
||||||
|
|
||||||
* include/glibtop/*.h: added some new function suffixes:
|
|
||||||
'__l' is a function defined in the client part;
|
|
||||||
'__s' is a function defined in the sysdeps part and
|
|
||||||
'__p' is a function that needs special priviledges.
|
|
||||||
'__r' is mapped either on '__l' or on '__s'.
|
|
||||||
|
|
||||||
* sysdeps/linux/glibtop_server.h: New file -
|
|
||||||
defines system dependent constants 'GLIBTOP_SUID_<feature>'
|
|
||||||
being either 'GLIBTOP_SYSDEPS_<feature>'+1 depending upon
|
|
||||||
whether or not this feature requires using the server.
|
|
||||||
|
|
||||||
* lib/sysdeps.c: removed that file; it is no longer
|
|
||||||
needed.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
May/21/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* doc/gnome-hackers.sgml: This is a short intro on how to use libgtop
|
|
||||||
in the GNOME project. It covers especially the use of its 'configure'
|
|
||||||
script and the automatically generated 'gtopConf.sh'.
|
|
||||||
|
|
||||||
May/20/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* 'gtopConf.sh' now defines 'GTOP_LIBS' and 'GTOP_INCS' in a manner
|
|
||||||
that they contain everything that is needed to link some program with
|
|
||||||
libgtop. It will use '-lgtop' only if the server is really needed and
|
|
||||||
'-lgtop_sysdeps' otherwise;
|
|
||||||
|
|
||||||
* 'gtopConf.sh' additionally defines 'GTOP_GUILE_LIBS' and 'GTOP_GUILE_INCS'
|
|
||||||
containing everything that is needed to link some program both with
|
|
||||||
libgtop and its guile interface. They are identically to 'GTOP_LIBS'
|
|
||||||
and 'GTOP_INCS' if building the guile interface is disabled or guile
|
|
||||||
cannot be found on the system.
|
|
||||||
|
|
||||||
* 'configure' takes additional arguments '--enable-libgtop-server' and
|
|
||||||
'--disable-libgtop-server' to use the server even when it's not needed
|
|
||||||
or to disable it's use where it's needed.
|
|
||||||
|
|
||||||
* 'configure' takes an argument '--without-libgtop-guile' to disable
|
|
||||||
guile support.
|
|
||||||
|
|
||||||
* 'configure takes an argument '--without-libgtop-names' to remove
|
|
||||||
'-lgtop_names' (and '-lgtop_guile_names' when we have guile) from
|
|
||||||
'GTOP_LIBS'; in this case these libraries are not even built.
|
|
||||||
|
|
||||||
May/19/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* Libgtop is now in the GNOME CVS Repository.
|
|
||||||
|
|
||||||
May/17/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* we have now 'const char *glibtop_types_* []' consisting
|
|
||||||
of the C types of the corresponding files of '_glibtop_*'.
|
|
||||||
|
|
||||||
* added guile function '(glibtop-types-*)' and '(glibtop-descriptions-*)'.
|
|
||||||
|
|
||||||
May/10/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* Port to DEC OSF1 3.0 has been made:
|
|
||||||
|
|
||||||
cpu (total, user, nice, sys, idle)
|
|
||||||
mem (total, used, free)
|
|
||||||
|
|
||||||
loadavg (loadavg)
|
|
||||||
uptime (uptime)
|
|
||||||
|
|
||||||
msg_limits (map, max, mnb, mni, tql)
|
|
||||||
sem_limits (mni, msl, opm, vmx, aem)
|
|
||||||
shm_limits (max, min, mni, seg)
|
|
||||||
|
|
||||||
The following need the server to be SUID root:
|
|
||||||
|
|
||||||
proclist (total, number, size)
|
|
||||||
procdata (cmd, state, uid, pid, ppid, pgrp, tty, k_flags,
|
|
||||||
session, tpgid, sigignore, sigcatch, signal, nice,
|
|
||||||
priority, resident, rss, vsize, utime, stime,
|
|
||||||
cutime, cstime, trs, drs)
|
|
||||||
|
|
||||||
May/07/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* 'flags' member of sysdeps/linux/procdata.c is now
|
|
||||||
'unsigned long flags [2]'.
|
|
||||||
|
|
||||||
* When we give glibtop_get_procdata () a pid of zero, only
|
|
||||||
the flags are returned.
|
|
||||||
|
|
||||||
* We now use static constants instead of #defines for sysdeps flags.
|
|
||||||
|
|
||||||
May/03/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* VPATH-Build now working; sometimes it's necessary to copy
|
|
||||||
$(top_srcdir)/po/cat-id-tbl.c to $(top_builddir)/po.
|
|
||||||
|
|
||||||
* The library has been tested on the following systems:
|
|
||||||
|
|
||||||
- i686-pc-linux-gnu
|
|
||||||
- sparc-sun-sunos4.1.1
|
|
||||||
- alpha-dec-osf1 (that's DEC OSF1 3.0 and 3.2)
|
|
||||||
|
|
||||||
* Compilation has been tested on the following systems (I have no root
|
|
||||||
access there and cannot test the library because of this):
|
|
||||||
|
|
||||||
- sparc-sun-solaris2
|
|
||||||
- i386-bsdi
|
|
||||||
|
|
||||||
* Does no longer require Gnome.
|
|
||||||
|
|
||||||
* Guile-Parts are compiled only if guile can be found.
|
|
||||||
|
|
||||||
* Some of the executables are statically linked to copy them more easily
|
|
||||||
between machines.
|
|
||||||
|
|
||||||
May/02/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
* Global changes to the interfaces, all functions except glibtop_open()
|
|
||||||
and glibtop_close() that took a server argument have now a '__r' suffix;
|
|
||||||
the original name is now a macro that uses glibtop_global_server.
|
|
||||||
|
|
||||||
Apr/10/1998
|
|
||||||
===========
|
|
||||||
Added new directory sysdeps/guile/names. It is the guile interface
|
|
||||||
to the gtop_names library found in sysdeps/names. Changed
|
|
||||||
GLIBTOP_DESCRIPTIONS to GLIBTOP_NAMES and added GLIBTOP_GUILE_NAMES
|
|
||||||
to the header files.
|
|
||||||
|
|
||||||
Apr/09/1998
|
|
||||||
===========
|
|
||||||
Added new directories guile and names to sysdeps. In names are
|
|
||||||
some string constants about the data stored in the structures.
|
|
||||||
guile is a guile interface for the library. It is used in
|
|
||||||
examples/third (which has been completely rewritten).
|
|
||||||
The header files define things from names when GLIBTOP_DESCRIPTIONS
|
|
||||||
if defined and/or from guile when HAVE_GUILE is defined.
|
|
||||||
|
|
||||||
Apr/08/1998
|
|
||||||
===========
|
|
||||||
|
|
||||||
Added guile wrapper for the library (see examples/third).
|
|
||||||
@@ -87,7 +87,7 @@ LibGTop is currently used in various places in the GNOME Project,
|
|||||||
for instance in some of the applets in gnome-core and - of cause -
|
for instance in some of the applets in gnome-core and - of cause -
|
||||||
this ultra-cool application called GTop ...
|
this ultra-cool application called GTop ...
|
||||||
|
|
||||||
Although LibGTop is not specific to GNOME and under LGPL license, I
|
Although LibGTop is not specific to GNOME and under GPL license, I
|
||||||
spent most my time during the last months to work in the GNOME project
|
spent most my time during the last months to work in the GNOME project
|
||||||
so this is the primary use for LibGTop (and currently the only one).
|
so this is the primary use for LibGTop (and currently the only one).
|
||||||
|
|
||||||
|
|||||||
172
RELNOTES-1.0.x
Normal file
172
RELNOTES-1.0.x
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
RELEASE NOTES FOR LIBGTOP 1.0.7
|
||||||
|
===============================
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
Network:
|
||||||
|
|
||||||
|
netload - Network load
|
||||||
|
ppp - PPP statistics
|
||||||
|
|
||||||
|
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_args - Command line arguments
|
||||||
|
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 privileges for the
|
||||||
|
calling process 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 privileges, 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.
|
||||||
|
|
||||||
|
LIBGTOP AND GNOME:
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Although LibGTop is part of the GNOME desktop environment, its main
|
||||||
|
interface is totally independent from any particular desktop environment,
|
||||||
|
so you can also use it as a standalone library in any piece of GPLed
|
||||||
|
software which makes it also a valuable part of the GNU project.
|
||||||
|
|
||||||
|
LibGTop is currently used in various places in the GNOME Project,
|
||||||
|
for instance in some of the applets in gnome-core and - of cause -
|
||||||
|
this ultra-cool application called GTop ...
|
||||||
|
|
||||||
|
However, you need to give the configure.in script the `--without-gnome'
|
||||||
|
parameter when you want to use LibGTop without GNOME (this is because,
|
||||||
|
if you want to use it with GNOME, you need to compile it after the main
|
||||||
|
GNOME libraries and I wanted to avoid getting unnecessary bug reports
|
||||||
|
about this).
|
||||||
|
|
||||||
|
LIBGTOP AND GNOME - PART II:
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
LibGTop was tested with FreeBSD 3.0 but it should also work with
|
||||||
|
FreeBSD 2.2.7, NetBSD and OpenBSD.
|
||||||
|
|
||||||
|
Unfortunately, I don't have the power and disk space to install all
|
||||||
|
possible operating systems out there on my machine and test things myself,
|
||||||
|
so I depend on people telling me whether it works and sending me bug
|
||||||
|
reports and patches if not.
|
||||||
|
|
||||||
|
However, I consider FreeBSD, NetBSD and OpenBSD as supported systems for
|
||||||
|
LibGTop and whenever I get bug reports I will do my best to fix them as
|
||||||
|
quickly as possible.
|
||||||
|
|
||||||
|
PLATFORM SPECIFIC NOTES FOR LINUX:
|
||||||
|
==================================
|
||||||
|
|
||||||
|
[I am speaking of the Linux kernel here.]
|
||||||
|
|
||||||
|
Under Linux, LibGTop should work without problems and read everything
|
||||||
|
from /proc.
|
||||||
|
|
||||||
|
LibGTop 0.25 also had an experimental kernel interface to read this
|
||||||
|
information directly from the kernel with a system call - but I have
|
||||||
|
currently dropped support for this as I am too busy with GNOME
|
||||||
|
development to keep current with kernel hacking.
|
||||||
|
|
||||||
|
PLATFORM SPECIFIC NOTES FOR SOLARIS:
|
||||||
|
====================================
|
||||||
|
|
||||||
|
The development branch of LibGTop (the 1.1.x series) has a first version
|
||||||
|
of the Solaris port which works at least on Solaris 7.
|
||||||
|
|
||||||
|
If you are on a Solaris system and want to give it a try, just fetch the
|
||||||
|
latest 1.1.x tarball from ftp://ftp.home-of-linux.org/pub/libgtop/1.1/
|
||||||
|
and try it out.
|
||||||
|
|
||||||
|
PLATFORM SPECIFIC NOTES FOR BSD:
|
||||||
|
=================================
|
||||||
|
|
||||||
|
There are a few caveats:
|
||||||
|
|
||||||
|
* You need to manually make the `$(prefix)/bin/libgtop_server' SGID to
|
||||||
|
kmem after installation and mount the /proc file system of FreeBSD
|
||||||
|
(/proc/<pid>/mem is used within 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
|
||||||
|
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
|
||||||
|
everything 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>
|
||||||
46
TODO
46
TODO
@@ -1,46 +0,0 @@
|
|||||||
This is LibGTop 0.99.2,
|
|
||||||
|
|
||||||
a feature-freezed version of LibGTop for GNOME 1.0.
|
|
||||||
|
|
||||||
You need to use the latest version of LibGTop from CVS for Gnome, it will
|
|
||||||
no longer work with older releases.
|
|
||||||
|
|
||||||
Martin
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
NOTE: LibGTop is already feature-freezed for GNOME 1.0, so only bug fixes
|
|
||||||
are ok, no API changes !
|
|
||||||
|
|
||||||
Sysdeps directory 'linux':
|
|
||||||
==========================
|
|
||||||
|
|
||||||
* Add implementation for `ppp' with modems.
|
|
||||||
|
|
||||||
Sysdeps directory 'freebsd':
|
|
||||||
============================
|
|
||||||
|
|
||||||
* FreeBSD 3.0: It works fine on this system, so please make sure not
|
|
||||||
to break it here.
|
|
||||||
|
|
||||||
* FreeBSD 2.2: Make sure it still works here.
|
|
||||||
|
|
||||||
* NetBSD/OpenBSD: Support was added on Dec 6, but we need to check
|
|
||||||
whether all data are valid.
|
|
||||||
|
|
||||||
Sysdeps directories 'kernel', 'osf1' and 'sun4':
|
|
||||||
================================================
|
|
||||||
|
|
||||||
* You need to use the `--enable-hacker-mode' parameter to configure
|
|
||||||
to build this directories.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Everything except sysdeps directories:
|
|
||||||
======================================
|
|
||||||
|
|
||||||
* Ready for Gnome 1.0. [ALREADY FEATURE FREEZED]
|
|
||||||
|
|
||||||
January 5, 1999
|
|
||||||
|
|
||||||
Martin
|
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#undef ENABLE_NLS
|
#undef ENABLE_NLS
|
||||||
#undef HAVE_CATGETS
|
#undef HAVE_CATGETS
|
||||||
|
#undef GETTEXT_PACKAGE
|
||||||
#undef HAVE_GETTEXT
|
#undef HAVE_GETTEXT
|
||||||
#undef HAVE_LC_MESSAGES
|
#undef HAVE_LC_MESSAGES
|
||||||
#undef HAVE_STPCPY
|
#undef HAVE_STPCPY
|
||||||
@@ -138,7 +139,7 @@
|
|||||||
|
|
||||||
#undef NEED_LIBGTOP
|
#undef NEED_LIBGTOP
|
||||||
|
|
||||||
#undef HAVE_LINUX_SYSCTL
|
#undef HAVE_LINUX_TABLE
|
||||||
#undef HAVE_LIBGTOP_SMP
|
#undef HAVE_LIBGTOP_SMP
|
||||||
|
|
||||||
#undef HAVE_XAUTH
|
#undef HAVE_XAUTH
|
||||||
|
|||||||
880
acinclude.m4
Normal file
880
acinclude.m4
Normal file
@@ -0,0 +1,880 @@
|
|||||||
|
dnl This is just copied m4s from need-declaration.m4 gnome-fileutils.m4
|
||||||
|
dnl gnome-supprt-checks.m4 and a little from gnome-libgtop-check.m4
|
||||||
|
dnl and finally libgtop-sysdeps.m4
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl LIBGTOP_CHECK_TYPE
|
||||||
|
dnl
|
||||||
|
dnl Improved version of AC_CHECK_TYPE which takes into account
|
||||||
|
dnl that we need to #include some other header files on some
|
||||||
|
dnl systems to get some types.
|
||||||
|
|
||||||
|
dnl AC_LIBGTOP_CHECK_TYPE(TYPE, DEFAULT)
|
||||||
|
AC_DEFUN([AC_LIBGTOP_CHECK_TYPE],
|
||||||
|
[AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||||
|
AC_MSG_CHECKING(for $1)
|
||||||
|
AC_CACHE_VAL(ac_cv_type_$1,
|
||||||
|
[AC_EGREP_CPP(dnl
|
||||||
|
changequote(<<,>>)dnl
|
||||||
|
<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
|
||||||
|
changequote([,]), [#include <sys/types.h>
|
||||||
|
#if STDC_HEADERS
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For Tru64 */
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif
|
||||||
|
], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
|
||||||
|
AC_MSG_RESULT($ac_cv_type_$1)
|
||||||
|
if test $ac_cv_type_$1 = no; then
|
||||||
|
AC_DEFINE($1, $2)
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl GNOME_LIBGTOP_TYPES
|
||||||
|
dnl
|
||||||
|
dnl some typechecks for libgtop.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_LIBGTOP_TYPES],
|
||||||
|
[
|
||||||
|
AC_CHECK_HEADERS(sys/bitypes.h)
|
||||||
|
AC_LIBGTOP_CHECK_TYPE(u_int64_t, unsigned long long int)
|
||||||
|
AC_LIBGTOP_CHECK_TYPE(int64_t, signed long long int)
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl See whether we need a declaration for a function.
|
||||||
|
dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
|
||||||
|
AC_DEFUN([GCC_NEED_DECLARATION],
|
||||||
|
[AC_MSG_CHECKING([whether $1 must be declared])
|
||||||
|
AC_CACHE_VAL(gcc_cv_decl_needed_$1,
|
||||||
|
[AC_TRY_COMPILE([
|
||||||
|
#include <stdio.h>
|
||||||
|
#ifdef HAVE_STRING_H
|
||||||
|
#include <string.h>
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_STRINGS_H
|
||||||
|
#include <strings.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STDLIB_H
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
$2],
|
||||||
|
[char *(*pfn) = (char *(*)) $1],
|
||||||
|
eval "gcc_cv_decl_needed_$1=no", eval "gcc_cv_decl_needed_$1=yes")])
|
||||||
|
if eval "test \"`echo '$gcc_cv_decl_needed_'$1`\" = yes"; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
gcc_need_declarations="$gcc_need_declarations $1"
|
||||||
|
gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||||
|
AC_DEFINE_UNQUOTED($gcc_tr_decl)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
])dnl
|
||||||
|
|
||||||
|
dnl Check multiple functions to see whether each needs a declaration.
|
||||||
|
dnl GCC_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
|
||||||
|
AC_DEFUN([GCC_NEED_DECLARATIONS],
|
||||||
|
[for ac_func in $1
|
||||||
|
do
|
||||||
|
GCC_NEED_DECLARATION($ac_func, $2)
|
||||||
|
done
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl GNOME_FILEUTILS_CHECKS
|
||||||
|
dnl
|
||||||
|
dnl checks that are needed for the diskusage applet.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_FILEUTILS_CHECKS],
|
||||||
|
[
|
||||||
|
AC_CHECK_HEADERS(fcntl.h sys/param.h sys/statfs.h sys/fstyp.h \
|
||||||
|
mnttab.h mntent.h sys/statvfs.h sys/vfs.h sys/mount.h \
|
||||||
|
sys/filsys.h sys/fs_types.h sys/fs/s5param.h)
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(bcopy endgrent endpwent fchdir ftime ftruncate \
|
||||||
|
getcwd getmntinfo gettimeofday isascii lchown \
|
||||||
|
listmntent memcpy mkfifo strchr strerror strrchr vprintf)
|
||||||
|
|
||||||
|
dnl Set some defaults when cross-compiling
|
||||||
|
|
||||||
|
if test x$cross_compiling = xyes ; then
|
||||||
|
case "$host_os" in
|
||||||
|
linux*)
|
||||||
|
fu_cv_sys_mounted_getmntent1=yes
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=yes
|
||||||
|
;;
|
||||||
|
sunos*)
|
||||||
|
fu_cv_sys_stat_statfs4=yes
|
||||||
|
;;
|
||||||
|
freebsd*)
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=yes
|
||||||
|
;;
|
||||||
|
osf*)
|
||||||
|
fu_cv_sys_stat_statfs3_osf1=yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Determine how to get the list of mounted filesystems.
|
||||||
|
list_mounted_fs=
|
||||||
|
|
||||||
|
# If the getmntent function is available but not in the standard library,
|
||||||
|
# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX).
|
||||||
|
AC_FUNC_GETMNTENT
|
||||||
|
|
||||||
|
# This test must precede the ones for getmntent because Unicos-9 is
|
||||||
|
# reported to have the getmntent function, but its support is incompatible
|
||||||
|
# with other getmntent implementations.
|
||||||
|
|
||||||
|
# NOTE: Normally, I wouldn't use a check for system type as I've done for
|
||||||
|
# `CRAY' below since that goes against the whole autoconf philosophy. But
|
||||||
|
# I think there is too great a chance that some non-Cray system has a
|
||||||
|
# function named listmntent to risk the false positive.
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# Cray UNICOS 9
|
||||||
|
AC_MSG_CHECKING([for listmntent of Cray/Unicos-9])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent,
|
||||||
|
[fu_cv_sys_mounted_cray_listmntent=no
|
||||||
|
AC_EGREP_CPP(yes,
|
||||||
|
[#ifdef _CRAY
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
], [test $ac_cv_func_listmntent = yes \
|
||||||
|
&& fu_cv_sys_mounted_cray_listmntent=yes]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent)
|
||||||
|
if test $fu_cv_sys_mounted_cray_listmntent = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_LISTMNTENT)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ac_cv_func_getmntent = yes; then
|
||||||
|
|
||||||
|
# This system has the getmntent function.
|
||||||
|
# Determine whether it's the one-argument variant or the two-argument one.
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# 4.3BSD, SunOS, HP-UX, Dynix, Irix
|
||||||
|
AC_MSG_CHECKING([for one-argument getmntent function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1,
|
||||||
|
[test $ac_cv_header_mntent_h = yes \
|
||||||
|
&& fu_cv_sys_mounted_getmntent1=yes \
|
||||||
|
|| fu_cv_sys_mounted_getmntent1=no])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1)
|
||||||
|
if test $fu_cv_sys_mounted_getmntent1 = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETMNTENT1)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# SVR4
|
||||||
|
AC_MSG_CHECKING([for two-argument getmntent function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2,
|
||||||
|
[AC_EGREP_HEADER(getmntent, sys/mnttab.h,
|
||||||
|
fu_cv_sys_mounted_getmntent2=yes,
|
||||||
|
fu_cv_sys_mounted_getmntent2=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2)
|
||||||
|
if test $fu_cv_sys_mounted_getmntent2 = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETMNTENT2)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
AC_MSG_ERROR([could not determine how to read list of mounted filesystems])
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# DEC Alpha running OSF/1.
|
||||||
|
AC_MSG_CHECKING([for getfsstat function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getsstat,
|
||||||
|
[AC_TRY_LINK([
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#include <sys/fs_types.h>],
|
||||||
|
[struct statfs *stats;
|
||||||
|
int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); ],
|
||||||
|
fu_cv_sys_mounted_getsstat=yes,
|
||||||
|
fu_cv_sys_mounted_getsstat=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getsstat)
|
||||||
|
if test $fu_cv_sys_mounted_getsstat = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETFSSTAT)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# AIX.
|
||||||
|
AC_MSG_CHECKING([for mntctl function and struct vmount])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_vmount,
|
||||||
|
[AC_TRY_CPP([#include <fshelp.h>],
|
||||||
|
fu_cv_sys_mounted_vmount=yes,
|
||||||
|
fu_cv_sys_mounted_vmount=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_vmount)
|
||||||
|
if test $fu_cv_sys_mounted_vmount = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_VMOUNT)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# SVR3
|
||||||
|
AC_MSG_CHECKING([for FIXME existence of three headers])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp,
|
||||||
|
[AC_TRY_CPP([
|
||||||
|
#include <sys/statfs.h>
|
||||||
|
#include <sys/fstyp.h>
|
||||||
|
#include <mnttab.h>],
|
||||||
|
fu_cv_sys_mounted_fread_fstyp=yes,
|
||||||
|
fu_cv_sys_mounted_fread_fstyp=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp)
|
||||||
|
if test $fu_cv_sys_mounted_fread_fstyp = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_FREAD_FSTYP)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# 4.4BSD and DEC OSF/1.
|
||||||
|
AC_MSG_CHECKING([for getmntinfo function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo,
|
||||||
|
[
|
||||||
|
ok=
|
||||||
|
if test $ac_cv_func_getmntinfo = yes; then
|
||||||
|
AC_EGREP_HEADER(f_type;, sys/mount.h,
|
||||||
|
ok=yes)
|
||||||
|
fi
|
||||||
|
test -n "$ok" \
|
||||||
|
&& fu_cv_sys_mounted_getmntinfo=yes \
|
||||||
|
|| fu_cv_sys_mounted_getmntinfo=no
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo)
|
||||||
|
if test $fu_cv_sys_mounted_getmntinfo = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETMNTINFO)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# FIXME: add a test for netbsd-1.1 here
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# Ultrix
|
||||||
|
AC_MSG_CHECKING([for getmnt function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getmnt,
|
||||||
|
[AC_TRY_CPP([
|
||||||
|
#include <sys/fs_types.h>
|
||||||
|
#include <sys/mount.h>],
|
||||||
|
fu_cv_sys_mounted_getmnt=yes,
|
||||||
|
fu_cv_sys_mounted_getmnt=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getmnt)
|
||||||
|
if test $fu_cv_sys_mounted_getmnt = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETMNT)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# SVR2
|
||||||
|
AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_fread,
|
||||||
|
[AC_TRY_CPP([#include <mnttab.h>],
|
||||||
|
fu_cv_sys_mounted_fread=yes,
|
||||||
|
fu_cv_sys_mounted_fread=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_fread)
|
||||||
|
if test $fu_cv_sys_mounted_fread = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_FREAD)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
AC_MSG_ERROR([could not determine how to read list of mounted filesystems])
|
||||||
|
# FIXME -- no need to abort building the whole package
|
||||||
|
# Cannot build mountlist.c or anything that needs its functions
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECKING(how to get filesystem space usage)
|
||||||
|
space=no
|
||||||
|
|
||||||
|
# Perform only the link test since it seems there are no variants of the
|
||||||
|
# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs)
|
||||||
|
# because that got a false positive on SCO OSR5. Adding the declaration
|
||||||
|
# of a `struct statvfs' causes this test to fail (as it should) on such
|
||||||
|
# systems. That system is reported to work fine with STAT_STATFS4 which
|
||||||
|
# is what it gets when this test fails.
|
||||||
|
if test $space = no; then
|
||||||
|
# SVR4
|
||||||
|
AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
|
||||||
|
[AC_TRY_LINK([#include <sys/types.h>
|
||||||
|
#include <sys/statvfs.h>],
|
||||||
|
[struct statvfs fsd; statvfs (0, &fsd);],
|
||||||
|
fu_cv_sys_stat_statvfs=yes,
|
||||||
|
fu_cv_sys_stat_statvfs=no)])
|
||||||
|
if test $fu_cv_sys_stat_statvfs = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATVFS)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# DEC Alpha running OSF/1
|
||||||
|
AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
|
||||||
|
[AC_TRY_RUN([
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
struct statfs fsd;
|
||||||
|
fsd.f_fsize = 0;
|
||||||
|
return (statfs (".", &fsd, sizeof (struct statfs)));
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_statfs3_osf1=yes,
|
||||||
|
fu_cv_sys_stat_statfs3_osf1=no,
|
||||||
|
fu_cv_sys_stat_statfs3_osf1=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
|
||||||
|
if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS3_OSF1)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# AIX
|
||||||
|
AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
|
||||||
|
member (AIX, 4.3BSD)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
|
||||||
|
[AC_TRY_RUN([
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_MOUNT_H
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_VFS_H
|
||||||
|
#include <sys/vfs.h>
|
||||||
|
#endif
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
struct statfs fsd;
|
||||||
|
fsd.f_bsize = 0;
|
||||||
|
return (statfs (".", &fsd));
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=yes,
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=no,
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
|
||||||
|
if test $fu_cv_sys_stat_statfs2_bsize = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS2_BSIZE)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# SVR3
|
||||||
|
AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
|
||||||
|
[AC_TRY_RUN([#include <sys/types.h>
|
||||||
|
#include <sys/statfs.h>
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
struct statfs fsd;
|
||||||
|
return (statfs (".", &fsd, sizeof fsd, 0));
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_statfs4=yes,
|
||||||
|
fu_cv_sys_stat_statfs4=no,
|
||||||
|
fu_cv_sys_stat_statfs4=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
|
||||||
|
if test $fu_cv_sys_stat_statfs4 = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS4)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# 4.4BSD and NetBSD
|
||||||
|
AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
|
||||||
|
member (4.4BSD and NetBSD)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
|
||||||
|
[AC_TRY_RUN([#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_MOUNT_H
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#endif
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
struct statfs fsd;
|
||||||
|
fsd.f_fsize = 0;
|
||||||
|
return (statfs (".", &fsd));
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_statfs2_fsize=yes,
|
||||||
|
fu_cv_sys_stat_statfs2_fsize=no,
|
||||||
|
fu_cv_sys_stat_statfs2_fsize=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
|
||||||
|
if test $fu_cv_sys_stat_statfs2_fsize = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS2_FSIZE)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# Ultrix
|
||||||
|
AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
|
||||||
|
[AC_TRY_RUN([#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_MOUNT_H
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_FS_TYPES_H
|
||||||
|
#include <sys/fs_types.h>
|
||||||
|
#endif
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
struct fs_data fsd;
|
||||||
|
/* Ultrix's statfs returns 1 for success,
|
||||||
|
0 for not mounted, -1 for failure. */
|
||||||
|
return (statfs (".", &fsd) != 1);
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_fs_data=yes,
|
||||||
|
fu_cv_sys_stat_fs_data=no,
|
||||||
|
fu_cv_sys_stat_fs_data=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
|
||||||
|
if test $fu_cv_sys_stat_fs_data = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS2_FS_DATA)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# SVR2
|
||||||
|
AC_TRY_CPP([#include <sys/filsys.h>],
|
||||||
|
AC_DEFINE(STAT_READ_FILSYS) space=yes)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$list_mounted_fs" && test $space != no; then
|
||||||
|
DF_PROG="df"
|
||||||
|
# AC_LIBOBJ(fsusage)
|
||||||
|
# AC_LIBOBJ(mountlist)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
|
||||||
|
# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
|
||||||
|
# enable the work-around code in fsusage.c.
|
||||||
|
AC_MSG_CHECKING([for statfs that truncates block counts])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
|
||||||
|
[AC_TRY_COMPILE([
|
||||||
|
#if !defined(sun) && !defined(__sun)
|
||||||
|
choke -- this is a workaround for a Sun-specific problem
|
||||||
|
#endif
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/vfs.h>],
|
||||||
|
[struct statfs t; long c = *(t.f_spare);],
|
||||||
|
fu_cv_sys_truncating_statfs=yes,
|
||||||
|
fu_cv_sys_truncating_statfs=no,
|
||||||
|
)])
|
||||||
|
if test $fu_cv_sys_truncating_statfs = yes; then
|
||||||
|
AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS)
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_truncating_statfs)
|
||||||
|
|
||||||
|
AC_CHECKING(for AFS)
|
||||||
|
test -d /afs && AC_DEFINE(AFS)
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl GNOME_SUPPORT_CHECKS
|
||||||
|
dnl Check for various support functions needed by the standard
|
||||||
|
dnl Gnome libraries. Sets LIBOBJS, might define some macros.
|
||||||
|
dnl This should only be used when building the Gnome libs;
|
||||||
|
dnl Gnome clients should not need this macro.
|
||||||
|
AC_DEFUN([GNOME_SUPPORT_CHECKS],[
|
||||||
|
# we need an `awk' to build `gnomesupport.h'
|
||||||
|
AC_REQUIRE([AC_PROG_AWK])
|
||||||
|
|
||||||
|
# this should go away soon
|
||||||
|
need_gnome_support=yes
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(getopt_long,,
|
||||||
|
[AC_LIBOBJ(getopt)
|
||||||
|
AC_LIBOBJ(getopt1)])
|
||||||
|
|
||||||
|
# for `scandir'
|
||||||
|
AC_HEADER_DIRENT
|
||||||
|
|
||||||
|
# copied from `configure.in' of `libiberty'
|
||||||
|
vars="program_invocation_short_name program_invocation_name sys_errlist"
|
||||||
|
for v in $vars; do
|
||||||
|
AC_MSG_CHECKING([for $v])
|
||||||
|
AC_CACHE_VAL(gnome_cv_var_$v,
|
||||||
|
[AC_TRY_LINK([int *p;], [extern int $v; p = &$v;],
|
||||||
|
[eval "gnome_cv_var_$v=yes"],
|
||||||
|
[eval "gnome_cv_var_$v=no"])])
|
||||||
|
if eval "test \"`echo '$gnome_cv_var_'$v`\" = yes"; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||||
|
AC_DEFINE_UNQUOTED($n)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
AC_REPLACE_FUNCS(memmove mkstemp scandir strcasecmp strerror strndup strnlen)
|
||||||
|
AC_REPLACE_FUNCS(strtok_r strtod strtol strtoul vasprintf vsnprintf)
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(realpath,,AC_LIBOBJ(canonicalize))
|
||||||
|
|
||||||
|
# to include `error.c' error.c has some HAVE_* checks
|
||||||
|
AC_CHECK_FUNCS(vprintf doprnt strerror_r)
|
||||||
|
# stolen from am_func_error_at_line
|
||||||
|
AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
|
||||||
|
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
|
||||||
|
am_cv_lib_error_at_line=yes,
|
||||||
|
am_cv_lib_error_at_line=no)])
|
||||||
|
if test $am_cv_lib_error_at_line = no; then
|
||||||
|
AC_LIBOBJ(error)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This is required if we declare setreuid () and setregid ().
|
||||||
|
AC_TYPE_UID_T
|
||||||
|
|
||||||
|
# see if we need to declare some functions. Solaris is notorious for
|
||||||
|
# putting functions into the `libc' but not listing them in the headers
|
||||||
|
AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h dirent.h)
|
||||||
|
GCC_NEED_DECLARATIONS(gethostname setreuid setregid getpagesize)
|
||||||
|
GCC_NEED_DECLARATION(scandir,[
|
||||||
|
#ifdef HAVE_DIRENT_H
|
||||||
|
#include <dirent.h>
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_SUBST(need_gnome_support)
|
||||||
|
|
||||||
|
AM_CONDITIONAL(BUILD_GNOME_SUPPORT, test "$need_gnome_support" = yes)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl This file is intended for use both internally in libgtop and in every program
|
||||||
|
dnl that wants to use it.
|
||||||
|
dnl
|
||||||
|
dnl It defines the following variables:
|
||||||
|
dnl
|
||||||
|
dnl * 'libgtop_sysdeps_dir' - sysdeps dir for libgtop.
|
||||||
|
dnl * 'libgtop_use_machine_h' - some of system dependend parts of libgtop provide
|
||||||
|
dnl their own header file. In this case we need to
|
||||||
|
dnl define 'HAVE_GLIBTOP_MACHINE_H'.
|
||||||
|
dnl * 'libgtop_need_server' - is the server really needed? Defines 'NEED_LIBGTOP'
|
||||||
|
dnl if true; defines conditional 'NEED_LIBGTOP'.
|
||||||
|
|
||||||
|
AC_DEFUN([LIBGTOP_HACKER_TESTS],[
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
|
||||||
|
AC_ARG_WITH(linux-table,
|
||||||
|
[ --with-linux-table Use the table () function from Martin Baulig],
|
||||||
|
[linux_table="$withval"],[linux_table=auto])
|
||||||
|
case "$host_os" in
|
||||||
|
linux*)
|
||||||
|
if test $linux_table = yes ; then
|
||||||
|
AC_CHECK_HEADER(linux/table.h, linux_table=yes, linux_table=no)
|
||||||
|
elif test $linux_table = auto ; then
|
||||||
|
AC_MSG_CHECKING(for table function in Linux Kernel)
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <linux/unistd.h>
|
||||||
|
#include <linux/table.h>
|
||||||
|
|
||||||
|
#include <syscall.h>
|
||||||
|
|
||||||
|
static inline _syscall3 (int, table, int, type, union table *, tbl, const void *, param);
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
union table tbl;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = table (TABLE_VERSION, NULL, NULL);
|
||||||
|
|
||||||
|
if (ret == -1)
|
||||||
|
exit (-errno);
|
||||||
|
|
||||||
|
exit (ret < 1 ? ret : 0);
|
||||||
|
}
|
||||||
|
], linux_table=yes, linux_table=no, linux_table=no)
|
||||||
|
AC_MSG_RESULT($linux_table)
|
||||||
|
fi
|
||||||
|
if test $linux_table = yes ; then
|
||||||
|
AC_DEFINE(HAVE_LINUX_TABLE)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
|
||||||
|
AC_SUBST(libgtop_sysdeps_dir)
|
||||||
|
AC_SUBST(libgtop_use_machine_h)
|
||||||
|
AC_SUBST(libgtop_need_server)
|
||||||
|
|
||||||
|
AC_ARG_WITH(libgtop-examples,
|
||||||
|
[ --with-libgtop-examples Build the libgtop examples (default=no)],[
|
||||||
|
build_examples="$withval"], [build_examples=no])
|
||||||
|
|
||||||
|
AM_CONDITIONAL(EXAMPLES, test x"$build_examples" = xyes)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(hacker-mode,
|
||||||
|
[ --enable-hacker-mode Enable building of unstable sysdeps],
|
||||||
|
[hacker_mode="$enableval"], [hacker_mode=no])
|
||||||
|
|
||||||
|
AM_CONDITIONAL(HACKER_MODE, test x"$hacker_mode" = xyes)
|
||||||
|
|
||||||
|
linux_table=auto
|
||||||
|
if test x$hacker_mode = xyes ; then
|
||||||
|
LIBGTOP_HACKER_TESTS
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(LINUX_TABLE, test $linux_table = yes)
|
||||||
|
|
||||||
|
AC_ARG_WITH(libgtop-smp,
|
||||||
|
[ --with-libgtop-smp Enable SMP support (default-auto)],[
|
||||||
|
libgtop_smp="$withval"],[libgtop_smp=auto])
|
||||||
|
|
||||||
|
if test $libgtop_smp = auto ; then
|
||||||
|
AC_MSG_CHECKING(whether to enable SMP support)
|
||||||
|
case "$host_os" in
|
||||||
|
linux*)
|
||||||
|
libgtop_smp=yes
|
||||||
|
;;
|
||||||
|
aix*)
|
||||||
|
libgtop_smp=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
libgtop_smp=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT($libgtop_smp)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $libgtop_smp = yes ; then
|
||||||
|
AC_DEFINE(HAVE_LIBGTOP_SMP)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(LIBGTOP_SMP, test $libgtop_smp = yes)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for libgtop sysdeps directory)
|
||||||
|
|
||||||
|
case "$host_os" in
|
||||||
|
linux*)
|
||||||
|
if test x$linux_table = xyes ; then
|
||||||
|
libgtop_sysdeps_dir=kernel
|
||||||
|
libgtop_use_machine_h=no
|
||||||
|
else
|
||||||
|
libgtop_sysdeps_dir=linux
|
||||||
|
libgtop_use_machine_h=no
|
||||||
|
libgtop_have_sysinfo=yes
|
||||||
|
fi
|
||||||
|
libgtop_need_server=no
|
||||||
|
;;
|
||||||
|
freebsd*|netbsd*|openbsd*|bsdi*)
|
||||||
|
libgtop_sysdeps_dir=freebsd
|
||||||
|
libgtop_use_machine_h=yes
|
||||||
|
libgtop_need_server=yes
|
||||||
|
libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
libgtop_sysdeps_dir=solaris
|
||||||
|
libgtop_use_machine_h=yes
|
||||||
|
libgtop_need_server=yes
|
||||||
|
libgtop_postinstall='chgrp sys $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
|
||||||
|
;;
|
||||||
|
aix*)
|
||||||
|
libgtop_sysdeps_dir=aix
|
||||||
|
libgtop_use_machine_h=yes
|
||||||
|
libgtop_need_server=yes
|
||||||
|
libgtop_have_sysinfo=yes
|
||||||
|
libgtop_postinstall='chgrp system $(bindir)/libgtop_server && chmod g+s $(bindir)/libgtop_server2'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if test x$hacker_mode = xyes ; then
|
||||||
|
case "$host_os" in
|
||||||
|
sunos4*)
|
||||||
|
#Please note that this port is obsolete and not working at
|
||||||
|
#all. It is only useful for people who want to fix it ... :-)
|
||||||
|
libgtop_sysdeps_dir=sun4
|
||||||
|
libgtop_use_machine_h=yes
|
||||||
|
libgtop_need_server=yes
|
||||||
|
;;
|
||||||
|
osf*)
|
||||||
|
libgtop_sysdeps_dir=osf1
|
||||||
|
libgtop_use_machine_h=yes
|
||||||
|
libgtop_need_server=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
libgtop_sysdeps_dir=stub
|
||||||
|
libgtop_use_machine_h=no
|
||||||
|
libgtop_need_server=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
libgtop_sysdeps_dir=stub
|
||||||
|
libgtop_use_machine_h=no
|
||||||
|
libgtop_need_server=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
test -z "$libgtop_postinstall" && libgtop_postinstall=:
|
||||||
|
|
||||||
|
AC_MSG_RESULT($libgtop_sysdeps_dir)
|
||||||
|
|
||||||
|
AC_SUBST(libgtop_sysdeps_dir)
|
||||||
|
AC_SUBST(libgtop_postinstall)
|
||||||
|
AC_SUBST(libgtop_have_sysinfo)
|
||||||
|
|
||||||
|
case "$host_os" in
|
||||||
|
*bsd*)
|
||||||
|
AC_CHECK_HEADERS(net/if_var.h)
|
||||||
|
AC_MSG_CHECKING([for I4B])
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <net/if_types.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_NET_IF_VAR_H
|
||||||
|
#include <net/if_var.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <net/netisr.h>
|
||||||
|
#include <net/route.h>
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
|
#include <net/if_sppp.h>
|
||||||
|
#else
|
||||||
|
#include <i4b/sppp/if_sppp.h>
|
||||||
|
#endif
|
||||||
|
],[
|
||||||
|
size_t size = sizeof (struct sppp);
|
||||||
|
], have_i4b=yes, have_i4b=no)
|
||||||
|
AC_MSG_RESULT($have_i4b)
|
||||||
|
if test x$have_i4b = xyes; then
|
||||||
|
AC_DEFINE(HAVE_I4B)
|
||||||
|
AC_MSG_CHECKING([for I4B accounting])
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <net/if_types.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_NET_IF_VAR_H
|
||||||
|
#include <net/if_var.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <net/netisr.h>
|
||||||
|
#include <net/route.h>
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
|
#include <net/if_sppp.h>
|
||||||
|
#else
|
||||||
|
#include <i4b/sppp/if_sppp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <machine/i4b_acct.h>
|
||||||
|
],[
|
||||||
|
size_t size = sizeof (struct i4bisppp_softc);
|
||||||
|
], have_i4b_acct=yes, have_i4b_acct=no)
|
||||||
|
AC_MSG_RESULT($have_i4b_acct)
|
||||||
|
if test x$have_i4b_acct = xyes ; then
|
||||||
|
AC_DEFINE(HAVE_I4B_ACCT)
|
||||||
|
else
|
||||||
|
AC_WARN([
|
||||||
|
*** I4B accounting disabled - you won't get any PPP statistics.
|
||||||
|
*** Read "misc/i4b_acct.txt" in the LibGTop source directory
|
||||||
|
*** to see how to enable it.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
linux*)
|
||||||
|
os_major_version=`uname -r | sed 's/-pre[[0-9]]*//' | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
os_minor_version=`uname -r | sed 's/-pre[[0-9]]*//' | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
os_micro_version=`uname -r | sed 's/-pre[[0-9]]*//' | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
os_version_expr="$os_major_version 65536 * $os_minor_version 256 * + $os_micro_version + p q"
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(linux/version.h, have_linux_version_h=yes,
|
||||||
|
have_linux_version_h=no)
|
||||||
|
|
||||||
|
if test x$have_linux_version_h = xyes ; then
|
||||||
|
version_code=`cat /usr/include/linux/version.h | \
|
||||||
|
grep \#define | grep LINUX_VERSION_CODE`
|
||||||
|
os_version_code=`echo $version_code | \
|
||||||
|
sed 's/^.*LINUX_VERSION_CODE[[ \t]]*\([[0-9]]*\).*$/\1/'`
|
||||||
|
else
|
||||||
|
os_version_code=`echo "$os_version_expr" | dc`
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for Linux kernel version code)
|
||||||
|
AC_DEFINE_UNQUOTED(GLIBTOP_LINUX_VERSION_CODE, $os_version_code)
|
||||||
|
AC_MSG_RESULT($os_version_code)
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
os_major_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\1/'`
|
||||||
|
os_minor_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\2/'`
|
||||||
|
os_micro_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\3/'`
|
||||||
|
test -z "$os_micro_version" && os_micro_version=0
|
||||||
|
os_version_expr="$os_major_version 100 * $os_minor_version 10 * + $os_micro_version + p q"
|
||||||
|
os_version_code=`echo "$os_version_expr" | dc`
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for Solaris release code)
|
||||||
|
AC_DEFINE_UNQUOTED(GLIBTOP_SOLARIS_RELEASE, $os_version_code)
|
||||||
|
AC_MSG_RESULT($os_version_code)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for machine.h in libgtop sysdeps dir)
|
||||||
|
AC_MSG_RESULT($libgtop_use_machine_h)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether we need libgtop)
|
||||||
|
AC_MSG_RESULT($libgtop_need_server)
|
||||||
|
|
||||||
|
if test x$libgtop_need_server = xyes ; then
|
||||||
|
AC_DEFINE(NEED_LIBGTOP)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$libgtop_use_machine_h = xyes ; then
|
||||||
|
AC_DEFINE(HAVE_GLIBTOP_MACHINE_H)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(NEED_LIBGTOP, test x$libgtop_need_server = xyes)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -14,4 +14,8 @@ PKG_NAME="Gnome Top Library"
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
. $srcdir/macros/autogen.sh
|
which gnome-autogen.sh || {
|
||||||
|
echo "You need to install gnome-common from the GNOME CVS"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
USE_GNOME2_MACROS=1 . gnome-autogen.sh
|
||||||
|
|||||||
325
configure.in
325
configure.in
@@ -6,24 +6,23 @@ AC_INIT(copyright.txt)
|
|||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
dnl This is required at several places
|
LIBGTOP_MAJOR_VERSION=2
|
||||||
AC_CHECK_PROG(ac_dc_found, dc, yes, no)
|
LIBGTOP_MINOR_VERSION=0
|
||||||
if test x$ac_dc_found != xyes ; then
|
LIBGTOP_MICRO_VERSION=5
|
||||||
AC_MSG_ERROR([
|
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
|
||||||
*** The "dc" utility was not found on your system.
|
AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION)
|
||||||
***
|
LIBGTOP_INTERFACE_AGE=5
|
||||||
*** When using RedHat Linux, you need to install the "bc" package.
|
LIBGTOP_BINARY_AGE=5
|
||||||
***
|
|
||||||
*** 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
|
|
||||||
|
|
||||||
. $srcdir/LIBGTOP-VERSION
|
# you can set this to `-snap' for instance to create
|
||||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
# a `libgtop-1.x.y-snap.tar.gz' tarball.
|
||||||
|
LIBGTOP_VERSION_SUFFIX=
|
||||||
|
|
||||||
|
# Increase each time you change the client/server protocol.
|
||||||
|
LIBGTOP_SERVER_VERSION=5
|
||||||
|
|
||||||
|
# Version code calculation
|
||||||
|
LIBGTOP_VERSION_CODE=`expr $LIBGTOP_MAJOR_VERSION \* 1000000 + $LIBGTOP_MINOR_VERSION \* 1000 + $LIBGTOP_MICRO_VERSION`
|
||||||
|
|
||||||
AC_SUBST(LIBGTOP_MAJOR_VERSION)
|
AC_SUBST(LIBGTOP_MAJOR_VERSION)
|
||||||
AC_SUBST(LIBGTOP_MINOR_VERSION)
|
AC_SUBST(LIBGTOP_MINOR_VERSION)
|
||||||
@@ -33,6 +32,7 @@ AC_SUBST(LIBGTOP_BINARY_AGE)
|
|||||||
AC_SUBST(LIBGTOP_SERVER_VERSION)
|
AC_SUBST(LIBGTOP_SERVER_VERSION)
|
||||||
AC_SUBST(LIBGTOP_VERSION)
|
AC_SUBST(LIBGTOP_VERSION)
|
||||||
AC_SUBST(LIBGTOP_VERSION_CODE)
|
AC_SUBST(LIBGTOP_VERSION_CODE)
|
||||||
|
AC_SUBST(LIBGTOP_VERSION_SUFFIX)
|
||||||
|
|
||||||
# libtool versioning
|
# libtool versioning
|
||||||
LT_RELEASE=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION
|
LT_RELEASE=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION
|
||||||
@@ -46,12 +46,16 @@ AC_SUBST(LT_CURRENT)
|
|||||||
AC_SUBST(LT_REVISION)
|
AC_SUBST(LT_REVISION)
|
||||||
AC_SUBST(LT_AGE)
|
AC_SUBST(LT_AGE)
|
||||||
|
|
||||||
AM_ACLOCAL_INCLUDE(. macros)
|
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I ."
|
||||||
|
|
||||||
AC_ISC_POSIX
|
AC_ISC_POSIX
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_STDC_HEADERS
|
AC_STDC_HEADERS
|
||||||
AC_ARG_PROGRAM
|
dnl AC_ARG_PROGRAM
|
||||||
|
|
||||||
|
dnl We need this at some places.
|
||||||
|
libgtop_top_builddir=`pwd`
|
||||||
|
AC_SUBST(libgtop_top_builddir)
|
||||||
|
|
||||||
dnl We don't use `AC_PROG_AWK' since it checks for mawk first which
|
dnl We don't use `AC_PROG_AWK' since it checks for mawk first which
|
||||||
dnl does not work for libgtop.
|
dnl does not work for libgtop.
|
||||||
@@ -66,10 +70,8 @@ AC_CHECK_TOOL(CC,gcc)
|
|||||||
AC_CHECK_TOOL(RANLIB,ranlib)
|
AC_CHECK_TOOL(RANLIB,ranlib)
|
||||||
AC_CHECK_TOOL(AS,as)
|
AC_CHECK_TOOL(AS,as)
|
||||||
AC_CHECK_TOOL(AR,ar)
|
AC_CHECK_TOOL(AR,ar)
|
||||||
AC_CHECK_TOOL(NM,nm)
|
|
||||||
|
|
||||||
NM=`which $NM`
|
export CC CXX RANLIB LD AS AR
|
||||||
export CC CXX RANLIB LD AS AR NM
|
|
||||||
|
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
@@ -80,37 +82,44 @@ export cross_compiling
|
|||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
dnl Let the user enable compiler warnings
|
dnl Let the user enable compiler warnings
|
||||||
GNOME_COMPILE_WARNINGS
|
dnl GNOME_COMPILE_WARNINGS
|
||||||
|
|
||||||
GNOME_INIT_HOOK(gnome_found=yes)
|
dnl GNOME_INIT_HOOK(gnome_found=yes)
|
||||||
|
|
||||||
if test "x$gnome_found" != xyes; then
|
dnl if test "x$gnome_found" != xyes; then
|
||||||
if test "x$want_gnome" != xno ; then
|
dnl if test "x$want_gnome" != xno ; then
|
||||||
AC_MSG_ERROR([
|
dnl AC_MSG_ERROR([
|
||||||
*** GNOME was not found on this system. ***
|
dnl *** GNOME was not found on this system. ***
|
||||||
|
dnl
|
||||||
|
dnl *** If you want to use LibGTop without GNOME, you need
|
||||||
|
dnl *** to give configure the --without-gnome parameter.
|
||||||
|
dnl ])
|
||||||
|
dnl else
|
||||||
|
dnl AC_DEFINE(WITHOUT_GNOME)
|
||||||
|
dnl fi
|
||||||
|
dnl GNOME_SUPPORT_CHECKS
|
||||||
|
dnl else
|
||||||
|
dnl if test "x$want_gnome" != xno ; then
|
||||||
|
dnl AM_CONDITIONAL(BUILD_GNOME_SUPPORT, false)
|
||||||
|
dnl else
|
||||||
|
dnl GNOME_SUPPORT_CHECKS
|
||||||
|
dnl fi
|
||||||
|
dnl fi
|
||||||
|
|
||||||
*** If you want to use LibGTop without GNOME, you need
|
AM_CONDITIONAL(BUILD_GNOME_SUPPORT, false)
|
||||||
*** to give configure the --without-gnome parameter.
|
|
||||||
])
|
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
||||||
else
|
|
||||||
AC_DEFINE(WITHOUT_GNOME)
|
|
||||||
fi
|
|
||||||
GNOME_SUPPORT_CHECKS
|
|
||||||
else
|
|
||||||
AM_CONDITIONAL(BUILD_GNOME_SUPPORT, false)
|
|
||||||
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
|
||||||
fi
|
|
||||||
|
|
||||||
GNOME_LIBGTOP_SYSDEPS
|
GNOME_LIBGTOP_SYSDEPS
|
||||||
GNOME_LIBGTOP_TYPES
|
GNOME_LIBGTOP_TYPES
|
||||||
|
|
||||||
AC_ARG_WITH(libgtop-guile,
|
dnl AC_ARG_WITH(libgtop-guile,
|
||||||
[ --with-libgtop-guile Build the libgtop guile interface (default=no)],
|
dnl [ --with-libgtop-guile Build the libgtop guile interface (default=no)],
|
||||||
[build_guile="$withval"], [build_guile=yes])
|
dnl [build_guile="$withval"], [build_guile=yes])
|
||||||
|
|
||||||
if test x$build_guile != xno ; then
|
dnl if test x$build_guile != xno ; then
|
||||||
GNOME_CHECK_GUILE
|
dnl GNOME_CHECK_GUILE
|
||||||
fi
|
dnl fi
|
||||||
|
|
||||||
AC_ARG_WITH(libgtop-inodedb,
|
AC_ARG_WITH(libgtop-inodedb,
|
||||||
[ --with-libgtop-inodedb Build the inodedb stuff (default=no)],
|
[ --with-libgtop-inodedb Build the inodedb stuff (default=no)],
|
||||||
@@ -158,6 +167,9 @@ else
|
|||||||
static_targets=""
|
static_targets=""
|
||||||
fi
|
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(static_targets)
|
||||||
AC_SUBST(smp_examples)
|
AC_SUBST(smp_examples)
|
||||||
AC_SUBST(guile_examples)
|
AC_SUBST(guile_examples)
|
||||||
@@ -165,11 +177,17 @@ AC_SUBST(guile_subdirs)
|
|||||||
|
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(GLIB >= 1.2.0 is required for LibGTop))
|
GLIB_REQUIRED=2.0.0
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
|
||||||
|
AC_SUBST(GLIB_CFLAGS)
|
||||||
|
AC_SUBST(GLIB_LIBS)
|
||||||
|
|
||||||
|
dnl (1.2.0,,AC_MSG_ERROR(GLIB >= 1.2.0 is required for LibGTop))
|
||||||
|
|
||||||
dnl You need to uncomment the following line if you want to use
|
dnl You need to uncomment the following line if you want to use
|
||||||
dnl libGTop without Gnome.
|
dnl libGTop without Gnome.
|
||||||
dnl GNOME_SUPPORT_CHECKS
|
GNOME_SUPPORT_CHECKS
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
@@ -187,13 +205,50 @@ AC_CHECK_TYPE(ssize_t, int)
|
|||||||
AC_CHECK_HEADERS(memory.h)
|
AC_CHECK_HEADERS(memory.h)
|
||||||
AC_CHECK_HEADERS(string.h strings.h, break)
|
AC_CHECK_HEADERS(string.h strings.h, break)
|
||||||
AC_REPLACE_FUNCS(strerror)
|
AC_REPLACE_FUNCS(strerror)
|
||||||
AC_CHECK_LIB(kvm, kvm_open)
|
|
||||||
|
dnl dlopen() and dlsym()
|
||||||
|
DL_LIB=
|
||||||
|
AC_CHECK_FUNCS(dlopen,,[
|
||||||
|
AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", [
|
||||||
|
AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld", [
|
||||||
|
AC_CHECK_FUNCS(dlopen, DL_LIB="", DL_LIB="")
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
oLIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $DL_LIB"
|
||||||
|
AC_CHECK_FUNCS(dlerror,,)
|
||||||
|
LIBS="$oLIBS"
|
||||||
|
AC_SUBST(DL_LIB)
|
||||||
|
|
||||||
|
dnl AIX
|
||||||
|
AH_TEMPLATE(HAVE_VMGETINFO, [Define to 1 if you have the `vmgetinfo' function in libperfstat])
|
||||||
|
AC_CHECK_LIB(perfstat, vmgetinfo, AC_DEFINE(HAVE_VMGETINFO))
|
||||||
|
|
||||||
dnl Solaris
|
dnl Solaris
|
||||||
AC_CHECK_LIB(kstat, kstat_open)
|
AC_CHECK_LIB(kstat, kstat_open)
|
||||||
AC_CHECK_FUNCS(getloadavg swapctl)
|
AC_CHECK_FUNCS(getloadavg swapctl)
|
||||||
AC_CHECK_HEADERS(procfs.h sys/procfs.h, break)
|
AC_CHECK_HEADERS(procfs.h sys/procfs.h, break)
|
||||||
|
|
||||||
|
dnl Some versions of Solaris require -lelf for -lkvm
|
||||||
|
AC_CHECK_LIB(kvm, kvm_open,[
|
||||||
|
LIBS="-lkvm $LIBS"
|
||||||
|
],[AC_MSG_CHECKING(for kvm_open in -lkvm with -lelf)
|
||||||
|
AC_CACHE_VAL(ac_cv_lib_kvm_with_elf,
|
||||||
|
[ac_save_LIBS="$LIBS"
|
||||||
|
LIBS="-lkvm -lelf $LIBS"
|
||||||
|
AC_TRY_LINK([char kvm_open();], [kvm_open()],
|
||||||
|
ac_cv_lib_kvm_with_elf=yes, ac_cv_lib_kvm_with_elf=no)
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
])
|
||||||
|
if test "$ac_cv_lib_kvm_with_elf" = "yes"; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
LIBS="-lkvm -lelf $LIBS"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
dnl For DEC OSF1
|
dnl For DEC OSF1
|
||||||
AC_CHECK_LIB(mach, vm_statistics)
|
AC_CHECK_LIB(mach, vm_statistics)
|
||||||
|
|
||||||
@@ -206,9 +261,9 @@ GCC_NEED_DECLARATION(program_invocation_name, [
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
])
|
])
|
||||||
|
|
||||||
CFLAGS=$saved_CFLAGS
|
CFLAGS=$saved_CFLAGS
|
||||||
|
|
||||||
dnl Check for Internet sockets.
|
|
||||||
AC_CHECK_FUNC(socket,
|
AC_CHECK_FUNC(socket,
|
||||||
[AC_CHECK_HEADER(netinet/in.h,
|
[AC_CHECK_HEADER(netinet/in.h,
|
||||||
[AC_CHECK_HEADER(arpa/inet.h, [
|
[AC_CHECK_HEADER(arpa/inet.h, [
|
||||||
@@ -230,9 +285,13 @@ AC_TYPE_SIGNAL
|
|||||||
AC_FUNC_STRFTIME
|
AC_FUNC_STRFTIME
|
||||||
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
|
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
|
||||||
|
|
||||||
dnl ## all 'es_??' are only needed for format numbers different of 'es'
|
ALL_LINGUAS="am ar az be bg bn ca cs cy da de el es et fa fi fr ga gl he hi hu id it ja ko lv mk ml mn ms nl nn no pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta tr uk vi zh_CN zh_TW"
|
||||||
ALL_LINGUAS="de es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fi fr ko no ja"
|
|
||||||
AM_GNOME_GETTEXT
|
GETTEXT_PACKAGE=libgtop-2.0
|
||||||
|
AC_SUBST(GETTEXT_PACKAGE)
|
||||||
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
|
||||||
|
|
||||||
|
AM_GLIB_GNU_GETTEXT
|
||||||
|
|
||||||
AC_PATH_XTRA
|
AC_PATH_XTRA
|
||||||
|
|
||||||
@@ -276,7 +335,7 @@ if test "x$gnome_found" = xyes ; then
|
|||||||
LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
|
LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
|
||||||
SUPPORTINCS="$GNOME_INCLUDEDIR"
|
SUPPORTINCS="$GNOME_INCLUDEDIR"
|
||||||
else
|
else
|
||||||
LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la'
|
LIBSUPPORT='$(top_builddir)/support/libgnomesupport-2.0.la'
|
||||||
SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support'
|
SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -292,7 +351,7 @@ AC_SUBST(SUPPORTINCS)
|
|||||||
|
|
||||||
dnl These definitions are expanded in make.
|
dnl These definitions are expanded in make.
|
||||||
LIBGTOP_LIBS='-L$(libdir)'
|
LIBGTOP_LIBS='-L$(libdir)'
|
||||||
LIBGTOP_INCS='-I$(includedir) -I$(pkglibdir)/include'
|
LIBGTOP_INCS='-I$(includedir)/libgtop-2.0'
|
||||||
|
|
||||||
if test x$libgtop_use_machine_h = xyes ; then
|
if test x$libgtop_use_machine_h = xyes ; then
|
||||||
LIBGTOP_INCS="$LIBGTOP_INCS -DHAVE_GLIBTOP_MACHINE_H"
|
LIBGTOP_INCS="$LIBGTOP_INCS -DHAVE_GLIBTOP_MACHINE_H"
|
||||||
@@ -315,13 +374,13 @@ LIBGTOP_INCS="$LIBGTOP_INCS $SUPPORTINCS $GLIB_CFLAGS"
|
|||||||
LIBGTOP_GUILE_LIBS="$LIBGTOP_LIBS"
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_LIBS"
|
||||||
LIBGTOP_GUILE_INCS="$LIBGTOP_INCS"
|
LIBGTOP_GUILE_INCS="$LIBGTOP_INCS"
|
||||||
LIBGTOP_BINDIR='$(bindir)'
|
LIBGTOP_BINDIR='$(bindir)'
|
||||||
LIBGTOP_SERVER='$(bindir)/libgtop_server'
|
LIBGTOP_SERVER='$(bindir)/libgtop_server2'
|
||||||
|
|
||||||
sysdeps_dir="$libgtop_sysdeps_dir"
|
sysdeps_dir="$libgtop_sysdeps_dir"
|
||||||
AC_SUBST(sysdeps_dir)
|
AC_SUBST(sysdeps_dir)
|
||||||
|
|
||||||
if test x$ac_cv_guile_found = xyes ; then
|
if test x$ac_cv_guile_found = xyes ; then
|
||||||
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile"
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile-2.0"
|
||||||
libgtop_guile_found=yes
|
libgtop_guile_found=yes
|
||||||
else
|
else
|
||||||
libgtop_guile_found=no
|
libgtop_guile_found=no
|
||||||
@@ -337,11 +396,11 @@ fi
|
|||||||
|
|
||||||
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS"
|
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS"
|
||||||
|
|
||||||
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop -lgtop_sysdeps -lgtop_common"
|
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop-2.0 -lgtop_sysdeps-2.0 -lgtop_common-2.0"
|
||||||
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop -lgtop_sysdeps -lgtop_common"
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop-2.0 -lgtop_sysdeps-2.0 -lgtop_common-2.0"
|
||||||
|
|
||||||
LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names"
|
LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names-2.0"
|
||||||
LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names -lgtop_names"
|
LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names-2.0 -lgtop_names-2.0"
|
||||||
|
|
||||||
LIBGTOP_LIBS="$LIBGTOP_LIBS"
|
LIBGTOP_LIBS="$LIBGTOP_LIBS"
|
||||||
LIBGTOP_NAMES_LIBS="$LIBGTOP_NAMES_LIBS"
|
LIBGTOP_NAMES_LIBS="$LIBGTOP_NAMES_LIBS"
|
||||||
@@ -365,12 +424,12 @@ else
|
|||||||
guile_def=""
|
guile_def=""
|
||||||
fi
|
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_VERSION_CODE='$LIBGTOP_VERSION_CODE' -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 $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)
|
AC_SUBST(INCLUDES)
|
||||||
|
|
||||||
AC_SUBST(LIBGTOP_EXTRA_LIBS)
|
AC_SUBST(LIBGTOP_EXTRA_LIBS)
|
||||||
|
AC_SUBST(GLIB_LIBS)
|
||||||
AC_SUBST(LIBGTOP_LIBS)
|
AC_SUBST(LIBGTOP_LIBS)
|
||||||
AC_SUBST(LIBGTOP_INCS)
|
AC_SUBST(LIBGTOP_INCS)
|
||||||
AC_SUBST(LIBGTOP_NAMES_LIBS)
|
AC_SUBST(LIBGTOP_NAMES_LIBS)
|
||||||
@@ -383,8 +442,8 @@ AC_SUBST(LIBGTOP_BINDIR)
|
|||||||
AC_SUBST(LIBGTOP_SERVER)
|
AC_SUBST(LIBGTOP_SERVER)
|
||||||
|
|
||||||
if test x$libgtop_need_server = xyes ; then
|
if test x$libgtop_need_server = xyes ; then
|
||||||
sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid.la"
|
sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid-2.0.la"
|
||||||
server_programs='libgtop_server'
|
server_programs='libgtop_server2'
|
||||||
else
|
else
|
||||||
sysdeps_suid_lib=
|
sysdeps_suid_lib=
|
||||||
server_programs=
|
server_programs=
|
||||||
@@ -392,144 +451,10 @@ fi
|
|||||||
AC_SUBST(sysdeps_suid_lib)
|
AC_SUBST(sysdeps_suid_lib)
|
||||||
AC_SUBST(server_programs)
|
AC_SUBST(server_programs)
|
||||||
|
|
||||||
|
|
||||||
dnl The following one is copied from glib/configure.in
|
|
||||||
|
|
||||||
AC_OUTPUT_COMMANDS([
|
|
||||||
|
|
||||||
## Generate `glibconfig.h' in two cases
|
|
||||||
## 1. `config.status' is run either explicitly, or via configure.
|
|
||||||
## Esp. not when it is run in `Makefile' to generate makefiles and
|
|
||||||
## config.h
|
|
||||||
## 2. CONFIG_OTHER is set explicitly
|
|
||||||
##
|
|
||||||
## Case 1 is difficult. We know that `automake' sets one of
|
|
||||||
## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
|
|
||||||
## only when AM_CONFIG_HEADER is set, however.
|
|
||||||
|
|
||||||
if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
|
|
||||||
# Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
|
|
||||||
CONFIG_OTHER=${CONFIG_OTHER:-glibtop-config.h}
|
|
||||||
fi
|
|
||||||
case "$CONFIG_OTHER" in
|
|
||||||
*glibtop-config.h*)
|
|
||||||
echo creating glibtop-config.h
|
|
||||||
outfile=glibtop-config.h-tmp
|
|
||||||
cat > $outfile <<\_______EOF
|
|
||||||
/* glibtop-config.h
|
|
||||||
*
|
|
||||||
* This is a generated file. Please modify `configure.in'
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef GLIBTOP_CONFIG_H
|
|
||||||
#define GLIBTOP_CONFIG_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
_______EOF
|
|
||||||
|
|
||||||
did_typedefs=no
|
|
||||||
|
|
||||||
if test x$glibtop_uint64_t != xyes ; then
|
|
||||||
did_typedefs=yes
|
|
||||||
cat >> $outfile <<\_______EOF
|
|
||||||
|
|
||||||
#ifndef u_int64_t
|
|
||||||
typedef u_int64_t unsigned long long int
|
|
||||||
#endif
|
|
||||||
_______EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$glibtop_int64_t != xyes ; then
|
|
||||||
did_typedefs=yes
|
|
||||||
cat >> $outfile <<\_______EOF
|
|
||||||
|
|
||||||
#ifndef int64_t
|
|
||||||
typedef int64_t signed long long int
|
|
||||||
#endif
|
|
||||||
_______EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$did_typedefs = xyes ; then
|
|
||||||
cat >>$outfile <<_______EOF
|
|
||||||
|
|
||||||
/*
|
|
||||||
* NOTE: If your application checks for "u_int64_t" or "int64_t" in its own
|
|
||||||
* config.h, you must not include it after any of the LibGTop headers.
|
|
||||||
*/
|
|
||||||
_______EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >>$outfile <<_______EOF
|
|
||||||
|
|
||||||
/* Define if we need the LibGTop server. */
|
|
||||||
_______EOF
|
|
||||||
|
|
||||||
if test x$glibtop_need_libgtop = xyes ; then
|
|
||||||
echo '#define NEED_LIBGTOP 1' >> $outfile
|
|
||||||
else
|
|
||||||
echo '#undef NEED_LIBGTOP' >> $outfile
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >>$outfile <<_______EOF
|
|
||||||
|
|
||||||
/* Define if LibGTop has support for multiple processors. */
|
|
||||||
_______EOF
|
|
||||||
|
|
||||||
if test x$glibtop_have_smp = xyes ; then
|
|
||||||
echo '#define HAVE_LIBGTOP_SMP 1' >> $outfile
|
|
||||||
else
|
|
||||||
echo '#undef HAVE_LIBGTOP_SMP' >> $outfile
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >>$outfile <<_______EOF
|
|
||||||
|
|
||||||
/* LibGTop major, minor and micro version. */
|
|
||||||
#define LIBGTOP_MAJOR_VERSION $libgtop_major_version
|
|
||||||
#define LIBGTOP_MINOR_VERSION $libgtop_minor_version
|
|
||||||
#define LIBGTOP_MICRO_VERSION $libgtop_micro_version
|
|
||||||
|
|
||||||
/* LibGTop version and numerical version code ("1.234.567" -> 1234567). */
|
|
||||||
#define LIBGTOP_VERSION "$libgtop_version"
|
|
||||||
#define LIBGTOP_VERSION_CODE $libgtop_version_code
|
|
||||||
|
|
||||||
/* LibGTop server version, increased each time the protocol changes. */
|
|
||||||
#define LIBGTOP_SERVER_VERSION $libgtop_server_version
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif /* GLIBCONFIG_H */
|
|
||||||
_______EOF
|
|
||||||
|
|
||||||
if cmp -s $outfile glibtop-config.h; then
|
|
||||||
echo glibtop-config.h is unchanged
|
|
||||||
rm -f $outfile
|
|
||||||
else
|
|
||||||
mv $outfile glibtop-config.h
|
|
||||||
fi ;;
|
|
||||||
esac
|
|
||||||
],[
|
|
||||||
glibtop_uint64_t=$ac_cv_type_u_int64_t
|
|
||||||
glibtop_int64_t=$ac_cv_type_int64_t
|
|
||||||
libgtop_major_version=$LIBGTOP_MAJOR_VERSION
|
|
||||||
libgtop_minor_version=$LIBGTOP_MINOR_VERSION
|
|
||||||
libgtop_micro_version=$LIBGTOP_MICRO_VERSION
|
|
||||||
libgtop_version_code=$LIBGTOP_VERSION_CODE
|
|
||||||
libgtop_server_version=$LIBGTOP_SERVER_VERSION
|
|
||||||
libgtop_version=$LIBGTOP_VERSION
|
|
||||||
glibtop_need_libgtop=$libgtop_need_server
|
|
||||||
glibtop_have_smp=$libgtop_smp
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
Makefile
|
Makefile
|
||||||
libgtop.spec
|
libgtop.spec
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
intl/Makefile
|
|
||||||
misc/Makefile
|
misc/Makefile
|
||||||
include/Makefile
|
include/Makefile
|
||||||
include/glibtop/Makefile
|
include/glibtop/Makefile
|
||||||
@@ -546,6 +471,7 @@ sysdeps/linux/Makefile
|
|||||||
sysdeps/kernel/Makefile
|
sysdeps/kernel/Makefile
|
||||||
sysdeps/freebsd/Makefile
|
sysdeps/freebsd/Makefile
|
||||||
sysdeps/solaris/Makefile
|
sysdeps/solaris/Makefile
|
||||||
|
sysdeps/aix/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/daemon/Makefile
|
src/daemon/Makefile
|
||||||
src/inodedb/Makefile
|
src/inodedb/Makefile
|
||||||
@@ -553,4 +479,5 @@ lib/Makefile
|
|||||||
examples/Makefile
|
examples/Makefile
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
support/Makefile
|
support/Makefile
|
||||||
macros/Makefile])
|
libgtop-2.0.pc
|
||||||
|
])
|
||||||
|
|||||||
9
debian/.cvsignore
vendored
Normal file
9
debian/.cvsignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
control
|
||||||
|
rules
|
||||||
|
build
|
||||||
|
tmp
|
||||||
|
*.postinst
|
||||||
|
*.debhelper
|
||||||
|
*.files
|
||||||
|
files
|
||||||
|
substvars
|
||||||
9
debian/README.Debian
vendored
Normal file
9
debian/README.Debian
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
LibGTop CVS snapshots for Debian
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
This is a debian package made from a stable release of LibGTop, but it
|
||||||
|
should be considered "unofficial" since I'm not a Debian Maintainer.
|
||||||
|
|
||||||
|
|
||||||
|
Martin Baulig <martin@home-of-linux.org>, Wed, 16 Feb 2000 16:40:50 +0100
|
||||||
|
|
||||||
121
debian/changelog
vendored
Normal file
121
debian/changelog
vendored
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
libgtop (1.0.7-1) unstable; urgency=low
|
||||||
|
* New upstream source (1.0.7 "Copenhagen" release)
|
||||||
|
* Non-maintainer upload; since I'm not a Debian maintainer, this is some
|
||||||
|
kind of "unofficial" debian package for LibGTop 1.0.7 - but I think it
|
||||||
|
can be considered stable and working.
|
||||||
|
|
||||||
|
-- Martin Baulig <martin@home-of-linux.org> Wed, 16 Feb 2000 16:40:50 +0100
|
||||||
|
|
||||||
|
libgtop (1.0.6-1) unstable; urgency=low
|
||||||
|
* New upstream source
|
||||||
|
|
||||||
|
-- Ian Lynagh (wibble) <igloo@debian.org> Wed, 20 Oct 1999 16:16:27 +0100
|
||||||
|
|
||||||
|
libgtop (1.0.4.5pre1-1) frozen unstable; urgency=low
|
||||||
|
* New upstream source (1.0.5 pre release)
|
||||||
|
* Maintainer e-mail address changed to igloo@debian.org
|
||||||
|
|
||||||
|
-- Ian Lynagh (wibble) <igloo@debian.org> Thu, 30 Sep 1999 22:37:33 +0100
|
||||||
|
|
||||||
|
libgtop (1.0.4-1) frozen unstable; urgency=low
|
||||||
|
* New upstream source
|
||||||
|
* Removed nasty sed stuff from the rules in favour of make install prefix=...
|
||||||
|
* Added .la files to libgtop-dev
|
||||||
|
* Added info to the copyright file
|
||||||
|
* Wrote simple man page for libgtop-config.
|
||||||
|
* Recompiled with later debhelper so docs go to /usr/share/doc as per FHS
|
||||||
|
* changed infodir to /usr/share/info
|
||||||
|
|
||||||
|
-- Ian Lynagh (wibble) <igloo@debian.org> Mon, 20 Sep 1999 00:06:16 +0100
|
||||||
|
|
||||||
|
libgtop (1.0.1-2) frozen unstable; urgency=low
|
||||||
|
|
||||||
|
* Didn't actually use wildcards in libgtop-dev.files because tar complained
|
||||||
|
* Set section names properly
|
||||||
|
|
||||||
|
-- Ian Lynagh <ian@lynagh.demon.co.uk> Sun, 7 Mar 1999 00:53:50 +0000
|
||||||
|
|
||||||
|
libgtop (1.0.1-1) frozen unstable; urgency=low
|
||||||
|
|
||||||
|
* SONAME changed back to 1. Fun fun fun.
|
||||||
|
* Added RELNOTES-1.0 to debian/libgtop1.docs and debian/rules
|
||||||
|
* Changed libgtop1.README.Debian to at least make sense
|
||||||
|
* Used wildcards in libgtop-dev.files
|
||||||
|
|
||||||
|
-- Ian Lynagh <ian@lynagh.demon.co.uk> Sun, 7 Mar 1999 00:53:50 +0000
|
||||||
|
|
||||||
|
libgtop (1.0.1-0.1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Non-maintainer upload for GNOME 1.0
|
||||||
|
|
||||||
|
-- Jules Bean <jules@debian.org> Thu, 4 Mar 1999 22:34:12 +0000
|
||||||
|
|
||||||
|
libgtop (0.99.2-0.2) unstable; urgency=low
|
||||||
|
|
||||||
|
* Oops, forgot some files.
|
||||||
|
|
||||||
|
-- Jim Pick <jim@jimpick.com> Sun, 24 Jan 1999 02:12:24 -0800
|
||||||
|
|
||||||
|
libgtop (0.99.2-0.1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Non-maintainer upload.
|
||||||
|
* New upstream source.
|
||||||
|
* SONAME is now 0 again. Hmmm.
|
||||||
|
|
||||||
|
-- Jim Pick <jim@jimpick.com> Sat, 23 Jan 1999 20:21:38 -0800
|
||||||
|
|
||||||
|
libgtop (0.26.2-4) frozen unstable; urgency=low
|
||||||
|
|
||||||
|
* Upstream changelog installed as changelog
|
||||||
|
* debian/shlibs.local removed in favour of the LD_LIBRARY_PATH line
|
||||||
|
|
||||||
|
-- Ian Lynagh <ian@lynagh.demon.co.uk> Thu, 26 Nov 1998 17:20:24 +0000
|
||||||
|
|
||||||
|
libgtop (0.26.2-3.1) frozen unstable; urgency=low
|
||||||
|
|
||||||
|
* Non-maintainer upload.
|
||||||
|
* Upload to frozen, corrects Bug #29110, Bug #29111, which were
|
||||||
|
already fixed.
|
||||||
|
* Noticed that guile option is no longer being used, so I removed
|
||||||
|
the dependency.
|
||||||
|
* Added changelog (to fix lintian error).
|
||||||
|
* Changed control file to use macro substitutions. This is a much
|
||||||
|
less error-prone way of building dependencies than doing them by
|
||||||
|
hand.
|
||||||
|
* Added -V option to dh_makeshlibs to put version number on shlibs
|
||||||
|
file.
|
||||||
|
* Added shlibs.local file with null entry for "libgtop 1" (and
|
||||||
|
others) so libgtop1 doesn't declare a relationship on itself.
|
||||||
|
|
||||||
|
-- Jim Pick <jim@jimpick.com> Wed, 25 Nov 1998 12:03:12 -0800
|
||||||
|
|
||||||
|
libgtop (0.26.2-3) frozen unstable; urgency=low
|
||||||
|
|
||||||
|
* libgtop0 changed to libgtop1
|
||||||
|
* Added an #ifndef strstr around the prototype of strstr in
|
||||||
|
sysdeps/common/mountlist.c as this is a macro under glibc 2.1.
|
||||||
|
|
||||||
|
-- Ian Lynagh <ian@lynagh.demon.co.uk> Sun, 8 Nov 1998 12:06:09 +0000
|
||||||
|
|
||||||
|
libgtop (0.26.2-2) frozen unstable; urgency=low
|
||||||
|
|
||||||
|
* Fixes minor bugs in debian/rules
|
||||||
|
|
||||||
|
-- Ian Lynagh <ian@lynagh.demon.co.uk> Fri, 16 Oct 1998 05:30:16 +0200
|
||||||
|
|
||||||
|
libgtop (0.26.2-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New upstream version
|
||||||
|
* Non-maintainer release
|
||||||
|
|
||||||
|
-- Martin Schulze <joey@finlandia.infodrom.north.de> Fri, 16 Oct 1998 05:30:16 +0200
|
||||||
|
|
||||||
|
libgtop (0.26.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial Release.
|
||||||
|
|
||||||
|
-- Jim Pick <jim@jimpick.com> Thu, 24 Sep 1998 18:42:48 -0700
|
||||||
|
|
||||||
|
Local variables:
|
||||||
|
mode: debian-changelog
|
||||||
|
End:
|
||||||
33
debian/control.in
vendored
Normal file
33
debian/control.in
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
Source: libgtop@SUFFIX@
|
||||||
|
Maintainer: Martin Baulig <martin@home-of-linux.org>
|
||||||
|
Section: libs
|
||||||
|
Priority: optional
|
||||||
|
Standards-Version: 3.0.0
|
||||||
|
|
||||||
|
Package: libgtop1@SUFFIX@
|
||||||
|
Architecture: any
|
||||||
|
Section: libs
|
||||||
|
Depends: ${shlibs:Depends}
|
||||||
|
Description: Portable system access library (part of Gnome)
|
||||||
|
Gnome is the "GNU Network Object Model Environment"
|
||||||
|
.
|
||||||
|
It is a project to build a complete, user-friendly desktop based
|
||||||
|
entirely on free software.
|
||||||
|
.
|
||||||
|
This package contains the gtop libraries which read information about
|
||||||
|
processes and the running systems.
|
||||||
|
|
||||||
|
Package: libgtop-dev@SUFFIX@
|
||||||
|
Architecture: any
|
||||||
|
Section: devel
|
||||||
|
Depends: libgtop1@SUFFIX@ (= ${Source-Version})
|
||||||
|
Description: Dev libraries for the portable system access library (part of Gnome)
|
||||||
|
Gnome is the "GNU Network Object Model Environment"
|
||||||
|
.
|
||||||
|
It is a project to build a complete, user-friendly desktop based
|
||||||
|
entirely on free software.
|
||||||
|
.
|
||||||
|
This package contains the include files and static library for the
|
||||||
|
gtop libraries which read information about processes and the running
|
||||||
|
systems.
|
||||||
|
|
||||||
109
debian/debconfigure
vendored
Executable file
109
debian/debconfigure
vendored
Executable file
@@ -0,0 +1,109 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# debconfigure
|
||||||
|
#
|
||||||
|
# A script to generate a debian/rules file, with options.
|
||||||
|
#
|
||||||
|
# By Jim Pick <jim@jimpick.com>, GPL'd of course.
|
||||||
|
# Adjusted for LibGTop by Martin Baulig <martin@home-of-linux.org>
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ ! -r rules.in ]; then
|
||||||
|
echo "Please run the debconfigure script in the debian directory" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
debtype='official'
|
||||||
|
prefix='/usr'
|
||||||
|
gnomeprefix='/usr'
|
||||||
|
localstatedir='/var/lib'
|
||||||
|
pkgsuffix=''
|
||||||
|
|
||||||
|
for dc_option
|
||||||
|
do
|
||||||
|
case "$dc_option" in
|
||||||
|
-*=*) dc_optarg=`echo "$dc_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||||
|
*) dc_optarg= ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$dc_option" in
|
||||||
|
|
||||||
|
--clean)
|
||||||
|
rm -f control rules *~ core *files *menu *substvars *.postinst *.debhelper
|
||||||
|
exit ;;
|
||||||
|
|
||||||
|
--prefix=*)
|
||||||
|
prefix="$dc_optarg" ;;
|
||||||
|
|
||||||
|
--localstatedir=*)
|
||||||
|
prefix="$dc_optarg" ;;
|
||||||
|
|
||||||
|
--pkgsuffix=*)
|
||||||
|
pkgsuffix="$dc_optarg" ;;
|
||||||
|
|
||||||
|
--gnome-prefix=*)
|
||||||
|
gnomeprefix="$dc_optarg" ;;
|
||||||
|
|
||||||
|
--debtype=*)
|
||||||
|
debtype="$dc_optarg" ;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
cat <<EOF 1>&2
|
||||||
|
Usage: debconfigure [options]
|
||||||
|
Options: [defaults in brackets after descriptions]
|
||||||
|
--help print this message
|
||||||
|
--clean remove generated files
|
||||||
|
--prefix=PREFIX install files under under PREFIX dir [/usr]
|
||||||
|
--gnome-prefix=PREFIX look for GNOME under PREFIX dir [/usr]
|
||||||
|
--localstatedir=DIR directory for things like game scores [/var/lib]
|
||||||
|
--pkgsuffix=SUFFIX append SUFFIX onto package names []
|
||||||
|
--debtype=DEBTYPE enable macros with the name of DEBTYPE [official]
|
||||||
|
EOF
|
||||||
|
exit ;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Strip leading slash
|
||||||
|
prefix=`expr $prefix : '/\(.*\)'`
|
||||||
|
gnomeprefix=`expr $gnomeprefix : '/\(.*\)'`
|
||||||
|
localstatedir=`expr $localstatedir : '/\(.*\)'`
|
||||||
|
|
||||||
|
for infile in `ls control.in rules.in`
|
||||||
|
do
|
||||||
|
tofile=`expr $infile : '\(.*\)\.in'`
|
||||||
|
cat $infile | \
|
||||||
|
sed "s,@SUFFIX@,$pkgsuffix,g" | \
|
||||||
|
sed "s,@PREFIX@,$prefix,g" | \
|
||||||
|
sed "s,@GNOMEPREFIX@,$gnomeprefix,g" | \
|
||||||
|
sed "s,@LOCALSTATEDIR@,$localstatedir,g" | \
|
||||||
|
sed "s,%$debtype>,," | sed '/^%/d' > $tofile
|
||||||
|
done
|
||||||
|
chmod +x rules
|
||||||
|
|
||||||
|
for filesfile in `ls *.files.in`
|
||||||
|
do
|
||||||
|
tofile=`expr $filesfile : '\(.*\)\.files\.in'`
|
||||||
|
tofile=`echo $tofile$pkgsuffix.files`
|
||||||
|
cat $filesfile | \
|
||||||
|
sed "s,@SUFFIX@,$pkgsuffix,g" | \
|
||||||
|
sed "s,@PREFIX@,$prefix,g" | \
|
||||||
|
sed "s,@GNOMEPREFIX@,$gnomeprefix,g" | \
|
||||||
|
sed "s,@LOCALSTATEDIR@,$localstatedir,g" | \
|
||||||
|
sed "s,%$debtype>,," | sed '/^%/d' > $tofile
|
||||||
|
done
|
||||||
|
|
||||||
|
for postinst in libgtop1$pkgsuffix
|
||||||
|
do
|
||||||
|
|
||||||
|
cat > $postinst.postinst <<EOF
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
EOF
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
34
debian/libgtop-config.1
vendored
Normal file
34
debian/libgtop-config.1
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
.TH GTOP l "15 September 1999"
|
||||||
|
.SH NAME
|
||||||
|
\fBlibgtop-config\fP \- libgtop libraries and component information retrieval.
|
||||||
|
.SH SYNTAX
|
||||||
|
.B libgtop-config
|
||||||
|
.RI [ --version ]
|
||||||
|
.RI [ --config ]
|
||||||
|
.RI [ --features-def-file ]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.B libgtop-config
|
||||||
|
is used to retrieve information from installed libraries in the system.
|
||||||
|
|
||||||
|
This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page.
|
||||||
|
.LP
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.B \-\-version
|
||||||
|
.PD
|
||||||
|
Prints the version of libgtop that you're using.
|
||||||
|
.TP
|
||||||
|
.B \-\-config
|
||||||
|
.PD
|
||||||
|
Prints the location of libgtopConf.sh.
|
||||||
|
.TP
|
||||||
|
.B \-\-version
|
||||||
|
.PD
|
||||||
|
Prints the location of libgtop-features.def.
|
||||||
|
.SH BUGS
|
||||||
|
None known
|
||||||
|
|
||||||
|
.SH AUTHORS
|
||||||
|
Martin Baulig (martin@home-of-linux.org)
|
||||||
|
.TP
|
||||||
|
Josh Sled (jsled@scam.XCF.Berkeley.EDU)
|
||||||
24
debian/libgtop-dev.files.in
vendored
Normal file
24
debian/libgtop-dev.files.in
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
@PREFIX@/lib/libgtop.a
|
||||||
|
@PREFIX@/lib/libgtop_common.a
|
||||||
|
@PREFIX@/lib/libgtop_names.a
|
||||||
|
@PREFIX@/lib/libgtop_suid_common.a
|
||||||
|
@PREFIX@/lib/libgtop_sysdeps.a
|
||||||
|
@PREFIX@/lib/libgtop.la
|
||||||
|
@PREFIX@/lib/libgtop_common.la
|
||||||
|
@PREFIX@/lib/libgtop_names.la
|
||||||
|
@PREFIX@/lib/libgtop_suid_common.la
|
||||||
|
@PREFIX@/lib/libgtop_sysdeps.la
|
||||||
|
@PREFIX@/lib/libgtopConf.sh
|
||||||
|
@PREFIX@/lib/libgtop.so
|
||||||
|
@PREFIX@/lib/libgtop_common.so
|
||||||
|
@PREFIX@/lib/libgtop_names.so
|
||||||
|
@PREFIX@/lib/libgtop_suid_common.so
|
||||||
|
@PREFIX@/lib/libgtop_sysdeps.so
|
||||||
|
@PREFIX@/lib/libgtop-features.def
|
||||||
|
@PREFIX@/lib/libgtop/include/*.h
|
||||||
|
@PREFIX@/include/glibtop/*.h
|
||||||
|
@PREFIX@/include/glibtop.h
|
||||||
|
@PREFIX@/include/glibtop_server.h
|
||||||
|
@PREFIX@/include/glibtop_machine.h
|
||||||
|
@PREFIX@/info/libgtop.info
|
||||||
|
@PREFIX@/bin/libgtop-config
|
||||||
5
debian/libgtop1.README.Debian
vendored
Normal file
5
debian/libgtop1.README.Debian
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
The Debian package of libgtop, a GNOME library.
|
||||||
|
|
||||||
|
--
|
||||||
|
Martin Baulig <martin@home-of-linux.org>
|
||||||
12
debian/libgtop1.copyright
vendored
Normal file
12
debian/libgtop1.copyright
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
libgtop is released under the GPL.
|
||||||
|
On Debian GNU/Linux systems, the complete text of the GNU General
|
||||||
|
Public License can be found in /usr/share/common-licenses/GPL
|
||||||
|
|
||||||
|
Original authors: Martin Baulig <martin@home-of-linux.org>
|
||||||
|
Drazen Kacar <dave@srce.hr>
|
||||||
|
|
||||||
|
Originally Debianised by Jim Pick <jim@jimpick.com>
|
||||||
|
Then re-Debianised in October 1998 by Martin Schulze
|
||||||
|
<joey@finlandia.infodrom.north.de> before being taken over by Ian Lynagh
|
||||||
|
<ian@lynagh.demon.co.uk> in November 1998.
|
||||||
5
debian/libgtop1.docs
vendored
Normal file
5
debian/libgtop1.docs
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
RELNOTES-0.25
|
||||||
|
RELNOTES-1.0.x
|
||||||
|
NEWS
|
||||||
|
AUTHORS
|
||||||
|
debian/changelog
|
||||||
4
debian/libgtop1.files.in
vendored
Normal file
4
debian/libgtop1.files.in
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@PREFIX@/lib/libgtop*.so.[0-9].[0-9][0-9].[0-9]
|
||||||
|
@PREFIX@/lib/libgtop*.so.[0-9].[0-9].[0-9]
|
||||||
|
@PREFIX@/lib/libgtop*.so.[0-9]
|
||||||
|
@PREFIX@/share/locale/*/*/libgtop.mo
|
||||||
115
debian/rules.in
vendored
Executable file
115
debian/rules.in
vendored
Executable file
@@ -0,0 +1,115 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
|
||||||
|
# This version is for a hypothetical package that builds an
|
||||||
|
# architecture-dependant package, as well as an architecture-independent
|
||||||
|
# package.
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
i=$(shell pwd)/debian/tmp
|
||||||
|
b=$(shell pwd)/debian/build
|
||||||
|
|
||||||
|
configure: configure.in
|
||||||
|
@echo "--- Making configure script and configuring"
|
||||||
|
chmod +x autogen.sh
|
||||||
|
./autogen.sh --prefix=/@PREFIX@ --with-gnome=/@GNOMEPREFIX@ \
|
||||||
|
--localstatedir=/@LOCALSTATEDIR@
|
||||||
|
|
||||||
|
Makefile: configure
|
||||||
|
@echo "--- Configuring"
|
||||||
|
./configure --prefix=/@PREFIX@ --with-gnome=/@GNOMEPREFIX@ \
|
||||||
|
--localstatedir=/@LOCALSTATEDIR@
|
||||||
|
|
||||||
|
build: configure Makefile build-debstamp
|
||||||
|
build-debstamp:
|
||||||
|
@echo "--- Compiling"
|
||||||
|
dh_testdir
|
||||||
|
$(MAKE) all
|
||||||
|
touch build-debstamp
|
||||||
|
|
||||||
|
clean: Makefile
|
||||||
|
@echo "--- Cleaning"
|
||||||
|
dh_testdir
|
||||||
|
dh_clean
|
||||||
|
-rm -rf static shared
|
||||||
|
-rm -f build-debstamp install-debstamp
|
||||||
|
-make -k distclean
|
||||||
|
-rm -f `find . -name "*~"`
|
||||||
|
-rm -f `find . -name "*\.la"`
|
||||||
|
-rm -rf `find . -name "\.deps"`
|
||||||
|
-rm -rf `find . -name "\.libs"`
|
||||||
|
-rm -rf `find . -name "*\.rej"`
|
||||||
|
-rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
|
||||||
|
-rm -f debian/*substvars
|
||||||
|
|
||||||
|
install: build install-debstamp
|
||||||
|
install-debstamp:
|
||||||
|
@echo "--- Installing"
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
rm -rf $(b)
|
||||||
|
$(MAKE) install prefix=$(i)/@PREFIX@ exec_prefix=$(i)/@PREFIX@ \
|
||||||
|
localstatedir=$(i)/@LOCALSTATEDIR@
|
||||||
|
touch install-debstamp
|
||||||
|
|
||||||
|
install-save: install
|
||||||
|
rm -rf $(i).saved
|
||||||
|
cp -a $(i) $(i).saved
|
||||||
|
|
||||||
|
install-saved:
|
||||||
|
rm -rf $(i)
|
||||||
|
cp -a $(i).saved $(i)
|
||||||
|
rm -rf $(b)
|
||||||
|
touch install-debstamp
|
||||||
|
|
||||||
|
binary-indep: build install
|
||||||
|
|
||||||
|
binary-arch: build install \
|
||||||
|
libgtop1@SUFFIX@ \
|
||||||
|
libgtop-dev@SUFFIX@
|
||||||
|
|
||||||
|
#
|
||||||
|
# libgtop1@SUFFIX@
|
||||||
|
#
|
||||||
|
|
||||||
|
libgtop1@SUFFIX@: install
|
||||||
|
@echo "--- Building: $@"
|
||||||
|
dh_installdocs -p$@ -P$(b)/$@ README NEWS AUTHORS
|
||||||
|
dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog
|
||||||
|
dh_movefiles -p$@ -P$(b)/$@
|
||||||
|
dh_strip -p$@ -P$(b)/$@
|
||||||
|
dh_compress -p$@ -P$(b)/$@
|
||||||
|
dh_fixperms -p$@ -P$(b)/$@
|
||||||
|
dh_installdeb -p$@ -P$(b)/$@
|
||||||
|
dh_shlibdeps -p$@ -P$(b)/$@
|
||||||
|
dh_gencontrol -p$@ -P$(b)/$@
|
||||||
|
dh_makeshlibs -p$@ -P$(b)/$@ -V
|
||||||
|
dh_md5sums -p$@ -P$(b)/$@
|
||||||
|
dh_builddeb -p$@ -P$(b)/$@
|
||||||
|
|
||||||
|
#
|
||||||
|
# libgtop-dev
|
||||||
|
#
|
||||||
|
|
||||||
|
libgtop-dev@SUFFIX@: install
|
||||||
|
@echo "--- Building: $@"
|
||||||
|
mkdir -p $(b)/$@/usr/doc
|
||||||
|
cd $(b)/$@/usr/doc; ln -s libgtop1@SUFFIX@ $@
|
||||||
|
dh_movefiles -p$@ -P$(b)/$@
|
||||||
|
dh_strip -p$@ -P$(b)/$@
|
||||||
|
dh_compress -p$@ -P$(b)/$@
|
||||||
|
dh_fixperms -p$@ -P$(b)/$@
|
||||||
|
dh_installdeb -p$@ -P$(b)/$@
|
||||||
|
dh_shlibdeps -p$@ -P$(b)/$@
|
||||||
|
dh_gencontrol -p$@ -P$(b)/$@
|
||||||
|
dh_makeshlibs -p$@ -P$(b)/$@ -V
|
||||||
|
dh_undocumented -p$@ -P$(b)/$@ \
|
||||||
|
libgtop-config.1
|
||||||
|
dh_md5sums -p$@ -P$(b)/$@
|
||||||
|
dh_builddeb -p$@ -P$(b)/$@
|
||||||
|
|
||||||
|
binary: binary-indep binary-arch
|
||||||
|
.PHONY: binary clean binary-indep binary-arch build install install-save install-saved
|
||||||
|
|
||||||
|
|
||||||
@@ -1,8 +1,24 @@
|
|||||||
1999-05-28 Martin Baulig <baulig@Stud.Informatik.Uni-Trier.DE>
|
2002-03-12 James Henstridge <james@daa.com.au>
|
||||||
|
|
||||||
* internals.texi: New file documenting LibGTop internals.
|
* Makefile.am (MAKEINFO): using += seems to screw up the build
|
||||||
* reference.texi: Started to document all library functions and
|
with newer automakes. Set it explicitly (using @MAKEINFO@) seems
|
||||||
finished the sysdeps and common references.
|
to be compatible with both.
|
||||||
|
|
||||||
|
2001-11-26 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* libgtop.texi, Makefile.am: Renamed to libgtop2.texi
|
||||||
|
* about.texi: Very minor update.
|
||||||
|
|
||||||
|
1999-10-18 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* about.texi: Added a note about LibGTop and GNOME.
|
||||||
|
|
||||||
|
* reference.texi (glibtop_proc_state): Fix description of the `state'
|
||||||
|
field for LibGTop 1.0.x.
|
||||||
|
|
||||||
|
1999-09-29 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* Makefile.am (MAKEINFO): Add `-I @libgtop_top_builddir@/doc' here.
|
||||||
|
|
||||||
1999-05-16 Martin Baulig <martin@home-of-linux.org>
|
1999-05-16 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
info_TEXINFOS = libgtop.texi
|
info_TEXINFOS = libgtop2.texi
|
||||||
|
|
||||||
libgtop_TEXINFOS = libgtop.texi about.texi reference.texi \
|
libgtop2_TEXINFOS = libgtop2.texi about.texi reference.texi \
|
||||||
auto-macros.texi version.texi main.texi \
|
auto-macros.texi version.texi main.texi \
|
||||||
white-paper.texi internals.texi
|
white-paper.texi
|
||||||
|
|
||||||
|
MAKEINFO = @MAKEINFO@ -I @libgtop_top_builddir@/doc
|
||||||
|
|
||||||
EXTRA_DIST = auto-macros.texi.in
|
EXTRA_DIST = auto-macros.texi.in
|
||||||
|
|
||||||
auto-macros.texi: auto-macros.texi.in Makefile
|
auto-macros.texi: auto-macros.texi.in Makefile
|
||||||
## Use sed and then mv to avoid problems if the user interrupts.
|
## Use sed and then mv to avoid problems if the user interrupts.
|
||||||
sed -e 's#\%LIBGTOP_LIBDIR\%#$(libdir)#g' \
|
sed -e 's#\%LIBGTOP_LIBDIR\%#$(libdir)#g' \
|
||||||
-e 's#\%LIBGTOP_INCLUDEDIR\%#$(includedir)#g' \
|
-e 's#\%LIBGTOP_INCLUDEDIR\%#$(includedir)/libgtop-2.0#g' \
|
||||||
-e 's#\%LIBGTOP_DATADIR\%#$(datadir)#g' \
|
-e 's#\%LIBGTOP_DATADIR\%#$(datadir)#g' \
|
||||||
-e 's#\%LIBGTOP_EXTRA_LIBS\%#$(LIBGTOP_EXTRA_LIBS)#g' \
|
-e 's#\%LIBGTOP_EXTRA_LIBS\%#$(LIBGTOP_EXTRA_LIBS)#g' \
|
||||||
-e 's#\%LIBGTOP_LIBS\%#$(LIBGTOP_LIBS)#g' \
|
-e 's#\%LIBGTOP_LIBS\%#$(LIBGTOP_LIBS)#g' \
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
This directory is shared between the HEAD and the LIBGTOP_STABLE_1_0
|
|
||||||
branch (`LIBGTOP_STABLE_1_0' is just an ordinary tag and no branch tag
|
|
||||||
here).
|
|
||||||
|
|
||||||
Whenever we make a new release of LibGTop 1.0.x, we'll move that tag to
|
|
||||||
point to a "stable" version of the documentation.
|
|
||||||
|
|
||||||
May 16, 1999
|
|
||||||
Martin Baulig
|
|
||||||
@@ -7,6 +7,11 @@ and information about running Processes.
|
|||||||
On Systems like Solaris or Digital Unix where you need special privileges to
|
On Systems like Solaris or Digital Unix where you need special privileges to
|
||||||
get those data, it uses a setuid/setgid server to do so.
|
get those data, it uses a setuid/setgid server to do so.
|
||||||
|
|
||||||
|
Even if LibGTop is a part of the GNOME desktop environment
|
||||||
|
(@uref{http://www.gnome.org}), the main interface of LibGTop is totally
|
||||||
|
independent from any particular desktop environment, so you can also use it
|
||||||
|
as a standalone library in any piece of GPLed software.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Availability:: Where to get LibGTop
|
* Availability:: Where to get LibGTop
|
||||||
* Supported Platforms:: Supported Platforms
|
* Supported Platforms:: Supported Platforms
|
||||||
@@ -28,10 +33,10 @@ latest release tarballs from
|
|||||||
@noindent
|
@noindent
|
||||||
or any of its mirror sites.
|
or any of its mirror sites.
|
||||||
|
|
||||||
The latest stable version of LibGTop is 1.0.1 which is also the one that comes
|
The latest stable version of LibGTop is 1.0.12 which is also the one that comes
|
||||||
together with GNOME 1.0. In CVS, there is a @code{LIBGTOP_STABLE_1_0} branch
|
together with GNOME 1.0. It belongs to @code{LIBGTOP_STABLE_1_0} branch in CVS.
|
||||||
which is rooted at the @code{LIBGTOP_1_0_1} tag while actual development occurs
|
Actual development occurs in the @code{libgtop-GNOME-2-0-port} which is
|
||||||
in the @code{HEAD} which currently has version 1.1.0.
|
currently versioned 1.90.0.
|
||||||
|
|
||||||
@node Supported Platforms, Mailing List, Availability, About
|
@node Supported Platforms, Mailing List, Availability, About
|
||||||
@section Supported Platforms
|
@section Supported Platforms
|
||||||
@@ -42,7 +47,9 @@ The stable branch currently supports the following platforms:
|
|||||||
@item All versions of Linux
|
@item All versions of Linux
|
||||||
|
|
||||||
LibGTop was tested under Linux 2.0.x and 2.2.x on the ix86 and the alpha, but
|
LibGTop was tested under Linux 2.0.x and 2.2.x on the ix86 and the alpha, but
|
||||||
it should also work without problems on SparcLinux.
|
it should also work without problems on SparcLinux or Linux 2.4.x.
|
||||||
|
|
||||||
|
Note: I'm speaking of the Linux kernel here, not the GNU/Linux operating system.
|
||||||
|
|
||||||
@item FreeBSD, NetBSD and OpenBSD
|
@item FreeBSD, NetBSD and OpenBSD
|
||||||
|
|
||||||
@@ -70,9 +77,10 @@ permits so it should be fully supported soon.
|
|||||||
|
|
||||||
@item Solaris
|
@item Solaris
|
||||||
|
|
||||||
There will be a Solaris port of LibGTop very soon. Especially Drazen Kacar and
|
The Solaris port currently works on Solaris 7 and maybe also on other releases.
|
||||||
some other people have been doing excellent work here and I'm sure that this
|
Thanks a lot to Drazen Kacar and everyone who helped working on this port. They
|
||||||
port will be ready soon.
|
have really done excellent work here and I'm pretty sure that this port will be
|
||||||
|
fully functional on most Solaris versions in near future.
|
||||||
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@@ -108,6 +116,7 @@ me a lot in the early beginning.
|
|||||||
@item Timur Bakeyev for the BSDI port.
|
@item Timur Bakeyev for the BSDI port.
|
||||||
@item Drazen Kacar and the other people on the LibGTop development mailing
|
@item Drazen Kacar and the other people on the LibGTop development mailing
|
||||||
list for the Solaris port.
|
list for the Solaris port.
|
||||||
|
@item Kevin Vandersloot for the effort to port to GNOME 2.0.
|
||||||
@item All people sending me patches, having good ideas, ...
|
@item All people sending me patches, having good ideas, ...
|
||||||
@item Everyone I have forgotten in this list ...
|
@item Everyone I have forgotten in this list ...
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
@node LibGTop Internals, , Reference Manual, Top
|
|
||||||
@chapter LibGTop Internals
|
|
||||||
|
|
||||||
@menu
|
|
||||||
* General Internals:: General Internals
|
|
||||||
* Sysdeps Internals:: Sysdeps Internals
|
|
||||||
@end menu
|
|
||||||
|
|
||||||
@node General Internals, Sysdeps Internals, LibGTop Internals, LibGTop Internals
|
|
||||||
@section General Internals
|
|
||||||
|
|
||||||
@menu
|
|
||||||
* glibtop:: The server structure
|
|
||||||
@end menu
|
|
||||||
|
|
||||||
@node glibtop, , General Internals, General Internals
|
|
||||||
@subsection The server structure - @code{glibtop}
|
|
||||||
|
|
||||||
@example
|
|
||||||
@cartouche
|
|
||||||
typedef struct _glibtop glibtop;
|
|
||||||
|
|
||||||
struct _glibtop
|
|
||||||
@{
|
|
||||||
unsigned flags;
|
|
||||||
unsigned method;
|
|
||||||
unsigned error_method;
|
|
||||||
#ifdef HAVE_GLIBTOP_MACHINE_H
|
|
||||||
glibtop_machine machine;
|
|
||||||
#endif
|
|
||||||
int input [2];
|
|
||||||
int output [2];
|
|
||||||
int socket;
|
|
||||||
int ncpu;
|
|
||||||
unsigned long os_version_code;
|
|
||||||
const char *name;
|
|
||||||
const char *server_command;
|
|
||||||
const char *server_host;
|
|
||||||
const char *server_user;
|
|
||||||
const char *server_rsh;
|
|
||||||
unsigned long features;
|
|
||||||
unsigned long server_port;
|
|
||||||
glibtop_sysdeps sysdeps;
|
|
||||||
glibtop_sysdeps required;
|
|
||||||
glibtop_sysdeps wanted;
|
|
||||||
pid_t pid;
|
|
||||||
@};
|
|
||||||
@end cartouche
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@node Sysdeps Internals, , General Internals, LibGTop Internals
|
|
||||||
@section Sysdeps Internals
|
|
||||||
|
|
||||||
@menu
|
|
||||||
* glibtop_open_s:: Non-privileged initializations
|
|
||||||
* glibtop_close_s:: Non-privileged cleanups
|
|
||||||
@end menu
|
|
||||||
|
|
||||||
@node glibtop_open_s, glibtop_close_s, Sysdeps Internals, Sysdeps Internals
|
|
||||||
@subsection glibtop_open_s
|
|
||||||
|
|
||||||
This function is used in the non-suid sysdeps library @samp{-lgtop_sysdeps} to
|
|
||||||
initialize a server. It should do all initializations that do not need any
|
|
||||||
privileges.
|
|
||||||
|
|
||||||
@example
|
|
||||||
@cartouche
|
|
||||||
void
|
|
||||||
glibtop_open_s (glibtop *server, const char *program_name,
|
|
||||||
const unsigned long features,
|
|
||||||
const unsigned flags);
|
|
||||||
@end cartouche
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@table @code
|
|
||||||
@item server
|
|
||||||
Pointer to the @code{glibtop} server structure.
|
|
||||||
@item program_name
|
|
||||||
Name of the calling program; the implementation will usually
|
|
||||||
set @samp{server->name} to this so it'll be used as the program
|
|
||||||
name in error messages.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Typically, this function will set @code{server->name}, @code{server->ncpu} and
|
|
||||||
@code{server->os_version_code} and initialize any of the @code{server->machine}
|
|
||||||
fields which do not need any privileges.
|
|
||||||
|
|
||||||
It is normally implemented in @file{open.c} in the sysdeps directory.
|
|
||||||
|
|
||||||
@node glibtop_close_s, , glibtop_open_s, Sysdeps Internals
|
|
||||||
@subsection glibtop_close_s
|
|
||||||
|
|
||||||
This function is used in the non-suid sysdeps library @samp{-lgtop_sysdeps} to
|
|
||||||
clean-up a server when it's no longer used.
|
|
||||||
|
|
||||||
It must free all resources that were allocated in @code{glibtop_open_s}.
|
|
||||||
|
|
||||||
@example
|
|
||||||
@cartouche
|
|
||||||
void
|
|
||||||
glibtop_close_s (glibtop *server);
|
|
||||||
@end cartouche
|
|
||||||
@end example
|
|
||||||
|
|
||||||
It is normally implemented in @file{close.c} in the sysdeps directory, but may
|
|
||||||
be empty.
|
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
\input texinfo @c -*-texinfo-*-
|
\input texinfo @c -*-texinfo-*-
|
||||||
@c %**start of header
|
@c %**start of header
|
||||||
@setfilename libgtop.info
|
@setfilename libgtop2.info
|
||||||
@settitle LibGTop Reference Manual
|
@settitle LibGTop Reference Manual
|
||||||
@setchapternewpage odd
|
@setchapternewpage odd
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
@@ -41,6 +41,15 @@ under the above conditions for modified versions,
|
|||||||
except that this permission notice may be stated in a
|
except that this permission notice may be stated in a
|
||||||
translation approved by the Free Software Foundation.
|
translation approved by the Free Software Foundation.
|
||||||
|
|
||||||
|
@format
|
||||||
|
@dircategory Libraries:
|
||||||
|
@direntry
|
||||||
|
* LibGTop2: (libgtop2). Library to get system specific data
|
||||||
|
such as cpu and memory usage, active
|
||||||
|
processes
|
||||||
|
@end direntry
|
||||||
|
@end format
|
||||||
|
|
||||||
@end ifinfo
|
@end ifinfo
|
||||||
|
|
||||||
@titlepage
|
@titlepage
|
||||||
@@ -4,25 +4,6 @@
|
|||||||
* About:: About LibGTop
|
* About:: About LibGTop
|
||||||
* White Paper:: LibGTop White Paper
|
* White Paper:: LibGTop White Paper
|
||||||
* Reference Manual:: LibGTop Reference Manual
|
* Reference Manual:: LibGTop Reference Manual
|
||||||
* LibGTop Internals:: LibGTop Internals
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- The Detailed Node Listing ---
|
--- The Detailed Node Listing ---
|
||||||
|
|
||||||
@@ -37,7 +18,6 @@ LibGTop White Paper
|
|||||||
|
|
||||||
* Introduction:: Introduction
|
* Introduction:: Introduction
|
||||||
* Overview:: Overview
|
* Overview:: Overview
|
||||||
* Servers and Daemons:: Servers and Daemons
|
|
||||||
|
|
||||||
Overview
|
Overview
|
||||||
|
|
||||||
@@ -80,24 +60,9 @@ Library Functions
|
|||||||
* glibtop_init:: Server Initialization.
|
* glibtop_init:: Server Initialization.
|
||||||
* glibtop_sysdeps:: Server Sysdeps.
|
* glibtop_sysdeps:: Server Sysdeps.
|
||||||
* Library Parameters:: Library Parameters.
|
* Library Parameters:: Library Parameters.
|
||||||
|
|
||||||
LibGTop Internals
|
|
||||||
|
|
||||||
* General Internals:: General Internals
|
|
||||||
* Sysdeps Internals:: Sysdeps Internals
|
|
||||||
|
|
||||||
General Internals
|
|
||||||
|
|
||||||
* glibtop:: The server structure
|
|
||||||
|
|
||||||
Sysdeps Internals
|
|
||||||
|
|
||||||
* glibtop_open_s:: Non-privileged initializations
|
|
||||||
* glibtop_close_s:: Non-privileged cleanups
|
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@include about.texi
|
@include about.texi
|
||||||
@include white-paper.texi
|
@include white-paper.texi
|
||||||
@include reference.texi
|
@include reference.texi
|
||||||
@include internals.texi
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@node Reference Manual, LibGTop Internals, White Paper, Top
|
@node Reference Manual, , White Paper, Top
|
||||||
@chapter LibGTop Reference Manual
|
@chapter LibGTop Reference Manual
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
@@ -494,7 +494,12 @@ struct _glibtop_proc_state
|
|||||||
@{
|
@{
|
||||||
u_int64_t flags;
|
u_int64_t flags;
|
||||||
char cmd[40];
|
char cmd[40];
|
||||||
|
@ifset LIBGTOP-1-1
|
||||||
unsigned state;
|
unsigned state;
|
||||||
|
@end ifset
|
||||||
|
@ifclear LIBGTOP-1-1
|
||||||
|
char state;
|
||||||
|
@end ifclear
|
||||||
int uid,
|
int uid,
|
||||||
gid,
|
gid,
|
||||||
ruid,
|
ruid,
|
||||||
@@ -511,7 +516,16 @@ struct _glibtop_proc_state
|
|||||||
@item cmd
|
@item cmd
|
||||||
Basename of the executable file in the call to @code{exec}.
|
Basename of the executable file in the call to @code{exec}.
|
||||||
@item state
|
@item state
|
||||||
|
@ifset LIBGTOP-1-1
|
||||||
Process state (see the constants defined below).
|
Process state (see the constants defined below).
|
||||||
|
@end ifset
|
||||||
|
@ifclear LIBGTOP-1-1
|
||||||
|
Process state ('R' = running, 'S' = sleeping, 'D' = uninterruptible,
|
||||||
|
'Z' = zombie, 'T' = stopped, 'I' = idle).
|
||||||
|
|
||||||
|
This was changed to an @code{unsigned} bitfield in LibGTop 1.1.x where there
|
||||||
|
are also some constants for it.
|
||||||
|
@end ifclear
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
When porting LibGTop, please @emph{try hard} to implement the following
|
When porting LibGTop, please @emph{try hard} to implement the following
|
||||||
@@ -547,6 +561,7 @@ in this case to find out whether the process really has a CPU).
|
|||||||
The is the processor id of the CPU the process was last running on.
|
The is the processor id of the CPU the process was last running on.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@ifset LIBGTOP-1-1
|
||||||
There are some constants for the @code{state} field:
|
There are some constants for the @code{state} field:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@@ -559,6 +574,7 @@ There are some constants for the @code{state} field:
|
|||||||
#define GLIBTOP_PROCESS_SWAPPING 32
|
#define GLIBTOP_PROCESS_SWAPPING 32
|
||||||
@end cartouche
|
@end cartouche
|
||||||
@end example
|
@end example
|
||||||
|
@end ifset
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item GLIBTOP_PROCESS_RUNNING
|
@item GLIBTOP_PROCESS_RUNNING
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
@menu
|
@menu
|
||||||
* Introduction:: Introduction
|
* Introduction:: Introduction
|
||||||
* Overview:: Overview
|
* Overview:: Overview
|
||||||
* Servers and Daemons:: Servers and Daemons
|
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Introduction, Overview, White Paper, White Paper
|
@node Introduction, Overview, White Paper, White Paper
|
||||||
@@ -48,7 +47,7 @@ since there's more than just one single program that wants to use them - for
|
|||||||
instance @code{gtop} and the @code{multiload}, @code{cpumemusage} and
|
instance @code{gtop} and the @code{multiload}, @code{cpumemusage} and
|
||||||
@code{netload} panel applets.
|
@code{netload} panel applets.
|
||||||
|
|
||||||
@node Overview, Servers and Daemons, Introduction, White Paper
|
@node Overview, , Introduction, White Paper
|
||||||
@section Overview
|
@section Overview
|
||||||
|
|
||||||
This section should give you a short overview on how LibGTop was developed, which
|
This section should give you a short overview on how LibGTop was developed, which
|
||||||
@@ -89,48 +88,3 @@ only contains the @dfn{features} which need privileges.
|
|||||||
Whenever we do not need any privileges to get all the data for some of the requested
|
Whenever we do not need any privileges to get all the data for some of the requested
|
||||||
structures (here called @dfn{features}) the library calls the sysdeps code directly
|
structures (here called @dfn{features}) the library calls the sysdeps code directly
|
||||||
rather than using the server.
|
rather than using the server.
|
||||||
|
|
||||||
@node Servers and Daemons, , Overview, White Paper
|
|
||||||
@section Servers and Daemons
|
|
||||||
|
|
||||||
LibGTop gives you the possibility to use different LibGTop "servers" and
|
|
||||||
"daemons" in your application.
|
|
||||||
|
|
||||||
Normally you do not need to worry about this things since LibGTop auto-
|
|
||||||
matically opens a pipe to its server it it's required, but this can also
|
|
||||||
be customized to fit your needs.
|
|
||||||
|
|
||||||
For instance if you have a small applet which is only interested in disk
|
|
||||||
usage there's no need to fork a separate server process since you don't
|
|
||||||
need any privileges to get them on any of the supported systems. This can
|
|
||||||
be archieved with a special call to @code{glibtop_init_r} on startup.
|
|
||||||
|
|
||||||
There's also an option to tell @code{glibtop_init_r} that you're only
|
|
||||||
interested in several features - for instance cpu and memory usage. In
|
|
||||||
this case LibGTop will only fork a server process if it's required to get
|
|
||||||
cpu and memory.
|
|
||||||
|
|
||||||
You can also tell @code{glibtop_init_r} to start the server only on demand,
|
|
||||||
this might become useful in command-line based programs. For graphical
|
|
||||||
applications it's normally best to start the server directly during their
|
|
||||||
initialization. The same applies for any time critical applications (since
|
|
||||||
@code{fork} is an expensive operation on some systems this may lead to
|
|
||||||
incorrect statistics).
|
|
||||||
|
|
||||||
LibGTop also allows you to talk to a remote machine using the
|
|
||||||
@dfn{LibGTop daemon}. This daemon is based on @code{gnuserv} from
|
|
||||||
GNU Emacs and should be run as an unprivileged user. It has support
|
|
||||||
for either @code{xauth} or host based authorization.
|
|
||||||
|
|
||||||
This daemon itself behaves like a LibGTop client application, i.e. it
|
|
||||||
forks a server process if this is required.
|
|
||||||
|
|
||||||
The main use for this daemon is when you want to monitor a machine which
|
|
||||||
is either very slow or has very low disk space. In this case you don't need
|
|
||||||
to install the whole client application (for instance GTop) on the remote
|
|
||||||
machine but only a very small (maybe also statically linked) executable and
|
|
||||||
run the graphical application on a more powerful machine.
|
|
||||||
|
|
||||||
It can also be used to monitor a remote machine over a very slow link such
|
|
||||||
as a dialup connection since the conversation between LibGTop client and
|
|
||||||
daemon uses much less bandwith than an ordinary X11 connection.
|
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
|
2001-01-14 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* \*.c: bindtextdomain and textdomain uses GETTEXT_PACKAGE.
|
||||||
|
|
||||||
|
* Makefile.am, first.c, second.c, sysdeps.c: Make them at least
|
||||||
|
compile for now, by disabling chunks which should belong to
|
||||||
|
HEAD branch.
|
||||||
|
|
||||||
1999-05-28 Martin Baulig <martin@home-of-linux.org>
|
1999-05-28 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* first.c, second.c, sysdeps.c: Use LibGTop version conditionals
|
* first.c, second.c, sysdeps.c: Use LibGTop version conditionals
|
||||||
so we can more easily merge the code into LIBGTOP_STABLE_1_0.
|
so we can more easily merge the code into LIBGTOP_STABLE_1_0.
|
||||||
|
|
||||||
1999-05-08 Drazen Kacar <dave@srce.hr>
|
|
||||||
|
|
||||||
* mountlist.c: Changed pfintf formats to "%lld" when printing
|
|
||||||
u_int64_t. This is still utterly unportable, but will
|
|
||||||
hopefully work on all supported architectures. For now.
|
|
||||||
|
|
||||||
1999-05-07 Martin Baulig <martin@home-of-linux.org>
|
1999-05-07 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* timings.c (timersub): Renamed this to `libgtop_timersub' and define
|
* timings.c (timersub): Renamed this to `libgtop_timersub' and define
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ EXTRA_PROGRAMS = first_static second_static \
|
|||||||
timings_static
|
timings_static
|
||||||
|
|
||||||
first_SOURCES = first.c
|
first_SOURCES = first.c
|
||||||
first_LDADD = $(top_builddir)/lib/libgtop.la \
|
first_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@LIBSUPPORT@ @INTLLIBS@
|
@LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
first_static_SOURCES = $(first_SOURCES)
|
first_static_SOURCES = $(first_SOURCES)
|
||||||
@@ -32,9 +32,9 @@ first_static_LDADD = $(first_LDADD)
|
|||||||
first_static_LDFLAGS = -static
|
first_static_LDFLAGS = -static
|
||||||
|
|
||||||
second_SOURCES = second.c
|
second_SOURCES = second.c
|
||||||
second_LDADD = $(top_builddir)/lib/libgtop.la \
|
second_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@LIBSUPPORT@ @INTLLIBS@
|
@LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
second_static_SOURCES = $(second_SOURCES)
|
second_static_SOURCES = $(second_SOURCES)
|
||||||
@@ -42,9 +42,9 @@ second_static_LDADD = $(second_LDADD)
|
|||||||
second_static_LDFLAGS = -static
|
second_static_LDFLAGS = -static
|
||||||
|
|
||||||
procmap_SOURCES = procmap.c
|
procmap_SOURCES = procmap.c
|
||||||
procmap_LDADD = $(top_builddir)/lib/libgtop.la \
|
procmap_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@LIBSUPPORT@ @INTLLIBS@
|
@LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
|
|
||||||
@@ -54,9 +54,9 @@ procmap_static_LDADD = $(procmap_LDADD)
|
|||||||
procmap_static_LDFLAGS = -static
|
procmap_static_LDFLAGS = -static
|
||||||
|
|
||||||
netload_SOURCES = netload.c
|
netload_SOURCES = netload.c
|
||||||
netload_LDADD = $(top_builddir)/lib/libgtop.la \
|
netload_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@LIBSUPPORT@ @INTLLIBS@
|
@LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
netload_static_SOURCES = $(netload_SOURCES)
|
netload_static_SOURCES = $(netload_SOURCES)
|
||||||
@@ -64,24 +64,24 @@ netload_static_LDADD = $(netload_LDADD)
|
|||||||
netload_static_LDFLAGS = -static
|
netload_static_LDFLAGS = -static
|
||||||
|
|
||||||
sysdeps_SOURCES = sysdeps.c
|
sysdeps_SOURCES = sysdeps.c
|
||||||
sysdeps_LDADD = $(top_builddir)/lib/libgtop.la \
|
sysdeps_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@LIBSUPPORT@ @INTLLIBS@
|
@LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
sysdeps_static_SOURCES = $(sysdeps_SOURCES)
|
sysdeps_static_SOURCES = $(sysdeps_SOURCES)
|
||||||
sysdeps_static_LDADD = $(sysdeps_LDADD)
|
sysdeps_static_LDADD = $(sysdeps_LDADD)
|
||||||
sysdeps_static_LDFLAGS = -static
|
sysdeps_static_LDFLAGS = -static
|
||||||
|
|
||||||
third_guile_names_LIBS = $(top_builddir)/sysdeps/guile/names/libgtop_guile_names.la
|
third_guile_names_LIBS = $(top_builddir)/sysdeps/guile/names/libgtop_guile_names-2.0.la
|
||||||
third_names_LIBS = $(top_builddir)/sysdeps/names/libgtop_names.la
|
third_names_LIBS = $(top_builddir)/sysdeps/names/libgtop_names-2.0.la
|
||||||
|
|
||||||
third_SOURCES = third.c
|
third_SOURCES = third.c
|
||||||
third_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile.la \
|
third_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile-2.0.la \
|
||||||
$(third_guile_names_LIBS) $(third_names_LIBS) \
|
$(third_guile_names_LIBS) $(third_names_LIBS) \
|
||||||
$(top_builddir)/lib/libgtop.la \
|
$(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@GUILE_LIBS@ @LIBSUPPORT@ @INTLLIBS@
|
@GUILE_LIBS@ @LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
third_static_SOURCES = $(third_SOURCES)
|
third_static_SOURCES = $(third_SOURCES)
|
||||||
@@ -89,9 +89,9 @@ third_static_LDADD = $(third_LDADD)
|
|||||||
third_static_LDFLAGS = -static
|
third_static_LDFLAGS = -static
|
||||||
|
|
||||||
mountlist_SOURCES = mountlist.c
|
mountlist_SOURCES = mountlist.c
|
||||||
mountlist_LDADD = $(top_builddir)/lib/libgtop.la \
|
mountlist_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@LIBSUPPORT@ @INTLLIBS@
|
@LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
mountlist_static_SOURCES= $(mountlist_SOURCES)
|
mountlist_static_SOURCES= $(mountlist_SOURCES)
|
||||||
@@ -100,9 +100,9 @@ mountlist_static_LDFLAGS= -static
|
|||||||
|
|
||||||
|
|
||||||
smp_SOURCES = smp.c
|
smp_SOURCES = smp.c
|
||||||
smp_LDADD = $(top_builddir)/lib/libgtop.la \
|
smp_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@LIBSUPPORT@ @INTLLIBS@
|
@LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
smp_static_SOURCES = $(smp_SOURCES)
|
smp_static_SOURCES = $(smp_SOURCES)
|
||||||
@@ -110,9 +110,9 @@ smp_static_LDADD = $(smp_LDADD)
|
|||||||
smp_static_LDFLAGS = -static
|
smp_static_LDFLAGS = -static
|
||||||
|
|
||||||
timings_SOURCES = timings.c
|
timings_SOURCES = timings.c
|
||||||
timings_LDADD = $(top_builddir)/lib/libgtop.la \
|
timings_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
|
||||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
$(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
|
||||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \
|
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
|
||||||
@LIBSUPPORT@ @INTLLIBS@
|
@LIBSUPPORT@ @INTLLIBS@
|
||||||
|
|
||||||
timings_static_SOURCES = $(timings_SOURCES)
|
timings_static_SOURCES = $(timings_SOURCES)
|
||||||
|
|||||||
242
examples/first.c
242
examples/first.c
@@ -52,8 +52,8 @@ main (int argc, char *argv [])
|
|||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
||||||
|
|
||||||
@@ -116,16 +116,9 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_uptime (&data.uptime);
|
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",
|
printf ("Uptime (0x%08lx): %f, %f\n",
|
||||||
(unsigned long) data.uptime.flags,
|
(unsigned long) data.uptime.flags,
|
||||||
data.uptime.uptime, data.uptime.idletime);
|
data.uptime.uptime, data.uptime.idletime);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_loadavg (&data.loadavg);
|
glibtop_get_loadavg (&data.loadavg);
|
||||||
@@ -249,52 +242,15 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_state (&data.proc_state, pid);
|
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",
|
printf ("Proc_State PID %5d (0x%08lx): '%s', %c, %lu, %lu\n",
|
||||||
(int) pid, (unsigned long) data.proc_state.flags,
|
(int) pid, (unsigned long) data.proc_state.flags,
|
||||||
data.proc_state.cmd, data.proc_state.state,
|
data.proc_state.cmd, data.proc_state.state,
|
||||||
(unsigned long) data.proc_state.uid,
|
(unsigned long) data.proc_state.uid,
|
||||||
(unsigned long) data.proc_state.gid);
|
(unsigned long) data.proc_state.gid);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_uid (&data.proc_uid, pid);
|
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): "
|
printf ("Proc_Uid PID %5d (0x%08lx): "
|
||||||
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) pid,
|
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) pid,
|
||||||
(unsigned long) data.proc_uid.flags,
|
(unsigned long) data.proc_uid.flags,
|
||||||
@@ -304,7 +260,6 @@ main (int argc, char *argv [])
|
|||||||
data.proc_uid.pgrp, data.proc_uid.session,
|
data.proc_uid.pgrp, data.proc_uid.session,
|
||||||
data.proc_uid.tty, data.proc_uid.tpgid,
|
data.proc_uid.tty, data.proc_uid.tpgid,
|
||||||
data.proc_uid.priority, data.proc_uid.nice);
|
data.proc_uid.priority, data.proc_uid.nice);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_mem (&data.proc_mem, pid);
|
glibtop_get_proc_mem (&data.proc_mem, pid);
|
||||||
@@ -322,30 +277,6 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_segment (&data.proc_segment, 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): "
|
printf ("Proc_Segment PID %5d (0x%08lx): "
|
||||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid,
|
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid,
|
||||||
(unsigned long) data.proc_segment.flags,
|
(unsigned long) data.proc_segment.flags,
|
||||||
@@ -357,7 +288,6 @@ main (int argc, char *argv [])
|
|||||||
(unsigned long) data.proc_segment.start_code,
|
(unsigned long) data.proc_segment.start_code,
|
||||||
(unsigned long) data.proc_segment.end_code,
|
(unsigned long) data.proc_segment.end_code,
|
||||||
(unsigned long) data.proc_segment.start_stack);
|
(unsigned long) data.proc_segment.start_stack);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_time (&data.proc_time, pid);
|
glibtop_get_proc_time (&data.proc_time, pid);
|
||||||
@@ -378,19 +308,6 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_signal (&data.proc_signal, 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): "
|
printf ("Proc_Signal PID %5d (0x%08lx): "
|
||||||
"%lu %lu %lu %lu\n", (int) pid,
|
"%lu %lu %lu %lu\n", (int) pid,
|
||||||
(unsigned long) data.proc_signal.flags,
|
(unsigned long) data.proc_signal.flags,
|
||||||
@@ -398,7 +315,6 @@ main (int argc, char *argv [])
|
|||||||
(unsigned long) data.proc_signal.blocked,
|
(unsigned long) data.proc_signal.blocked,
|
||||||
(unsigned long) data.proc_signal.sigignore,
|
(unsigned long) data.proc_signal.sigignore,
|
||||||
(unsigned long) data.proc_signal.sigcatch);
|
(unsigned long) data.proc_signal.sigcatch);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_kernel (&data.proc_kernel, pid);
|
glibtop_get_proc_kernel (&data.proc_kernel, pid);
|
||||||
@@ -437,52 +353,15 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_state (&data.proc_state, ppid);
|
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",
|
printf ("Proc_State PPID %5d (0x%08lx): '%s', %c, %lu, %lu\n",
|
||||||
(int) ppid, (unsigned long) data.proc_state.flags,
|
(int) ppid, (unsigned long) data.proc_state.flags,
|
||||||
data.proc_state.cmd, data.proc_state.state,
|
data.proc_state.cmd, data.proc_state.state,
|
||||||
(unsigned long) data.proc_state.uid,
|
(unsigned long) data.proc_state.uid,
|
||||||
(unsigned long) data.proc_state.gid);
|
(unsigned long) data.proc_state.gid);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_uid (&data.proc_uid, ppid);
|
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): "
|
printf ("Proc_Uid PPID %5d (0x%08lx): "
|
||||||
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) ppid,
|
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) ppid,
|
||||||
(unsigned long) data.proc_uid.flags,
|
(unsigned long) data.proc_uid.flags,
|
||||||
@@ -492,7 +371,6 @@ main (int argc, char *argv [])
|
|||||||
data.proc_uid.pgrp, data.proc_uid.session,
|
data.proc_uid.pgrp, data.proc_uid.session,
|
||||||
data.proc_uid.tty, data.proc_uid.tpgid,
|
data.proc_uid.tty, data.proc_uid.tpgid,
|
||||||
data.proc_uid.priority, data.proc_uid.nice);
|
data.proc_uid.priority, data.proc_uid.nice);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_mem (&data.proc_mem, ppid);
|
glibtop_get_proc_mem (&data.proc_mem, ppid);
|
||||||
@@ -510,30 +388,6 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_segment (&data.proc_segment, ppid);
|
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): "
|
printf ("Proc_Segment PPID %5d (0x%08lx): "
|
||||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) ppid,
|
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) ppid,
|
||||||
(unsigned long) data.proc_segment.flags,
|
(unsigned long) data.proc_segment.flags,
|
||||||
@@ -545,7 +399,6 @@ main (int argc, char *argv [])
|
|||||||
(unsigned long) data.proc_segment.start_code,
|
(unsigned long) data.proc_segment.start_code,
|
||||||
(unsigned long) data.proc_segment.end_code,
|
(unsigned long) data.proc_segment.end_code,
|
||||||
(unsigned long) data.proc_segment.start_stack);
|
(unsigned long) data.proc_segment.start_stack);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_time (&data.proc_time, ppid);
|
glibtop_get_proc_time (&data.proc_time, ppid);
|
||||||
@@ -566,26 +419,12 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_signal (&data.proc_signal, ppid);
|
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",
|
printf ("Proc_Signal PPID %5d (0x%08lx): %lu %lu %lu %lu\n",
|
||||||
(int) ppid, (unsigned long) data.proc_signal.flags,
|
(int) ppid, (unsigned long) data.proc_signal.flags,
|
||||||
(unsigned long) data.proc_signal.signal,
|
(unsigned long) data.proc_signal.signal,
|
||||||
(unsigned long) data.proc_signal.blocked,
|
(unsigned long) data.proc_signal.blocked,
|
||||||
(unsigned long) data.proc_signal.sigignore,
|
(unsigned long) data.proc_signal.sigignore,
|
||||||
(unsigned long) data.proc_signal.sigcatch);
|
(unsigned long) data.proc_signal.sigcatch);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_kernel (&data.proc_kernel, ppid);
|
glibtop_get_proc_kernel (&data.proc_kernel, ppid);
|
||||||
@@ -624,52 +463,15 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_state (&data.proc_state, 1);
|
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,
|
printf ("Proc_State INIT %5d (0x%08lx): '%s', %c, %lu, %lu\n", 1,
|
||||||
(unsigned long) data.proc_state.flags,
|
(unsigned long) data.proc_state.flags,
|
||||||
data.proc_state.cmd, data.proc_state.state,
|
data.proc_state.cmd, data.proc_state.state,
|
||||||
(unsigned long) data.proc_state.uid,
|
(unsigned long) data.proc_state.uid,
|
||||||
(unsigned long) data.proc_state.gid);
|
(unsigned long) data.proc_state.gid);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_uid (&data.proc_uid, 1);
|
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): "
|
printf ("Proc_Uid INIT %5d (0x%08lx): "
|
||||||
"%d %d %d %d %d %d %d %d %d %d %d %d\n", 1,
|
"%d %d %d %d %d %d %d %d %d %d %d %d\n", 1,
|
||||||
(unsigned long) data.proc_uid.flags,
|
(unsigned long) data.proc_uid.flags,
|
||||||
@@ -679,7 +481,6 @@ main (int argc, char *argv [])
|
|||||||
data.proc_uid.pgrp, data.proc_uid.session,
|
data.proc_uid.pgrp, data.proc_uid.session,
|
||||||
data.proc_uid.tty, data.proc_uid.tpgid,
|
data.proc_uid.tty, data.proc_uid.tpgid,
|
||||||
data.proc_uid.priority, data.proc_uid.nice);
|
data.proc_uid.priority, data.proc_uid.nice);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_mem (&data.proc_mem, 1);
|
glibtop_get_proc_mem (&data.proc_mem, 1);
|
||||||
@@ -697,30 +498,6 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_segment (&data.proc_segment, 1);
|
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): "
|
printf ("Proc_Segment INIT %5d (0x%08lx): "
|
||||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", 1,
|
"%lu %lu %lu %lu %lu %lu %lu %lu\n", 1,
|
||||||
(unsigned long) data.proc_segment.flags,
|
(unsigned long) data.proc_segment.flags,
|
||||||
@@ -732,7 +509,6 @@ main (int argc, char *argv [])
|
|||||||
(unsigned long) data.proc_segment.start_code,
|
(unsigned long) data.proc_segment.start_code,
|
||||||
(unsigned long) data.proc_segment.end_code,
|
(unsigned long) data.proc_segment.end_code,
|
||||||
(unsigned long) data.proc_segment.start_stack);
|
(unsigned long) data.proc_segment.start_stack);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_time (&data.proc_time, 1);
|
glibtop_get_proc_time (&data.proc_time, 1);
|
||||||
@@ -753,19 +529,6 @@ main (int argc, char *argv [])
|
|||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_signal (&data.proc_signal, 1);
|
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): "
|
printf ("Proc_Signal INIT %5d (0x%08lx): "
|
||||||
"%lu %lu %lu %lu\n", 1,
|
"%lu %lu %lu %lu\n", 1,
|
||||||
(unsigned long) data.proc_signal.flags,
|
(unsigned long) data.proc_signal.flags,
|
||||||
@@ -773,7 +536,6 @@ main (int argc, char *argv [])
|
|||||||
(unsigned long) data.proc_signal.blocked,
|
(unsigned long) data.proc_signal.blocked,
|
||||||
(unsigned long) data.proc_signal.sigignore,
|
(unsigned long) data.proc_signal.sigignore,
|
||||||
(unsigned long) data.proc_signal.sigcatch);
|
(unsigned long) data.proc_signal.sigcatch);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (c = 0; c < PROFILE_COUNT; c++)
|
for (c = 0; c < PROFILE_COUNT; c++)
|
||||||
glibtop_get_proc_kernel (&data.proc_kernel, 1);
|
glibtop_get_proc_kernel (&data.proc_kernel, 1);
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ main (int argc, char *argv [])
|
|||||||
char buffer [BUFSIZ];
|
char buffer [BUFSIZ];
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ main (int argc, char *argv [])
|
|||||||
glibtop_get_fsusage (&fsusage,
|
glibtop_get_fsusage (&fsusage,
|
||||||
mount_entries [index].mountdir);
|
mount_entries [index].mountdir);
|
||||||
|
|
||||||
printf ("Usage: %-16s %9llu %9llu %9llu %9llu %9llu\n",
|
printf ("Usage: %-16s %9Lu %9Lu %9Lu %9Lu %9Lu\n",
|
||||||
mount_entries [index].mountdir,
|
mount_entries [index].mountdir,
|
||||||
fsusage.blocks, fsusage.bfree,
|
fsusage.blocks, fsusage.bfree,
|
||||||
fsusage.bavail, fsusage.files,
|
fsusage.bavail, fsusage.files,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_netload netload;
|
glibtop_netload netload;
|
||||||
unsigned method, count, port, i;
|
unsigned method, count, port;
|
||||||
struct in_addr addr, subnet;
|
struct in_addr addr, subnet;
|
||||||
char *address_string, *subnet_string;
|
char *address_string, *subnet_string;
|
||||||
char buffer [BUFSIZ];
|
char buffer [BUFSIZ];
|
||||||
@@ -51,8 +51,8 @@ main (int argc, char *argv [])
|
|||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ main (int argc, char *argv [])
|
|||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/open.h>
|
#include <glibtop/open.h>
|
||||||
@@ -31,8 +32,6 @@
|
|||||||
#include <glibtop/union.h>
|
#include <glibtop/union.h>
|
||||||
#include <glibtop/sysdeps.h>
|
#include <glibtop/sysdeps.h>
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
output (pid_t pid)
|
output (pid_t pid)
|
||||||
{
|
{
|
||||||
@@ -53,52 +52,15 @@ output (pid_t pid)
|
|||||||
|
|
||||||
glibtop_get_proc_state (&data.proc_state, pid);
|
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): "
|
printf ("Proc_State PID %5d (0x%08lx): "
|
||||||
"'%s', %c, %lu, %lu\n", (int) pid,
|
"'%s', %c, %lu, %lu\n", (int) pid,
|
||||||
(unsigned long) data.proc_state.flags,
|
(unsigned long) data.proc_state.flags,
|
||||||
data.proc_state.cmd, data.proc_state.state,
|
data.proc_state.cmd, data.proc_state.state,
|
||||||
(unsigned long) data.proc_state.uid,
|
(unsigned long) data.proc_state.uid,
|
||||||
(unsigned long) data.proc_state.gid);
|
(unsigned long) data.proc_state.gid);
|
||||||
#endif
|
|
||||||
|
|
||||||
glibtop_get_proc_uid (&data.proc_uid, pid);
|
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): "
|
printf ("Proc_Uid PID %5d (0x%08lx): "
|
||||||
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) pid,
|
"%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) pid,
|
||||||
(unsigned long) data.proc_uid.flags,
|
(unsigned long) data.proc_uid.flags,
|
||||||
@@ -108,7 +70,6 @@ output (pid_t pid)
|
|||||||
data.proc_uid.pgrp, data.proc_uid.session,
|
data.proc_uid.pgrp, data.proc_uid.session,
|
||||||
data.proc_uid.tty, data.proc_uid.tpgid,
|
data.proc_uid.tty, data.proc_uid.tpgid,
|
||||||
data.proc_uid.priority, data.proc_uid.nice);
|
data.proc_uid.priority, data.proc_uid.nice);
|
||||||
#endif
|
|
||||||
|
|
||||||
glibtop_get_proc_mem (&data.proc_mem, pid);
|
glibtop_get_proc_mem (&data.proc_mem, pid);
|
||||||
|
|
||||||
@@ -124,30 +85,6 @@ output (pid_t pid)
|
|||||||
|
|
||||||
glibtop_get_proc_segment (&data.proc_segment, 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): "
|
printf ("Proc_Segment PID %5d (0x%08lx): "
|
||||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid,
|
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid,
|
||||||
(unsigned long) data.proc_segment.flags,
|
(unsigned long) data.proc_segment.flags,
|
||||||
@@ -159,7 +96,6 @@ output (pid_t pid)
|
|||||||
(unsigned long) data.proc_segment.start_code,
|
(unsigned long) data.proc_segment.start_code,
|
||||||
(unsigned long) data.proc_segment.end_code,
|
(unsigned long) data.proc_segment.end_code,
|
||||||
(unsigned long) data.proc_segment.start_stack);
|
(unsigned long) data.proc_segment.start_stack);
|
||||||
#endif
|
|
||||||
|
|
||||||
glibtop_get_proc_time (&data.proc_time, pid);
|
glibtop_get_proc_time (&data.proc_time, pid);
|
||||||
|
|
||||||
@@ -178,19 +114,6 @@ output (pid_t pid)
|
|||||||
|
|
||||||
glibtop_get_proc_signal (&data.proc_signal, 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): "
|
printf ("Proc_Signal PID %5d (0x%08lx): "
|
||||||
"%lu %lu %lu %lu\n", (int) pid,
|
"%lu %lu %lu %lu\n", (int) pid,
|
||||||
(unsigned long) data.proc_signal.flags,
|
(unsigned long) data.proc_signal.flags,
|
||||||
@@ -198,7 +121,6 @@ output (pid_t pid)
|
|||||||
(unsigned long) data.proc_signal.blocked,
|
(unsigned long) data.proc_signal.blocked,
|
||||||
(unsigned long) data.proc_signal.sigignore,
|
(unsigned long) data.proc_signal.sigignore,
|
||||||
(unsigned long) data.proc_signal.sigcatch);
|
(unsigned long) data.proc_signal.sigcatch);
|
||||||
#endif
|
|
||||||
|
|
||||||
glibtop_get_proc_kernel (&data.proc_kernel, pid);
|
glibtop_get_proc_kernel (&data.proc_kernel, pid);
|
||||||
|
|
||||||
@@ -317,8 +239,8 @@ main (int argc, char *argv [])
|
|||||||
unsigned *ptr, pid, i;
|
unsigned *ptr, pid, i;
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
glibtop_init ();
|
glibtop_init ();
|
||||||
|
|
||||||
|
|||||||
@@ -22,13 +22,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/cpu.h>
|
#include <glibtop/cpu.h>
|
||||||
#include <glibtop/xmalloc.h>
|
#include <glibtop/xmalloc.h>
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
@@ -41,8 +40,10 @@ main (int argc, char *argv [])
|
|||||||
int ncpu, i;
|
int ncpu, i;
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
|
glibtop_init();
|
||||||
|
|
||||||
glibtop_get_cpu (&cpu);
|
glibtop_get_cpu (&cpu);
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ main (int argc, char *argv [])
|
|||||||
memset (separator, '-', 91);
|
memset (separator, '-', 91);
|
||||||
separator [92] = '\0';
|
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,
|
printf ("\n\n%-26s %12s %12s %12s %12s %12s\n%s\n", buffer,
|
||||||
_("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator);
|
_("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator);
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_sysdeps sysdeps;
|
glibtop_sysdeps sysdeps;
|
||||||
unsigned method, count, port, i;
|
unsigned method, count, port;
|
||||||
char buffer [BUFSIZ];
|
char buffer [BUFSIZ];
|
||||||
|
|
||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN);
|
||||||
|
|
||||||
@@ -73,9 +73,6 @@ main (int argc, char *argv [])
|
|||||||
|
|
||||||
printf ("Sysdeps (0x%08lx):\n\n"
|
printf ("Sysdeps (0x%08lx):\n\n"
|
||||||
"\tfeatures:\t\t0x%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"
|
"\tcpu:\t\t%d\t0x%08lx\n"
|
||||||
"\tmem:\t\t%d\t0x%08lx\n"
|
"\tmem:\t\t%d\t0x%08lx\n"
|
||||||
"\tswap:\t\t%d\t0x%08lx\n\n"
|
"\tswap:\t\t%d\t0x%08lx\n\n"
|
||||||
@@ -100,9 +97,6 @@ main (int argc, char *argv [])
|
|||||||
"\tppp:\t\t%d\t0x%08lx\n\n",
|
"\tppp:\t\t%d\t0x%08lx\n\n",
|
||||||
(unsigned long) sysdeps.flags,
|
(unsigned long) sysdeps.flags,
|
||||||
(unsigned long) sysdeps.features,
|
(unsigned long) sysdeps.features,
|
||||||
#if LIBGTOP_VERSION_CODE > 1001000
|
|
||||||
(unsigned long) sysdeps.pointer_size,
|
|
||||||
#endif
|
|
||||||
FEATURE_CHECK(CPU),
|
FEATURE_CHECK(CPU),
|
||||||
(unsigned long) sysdeps.cpu,
|
(unsigned long) sysdeps.cpu,
|
||||||
FEATURE_CHECK(MEM),
|
FEATURE_CHECK(MEM),
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ int
|
|||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
gh_enter (argc, argv, main_prog);
|
gh_enter (argc, argv, main_prog);
|
||||||
exit (0);
|
exit (0);
|
||||||
|
|||||||
@@ -70,20 +70,17 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_union data;
|
glibtop_union data;
|
||||||
glibtop_sysdeps sysdeps;
|
unsigned c, count, *ptr;
|
||||||
unsigned c, count, port, i, *ptr;
|
|
||||||
struct rusage total_start, total_end;
|
struct rusage total_start, total_end;
|
||||||
struct rusage rusage_start, rusage_end;
|
struct rusage rusage_start, rusage_end;
|
||||||
struct timeval elapsed_utime, elapsed_stime;
|
struct timeval elapsed_utime, elapsed_stime;
|
||||||
char buffer [BUFSIZ];
|
pid_t pid;
|
||||||
pid_t pid, ppid;
|
|
||||||
char *args;
|
|
||||||
|
|
||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
bindtextdomain (PACKAGE, GTOPLOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
|
||||||
textdomain (PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
printf ("%-12s (%-10s): %7s - %9s - %9s\n",
|
printf ("%-12s (%-10s): %7s - %9s - %9s\n",
|
||||||
"Feature", "Flags", "Count", "utime", "stime");
|
"Feature", "Flags", "Count", "utime", "stime");
|
||||||
|
|||||||
12
features.def
12
features.def
@@ -1,19 +1,19 @@
|
|||||||
void|cpu|ulong(total,user,nice,sys,idle,frequency,xcpu_total[GLIBTOP_NCPU],xcpu_user[GLIBTOP_NCPU],xcpu_nice[GLIBTOP_NCPU],xcpu_sys[GLIBTOP_NCPU],xcpu_idle[GLIBTOP_NCPU],xcpu_flags)
|
void|cpu|ulong(total,user,nice,sys,idle,frequency,xcpu_total[4],xcpu_user[4],xcpu_nice[4],xcpu_sys[4],xcpu_idle[4])
|
||||||
void|mem|ulong(total,used,free,shared,buffer,cached,user,locked)
|
void|mem|ulong(total,used,free,shared,buffer,cached,user,locked)
|
||||||
void|swap|ulong(total,used,free,pagein,pageout)
|
void|swap|ulong(total,used,free,pagein,pageout)
|
||||||
void|uptime|double(uptime,idletime):ulong(boot_time)
|
void|uptime|double(uptime,idletime)
|
||||||
void|loadavg|double(loadavg[3]):ulong(nr_running,nr_tasks,last_pid)
|
void|loadavg|double(loadavg[3]):ulong(nr_running,nr_tasks,last_pid)
|
||||||
void|shm_limits|ulong(shmmax,shmmin,shmmni,shmseg,shmall)
|
void|shm_limits|ulong(shmmax,shmmin,shmmni,shmseg,shmall)
|
||||||
void|msg_limits|ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql)
|
void|msg_limits|ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql)
|
||||||
void|sem_limits|ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem)
|
void|sem_limits|ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem)
|
||||||
unsigned *|proclist|ulong(number,size,total)|long(which,arg)
|
unsigned *|proclist|ulong(number,size,total)|long(which,arg)
|
||||||
void|proc_state|str(cmd):unsigned(state):ulong(uid,gid,ruid,rgid,has_cpu,processor,last_processor)|pid_t(pid)
|
void|proc_state|str(cmd):char(state):ulong(uid,gid)|pid_t(pid)
|
||||||
void|proc_uid|long(uid,euid,gid,egid,suid,sgid,fsuid,fsgid,pid,ppid,pgrp,session,tty,tpgid,priority,nice,ngroups,groups[GLIBTOP_MAX_GROUPS])|pid_t(pid)
|
void|proc_uid|long(uid,euid,gid,egid,pid,ppid,pgrp,session,tty,tpgid,priority,nice)|pid_t(pid)
|
||||||
void|proc_mem|long(size,vsize,resident,share,rss,rss_rlim)|pid_t(pid)
|
void|proc_mem|long(size,vsize,resident,share,rss,rss_rlim)|pid_t(pid)
|
||||||
void|proc_time|long(start_time,rtime,utime,stime,cutime,cstime,timeout,it_real_value,frequency,xcpu_utime[GLIBTOP_NCPU],xcpu_stime[GLIBTOP_NCPU],xcpu_flags)|pid_t(pid)
|
void|proc_time|long(start_time,rtime,utime,stime,cutime,cstime,timeout,it_real_value,frequency,xcpu_utime[4],xcpu_stime[4])|pid_t(pid)
|
||||||
void|proc_signal|ulong(signal[2],blocked[2],sigignore[2],sigcatch[2])|pid_t(pid)
|
void|proc_signal|ulong(signal[2],blocked[2],sigignore[2],sigcatch[2])|pid_t(pid)
|
||||||
void|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,nwchan):str(wchan)|pid_t(pid)
|
void|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,nwchan):str(wchan)|pid_t(pid)
|
||||||
void|proc_segment|ulong(text_rss,shlib_rss,data_rss,stack_rss,dirty_size,start_code,end_code,start_data,end_data,start_brk,end_brk,start_stack,start_mmap,arg_start,arg_end,env_start,env_end)|pid_t(pid)
|
void|proc_segment|ulong(text_rss,shlib_rss,data_rss,stack_rss,dirty_size,start_code,end_code,start_stack)|pid_t(pid)
|
||||||
char *|proc_args|ulong(size)|pid_t(pid):unsigned(max_len)
|
char *|proc_args|ulong(size)|pid_t(pid):unsigned(max_len)
|
||||||
glibtop_map_entry *|proc_map|ulong(number,size,total)|pid_t(pid)
|
glibtop_map_entry *|proc_map|ulong(number,size,total)|pid_t(pid)
|
||||||
glibtop_mountentry *|@mountlist|ulong(number,size,total)|int(all_fs)
|
glibtop_mountentry *|@mountlist|ulong(number,size,total)|int(all_fs)
|
||||||
|
|||||||
10
glibtop.h
10
glibtop.h
@@ -24,12 +24,7 @@
|
|||||||
#ifndef __GLIBTOP_H__
|
#ifndef __GLIBTOP_H__
|
||||||
#define __GLIBTOP_H__
|
#define __GLIBTOP_H__
|
||||||
|
|
||||||
#ifndef _IN_LIBGTOP
|
|
||||||
#include <glibtop-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
#include <glibtop/limits.h>
|
|
||||||
|
|
||||||
#include <glibtop_server.h>
|
#include <glibtop_server.h>
|
||||||
#include <glibtop/types.h>
|
#include <glibtop/types.h>
|
||||||
@@ -38,6 +33,10 @@
|
|||||||
#include <glibtop_machine.h>
|
#include <glibtop_machine.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLIBTOP_MOUNTENTRY_LEN
|
||||||
|
#define GLIBTOP_MOUNTENTRY_LEN 79
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _glibtop glibtop;
|
typedef struct _glibtop glibtop;
|
||||||
|
|
||||||
#include <glibtop/sysdeps.h>
|
#include <glibtop/sysdeps.h>
|
||||||
@@ -64,7 +63,6 @@ struct _glibtop
|
|||||||
unsigned long server_port; /* Port on which daemon is listening */
|
unsigned long server_port; /* Port on which daemon is listening */
|
||||||
glibtop_sysdeps sysdeps; /* Detailed feature list */
|
glibtop_sysdeps sysdeps; /* Detailed feature list */
|
||||||
glibtop_sysdeps required; /* Required feature list */
|
glibtop_sysdeps required; /* Required feature list */
|
||||||
glibtop_sysdeps wanted; /* We only want this features */
|
|
||||||
pid_t pid; /* PID of the server */
|
pid_t pid; /* PID of the server */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
glibtopdir = $(includedir)/glibtop
|
glibtopdir = $(includedir)/libgtop-2.0/glibtop
|
||||||
|
|
||||||
glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
|
glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
|
||||||
sem_limits.h uptime.h command.h mem.h proclist.h \
|
sem_limits.h uptime.h command.h mem.h proclist.h \
|
||||||
@@ -7,5 +7,4 @@ glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
|
|||||||
procsegment.h read.h sysdeps.h xmalloc.h global.h \
|
procsegment.h read.h sysdeps.h xmalloc.h global.h \
|
||||||
procsignal.h read_data.h union.h types.h gnuserv.h \
|
procsignal.h read_data.h union.h types.h gnuserv.h \
|
||||||
parameter.h mountlist.h fsusage.h procmap.h signal.h \
|
parameter.h mountlist.h fsusage.h procmap.h signal.h \
|
||||||
inodedb.h sysinfo.h ppp.h procargs.h netload.h \
|
inodedb.h sysinfo.h ppp.h procargs.h netload.h
|
||||||
limits.h
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -43,9 +41,11 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_XCPU_NICE 8
|
#define GLIBTOP_XCPU_NICE 8
|
||||||
#define GLIBTOP_XCPU_SYS 9
|
#define GLIBTOP_XCPU_SYS 9
|
||||||
#define GLIBTOP_XCPU_IDLE 10
|
#define GLIBTOP_XCPU_IDLE 10
|
||||||
#define GLIBTOP_XCPU_FLAGS 11
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_CPU 12
|
#define GLIBTOP_MAX_CPU 11
|
||||||
|
|
||||||
|
/* Nobody should really be using more than 4 processors. */
|
||||||
|
#define GLIBTOP_NCPU 4
|
||||||
|
|
||||||
typedef struct _glibtop_cpu glibtop_cpu;
|
typedef struct _glibtop_cpu glibtop_cpu;
|
||||||
|
|
||||||
@@ -62,8 +62,7 @@ struct _glibtop_cpu
|
|||||||
xcpu_user [GLIBTOP_NCPU], /* GLIBTOP_XCPU_USER */
|
xcpu_user [GLIBTOP_NCPU], /* GLIBTOP_XCPU_USER */
|
||||||
xcpu_nice [GLIBTOP_NCPU], /* GLIBTOP_XCPU_NICE */
|
xcpu_nice [GLIBTOP_NCPU], /* GLIBTOP_XCPU_NICE */
|
||||||
xcpu_sys [GLIBTOP_NCPU], /* GLIBTOP_XCPU_SYS */
|
xcpu_sys [GLIBTOP_NCPU], /* GLIBTOP_XCPU_SYS */
|
||||||
xcpu_idle [GLIBTOP_NCPU], /* GLIBTOP_XCPU_IDLE */
|
xcpu_idle [GLIBTOP_NCPU]; /* GLIBTOP_XCPU_IDLE */
|
||||||
xcpu_flags; /* GLIBTOP_XCPU_FLAGS */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_cpu(cpu) glibtop_get_cpu_l(glibtop_global_server, cpu)
|
#define glibtop_get_cpu(cpu) glibtop_get_cpu_l(glibtop_global_server, cpu)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -30,13 +28,22 @@
|
|||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
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_error_vr (glibtop *server, char *format, va_list args);
|
||||||
void glibtop_warn_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_error_io_vr (glibtop *server, char *format, int, va_list args);
|
||||||
void glibtop_warn_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, ...)
|
glibtop_error_r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -46,7 +53,7 @@ glibtop_error_r (glibtop *server, char *format, ...)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void G_GNUC_UNUSED
|
||||||
glibtop_warn_r (glibtop *server, char *format, ...)
|
glibtop_warn_r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -56,7 +63,7 @@ glibtop_warn_r (glibtop *server, char *format, ...)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void G_GNUC_UNUSED
|
||||||
glibtop_error_io_r (glibtop *server, char *format, ...)
|
glibtop_error_io_r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -66,7 +73,7 @@ glibtop_error_io_r (glibtop *server, char *format, ...)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void G_GNUC_UNUSED
|
||||||
glibtop_warn_io_r (glibtop *server, char *format, ...)
|
glibtop_warn_io_r (glibtop *server, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
This file is part of LibGTop 1.0.
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
This file is part of LibGTop 1.0.
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
This file is part of LibGTop 1.0.
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -43,17 +41,6 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
|
|
||||||
#define GLIBTOP_MAX_PROC_KERNEL 9
|
#define GLIBTOP_MAX_PROC_KERNEL 9
|
||||||
|
|
||||||
/* Constants for the `k_flags' field. */
|
|
||||||
#define GLIBTOP_KFLAGS_STARTING 1 /* being created */
|
|
||||||
#define GLIBTOP_KFLAGS_EXITING 2 /* getting shut down */
|
|
||||||
#define GLIBTOP_KFLAGS_PTRACED 4 /* set if ptrace (0) has
|
|
||||||
been called */
|
|
||||||
#define GLIBTOP_KFLAGS_TRACESYS 8 /* tracing system calls */
|
|
||||||
#define GLIBTOP_KFLAGS_FORKNOEXEC 16 /* forked but didn't exec */
|
|
||||||
#define GLIBTOP_KFLAGS_SUPERPRIV 32 /* used super-user privileges */
|
|
||||||
#define GLIBTOP_KFLAGS_DUMPEDCORE 64 /* dumped core */
|
|
||||||
#define GLIBTOP_KFLAGS_SIGNALED 128 /* killed by a signal */
|
|
||||||
|
|
||||||
typedef struct _glibtop_proc_kernel glibtop_proc_kernel;
|
typedef struct _glibtop_proc_kernel glibtop_proc_kernel;
|
||||||
|
|
||||||
/* Kernel stuff */
|
/* Kernel stuff */
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -38,18 +36,9 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_PROC_SEGMENT_DIRTY_SIZE 4
|
#define GLIBTOP_PROC_SEGMENT_DIRTY_SIZE 4
|
||||||
#define GLIBTOP_PROC_SEGMENT_START_CODE 5
|
#define GLIBTOP_PROC_SEGMENT_START_CODE 5
|
||||||
#define GLIBTOP_PROC_SEGMENT_END_CODE 6
|
#define GLIBTOP_PROC_SEGMENT_END_CODE 6
|
||||||
#define GLIBTOP_PROC_SEGMENT_START_DATA 7
|
#define GLIBTOP_PROC_SEGMENT_START_STACK 7
|
||||||
#define GLIBTOP_PROC_SEGMENT_END_DATA 8
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_START_BRK 9
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_END_BRK 10
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_START_STACK 11
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_START_MMAP 12
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_ARG_START 13
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_ARG_END 14
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_ENV_START 15
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_ENV_END 16
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_PROC_SEGMENT 17
|
#define GLIBTOP_MAX_PROC_SEGMENT 8
|
||||||
|
|
||||||
typedef struct _glibtop_proc_segment glibtop_proc_segment;
|
typedef struct _glibtop_proc_segment glibtop_proc_segment;
|
||||||
|
|
||||||
@@ -63,18 +52,10 @@ struct _glibtop_proc_segment
|
|||||||
data_rss, /* data resident set size */
|
data_rss, /* data resident set size */
|
||||||
stack_rss, /* stack resident set size */
|
stack_rss, /* stack resident set size */
|
||||||
dirty_size, /* size of dirty pages */
|
dirty_size, /* size of dirty pages */
|
||||||
start_code, /* address of beginning of code segment */
|
start_code,
|
||||||
|
/* address of beginning of code segment */
|
||||||
end_code, /* address of end of code segment */
|
end_code, /* address of end of code segment */
|
||||||
start_data, /* address of beginning of data segment */
|
start_stack; /* address of the bottom of stack segment */
|
||||||
end_data, /* address of end of data segment */
|
|
||||||
start_brk,
|
|
||||||
end_brk,
|
|
||||||
start_stack, /* address of the bottom of stack segment */
|
|
||||||
start_mmap,
|
|
||||||
arg_start,
|
|
||||||
arg_end,
|
|
||||||
env_start,
|
|
||||||
env_end;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment_l(glibtop_global_server, p1, p2)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -35,21 +33,8 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_PROC_STATE_STATE 1
|
#define GLIBTOP_PROC_STATE_STATE 1
|
||||||
#define GLIBTOP_PROC_STATE_UID 2
|
#define GLIBTOP_PROC_STATE_UID 2
|
||||||
#define GLIBTOP_PROC_STATE_GID 3
|
#define GLIBTOP_PROC_STATE_GID 3
|
||||||
#define GLIBTOP_PROC_STATE_RUID 4
|
|
||||||
#define GLIBTOP_PROC_STATE_RGID 5
|
|
||||||
#define GLIBTOP_PROC_STATE_HAS_CPU 6
|
|
||||||
#define GLIBTOP_PROC_STATE_PROCESSOR 7
|
|
||||||
#define GLIBTOP_PROC_STATE_LAST_PROCESSOR 8
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_PROC_STATE 9
|
#define GLIBTOP_MAX_PROC_STATE 4
|
||||||
|
|
||||||
/* Constants for the `state' field. */
|
|
||||||
#define GLIBTOP_PROCESS_RUNNING 1
|
|
||||||
#define GLIBTOP_PROCESS_INTERRUPTIBLE 2
|
|
||||||
#define GLIBTOP_PROCESS_UNINTERRUPTIBLE 4
|
|
||||||
#define GLIBTOP_PROCESS_ZOMBIE 8
|
|
||||||
#define GLIBTOP_PROCESS_STOPPED 16
|
|
||||||
#define GLIBTOP_PROCESS_SWAPPING 32
|
|
||||||
|
|
||||||
typedef struct _glibtop_proc_state glibtop_proc_state;
|
typedef struct _glibtop_proc_state glibtop_proc_state;
|
||||||
|
|
||||||
@@ -58,23 +43,17 @@ typedef struct _glibtop_proc_state glibtop_proc_state;
|
|||||||
struct _glibtop_proc_state
|
struct _glibtop_proc_state
|
||||||
{
|
{
|
||||||
u_int64_t flags;
|
u_int64_t flags;
|
||||||
char cmd[40]; /* basename of executable file in
|
char cmd[40], /* basename of executable file in
|
||||||
* call to exec(2) */
|
* call to exec(2) */
|
||||||
unsigned state; /* process state */
|
state; /* single-char code for process state
|
||||||
|
* (S=sleeping) */
|
||||||
/* NOTE: when porting the library, TRY HARD to implement the
|
/* NOTE: when porting the library, TRY HARD to implement the
|
||||||
* following two fields. */
|
* following two fields. */
|
||||||
/* IMPORTANT NOTICE: For security reasons, it is extremely important
|
/* IMPORTANT NOTICE: For security reasons, it is extremely important
|
||||||
* only to set the flags value for those two
|
* only to set the flags value for those two
|
||||||
* fields if their values are corrent ! */
|
* fields if their values are corrent ! */
|
||||||
int uid, /* effective UID of process */
|
int uid, /* UID of process */
|
||||||
gid, /* effective GID of process */
|
gid; /* GID of process */
|
||||||
ruid, /* real UID of process */
|
|
||||||
rgid; /* real GID of process */
|
|
||||||
/* SMP values. */
|
|
||||||
int has_cpu,
|
|
||||||
processor,
|
|
||||||
last_processor;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state_l(glibtop_global_server, p1, p2)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -43,9 +41,8 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_PROC_TIME_FREQUENCY 8
|
#define GLIBTOP_PROC_TIME_FREQUENCY 8
|
||||||
#define GLIBTOP_PROC_TIME_XCPU_UTIME 9
|
#define GLIBTOP_PROC_TIME_XCPU_UTIME 9
|
||||||
#define GLIBTOP_PROC_TIME_XCPU_STIME 10
|
#define GLIBTOP_PROC_TIME_XCPU_STIME 10
|
||||||
#define GLIBTOP_PROC_TIME_XCPU_FLAGS 11
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_PROC_TIME 12
|
#define GLIBTOP_MAX_PROC_TIME 11
|
||||||
|
|
||||||
typedef struct _glibtop_proc_time glibtop_proc_time;
|
typedef struct _glibtop_proc_time glibtop_proc_time;
|
||||||
|
|
||||||
@@ -70,8 +67,7 @@ struct _glibtop_proc_time
|
|||||||
* due to an interval timer. */
|
* due to an interval timer. */
|
||||||
frequency, /* Tick frequency. */
|
frequency, /* Tick frequency. */
|
||||||
xcpu_utime [GLIBTOP_NCPU], /* utime and stime for all CPUs on */
|
xcpu_utime [GLIBTOP_NCPU], /* utime and stime for all CPUs on */
|
||||||
xcpu_stime [GLIBTOP_NCPU], /* SMP machines. */
|
xcpu_stime [GLIBTOP_NCPU]; /* SMP machines. */
|
||||||
xcpu_flags;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time_l(glibtop_global_server, p1, p2)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -35,22 +33,16 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_PROC_UID_EUID 1
|
#define GLIBTOP_PROC_UID_EUID 1
|
||||||
#define GLIBTOP_PROC_UID_GID 2
|
#define GLIBTOP_PROC_UID_GID 2
|
||||||
#define GLIBTOP_PROC_UID_EGID 3
|
#define GLIBTOP_PROC_UID_EGID 3
|
||||||
#define GLIBTOP_PROC_UID_SUID 4
|
#define GLIBTOP_PROC_UID_PID 4
|
||||||
#define GLIBTOP_PROC_UID_SGID 5
|
#define GLIBTOP_PROC_UID_PPID 5
|
||||||
#define GLIBTOP_PROC_UID_FSUID 6
|
#define GLIBTOP_PROC_UID_PGRP 6
|
||||||
#define GLIBTOP_PROC_UID_FSGID 7
|
#define GLIBTOP_PROC_UID_SESSION 7
|
||||||
#define GLIBTOP_PROC_UID_PID 8
|
#define GLIBTOP_PROC_UID_TTY 8
|
||||||
#define GLIBTOP_PROC_UID_PPID 9
|
#define GLIBTOP_PROC_UID_TPGID 9
|
||||||
#define GLIBTOP_PROC_UID_PGRP 10
|
#define GLIBTOP_PROC_UID_PRIORITY 10
|
||||||
#define GLIBTOP_PROC_UID_SESSION 11
|
#define GLIBTOP_PROC_UID_NICE 11
|
||||||
#define GLIBTOP_PROC_UID_TTY 12
|
|
||||||
#define GLIBTOP_PROC_UID_TPGID 13
|
|
||||||
#define GLIBTOP_PROC_UID_PRIORITY 14
|
|
||||||
#define GLIBTOP_PROC_UID_NICE 15
|
|
||||||
#define GLIBTOP_PROC_UID_NGROUPS 16
|
|
||||||
#define GLIBTOP_PROC_UID_GROUPS 17
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_PROC_UID 18
|
#define GLIBTOP_MAX_PROC_UID 12
|
||||||
|
|
||||||
typedef struct _glibtop_proc_uid glibtop_proc_uid;
|
typedef struct _glibtop_proc_uid glibtop_proc_uid;
|
||||||
|
|
||||||
@@ -63,10 +55,6 @@ struct _glibtop_proc_uid
|
|||||||
euid, /* effective user id */
|
euid, /* effective user id */
|
||||||
gid, /* group id */
|
gid, /* group id */
|
||||||
egid, /* effective group id */
|
egid, /* effective group id */
|
||||||
suid, /* saved user id */
|
|
||||||
sgid, /* saved group id */
|
|
||||||
fsuid, /* file system user id */
|
|
||||||
fsgid, /* file system group id */
|
|
||||||
pid, /* process id */
|
pid, /* process id */
|
||||||
ppid, /* pid of parent process */
|
ppid, /* pid of parent process */
|
||||||
pgrp, /* process group id */
|
pgrp, /* process group id */
|
||||||
@@ -74,9 +62,7 @@ struct _glibtop_proc_uid
|
|||||||
tty, /* full device number of controlling terminal */
|
tty, /* full device number of controlling terminal */
|
||||||
tpgid, /* terminal process group id */
|
tpgid, /* terminal process group id */
|
||||||
priority, /* kernel scheduling priority */
|
priority, /* kernel scheduling priority */
|
||||||
nice, /* standard unix nice level of process */
|
nice; /* standard unix nice level of process */
|
||||||
ngroups, /* number of additional process groups */
|
|
||||||
groups [GLIBTOP_MAX_GROUPS]; /* additional prcess groups */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid_l(glibtop_global_server, p1, p2)
|
#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid_l(glibtop_global_server, p1, p2)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -30,30 +28,31 @@
|
|||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
BEGIN_LIBGTOP_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_SYSDEPS_CPU 0
|
#define GLIBTOP_SYSDEPS_FEATURES 0
|
||||||
#define GLIBTOP_SYSDEPS_MEM 1
|
#define GLIBTOP_SYSDEPS_CPU 1
|
||||||
#define GLIBTOP_SYSDEPS_SWAP 2
|
#define GLIBTOP_SYSDEPS_MEM 2
|
||||||
#define GLIBTOP_SYSDEPS_UPTIME 3
|
#define GLIBTOP_SYSDEPS_SWAP 3
|
||||||
#define GLIBTOP_SYSDEPS_LOADAVG 4
|
#define GLIBTOP_SYSDEPS_UPTIME 4
|
||||||
#define GLIBTOP_SYSDEPS_SHM_LIMITS 5
|
#define GLIBTOP_SYSDEPS_LOADAVG 5
|
||||||
#define GLIBTOP_SYSDEPS_MSG_LIMITS 6
|
#define GLIBTOP_SYSDEPS_SHM_LIMITS 6
|
||||||
#define GLIBTOP_SYSDEPS_SEM_LIMITS 7
|
#define GLIBTOP_SYSDEPS_MSG_LIMITS 7
|
||||||
#define GLIBTOP_SYSDEPS_PROCLIST 8
|
#define GLIBTOP_SYSDEPS_SEM_LIMITS 8
|
||||||
#define GLIBTOP_SYSDEPS_PROC_STATE 9
|
#define GLIBTOP_SYSDEPS_PROCLIST 9
|
||||||
#define GLIBTOP_SYSDEPS_PROC_UID 10
|
#define GLIBTOP_SYSDEPS_PROC_STATE 10
|
||||||
#define GLIBTOP_SYSDEPS_PROC_MEM 11
|
#define GLIBTOP_SYSDEPS_PROC_UID 11
|
||||||
#define GLIBTOP_SYSDEPS_PROC_TIME 12
|
#define GLIBTOP_SYSDEPS_PROC_MEM 12
|
||||||
#define GLIBTOP_SYSDEPS_PROC_SIGNAL 13
|
#define GLIBTOP_SYSDEPS_PROC_TIME 13
|
||||||
#define GLIBTOP_SYSDEPS_PROC_KERNEL 14
|
#define GLIBTOP_SYSDEPS_PROC_SIGNAL 14
|
||||||
#define GLIBTOP_SYSDEPS_PROC_SEGMENT 15
|
#define GLIBTOP_SYSDEPS_PROC_KERNEL 15
|
||||||
#define GLIBTOP_SYSDEPS_PROC_ARGS 16
|
#define GLIBTOP_SYSDEPS_PROC_SEGMENT 16
|
||||||
#define GLIBTOP_SYSDEPS_PROC_MAP 17
|
#define GLIBTOP_SYSDEPS_PROC_ARGS 17
|
||||||
#define GLIBTOP_SYSDEPS_MOUNTLIST 18
|
#define GLIBTOP_SYSDEPS_PROC_MAP 18
|
||||||
#define GLIBTOP_SYSDEPS_FSUSAGE 19
|
#define GLIBTOP_SYSDEPS_MOUNTLIST 19
|
||||||
#define GLIBTOP_SYSDEPS_NETLOAD 20
|
#define GLIBTOP_SYSDEPS_FSUSAGE 20
|
||||||
#define GLIBTOP_SYSDEPS_PPP 21
|
#define GLIBTOP_SYSDEPS_NETLOAD 21
|
||||||
|
#define GLIBTOP_SYSDEPS_PPP 22
|
||||||
|
|
||||||
#define GLIBTOP_MAX_SYSDEPS 24
|
#define GLIBTOP_MAX_SYSDEPS 23
|
||||||
|
|
||||||
#define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1)
|
#define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1)
|
||||||
|
|
||||||
@@ -67,7 +66,6 @@ struct _glibtop_sysdeps
|
|||||||
{
|
{
|
||||||
u_int64_t flags,
|
u_int64_t flags,
|
||||||
features, /* server features */
|
features, /* server features */
|
||||||
pointer_size, /* sizeof(void*)*8 */
|
|
||||||
cpu, /* glibtop_cpu */
|
cpu, /* glibtop_cpu */
|
||||||
mem, /* glibtop_mem */
|
mem, /* glibtop_mem */
|
||||||
swap, /* glibtop_swap */
|
swap, /* glibtop_swap */
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -32,9 +30,8 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_TYPE_ULONG 2
|
#define GLIBTOP_TYPE_ULONG 2
|
||||||
#define GLIBTOP_TYPE_DOUBLE 3
|
#define GLIBTOP_TYPE_DOUBLE 3
|
||||||
#define GLIBTOP_TYPE_INT 4
|
#define GLIBTOP_TYPE_INT 4
|
||||||
#define GLIBTOP_TYPE_UNSIGNED 5
|
#define GLIBTOP_TYPE_CHAR 5
|
||||||
#define GLIBTOP_TYPE_CHAR 6
|
#define GLIBTOP_TYPE_STRING 6
|
||||||
#define GLIBTOP_TYPE_STRING 7
|
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
END_LIBGTOP_DECLS
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
@@ -33,9 +31,8 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
|
|
||||||
#define GLIBTOP_UPTIME_UPTIME 0
|
#define GLIBTOP_UPTIME_UPTIME 0
|
||||||
#define GLIBTOP_UPTIME_IDLETIME 1
|
#define GLIBTOP_UPTIME_IDLETIME 1
|
||||||
#define GLIBTOP_UPTIME_BOOT_TIME 2
|
|
||||||
|
|
||||||
#define GLIBTOP_MAX_UPTIME 3
|
#define GLIBTOP_MAX_UPTIME 2
|
||||||
|
|
||||||
typedef struct _glibtop_uptime glibtop_uptime;
|
typedef struct _glibtop_uptime glibtop_uptime;
|
||||||
|
|
||||||
@@ -44,7 +41,6 @@ struct _glibtop_uptime
|
|||||||
u_int64_t flags;
|
u_int64_t flags;
|
||||||
double uptime, /* GLIBTOP_UPTIME_UPTIME */
|
double uptime, /* GLIBTOP_UPTIME_UPTIME */
|
||||||
idletime; /* GLIBTOP_UPTIME_IDLETIME */
|
idletime; /* GLIBTOP_UPTIME_IDLETIME */
|
||||||
u_int64_t boot_time; /* GLIBTOP_UPTIME_BOOT_TIME */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_uptime(uptime) glibtop_get_uptime_l(glibtop_global_server, uptime)
|
#define glibtop_get_uptime(uptime) glibtop_get_uptime_l(glibtop_global_server, uptime)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
This file is part of LibGTop 1.0.
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
|||||||
14
kernel/ChangeLog
Normal file
14
kernel/ChangeLog
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
1998-07-21 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* table20: New directory for 2.0.xx kernels.
|
||||||
|
|
||||||
|
* table21: New directory for 2.1.xx kernels.
|
||||||
|
|
||||||
|
* *: Moved into `table20' and `table21'.
|
||||||
|
|
||||||
|
1998-06-14 Martin Baulig <baulig@taurus.uni-trier.de>
|
||||||
|
|
||||||
|
* README: Added README.
|
||||||
|
|
||||||
|
* kernel.patch: Patch for the Linux kernel to add the
|
||||||
|
new system call.
|
||||||
188
kernel/table.h
Normal file
188
kernel/table.h
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
#ifndef _LINUX_TABLE_H
|
||||||
|
#define _LINUX_TABLE_H
|
||||||
|
|
||||||
|
#ifdef _KERNEL
|
||||||
|
#include <linux/types.h>
|
||||||
|
#else
|
||||||
|
#define NR_TASKS 512
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TABLE_KERN_PROC_ALL 0 /* all processes */
|
||||||
|
#define TABLE_KERN_PROC_PID 1
|
||||||
|
#define TABLE_KERN_PROC_PGRP 2
|
||||||
|
#define TABLE_KERN_PROC_SESSION 3
|
||||||
|
#define TABLE_KERN_PROC_TTY 4
|
||||||
|
#define TABLE_KERN_PROC_UID 5
|
||||||
|
#define TABLE_KERN_PROC_RUID 6
|
||||||
|
|
||||||
|
#define TABLE_KERN_PROC_MASK 15
|
||||||
|
|
||||||
|
#define TABLE_EXCLUDE_IDLE 0x1000
|
||||||
|
#define TABLE_EXCLUDE_SYSTEM 0x2000
|
||||||
|
#define TABLE_EXCLUDE_NOTTY 0x4000
|
||||||
|
|
||||||
|
#define TABLE_VERSION 0
|
||||||
|
#define TABLE_CPU 1
|
||||||
|
#define TABLE_MEM 2
|
||||||
|
#define TABLE_SWAP 3
|
||||||
|
#define TABLE_LOADAVG 4
|
||||||
|
#define TABLE_UPTIME 5
|
||||||
|
#define TABLE_PROCLIST 6
|
||||||
|
#define TABLE_PROC_UID 7
|
||||||
|
#define TABLE_PROC_MEM 8
|
||||||
|
#define TABLE_PROC_SEGMENT 9
|
||||||
|
#define TABLE_PROC_TIME 10
|
||||||
|
#define TABLE_PROC_STATE 11
|
||||||
|
#define TABLE_PROC_SIGNAL 12
|
||||||
|
#define TABLE_PROC_KERNEL 13
|
||||||
|
|
||||||
|
/* CPU Usage (in jiffies = 1/100th seconds) */
|
||||||
|
|
||||||
|
struct table_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 */
|
||||||
|
unsigned long frequency; /* Tick frequency */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Memory Usage (in bytes) */
|
||||||
|
|
||||||
|
struct table_mem
|
||||||
|
{
|
||||||
|
unsigned long total; /* Total physical memory */
|
||||||
|
unsigned long used; /* Used memory size */
|
||||||
|
unsigned long free; /* Free memory size */
|
||||||
|
unsigned long shared; /* Shared memory size */
|
||||||
|
unsigned long buffer; /* Size of buffers */
|
||||||
|
unsigned long cached; /* Size of cached memory */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Swap Space (in bytes) */
|
||||||
|
|
||||||
|
struct table_swap
|
||||||
|
{
|
||||||
|
unsigned long total; /* Total swap space */
|
||||||
|
unsigned long used; /* Used swap space */
|
||||||
|
unsigned long free; /* Free swap space */
|
||||||
|
unsigned long pagein; /* Total # of pages swapped in */
|
||||||
|
unsigned long pageout; /* Total # of pages swapped out */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Load average */
|
||||||
|
|
||||||
|
struct table_loadavg
|
||||||
|
{
|
||||||
|
double loadavg [3];
|
||||||
|
unsigned nr_running;
|
||||||
|
unsigned nr_tasks;
|
||||||
|
unsigned last_pid;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Uptime */
|
||||||
|
|
||||||
|
struct table_uptime
|
||||||
|
{
|
||||||
|
unsigned long uptime;
|
||||||
|
unsigned long idle;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Process list. */
|
||||||
|
|
||||||
|
struct proclist_args
|
||||||
|
{
|
||||||
|
int which, arg;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct table_proclist
|
||||||
|
{
|
||||||
|
int nr_running, nr_tasks, last_pid;
|
||||||
|
unsigned pids [NR_TASKS];
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Information about processes. */
|
||||||
|
|
||||||
|
struct table_proc_state
|
||||||
|
{
|
||||||
|
long state;
|
||||||
|
unsigned long flags;
|
||||||
|
char comm[16];
|
||||||
|
int uid, gid;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct table_proc_uid
|
||||||
|
{
|
||||||
|
int uid, euid, suid, fsuid;
|
||||||
|
int gid, egid, sgid, fsgid;
|
||||||
|
int pid, pgrp, ppid;
|
||||||
|
int session;
|
||||||
|
unsigned int tty;
|
||||||
|
int tpgid;
|
||||||
|
long priority;
|
||||||
|
long counter;
|
||||||
|
long def_priority;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct table_proc_mem
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct table_proc_segment
|
||||||
|
{
|
||||||
|
unsigned long vsize;
|
||||||
|
unsigned long size, resident, shared;
|
||||||
|
unsigned long trs, lrs, drs, srs, dt;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct table_proc_time
|
||||||
|
{
|
||||||
|
long utime, stime, cutime, cstime, start_time;
|
||||||
|
unsigned long timeout, 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct table_proc_signal
|
||||||
|
{
|
||||||
|
unsigned long long signal,
|
||||||
|
blocked, /* bitmap of masked signals */
|
||||||
|
ignored, /* mask of ignored signals */
|
||||||
|
caught; /* mask of caught signals */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct table_proc_kernel
|
||||||
|
{
|
||||||
|
unsigned long keip, kesp, wchan;
|
||||||
|
unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
|
||||||
|
unsigned long nswap, cnswap;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Union */
|
||||||
|
|
||||||
|
union table
|
||||||
|
{
|
||||||
|
struct table_cpu cpu;
|
||||||
|
struct table_mem mem;
|
||||||
|
struct table_swap swap;
|
||||||
|
struct table_loadavg loadavg;
|
||||||
|
struct table_uptime uptime;
|
||||||
|
struct table_proclist proclist;
|
||||||
|
struct table_proc_uid proc_uid;
|
||||||
|
struct table_proc_mem proc_mem;
|
||||||
|
struct table_proc_segment proc_segment;
|
||||||
|
struct table_proc_time proc_time;
|
||||||
|
struct table_proc_state proc_state;
|
||||||
|
struct table_proc_signal proc_signal;
|
||||||
|
struct table_proc_kernel proc_kernel;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _LINUX_IPC_H */
|
||||||
|
|
||||||
|
|
||||||
13
kernel/table20/Makefile
Normal file
13
kernel/table20/Makefile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#
|
||||||
|
# Makefile for the linux system information tables.
|
||||||
|
#
|
||||||
|
# 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 := table.o
|
||||||
|
O_OBJS := main.o
|
||||||
|
|
||||||
|
include $(TOPDIR)/Rules.make
|
||||||
21
kernel/table20/README
Normal file
21
kernel/table20/README
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
This is a new system call `table ()' for the Linux table. It is faster
|
||||||
|
than reading from /proc and can be used to fetch all information required
|
||||||
|
for libgtop until whe have some other function (extended sysctl, ...) in
|
||||||
|
standard kernels.
|
||||||
|
|
||||||
|
I didn't want to change sysctl or some other function myself cause this may
|
||||||
|
cause other applications relying upon those function to fail. This is
|
||||||
|
something for the ``real'' kernel gurus ...
|
||||||
|
|
||||||
|
To use this new system call for libgtop, do the following:
|
||||||
|
|
||||||
|
* Copy this directory to /usr/src/linux/table
|
||||||
|
* Make /usr/src/linux/include/linux/table.h symlink to /usr/src/linux/table/table.h
|
||||||
|
* Apply the patch `kernel.patch' to the kernel, compile, install and reboot
|
||||||
|
* Recompile libgtop (remove `config.cache' and run the `autogen.sh' again).
|
||||||
|
|
||||||
|
If you want to change and/or add something - feel free to do so !
|
||||||
|
|
||||||
|
Have fun,
|
||||||
|
|
||||||
|
Martin
|
||||||
706
kernel/table20/entry-i386.S
Normal file
706
kernel/table20/entry-i386.S
Normal file
@@ -0,0 +1,706 @@
|
|||||||
|
/*
|
||||||
|
* linux/arch/i386/entry.S
|
||||||
|
*
|
||||||
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* entry.S contains the system-call and fault low-level handling routines.
|
||||||
|
* This also contains the timer-interrupt handler, as well as all interrupts
|
||||||
|
* and faults that can result in a task-switch.
|
||||||
|
*
|
||||||
|
* NOTE: This code handles signal-recognition, which happens every time
|
||||||
|
* after a timer-interrupt and after each system call.
|
||||||
|
*
|
||||||
|
* I changed all the .align's to 4 (16 byte alignment), as that's faster
|
||||||
|
* on a 486.
|
||||||
|
*
|
||||||
|
* Stack layout in 'ret_from_system_call':
|
||||||
|
* ptrace needs to have all regs on the stack.
|
||||||
|
* if the order here is changed, it needs to be
|
||||||
|
* updated in fork.c:copy_process, signal.c:do_signal,
|
||||||
|
* ptrace.c and ptrace.h
|
||||||
|
*
|
||||||
|
* 0(%esp) - %ebx
|
||||||
|
* 4(%esp) - %ecx
|
||||||
|
* 8(%esp) - %edx
|
||||||
|
* C(%esp) - %esi
|
||||||
|
* 10(%esp) - %edi
|
||||||
|
* 14(%esp) - %ebp
|
||||||
|
* 18(%esp) - %eax
|
||||||
|
* 1C(%esp) - %ds
|
||||||
|
* 20(%esp) - %es
|
||||||
|
* 24(%esp) - %fs
|
||||||
|
* 28(%esp) - %gs
|
||||||
|
* 2C(%esp) - orig_eax
|
||||||
|
* 30(%esp) - %eip
|
||||||
|
* 34(%esp) - %cs
|
||||||
|
* 38(%esp) - %eflags
|
||||||
|
* 3C(%esp) - %oldesp
|
||||||
|
* 40(%esp) - %oldss
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/sys.h>
|
||||||
|
#include <linux/linkage.h>
|
||||||
|
#include <asm/segment.h>
|
||||||
|
#define ASSEMBLY
|
||||||
|
#include <asm/smp.h>
|
||||||
|
|
||||||
|
EBX = 0x00
|
||||||
|
ECX = 0x04
|
||||||
|
EDX = 0x08
|
||||||
|
ESI = 0x0C
|
||||||
|
EDI = 0x10
|
||||||
|
EBP = 0x14
|
||||||
|
EAX = 0x18
|
||||||
|
DS = 0x1C
|
||||||
|
ES = 0x20
|
||||||
|
FS = 0x24
|
||||||
|
GS = 0x28
|
||||||
|
ORIG_EAX = 0x2C
|
||||||
|
EIP = 0x30
|
||||||
|
CS = 0x34
|
||||||
|
EFLAGS = 0x38
|
||||||
|
OLDESP = 0x3C
|
||||||
|
OLDSS = 0x40
|
||||||
|
|
||||||
|
CF_MASK = 0x00000001
|
||||||
|
IF_MASK = 0x00000200
|
||||||
|
NT_MASK = 0x00004000
|
||||||
|
VM_MASK = 0x00020000
|
||||||
|
|
||||||
|
/*
|
||||||
|
* these are offsets into the task-struct.
|
||||||
|
*/
|
||||||
|
state = 0
|
||||||
|
counter = 4
|
||||||
|
priority = 8
|
||||||
|
signal = 12
|
||||||
|
blocked = 16
|
||||||
|
flags = 20
|
||||||
|
dbgreg6 = 52
|
||||||
|
dbgreg7 = 56
|
||||||
|
exec_domain = 60
|
||||||
|
|
||||||
|
ENOSYS = 38
|
||||||
|
|
||||||
|
#define SAVE_ALL \
|
||||||
|
cld; \
|
||||||
|
push %gs; \
|
||||||
|
push %fs; \
|
||||||
|
push %es; \
|
||||||
|
push %ds; \
|
||||||
|
pushl %eax; \
|
||||||
|
pushl %ebp; \
|
||||||
|
pushl %edi; \
|
||||||
|
pushl %esi; \
|
||||||
|
pushl %edx; \
|
||||||
|
pushl %ecx; \
|
||||||
|
pushl %ebx; \
|
||||||
|
movl $(KERNEL_DS),%edx; \
|
||||||
|
mov %dx,%ds; \
|
||||||
|
mov %dx,%es; \
|
||||||
|
movl $(USER_DS),%edx; \
|
||||||
|
mov %dx,%fs;
|
||||||
|
|
||||||
|
#ifdef __SMP__
|
||||||
|
|
||||||
|
#define GET_PROCESSOR_ID \
|
||||||
|
movl SYMBOL_NAME(apic_reg), %edx; \
|
||||||
|
movl 32(%edx), %eax;\
|
||||||
|
movl %eax,SYMBOL_NAME(apic_retval); \
|
||||||
|
shrl $24,%eax; \
|
||||||
|
andb $0x0F,%al;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the processor ID multiplied by 4
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define GET_PROCESSOR_OFFSET(x) \
|
||||||
|
movl SYMBOL_NAME(apic_reg), x ; \
|
||||||
|
movl 32( x ), x ; \
|
||||||
|
shrl $22, x ; \
|
||||||
|
andl $0x3C, x ;
|
||||||
|
|
||||||
|
/* macro LEAVE_KERNEL decrements kernel_counter and resets kernel_flag and
|
||||||
|
saves processor variables if zero */
|
||||||
|
#define LEAVE_KERNEL \
|
||||||
|
pushfl; \
|
||||||
|
cli; \
|
||||||
|
GET_PROCESSOR_ID \
|
||||||
|
btrl $ SMP_FROM_SYSCALL,SYMBOL_NAME(smp_proc_in_lock)(,%eax,4); \
|
||||||
|
decl SYMBOL_NAME(syscall_count); \
|
||||||
|
decl SYMBOL_NAME(kernel_counter); \
|
||||||
|
jnz 1f; \
|
||||||
|
movb SYMBOL_NAME(saved_active_kernel_processor), %al; \
|
||||||
|
movb %al, SYMBOL_NAME(active_kernel_processor); \
|
||||||
|
cmpb $(NO_PROC_ID), %al; \
|
||||||
|
jnz 1f; \
|
||||||
|
lock; \
|
||||||
|
btrl $0, SYMBOL_NAME(kernel_flag); \
|
||||||
|
1: popfl;
|
||||||
|
|
||||||
|
/* macro ENTER_KERNEL waits for entering the kernel, increments
|
||||||
|
kernel_counter, and reloads the processor variables if necessary
|
||||||
|
uses : %eax, %edx (pushed and popped)
|
||||||
|
|
||||||
|
Note: We go to great pains to minimise the number of locked operations.
|
||||||
|
We want to spin without locking, and lock when we attempt an update.
|
||||||
|
The pentium has a MESI cache so the spin without lock will exit when
|
||||||
|
another CPU write invalidates our cache, and the lock is avoided when
|
||||||
|
possible so we don't play ping-pong games with the cache line.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SMP_PROF__
|
||||||
|
|
||||||
|
#define SMP_PROF_A
|
||||||
|
#define SMP_PROF_B
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define SMP_PROF_A movl $0,SYMBOL_NAME(smp_spins_syscall_cur)(,%eax,4);
|
||||||
|
#define SMP_PROF_B incl SYMBOL_NAME(smp_spins_syscall)(,%eax,4); \
|
||||||
|
incl SYMBOL_NAME(smp_spins_syscall_cur)(,%eax,4);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ENTER_KERNEL \
|
||||||
|
pushl %eax; \
|
||||||
|
pushl %ebx; \
|
||||||
|
pushl %ecx; \
|
||||||
|
pushl %edx; \
|
||||||
|
pushfl; \
|
||||||
|
cli; \
|
||||||
|
movl $6000, %ebx; \
|
||||||
|
movl SYMBOL_NAME(smp_loops_per_tick), %ecx; \
|
||||||
|
GET_PROCESSOR_ID \
|
||||||
|
btsl $ SMP_FROM_SYSCALL,SYMBOL_NAME(smp_proc_in_lock)(,%eax,4); \
|
||||||
|
SMP_PROF_A \
|
||||||
|
1: lock; \
|
||||||
|
btsl $0, SYMBOL_NAME(kernel_flag); \
|
||||||
|
jnc 3f; \
|
||||||
|
cmpb SYMBOL_NAME(active_kernel_processor), %al; \
|
||||||
|
je 4f; \
|
||||||
|
2: SMP_PROF_B \
|
||||||
|
btl %eax, SYMBOL_NAME(smp_invalidate_needed); \
|
||||||
|
jnc 5f; \
|
||||||
|
lock; \
|
||||||
|
btrl %eax, SYMBOL_NAME(smp_invalidate_needed); \
|
||||||
|
jnc 5f; \
|
||||||
|
movl %cr3,%edx; \
|
||||||
|
movl %edx,%cr3; \
|
||||||
|
5: sti; \
|
||||||
|
decl %ecx; \
|
||||||
|
cli; \
|
||||||
|
jne 7f; \
|
||||||
|
decl %ebx; \
|
||||||
|
jne 6f; \
|
||||||
|
call SYMBOL_NAME(non_irq_deadlock_detected); \
|
||||||
|
6: movl SYMBOL_NAME(smp_loops_per_tick), %ecx; \
|
||||||
|
cmpb SYMBOL_NAME(boot_cpu_id), %al; \
|
||||||
|
jne 7f; \
|
||||||
|
incl SYMBOL_NAME(jiffies); \
|
||||||
|
7: btl $0, SYMBOL_NAME(kernel_flag); \
|
||||||
|
jc 2b; \
|
||||||
|
jmp 1b; \
|
||||||
|
3: movb %al, SYMBOL_NAME(active_kernel_processor); \
|
||||||
|
4: incl SYMBOL_NAME(kernel_counter); \
|
||||||
|
incl SYMBOL_NAME(syscall_count); \
|
||||||
|
popfl; \
|
||||||
|
popl %edx; \
|
||||||
|
popl %ecx; \
|
||||||
|
popl %ebx; \
|
||||||
|
popl %eax;
|
||||||
|
|
||||||
|
|
||||||
|
#define RESTORE_ALL \
|
||||||
|
cmpw $(KERNEL_CS),CS(%esp); \
|
||||||
|
je 1f; \
|
||||||
|
GET_PROCESSOR_OFFSET(%edx) \
|
||||||
|
movl SYMBOL_NAME(current_set)(,%edx), %eax ; ; \
|
||||||
|
movl dbgreg7(%eax),%ebx; \
|
||||||
|
movl %ebx,%db7; \
|
||||||
|
1: LEAVE_KERNEL \
|
||||||
|
popl %ebx; \
|
||||||
|
popl %ecx; \
|
||||||
|
popl %edx; \
|
||||||
|
popl %esi; \
|
||||||
|
popl %edi; \
|
||||||
|
popl %ebp; \
|
||||||
|
popl %eax; \
|
||||||
|
pop %ds; \
|
||||||
|
pop %es; \
|
||||||
|
pop %fs; \
|
||||||
|
pop %gs; \
|
||||||
|
addl $4,%esp; \
|
||||||
|
iret
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define RESTORE_ALL \
|
||||||
|
cmpw $(KERNEL_CS),CS(%esp); \
|
||||||
|
je 1f; \
|
||||||
|
movl SYMBOL_NAME(current_set),%eax; \
|
||||||
|
movl dbgreg7(%eax),%ebx; \
|
||||||
|
movl %ebx,%db7; \
|
||||||
|
1: \
|
||||||
|
popl %ebx; \
|
||||||
|
popl %ecx; \
|
||||||
|
popl %edx; \
|
||||||
|
popl %esi; \
|
||||||
|
popl %edi; \
|
||||||
|
popl %ebp; \
|
||||||
|
popl %eax; \
|
||||||
|
pop %ds; \
|
||||||
|
pop %es; \
|
||||||
|
pop %fs; \
|
||||||
|
pop %gs; \
|
||||||
|
addl $4,%esp; \
|
||||||
|
iret
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ENTRY(lcall7)
|
||||||
|
pushfl # We get a different stack layout with call gates,
|
||||||
|
pushl %eax # which has to be cleaned up later..
|
||||||
|
SAVE_ALL
|
||||||
|
#ifdef __SMP__
|
||||||
|
ENTER_KERNEL
|
||||||
|
#endif
|
||||||
|
movl EIP(%esp),%eax # due to call gates, this is eflags, not eip..
|
||||||
|
movl CS(%esp),%edx # this is eip..
|
||||||
|
movl EFLAGS(%esp),%ecx # and this is cs..
|
||||||
|
movl %eax,EFLAGS(%esp) #
|
||||||
|
movl %edx,EIP(%esp) # Now we move them to their "normal" places
|
||||||
|
movl %ecx,CS(%esp) #
|
||||||
|
movl %esp,%eax
|
||||||
|
#ifdef __SMP__
|
||||||
|
GET_PROCESSOR_OFFSET(%edx) # Processor offset into edx
|
||||||
|
movl SYMBOL_NAME(current_set)(,%edx),%edx
|
||||||
|
#else
|
||||||
|
movl SYMBOL_NAME(current_set),%edx
|
||||||
|
#endif
|
||||||
|
pushl %eax
|
||||||
|
movl exec_domain(%edx),%edx # Get the execution domain
|
||||||
|
movl 4(%edx),%edx # Get the lcall7 handler for the domain
|
||||||
|
call *%edx
|
||||||
|
popl %eax
|
||||||
|
jmp ret_from_sys_call
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
handle_bottom_half:
|
||||||
|
incl SYMBOL_NAME(intr_count)
|
||||||
|
call SYMBOL_NAME(do_bottom_half)
|
||||||
|
decl SYMBOL_NAME(intr_count)
|
||||||
|
jmp 9f
|
||||||
|
ALIGN
|
||||||
|
reschedule:
|
||||||
|
pushl $ret_from_sys_call
|
||||||
|
jmp SYMBOL_NAME(schedule) # test
|
||||||
|
|
||||||
|
ENTRY(system_call)
|
||||||
|
pushl %eax # save orig_eax
|
||||||
|
SAVE_ALL
|
||||||
|
#ifdef __SMP__
|
||||||
|
ENTER_KERNEL
|
||||||
|
#endif
|
||||||
|
movl $-ENOSYS,EAX(%esp)
|
||||||
|
cmpl $(NR_syscalls),%eax
|
||||||
|
jae ret_from_sys_call
|
||||||
|
movl SYMBOL_NAME(sys_call_table)(,%eax,4),%eax
|
||||||
|
testl %eax,%eax
|
||||||
|
je ret_from_sys_call
|
||||||
|
#ifdef __SMP__
|
||||||
|
GET_PROCESSOR_OFFSET(%edx)
|
||||||
|
movl SYMBOL_NAME(current_set)(,%edx),%ebx
|
||||||
|
#else
|
||||||
|
movl SYMBOL_NAME(current_set),%ebx
|
||||||
|
#endif
|
||||||
|
andl $~CF_MASK,EFLAGS(%esp) # clear carry - assume no errors
|
||||||
|
movl %db6,%edx
|
||||||
|
movl %edx,dbgreg6(%ebx) # save current hardware debugging status
|
||||||
|
testb $0x20,flags(%ebx) # PF_TRACESYS
|
||||||
|
jne 1f
|
||||||
|
call *%eax
|
||||||
|
movl %eax,EAX(%esp) # save the return value
|
||||||
|
jmp ret_from_sys_call
|
||||||
|
ALIGN
|
||||||
|
1: call SYMBOL_NAME(syscall_trace)
|
||||||
|
movl ORIG_EAX(%esp),%eax
|
||||||
|
call SYMBOL_NAME(sys_call_table)(,%eax,4)
|
||||||
|
movl %eax,EAX(%esp) # save the return value
|
||||||
|
#ifdef __SMP__
|
||||||
|
GET_PROCESSOR_OFFSET(%eax)
|
||||||
|
movl SYMBOL_NAME(current_set)(,%eax),%eax
|
||||||
|
#else
|
||||||
|
movl SYMBOL_NAME(current_set),%eax
|
||||||
|
#endif
|
||||||
|
call SYMBOL_NAME(syscall_trace)
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
.globl ret_from_sys_call
|
||||||
|
ret_from_sys_call:
|
||||||
|
cmpl $0,SYMBOL_NAME(intr_count)
|
||||||
|
jne 2f
|
||||||
|
9: movl SYMBOL_NAME(bh_mask),%eax
|
||||||
|
andl SYMBOL_NAME(bh_active),%eax
|
||||||
|
jne handle_bottom_half
|
||||||
|
#ifdef __SMP__
|
||||||
|
cmpb $(NO_PROC_ID), SYMBOL_NAME(saved_active_kernel_processor)
|
||||||
|
jne 2f
|
||||||
|
#endif
|
||||||
|
movl EFLAGS(%esp),%eax # check VM86 flag: CS/SS are
|
||||||
|
testl $(VM_MASK),%eax # different then
|
||||||
|
jne 1f
|
||||||
|
cmpw $(KERNEL_CS),CS(%esp) # was old code segment supervisor ?
|
||||||
|
je 2f
|
||||||
|
1: sti
|
||||||
|
orl $(IF_MASK),%eax # these just try to make sure
|
||||||
|
andl $~NT_MASK,%eax # the program doesn't do anything
|
||||||
|
movl %eax,EFLAGS(%esp) # stupid
|
||||||
|
cmpl $0,SYMBOL_NAME(need_resched)
|
||||||
|
jne reschedule
|
||||||
|
#ifdef __SMP__
|
||||||
|
GET_PROCESSOR_OFFSET(%eax)
|
||||||
|
movl SYMBOL_NAME(current_set)(,%eax), %eax
|
||||||
|
#else
|
||||||
|
movl SYMBOL_NAME(current_set),%eax
|
||||||
|
#endif
|
||||||
|
cmpl SYMBOL_NAME(task),%eax # task[0] cannot have signals
|
||||||
|
je 2f
|
||||||
|
movl blocked(%eax),%ecx
|
||||||
|
movl %ecx,%ebx # save blocked in %ebx for signal handling
|
||||||
|
notl %ecx
|
||||||
|
andl signal(%eax),%ecx
|
||||||
|
jne signal_return
|
||||||
|
2: RESTORE_ALL
|
||||||
|
ALIGN
|
||||||
|
signal_return:
|
||||||
|
movl %esp,%ecx
|
||||||
|
pushl %ecx
|
||||||
|
testl $(VM_MASK),EFLAGS(%ecx)
|
||||||
|
jne v86_signal_return
|
||||||
|
pushl %ebx
|
||||||
|
call SYMBOL_NAME(do_signal)
|
||||||
|
popl %ebx
|
||||||
|
popl %ebx
|
||||||
|
RESTORE_ALL
|
||||||
|
ALIGN
|
||||||
|
v86_signal_return:
|
||||||
|
call SYMBOL_NAME(save_v86_state)
|
||||||
|
movl %eax,%esp
|
||||||
|
pushl %eax
|
||||||
|
pushl %ebx
|
||||||
|
call SYMBOL_NAME(do_signal)
|
||||||
|
popl %ebx
|
||||||
|
popl %ebx
|
||||||
|
RESTORE_ALL
|
||||||
|
|
||||||
|
ENTRY(divide_error)
|
||||||
|
pushl $0 # no error code
|
||||||
|
pushl $ SYMBOL_NAME(do_divide_error)
|
||||||
|
ALIGN
|
||||||
|
error_code:
|
||||||
|
push %fs
|
||||||
|
push %es
|
||||||
|
push %ds
|
||||||
|
pushl %eax
|
||||||
|
xorl %eax,%eax
|
||||||
|
pushl %ebp
|
||||||
|
pushl %edi
|
||||||
|
pushl %esi
|
||||||
|
pushl %edx
|
||||||
|
decl %eax # eax = -1
|
||||||
|
pushl %ecx
|
||||||
|
pushl %ebx
|
||||||
|
cld
|
||||||
|
xorl %ebx,%ebx # zero ebx
|
||||||
|
xchgl %eax, ORIG_EAX(%esp) # orig_eax (get the error code. )
|
||||||
|
mov %gs,%bx # get the lower order bits of gs
|
||||||
|
movl %esp,%edx
|
||||||
|
xchgl %ebx, GS(%esp) # get the address and save gs.
|
||||||
|
pushl %eax # push the error code
|
||||||
|
pushl %edx
|
||||||
|
movl $(KERNEL_DS),%edx
|
||||||
|
mov %dx,%ds
|
||||||
|
mov %dx,%es
|
||||||
|
movl $(USER_DS),%edx
|
||||||
|
mov %dx,%fs
|
||||||
|
#ifdef __SMP__
|
||||||
|
ENTER_KERNEL
|
||||||
|
GET_PROCESSOR_OFFSET(%eax)
|
||||||
|
movl SYMBOL_NAME(current_set)(,%eax), %eax
|
||||||
|
#else
|
||||||
|
movl SYMBOL_NAME(current_set),%eax
|
||||||
|
#endif
|
||||||
|
movl %db6,%edx
|
||||||
|
movl %edx,dbgreg6(%eax) # save current hardware debugging status
|
||||||
|
call *%ebx
|
||||||
|
addl $8,%esp
|
||||||
|
jmp ret_from_sys_call
|
||||||
|
|
||||||
|
ENTRY(coprocessor_error)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_coprocessor_error)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(device_not_available)
|
||||||
|
pushl $-1 # mark this as an int
|
||||||
|
SAVE_ALL
|
||||||
|
#ifdef __SMP__
|
||||||
|
ENTER_KERNEL
|
||||||
|
#endif
|
||||||
|
pushl $ret_from_sys_call
|
||||||
|
movl %cr0,%eax
|
||||||
|
testl $0x4,%eax # EM (math emulation bit)
|
||||||
|
je SYMBOL_NAME(math_state_restore)
|
||||||
|
pushl $0 # temporary storage for ORIG_EIP
|
||||||
|
call SYMBOL_NAME(math_emulate)
|
||||||
|
addl $4,%esp
|
||||||
|
ret
|
||||||
|
|
||||||
|
ENTRY(debug)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_debug)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(nmi)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_nmi)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(int3)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_int3)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(overflow)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_overflow)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(bounds)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_bounds)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(invalid_op)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_invalid_op)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(coprocessor_segment_overrun)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(reserved)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_reserved)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(double_fault)
|
||||||
|
pushl $ SYMBOL_NAME(do_double_fault)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(invalid_TSS)
|
||||||
|
pushl $ SYMBOL_NAME(do_invalid_TSS)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(segment_not_present)
|
||||||
|
pushl $ SYMBOL_NAME(do_segment_not_present)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(stack_segment)
|
||||||
|
pushl $ SYMBOL_NAME(do_stack_segment)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(general_protection)
|
||||||
|
pushl $ SYMBOL_NAME(do_general_protection)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(alignment_check)
|
||||||
|
pushl $ SYMBOL_NAME(do_alignment_check)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(page_fault)
|
||||||
|
pushl $ SYMBOL_NAME(do_page_fault)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
ENTRY(spurious_interrupt_bug)
|
||||||
|
pushl $0
|
||||||
|
pushl $ SYMBOL_NAME(do_spurious_interrupt_bug)
|
||||||
|
jmp error_code
|
||||||
|
|
||||||
|
.data
|
||||||
|
ENTRY(sys_call_table)
|
||||||
|
.long SYMBOL_NAME(sys_setup) /* 0 */
|
||||||
|
.long SYMBOL_NAME(sys_exit)
|
||||||
|
.long SYMBOL_NAME(sys_fork)
|
||||||
|
.long SYMBOL_NAME(sys_read)
|
||||||
|
.long SYMBOL_NAME(sys_write)
|
||||||
|
.long SYMBOL_NAME(sys_open) /* 5 */
|
||||||
|
.long SYMBOL_NAME(sys_close)
|
||||||
|
.long SYMBOL_NAME(sys_waitpid)
|
||||||
|
.long SYMBOL_NAME(sys_creat)
|
||||||
|
.long SYMBOL_NAME(sys_link)
|
||||||
|
.long SYMBOL_NAME(sys_unlink) /* 10 */
|
||||||
|
.long SYMBOL_NAME(sys_execve)
|
||||||
|
.long SYMBOL_NAME(sys_chdir)
|
||||||
|
.long SYMBOL_NAME(sys_time)
|
||||||
|
.long SYMBOL_NAME(sys_mknod)
|
||||||
|
.long SYMBOL_NAME(sys_chmod) /* 15 */
|
||||||
|
.long SYMBOL_NAME(sys_chown)
|
||||||
|
.long SYMBOL_NAME(sys_break)
|
||||||
|
.long SYMBOL_NAME(sys_stat)
|
||||||
|
.long SYMBOL_NAME(sys_lseek)
|
||||||
|
.long SYMBOL_NAME(sys_getpid) /* 20 */
|
||||||
|
.long SYMBOL_NAME(sys_mount)
|
||||||
|
.long SYMBOL_NAME(sys_umount)
|
||||||
|
.long SYMBOL_NAME(sys_setuid)
|
||||||
|
.long SYMBOL_NAME(sys_getuid)
|
||||||
|
.long SYMBOL_NAME(sys_stime) /* 25 */
|
||||||
|
.long SYMBOL_NAME(sys_ptrace)
|
||||||
|
.long SYMBOL_NAME(sys_alarm)
|
||||||
|
.long SYMBOL_NAME(sys_fstat)
|
||||||
|
.long SYMBOL_NAME(sys_pause)
|
||||||
|
.long SYMBOL_NAME(sys_utime) /* 30 */
|
||||||
|
.long SYMBOL_NAME(sys_stty)
|
||||||
|
.long SYMBOL_NAME(sys_gtty)
|
||||||
|
.long SYMBOL_NAME(sys_access)
|
||||||
|
.long SYMBOL_NAME(sys_nice)
|
||||||
|
.long SYMBOL_NAME(sys_ftime) /* 35 */
|
||||||
|
.long SYMBOL_NAME(sys_sync)
|
||||||
|
.long SYMBOL_NAME(sys_kill)
|
||||||
|
.long SYMBOL_NAME(sys_rename)
|
||||||
|
.long SYMBOL_NAME(sys_mkdir)
|
||||||
|
.long SYMBOL_NAME(sys_rmdir) /* 40 */
|
||||||
|
.long SYMBOL_NAME(sys_dup)
|
||||||
|
.long SYMBOL_NAME(sys_pipe)
|
||||||
|
.long SYMBOL_NAME(sys_times)
|
||||||
|
.long SYMBOL_NAME(sys_prof)
|
||||||
|
.long SYMBOL_NAME(sys_brk) /* 45 */
|
||||||
|
.long SYMBOL_NAME(sys_setgid)
|
||||||
|
.long SYMBOL_NAME(sys_getgid)
|
||||||
|
.long SYMBOL_NAME(sys_signal)
|
||||||
|
.long SYMBOL_NAME(sys_geteuid)
|
||||||
|
.long SYMBOL_NAME(sys_getegid) /* 50 */
|
||||||
|
.long SYMBOL_NAME(sys_acct)
|
||||||
|
.long SYMBOL_NAME(sys_phys)
|
||||||
|
.long SYMBOL_NAME(sys_lock)
|
||||||
|
.long SYMBOL_NAME(sys_ioctl)
|
||||||
|
.long SYMBOL_NAME(sys_fcntl) /* 55 */
|
||||||
|
.long SYMBOL_NAME(sys_mpx)
|
||||||
|
.long SYMBOL_NAME(sys_setpgid)
|
||||||
|
.long SYMBOL_NAME(sys_ulimit)
|
||||||
|
.long SYMBOL_NAME(sys_olduname)
|
||||||
|
.long SYMBOL_NAME(sys_umask) /* 60 */
|
||||||
|
.long SYMBOL_NAME(sys_chroot)
|
||||||
|
.long SYMBOL_NAME(sys_ustat)
|
||||||
|
.long SYMBOL_NAME(sys_dup2)
|
||||||
|
.long SYMBOL_NAME(sys_getppid)
|
||||||
|
.long SYMBOL_NAME(sys_getpgrp) /* 65 */
|
||||||
|
.long SYMBOL_NAME(sys_setsid)
|
||||||
|
.long SYMBOL_NAME(sys_sigaction)
|
||||||
|
.long SYMBOL_NAME(sys_sgetmask)
|
||||||
|
.long SYMBOL_NAME(sys_ssetmask)
|
||||||
|
.long SYMBOL_NAME(sys_setreuid) /* 70 */
|
||||||
|
.long SYMBOL_NAME(sys_setregid)
|
||||||
|
.long SYMBOL_NAME(sys_sigsuspend)
|
||||||
|
.long SYMBOL_NAME(sys_sigpending)
|
||||||
|
.long SYMBOL_NAME(sys_sethostname)
|
||||||
|
.long SYMBOL_NAME(sys_setrlimit) /* 75 */
|
||||||
|
.long SYMBOL_NAME(sys_getrlimit)
|
||||||
|
.long SYMBOL_NAME(sys_getrusage)
|
||||||
|
.long SYMBOL_NAME(sys_gettimeofday)
|
||||||
|
.long SYMBOL_NAME(sys_settimeofday)
|
||||||
|
.long SYMBOL_NAME(sys_getgroups) /* 80 */
|
||||||
|
.long SYMBOL_NAME(sys_setgroups)
|
||||||
|
.long SYMBOL_NAME(old_select)
|
||||||
|
.long SYMBOL_NAME(sys_symlink)
|
||||||
|
.long SYMBOL_NAME(sys_lstat)
|
||||||
|
.long SYMBOL_NAME(sys_readlink) /* 85 */
|
||||||
|
.long SYMBOL_NAME(sys_uselib)
|
||||||
|
.long SYMBOL_NAME(sys_swapon)
|
||||||
|
.long SYMBOL_NAME(sys_reboot)
|
||||||
|
.long SYMBOL_NAME(old_readdir)
|
||||||
|
.long SYMBOL_NAME(old_mmap) /* 90 */
|
||||||
|
.long SYMBOL_NAME(sys_munmap)
|
||||||
|
.long SYMBOL_NAME(sys_truncate)
|
||||||
|
.long SYMBOL_NAME(sys_ftruncate)
|
||||||
|
.long SYMBOL_NAME(sys_fchmod)
|
||||||
|
.long SYMBOL_NAME(sys_fchown) /* 95 */
|
||||||
|
.long SYMBOL_NAME(sys_getpriority)
|
||||||
|
.long SYMBOL_NAME(sys_setpriority)
|
||||||
|
.long SYMBOL_NAME(sys_profil)
|
||||||
|
.long SYMBOL_NAME(sys_statfs)
|
||||||
|
.long SYMBOL_NAME(sys_fstatfs) /* 100 */
|
||||||
|
.long SYMBOL_NAME(sys_ioperm)
|
||||||
|
.long SYMBOL_NAME(sys_socketcall)
|
||||||
|
.long SYMBOL_NAME(sys_syslog)
|
||||||
|
.long SYMBOL_NAME(sys_setitimer)
|
||||||
|
.long SYMBOL_NAME(sys_getitimer) /* 105 */
|
||||||
|
.long SYMBOL_NAME(sys_newstat)
|
||||||
|
.long SYMBOL_NAME(sys_newlstat)
|
||||||
|
.long SYMBOL_NAME(sys_newfstat)
|
||||||
|
.long SYMBOL_NAME(sys_uname)
|
||||||
|
.long SYMBOL_NAME(sys_iopl) /* 110 */
|
||||||
|
.long SYMBOL_NAME(sys_vhangup)
|
||||||
|
.long SYMBOL_NAME(sys_idle)
|
||||||
|
.long SYMBOL_NAME(sys_vm86old)
|
||||||
|
.long SYMBOL_NAME(sys_wait4)
|
||||||
|
.long SYMBOL_NAME(sys_swapoff) /* 115 */
|
||||||
|
.long SYMBOL_NAME(sys_sysinfo)
|
||||||
|
.long SYMBOL_NAME(sys_ipc)
|
||||||
|
.long SYMBOL_NAME(sys_fsync)
|
||||||
|
.long SYMBOL_NAME(sys_sigreturn)
|
||||||
|
.long SYMBOL_NAME(sys_clone) /* 120 */
|
||||||
|
.long SYMBOL_NAME(sys_setdomainname)
|
||||||
|
.long SYMBOL_NAME(sys_newuname)
|
||||||
|
.long SYMBOL_NAME(sys_modify_ldt)
|
||||||
|
.long SYMBOL_NAME(sys_adjtimex)
|
||||||
|
.long SYMBOL_NAME(sys_mprotect) /* 125 */
|
||||||
|
.long SYMBOL_NAME(sys_sigprocmask)
|
||||||
|
.long SYMBOL_NAME(sys_create_module)
|
||||||
|
.long SYMBOL_NAME(sys_init_module)
|
||||||
|
.long SYMBOL_NAME(sys_delete_module)
|
||||||
|
.long SYMBOL_NAME(sys_get_kernel_syms) /* 130 */
|
||||||
|
.long SYMBOL_NAME(sys_quotactl)
|
||||||
|
.long SYMBOL_NAME(sys_getpgid)
|
||||||
|
.long SYMBOL_NAME(sys_fchdir)
|
||||||
|
.long SYMBOL_NAME(sys_bdflush)
|
||||||
|
.long SYMBOL_NAME(sys_sysfs) /* 135 */
|
||||||
|
.long SYMBOL_NAME(sys_personality)
|
||||||
|
.long 0 /* for afs_syscall */
|
||||||
|
.long SYMBOL_NAME(sys_setfsuid)
|
||||||
|
.long SYMBOL_NAME(sys_setfsgid)
|
||||||
|
.long SYMBOL_NAME(sys_llseek) /* 140 */
|
||||||
|
.long SYMBOL_NAME(sys_getdents)
|
||||||
|
.long SYMBOL_NAME(sys_select)
|
||||||
|
.long SYMBOL_NAME(sys_flock)
|
||||||
|
.long SYMBOL_NAME(sys_msync)
|
||||||
|
.long SYMBOL_NAME(sys_readv) /* 145 */
|
||||||
|
.long SYMBOL_NAME(sys_writev)
|
||||||
|
.long SYMBOL_NAME(sys_getsid)
|
||||||
|
.long SYMBOL_NAME(sys_fdatasync)
|
||||||
|
.long SYMBOL_NAME(sys_sysctl)
|
||||||
|
.long SYMBOL_NAME(sys_mlock) /* 150 */
|
||||||
|
.long SYMBOL_NAME(sys_munlock)
|
||||||
|
.long SYMBOL_NAME(sys_mlockall)
|
||||||
|
.long SYMBOL_NAME(sys_munlockall)
|
||||||
|
.long SYMBOL_NAME(sys_sched_setparam)
|
||||||
|
.long SYMBOL_NAME(sys_sched_getparam) /* 155 */
|
||||||
|
.long SYMBOL_NAME(sys_sched_setscheduler)
|
||||||
|
.long SYMBOL_NAME(sys_sched_getscheduler)
|
||||||
|
.long SYMBOL_NAME(sys_sched_yield)
|
||||||
|
.long SYMBOL_NAME(sys_sched_get_priority_max)
|
||||||
|
.long SYMBOL_NAME(sys_sched_get_priority_min) /* 160 */
|
||||||
|
.long SYMBOL_NAME(sys_sched_rr_get_interval)
|
||||||
|
.long SYMBOL_NAME(sys_nanosleep)
|
||||||
|
.long SYMBOL_NAME(sys_mremap)
|
||||||
|
.long 0,0
|
||||||
|
.long SYMBOL_NAME(sys_vm86)
|
||||||
|
.long 0,0,0,0 /* 170 */
|
||||||
|
.long 0,0,0,0,0,0,0,0,0,0 /* 180 */
|
||||||
|
.long 0,0,0,0,0,0,0
|
||||||
|
.long SYMBOL_NAME(sys_table)
|
||||||
|
.space (NR_syscalls-188)*4
|
||||||
51
kernel/table20/kernel.patch
Normal file
51
kernel/table20/kernel.patch
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
diff -ur linux-2.0.32/Makefile linux-hacked/Makefile
|
||||||
|
--- linux-2.0.32/Makefile Fri Nov 7 19:51:05 1997
|
||||||
|
+++ linux-hacked/Makefile Thu Jun 11 20:41:12 1998
|
||||||
|
@@ -87,7 +87,7 @@
|
||||||
|
# standard CFLAGS
|
||||||
|
#
|
||||||
|
|
||||||
|
-CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce
|
||||||
|
+CFLAGS = -Wall -Wstrict-prototypes -g -O2 -fomit-frame-pointer -fno-strength-reduce
|
||||||
|
|
||||||
|
ifdef CONFIG_CPP
|
||||||
|
CFLAGS := $(CFLAGS) -x c++
|
||||||
|
@@ -113,12 +113,12 @@
|
||||||
|
# Include the make variables (CC, etc...)
|
||||||
|
#
|
||||||
|
|
||||||
|
-ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o net/network.a
|
||||||
|
+ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o net/network.a table/table.o
|
||||||
|
FILESYSTEMS =fs/filesystems.a
|
||||||
|
DRIVERS =drivers/block/block.a \
|
||||||
|
drivers/char/char.a
|
||||||
|
LIBS =$(TOPDIR)/lib/lib.a
|
||||||
|
-SUBDIRS =kernel drivers mm fs net ipc lib
|
||||||
|
+SUBDIRS =kernel drivers mm fs net ipc lib table
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_ISDN),y)
|
||||||
|
DRIVERS := $(DRIVERS) drivers/isdn/isdn.a
|
||||||
|
diff -ur linux-2.0.32/arch/i386/kernel/entry.S linux-hacked/arch/i386/kernel/entry.S
|
||||||
|
--- linux-2.0.32/arch/i386/kernel/entry.S Tue Sep 16 23:42:45 1997
|
||||||
|
+++ linux-hacked/arch/i386/kernel/entry.S Thu Jun 11 21:37:20 1998
|
||||||
|
@@ -699,4 +699,8 @@
|
||||||
|
.long SYMBOL_NAME(sys_mremap)
|
||||||
|
.long 0,0
|
||||||
|
.long SYMBOL_NAME(sys_vm86)
|
||||||
|
- .space (NR_syscalls-166)*4
|
||||||
|
+ .long 0,0,0,0 /* 170 */
|
||||||
|
+ .long 0,0,0,0,0,0,0,0,0,0 /* 180 */
|
||||||
|
+ .long 0,0,0,0,0,0,0
|
||||||
|
+ .long SYMBOL_NAME(sys_table)
|
||||||
|
+ .space (NR_syscalls-188)*4
|
||||||
|
diff -ur linux-2.0.32/include/asm-i386/unistd.h linux-hacked/include/asm-i386/unistd.h
|
||||||
|
--- linux-2.0.32/include/asm-i386/unistd.h Fri Mar 22 07:34:02 1996
|
||||||
|
+++ linux-hacked/include/asm-i386/unistd.h Thu Jun 11 21:37:03 1998
|
||||||
|
@@ -169,6 +169,7 @@
|
||||||
|
#define __NR_sched_rr_get_interval 161
|
||||||
|
#define __NR_nanosleep 162
|
||||||
|
#define __NR_mremap 163
|
||||||
|
+#define __NR_table 188
|
||||||
|
|
||||||
|
/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
|
||||||
|
#define _syscall0(type,name) \
|
||||||
468
kernel/table20/main.c
Normal file
468
kernel/table20/main.c
Normal file
@@ -0,0 +1,468 @@
|
|||||||
|
/*
|
||||||
|
* linux/table/table_impl.c
|
||||||
|
* Copyright (C) 1998 Martin Baulig
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/types.h>
|
||||||
|
#include <linux/errno.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/kernel_stat.h>
|
||||||
|
#include <linux/tty.h>
|
||||||
|
#include <linux/user.h>
|
||||||
|
#include <linux/a.out.h>
|
||||||
|
#include <linux/string.h>
|
||||||
|
#include <linux/mman.h>
|
||||||
|
#include <linux/proc_fs.h>
|
||||||
|
#include <linux/ioport.h>
|
||||||
|
#include <linux/config.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
#include <linux/pagemap.h>
|
||||||
|
#include <linux/swap.h>
|
||||||
|
|
||||||
|
#include <asm/segment.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
|
||||||
|
#include <linux/table.h>
|
||||||
|
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#if defined(__i386__)
|
||||||
|
# define KSTK_EIP(tsk) (((unsigned long *)tsk->kernel_stack_page)[1019])
|
||||||
|
# define KSTK_ESP(tsk) (((unsigned long *)tsk->kernel_stack_page)[1022])
|
||||||
|
#elif defined(__alpha__)
|
||||||
|
/*
|
||||||
|
* See arch/alpha/kernel/ptrace.c for details.
|
||||||
|
*/
|
||||||
|
# define PT_REG(reg) (PAGE_SIZE - sizeof(struct pt_regs) \
|
||||||
|
+ (long)&((struct pt_regs *)0)->reg)
|
||||||
|
# define KSTK_EIP(tsk) (*(unsigned long *)(tsk->kernel_stack_page + PT_REG(pc)))
|
||||||
|
# define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->tss.usp)
|
||||||
|
#elif defined(__sparc__)
|
||||||
|
# define PT_REG(reg) (PAGE_SIZE - sizeof(struct pt_regs) \
|
||||||
|
+ (long)&((struct pt_regs *)0)->reg)
|
||||||
|
# define KSTK_EIP(tsk) (*(unsigned long *)(tsk->kernel_stack_page + PT_REG(pc)))
|
||||||
|
# define KSTK_ESP(tsk) (*(unsigned long *)(tsk->kernel_stack_page + PT_REG(u_regs[UREG_FP])))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static struct task_struct *
|
||||||
|
get_task (pid_t pid)
|
||||||
|
{
|
||||||
|
struct task_struct ** p;
|
||||||
|
|
||||||
|
p = task;
|
||||||
|
while (++p < task+NR_TASKS) {
|
||||||
|
if (*p && (*p)->pid == pid)
|
||||||
|
return *p;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void statm_pte_range(pmd_t * pmd, unsigned long address, unsigned long size,
|
||||||
|
int * pages, int * shared, int * dirty, int * total)
|
||||||
|
{
|
||||||
|
pte_t * pte;
|
||||||
|
unsigned long end;
|
||||||
|
|
||||||
|
if (pmd_none(*pmd))
|
||||||
|
return;
|
||||||
|
if (pmd_bad(*pmd)) {
|
||||||
|
printk("statm_pte_range: bad pmd (%08lx)\n", pmd_val(*pmd));
|
||||||
|
pmd_clear(pmd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pte = pte_offset(pmd, address);
|
||||||
|
address &= ~PMD_MASK;
|
||||||
|
end = address + size;
|
||||||
|
if (end > PMD_SIZE)
|
||||||
|
end = PMD_SIZE;
|
||||||
|
do {
|
||||||
|
pte_t page = *pte;
|
||||||
|
|
||||||
|
address += PAGE_SIZE;
|
||||||
|
pte++;
|
||||||
|
if (pte_none(page))
|
||||||
|
continue;
|
||||||
|
++*total;
|
||||||
|
if (!pte_present(page))
|
||||||
|
continue;
|
||||||
|
++*pages;
|
||||||
|
if (pte_dirty(page))
|
||||||
|
++*dirty;
|
||||||
|
if (pte_page(page) >= high_memory)
|
||||||
|
continue;
|
||||||
|
if (mem_map[MAP_NR(pte_page(page))].count > 1)
|
||||||
|
++*shared;
|
||||||
|
} while (address < end);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void statm_pmd_range(pgd_t * pgd, unsigned long address, unsigned long size,
|
||||||
|
int * pages, int * shared, int * dirty, int * total)
|
||||||
|
{
|
||||||
|
pmd_t * pmd;
|
||||||
|
unsigned long end;
|
||||||
|
|
||||||
|
if (pgd_none(*pgd))
|
||||||
|
return;
|
||||||
|
if (pgd_bad(*pgd)) {
|
||||||
|
printk("statm_pmd_range: bad pgd (%08lx)\n", pgd_val(*pgd));
|
||||||
|
pgd_clear(pgd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pmd = pmd_offset(pgd, address);
|
||||||
|
address &= ~PGDIR_MASK;
|
||||||
|
end = address + size;
|
||||||
|
if (end > PGDIR_SIZE)
|
||||||
|
end = PGDIR_SIZE;
|
||||||
|
do {
|
||||||
|
statm_pte_range(pmd, address, end - address, pages, shared, dirty, total);
|
||||||
|
address = (address + PMD_SIZE) & PMD_MASK;
|
||||||
|
pmd++;
|
||||||
|
} while (address < end);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void statm_pgd_range(pgd_t * pgd, unsigned long address, unsigned long end,
|
||||||
|
int * pages, int * shared, int * dirty, int * total)
|
||||||
|
{
|
||||||
|
while (address < end) {
|
||||||
|
statm_pmd_range(pgd, address, end - address, pages, shared, dirty, total);
|
||||||
|
address = (address + PGDIR_SIZE) & PGDIR_MASK;
|
||||||
|
pgd++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned long
|
||||||
|
get_wchan (struct task_struct *p)
|
||||||
|
{
|
||||||
|
if (!p || p == current || p->state == TASK_RUNNING)
|
||||||
|
return 0;
|
||||||
|
#if defined(__i386__)
|
||||||
|
{
|
||||||
|
unsigned long ebp, eip;
|
||||||
|
unsigned long stack_page;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
stack_page = p->kernel_stack_page;
|
||||||
|
if (!stack_page)
|
||||||
|
return 0;
|
||||||
|
ebp = p->tss.ebp;
|
||||||
|
do {
|
||||||
|
if (ebp < stack_page || ebp >= 4092+stack_page)
|
||||||
|
return 0;
|
||||||
|
eip = *(unsigned long *) (ebp+4);
|
||||||
|
if (eip < (unsigned long) interruptible_sleep_on
|
||||||
|
|| eip >= (unsigned long) add_timer)
|
||||||
|
return eip;
|
||||||
|
ebp = *(unsigned long *) ebp;
|
||||||
|
} while (count++ < 16);
|
||||||
|
}
|
||||||
|
#elif defined(__alpha__)
|
||||||
|
/*
|
||||||
|
* This one depends on the frame size of schedule(). Do a
|
||||||
|
* "disass schedule" in gdb to find the frame size. Also, the
|
||||||
|
* code assumes that sleep_on() follows immediately after
|
||||||
|
* interruptible_sleep_on() and that add_timer() follows
|
||||||
|
* immediately after interruptible_sleep(). Ugly, isn't it?
|
||||||
|
* Maybe adding a wchan field to task_struct would be better,
|
||||||
|
* after all...
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
unsigned long schedule_frame;
|
||||||
|
unsigned long pc;
|
||||||
|
|
||||||
|
pc = thread_saved_pc(&p->tss);
|
||||||
|
if (pc >= (unsigned long) interruptible_sleep_on && pc < (unsigned long) add_timer) {
|
||||||
|
schedule_frame = ((unsigned long *)p->tss.ksp)[6];
|
||||||
|
return ((unsigned long *)schedule_frame)[12];
|
||||||
|
}
|
||||||
|
return pc;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
asmlinkage int
|
||||||
|
sys_table (int type, union table *buf, const void *param)
|
||||||
|
{
|
||||||
|
union table tbl;
|
||||||
|
struct sysinfo i;
|
||||||
|
struct task_struct *tsk = NULL;
|
||||||
|
struct ip_chain *chain;
|
||||||
|
struct ip_fwkernel *rule;
|
||||||
|
char devname [9];
|
||||||
|
int index, err;
|
||||||
|
pid_t pid;
|
||||||
|
|
||||||
|
if (type == TABLE_VERSION)
|
||||||
|
return _TABLE_VERSION;
|
||||||
|
|
||||||
|
if (!buf)
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
|
memset (&tbl, 0, sizeof (union table));
|
||||||
|
|
||||||
|
/* For TABLE_PROC_*, read pid and get task_struct */
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case TABLE_PROC_UID:
|
||||||
|
case TABLE_PROC_MEM:
|
||||||
|
case TABLE_PROC_SEGMENT:
|
||||||
|
case TABLE_PROC_TIME:
|
||||||
|
case TABLE_PROC_STATE:
|
||||||
|
case TABLE_PROC_SIGNAL:
|
||||||
|
case TABLE_PROC_KERNEL:
|
||||||
|
err = verify_area (VERIFY_READ, param, sizeof (pid_t));
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
memcpy_fromfs (&pid, param, sizeof (pid_t));
|
||||||
|
|
||||||
|
tsk = get_task (pid);
|
||||||
|
if (tsk == NULL)
|
||||||
|
return -ESRCH;
|
||||||
|
break;
|
||||||
|
case TABLE_NETACCT:
|
||||||
|
err = verify_area (VERIFY_READ, param, 5);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
copy_from_user (devname, param, 5);
|
||||||
|
devname [5] = 0;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main function dispatcher */
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case TABLE_PROCLIST:
|
||||||
|
tsk = task [0];
|
||||||
|
for (index = 0; index < nr_tasks; index++) {
|
||||||
|
tbl.proclist.pids [index] = tsk->pid;
|
||||||
|
tsk = tsk->next_task;
|
||||||
|
}
|
||||||
|
tbl.proclist.nr_running = nr_running;
|
||||||
|
tbl.proclist.nr_tasks = nr_tasks;
|
||||||
|
tbl.proclist.last_pid = last_pid;
|
||||||
|
break;
|
||||||
|
case TABLE_CPU:
|
||||||
|
tbl.cpu.total = jiffies;
|
||||||
|
tbl.cpu.user = kstat.cpu_user;
|
||||||
|
tbl.cpu.nice = kstat.cpu_nice;
|
||||||
|
tbl.cpu.sys = kstat.cpu_system;
|
||||||
|
tbl.cpu.idle = tbl.cpu.total -
|
||||||
|
(tbl.cpu.user + tbl.cpu.nice + tbl.cpu.sys);
|
||||||
|
tbl.cpu.frequency = HZ;
|
||||||
|
break;
|
||||||
|
case TABLE_MEM:
|
||||||
|
si_meminfo (&i);
|
||||||
|
tbl.mem.total = i.totalram;
|
||||||
|
tbl.mem.used = i.totalram - i.freeram;
|
||||||
|
tbl.mem.free = i.freeram;
|
||||||
|
tbl.mem.shared = i.sharedram;
|
||||||
|
tbl.mem.buffer = i.bufferram;
|
||||||
|
tbl.mem.cached = page_cache_size << PAGE_SHIFT;
|
||||||
|
break;
|
||||||
|
case TABLE_SWAP:
|
||||||
|
si_swapinfo (&i);
|
||||||
|
tbl.swap.total = i.totalswap;
|
||||||
|
tbl.swap.used = i.totalswap - i.freeswap;
|
||||||
|
tbl.swap.free = i.freeswap;
|
||||||
|
tbl.swap.pagein = kstat.pswpin;
|
||||||
|
tbl.swap.pageout = kstat.pswpout;
|
||||||
|
break;
|
||||||
|
case TABLE_LOADAVG:
|
||||||
|
tbl.loadavg.loadavg [0] = (double) avenrun [0] / (1 << FSHIFT);
|
||||||
|
tbl.loadavg.loadavg [1] = (double) avenrun [1] / (1 << FSHIFT);
|
||||||
|
tbl.loadavg.loadavg [2] = (double) avenrun [2] / (1 << FSHIFT);
|
||||||
|
tbl.loadavg.nr_running = nr_running;
|
||||||
|
tbl.loadavg.nr_tasks = nr_tasks;
|
||||||
|
tbl.loadavg.last_pid = last_pid;
|
||||||
|
break;
|
||||||
|
case TABLE_UPTIME:
|
||||||
|
tbl.uptime.uptime = jiffies;
|
||||||
|
tbl.uptime.idle = task[0]->utime + task[0]->stime;
|
||||||
|
break;
|
||||||
|
case TABLE_PROC_STATE:
|
||||||
|
tbl.proc_state.state = tsk->state;
|
||||||
|
tbl.proc_state.flags = tsk->flags;
|
||||||
|
memcpy (tbl.proc_state.comm, tsk->comm,
|
||||||
|
sizeof (tbl.proc_state.comm));
|
||||||
|
break;
|
||||||
|
case TABLE_PROC_UID:
|
||||||
|
tbl.proc_uid.uid = tsk->uid;
|
||||||
|
tbl.proc_uid.euid = tsk->euid;
|
||||||
|
tbl.proc_uid.suid = tsk->suid;
|
||||||
|
tbl.proc_uid.fsuid = tsk->fsuid;
|
||||||
|
|
||||||
|
tbl.proc_uid.gid = tsk->gid;
|
||||||
|
tbl.proc_uid.egid = tsk->egid;
|
||||||
|
tbl.proc_uid.sgid = tsk->sgid;
|
||||||
|
tbl.proc_uid.fsgid = tsk->fsgid;
|
||||||
|
|
||||||
|
tbl.proc_uid.pid = tsk->pid;
|
||||||
|
tbl.proc_uid.pgrp = tsk->pgrp;
|
||||||
|
tbl.proc_uid.ppid = tsk->p_pptr->pid;
|
||||||
|
|
||||||
|
tbl.proc_uid.session = tsk->session;
|
||||||
|
tbl.proc_uid.tty = tsk->tty ?
|
||||||
|
kdev_t_to_nr (tsk->tty->device) : 0;
|
||||||
|
tbl.proc_uid.tpgid = tsk->tty ? tsk->tty->pgrp : -1;
|
||||||
|
|
||||||
|
tbl.proc_uid.priority = tsk->priority;
|
||||||
|
tbl.proc_uid.counter = tsk->counter;
|
||||||
|
tbl.proc_uid.def_priority = DEF_PRIORITY;
|
||||||
|
break;
|
||||||
|
case TABLE_PROC_SIGNAL:
|
||||||
|
tbl.proc_signal.signal = tsk->signal;
|
||||||
|
tbl.proc_signal.blocked = tsk->blocked;
|
||||||
|
|
||||||
|
if (tsk->sig) {
|
||||||
|
struct sigaction * action = tsk->sig->action;
|
||||||
|
unsigned long sig_ign = 0, sig_caught = 0;
|
||||||
|
unsigned long bit = 1;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 32; i++) {
|
||||||
|
switch((unsigned long) action->sa_handler) {
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
sig_ign |= bit;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sig_caught |= bit;
|
||||||
|
}
|
||||||
|
bit <<= 1;
|
||||||
|
action++;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbl.proc_signal.ignored = sig_ign;
|
||||||
|
tbl.proc_signal.caught = sig_caught;
|
||||||
|
} else {
|
||||||
|
tbl.proc_signal.ignored = 0;
|
||||||
|
tbl.proc_signal.caught = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TABLE_PROC_MEM:
|
||||||
|
if (tsk->mm && tsk->mm != &init_mm) {
|
||||||
|
tbl.proc_mem.context = tsk->mm->context;
|
||||||
|
tbl.proc_mem.start_code = tsk->mm->start_code;
|
||||||
|
tbl.proc_mem.end_code = tsk->mm->end_code;
|
||||||
|
tbl.proc_mem.start_data = tsk->mm-> start_data;
|
||||||
|
tbl.proc_mem.end_data = tsk->mm->end_data;
|
||||||
|
tbl.proc_mem.start_brk = tsk->mm->start_brk;
|
||||||
|
tbl.proc_mem.brk = tsk->mm->brk;
|
||||||
|
tbl.proc_mem.start_stack = tsk->mm->start_stack;
|
||||||
|
tbl.proc_mem.start_mmap = tsk->mm->start_mmap;
|
||||||
|
tbl.proc_mem.arg_start = tsk->mm->arg_start;
|
||||||
|
tbl.proc_mem.arg_end = tsk->mm->arg_end;
|
||||||
|
tbl.proc_mem.env_start = tsk->mm->env_start;
|
||||||
|
tbl.proc_mem.env_end = tsk->mm->env_end;
|
||||||
|
tbl.proc_mem.rss = tsk->mm->rss;
|
||||||
|
tbl.proc_mem.total_vm = tsk->mm->total_vm;
|
||||||
|
tbl.proc_mem.locked_vm = tsk->mm->locked_vm;
|
||||||
|
}
|
||||||
|
tbl.proc_mem.rlim = tsk->rlim ?
|
||||||
|
tsk->rlim[RLIMIT_RSS].rlim_cur : 0;
|
||||||
|
break;
|
||||||
|
case TABLE_PROC_SEGMENT:
|
||||||
|
if (tsk->mm && tsk->mm != &init_mm) {
|
||||||
|
unsigned long vsize = 0;
|
||||||
|
int size = 0, resident = 0, share = 0;
|
||||||
|
int trs = 0, lrs = 0, drs = 0, dt = 0;
|
||||||
|
struct vm_area_struct * vma = tsk->mm->mmap;
|
||||||
|
|
||||||
|
while (vma) {
|
||||||
|
pgd_t *pgd = pgd_offset(tsk->mm, vma->vm_start);
|
||||||
|
int pages = 0, shared = 0, dirty = 0, total = 0;
|
||||||
|
|
||||||
|
vsize += vma->vm_end - vma->vm_start;
|
||||||
|
|
||||||
|
statm_pgd_range (pgd, vma->vm_start, vma->vm_end,
|
||||||
|
&pages, &shared, &dirty, &total);
|
||||||
|
resident += pages;
|
||||||
|
share += shared;
|
||||||
|
dt += dirty;
|
||||||
|
size += total;
|
||||||
|
if (vma->vm_flags & VM_EXECUTABLE)
|
||||||
|
trs += pages; /* text */
|
||||||
|
else if (vma->vm_flags & VM_GROWSDOWN)
|
||||||
|
drs += pages; /* stack */
|
||||||
|
else if (vma->vm_end > 0x60000000)
|
||||||
|
lrs += pages; /* library */
|
||||||
|
else
|
||||||
|
drs += pages;
|
||||||
|
vma = vma->vm_next;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbl.proc_segment.vsize = vsize;
|
||||||
|
tbl.proc_segment.size = size;
|
||||||
|
tbl.proc_segment.resident = resident;
|
||||||
|
tbl.proc_segment.shared = share;
|
||||||
|
tbl.proc_segment.trs = trs;
|
||||||
|
tbl.proc_segment.lrs = lrs;
|
||||||
|
tbl.proc_segment.dt = dt;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TABLE_PROC_TIME:
|
||||||
|
tbl.proc_time.utime = tsk->utime;
|
||||||
|
tbl.proc_time.stime = tsk->stime;
|
||||||
|
tbl.proc_time.cutime = tsk->cutime;
|
||||||
|
tbl.proc_time.cstime = tsk->cstime;
|
||||||
|
|
||||||
|
tbl.proc_time.start_time = tsk->start_time;
|
||||||
|
tbl.proc_time.timeout = tsk->timeout;
|
||||||
|
tbl.proc_time.policy = tsk->policy;
|
||||||
|
tbl.proc_time.rt_priority = tsk->rt_priority;
|
||||||
|
|
||||||
|
tbl.proc_time.it_real_value = tsk->it_real_value;
|
||||||
|
tbl.proc_time.it_prof_value = tsk->it_prof_value;
|
||||||
|
tbl.proc_time.it_virt_value = tsk->it_virt_value;
|
||||||
|
tbl.proc_time.it_real_incr = tsk->it_real_incr;
|
||||||
|
tbl.proc_time.it_prof_incr = tsk->it_prof_incr;
|
||||||
|
tbl.proc_time.it_virt_incr = tsk->it_virt_incr;
|
||||||
|
break;
|
||||||
|
case TABLE_PROC_KERNEL:
|
||||||
|
tbl.proc_kernel.min_flt = tsk->min_flt;
|
||||||
|
tbl.proc_kernel.cmin_flt = tsk->cmin_flt;
|
||||||
|
tbl.proc_kernel.maj_flt = tsk->maj_flt;
|
||||||
|
tbl.proc_kernel.cmaj_flt = tsk->cmaj_flt;
|
||||||
|
|
||||||
|
tbl.proc_kernel.kesp = tsk->kernel_stack_page ? KSTK_EIP(tsk) : 0;
|
||||||
|
tbl.proc_kernel.keip = tsk->kernel_stack_page ? KSTK_ESP(tsk) : 0;
|
||||||
|
|
||||||
|
tbl.proc_kernel.nswap = tsk->nswap;
|
||||||
|
tbl.proc_kernel.cnswap = tsk->cnswap;
|
||||||
|
|
||||||
|
tbl.proc_kernel.wchan = get_wchan (tsk);
|
||||||
|
break;
|
||||||
|
case TABLE_NETACCT:
|
||||||
|
for (chain = ip_fw_chains; chain; chain = chain->next) {
|
||||||
|
for (rule = chain->chain; rule; rule = rule->next) {
|
||||||
|
const char *name = rule->ipfw.fw_vianame;
|
||||||
|
int k;
|
||||||
|
|
||||||
|
if (name [0] && !strncmp (param, name, 5))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (k = 0; k < NUM_SLOTS; k++) {
|
||||||
|
tbl.netacct.packets +=
|
||||||
|
rule->counters[k].pcnt;
|
||||||
|
tbl.netacct.bytes +=
|
||||||
|
rule->counters[k].bcnt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = verify_area (VERIFY_WRITE, buf, sizeof (struct table));
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
memcpy_tofs (buf, &tbl, sizeof (union table));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
324
kernel/table20/unistd-i386.h
Normal file
324
kernel/table20/unistd-i386.h
Normal file
@@ -0,0 +1,324 @@
|
|||||||
|
#ifndef _ASM_I386_UNISTD_H_
|
||||||
|
#define _ASM_I386_UNISTD_H_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file contains the system call numbers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define __NR_setup 0 /* used only by init, to get system going */
|
||||||
|
#define __NR_exit 1
|
||||||
|
#define __NR_fork 2
|
||||||
|
#define __NR_read 3
|
||||||
|
#define __NR_write 4
|
||||||
|
#define __NR_open 5
|
||||||
|
#define __NR_close 6
|
||||||
|
#define __NR_waitpid 7
|
||||||
|
#define __NR_creat 8
|
||||||
|
#define __NR_link 9
|
||||||
|
#define __NR_unlink 10
|
||||||
|
#define __NR_execve 11
|
||||||
|
#define __NR_chdir 12
|
||||||
|
#define __NR_time 13
|
||||||
|
#define __NR_mknod 14
|
||||||
|
#define __NR_chmod 15
|
||||||
|
#define __NR_chown 16
|
||||||
|
#define __NR_break 17
|
||||||
|
#define __NR_oldstat 18
|
||||||
|
#define __NR_lseek 19
|
||||||
|
#define __NR_getpid 20
|
||||||
|
#define __NR_mount 21
|
||||||
|
#define __NR_umount 22
|
||||||
|
#define __NR_setuid 23
|
||||||
|
#define __NR_getuid 24
|
||||||
|
#define __NR_stime 25
|
||||||
|
#define __NR_ptrace 26
|
||||||
|
#define __NR_alarm 27
|
||||||
|
#define __NR_oldfstat 28
|
||||||
|
#define __NR_pause 29
|
||||||
|
#define __NR_utime 30
|
||||||
|
#define __NR_stty 31
|
||||||
|
#define __NR_gtty 32
|
||||||
|
#define __NR_access 33
|
||||||
|
#define __NR_nice 34
|
||||||
|
#define __NR_ftime 35
|
||||||
|
#define __NR_sync 36
|
||||||
|
#define __NR_kill 37
|
||||||
|
#define __NR_rename 38
|
||||||
|
#define __NR_mkdir 39
|
||||||
|
#define __NR_rmdir 40
|
||||||
|
#define __NR_dup 41
|
||||||
|
#define __NR_pipe 42
|
||||||
|
#define __NR_times 43
|
||||||
|
#define __NR_prof 44
|
||||||
|
#define __NR_brk 45
|
||||||
|
#define __NR_setgid 46
|
||||||
|
#define __NR_getgid 47
|
||||||
|
#define __NR_signal 48
|
||||||
|
#define __NR_geteuid 49
|
||||||
|
#define __NR_getegid 50
|
||||||
|
#define __NR_acct 51
|
||||||
|
#define __NR_phys 52
|
||||||
|
#define __NR_lock 53
|
||||||
|
#define __NR_ioctl 54
|
||||||
|
#define __NR_fcntl 55
|
||||||
|
#define __NR_mpx 56
|
||||||
|
#define __NR_setpgid 57
|
||||||
|
#define __NR_ulimit 58
|
||||||
|
#define __NR_oldolduname 59
|
||||||
|
#define __NR_umask 60
|
||||||
|
#define __NR_chroot 61
|
||||||
|
#define __NR_ustat 62
|
||||||
|
#define __NR_dup2 63
|
||||||
|
#define __NR_getppid 64
|
||||||
|
#define __NR_getpgrp 65
|
||||||
|
#define __NR_setsid 66
|
||||||
|
#define __NR_sigaction 67
|
||||||
|
#define __NR_sgetmask 68
|
||||||
|
#define __NR_ssetmask 69
|
||||||
|
#define __NR_setreuid 70
|
||||||
|
#define __NR_setregid 71
|
||||||
|
#define __NR_sigsuspend 72
|
||||||
|
#define __NR_sigpending 73
|
||||||
|
#define __NR_sethostname 74
|
||||||
|
#define __NR_setrlimit 75
|
||||||
|
#define __NR_getrlimit 76
|
||||||
|
#define __NR_getrusage 77
|
||||||
|
#define __NR_gettimeofday 78
|
||||||
|
#define __NR_settimeofday 79
|
||||||
|
#define __NR_getgroups 80
|
||||||
|
#define __NR_setgroups 81
|
||||||
|
#define __NR_select 82
|
||||||
|
#define __NR_symlink 83
|
||||||
|
#define __NR_oldlstat 84
|
||||||
|
#define __NR_readlink 85
|
||||||
|
#define __NR_uselib 86
|
||||||
|
#define __NR_swapon 87
|
||||||
|
#define __NR_reboot 88
|
||||||
|
#define __NR_readdir 89
|
||||||
|
#define __NR_mmap 90
|
||||||
|
#define __NR_munmap 91
|
||||||
|
#define __NR_truncate 92
|
||||||
|
#define __NR_ftruncate 93
|
||||||
|
#define __NR_fchmod 94
|
||||||
|
#define __NR_fchown 95
|
||||||
|
#define __NR_getpriority 96
|
||||||
|
#define __NR_setpriority 97
|
||||||
|
#define __NR_profil 98
|
||||||
|
#define __NR_statfs 99
|
||||||
|
#define __NR_fstatfs 100
|
||||||
|
#define __NR_ioperm 101
|
||||||
|
#define __NR_socketcall 102
|
||||||
|
#define __NR_syslog 103
|
||||||
|
#define __NR_setitimer 104
|
||||||
|
#define __NR_getitimer 105
|
||||||
|
#define __NR_stat 106
|
||||||
|
#define __NR_lstat 107
|
||||||
|
#define __NR_fstat 108
|
||||||
|
#define __NR_olduname 109
|
||||||
|
#define __NR_iopl 110
|
||||||
|
#define __NR_vhangup 111
|
||||||
|
#define __NR_idle 112
|
||||||
|
#define __NR_vm86 113
|
||||||
|
#define __NR_wait4 114
|
||||||
|
#define __NR_swapoff 115
|
||||||
|
#define __NR_sysinfo 116
|
||||||
|
#define __NR_ipc 117
|
||||||
|
#define __NR_fsync 118
|
||||||
|
#define __NR_sigreturn 119
|
||||||
|
#define __NR_clone 120
|
||||||
|
#define __NR_setdomainname 121
|
||||||
|
#define __NR_uname 122
|
||||||
|
#define __NR_modify_ldt 123
|
||||||
|
#define __NR_adjtimex 124
|
||||||
|
#define __NR_mprotect 125
|
||||||
|
#define __NR_sigprocmask 126
|
||||||
|
#define __NR_create_module 127
|
||||||
|
#define __NR_init_module 128
|
||||||
|
#define __NR_delete_module 129
|
||||||
|
#define __NR_get_kernel_syms 130
|
||||||
|
#define __NR_quotactl 131
|
||||||
|
#define __NR_getpgid 132
|
||||||
|
#define __NR_fchdir 133
|
||||||
|
#define __NR_bdflush 134
|
||||||
|
#define __NR_sysfs 135
|
||||||
|
#define __NR_personality 136
|
||||||
|
#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
|
||||||
|
#define __NR_setfsuid 138
|
||||||
|
#define __NR_setfsgid 139
|
||||||
|
#define __NR__llseek 140
|
||||||
|
#define __NR_getdents 141
|
||||||
|
#define __NR__newselect 142
|
||||||
|
#define __NR_flock 143
|
||||||
|
#define __NR_msync 144
|
||||||
|
#define __NR_readv 145
|
||||||
|
#define __NR_writev 146
|
||||||
|
#define __NR_getsid 147
|
||||||
|
#define __NR_fdatasync 148
|
||||||
|
#define __NR__sysctl 149
|
||||||
|
#define __NR_mlock 150
|
||||||
|
#define __NR_munlock 151
|
||||||
|
#define __NR_mlockall 152
|
||||||
|
#define __NR_munlockall 153
|
||||||
|
#define __NR_sched_setparam 154
|
||||||
|
#define __NR_sched_getparam 155
|
||||||
|
#define __NR_sched_setscheduler 156
|
||||||
|
#define __NR_sched_getscheduler 157
|
||||||
|
#define __NR_sched_yield 158
|
||||||
|
#define __NR_sched_get_priority_max 159
|
||||||
|
#define __NR_sched_get_priority_min 160
|
||||||
|
#define __NR_sched_rr_get_interval 161
|
||||||
|
#define __NR_nanosleep 162
|
||||||
|
#define __NR_mremap 163
|
||||||
|
#define __NR_table 188
|
||||||
|
|
||||||
|
/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
|
||||||
|
#define _syscall0(type,name) \
|
||||||
|
type name(void) \
|
||||||
|
{ \
|
||||||
|
long __res; \
|
||||||
|
__asm__ volatile ("int $0x80" \
|
||||||
|
: "=a" (__res) \
|
||||||
|
: "0" (__NR_##name)); \
|
||||||
|
if (__res >= 0) \
|
||||||
|
return (type) __res; \
|
||||||
|
errno = -__res; \
|
||||||
|
return -1; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _syscall1(type,name,type1,arg1) \
|
||||||
|
type name(type1 arg1) \
|
||||||
|
{ \
|
||||||
|
long __res; \
|
||||||
|
__asm__ volatile ("int $0x80" \
|
||||||
|
: "=a" (__res) \
|
||||||
|
: "0" (__NR_##name),"b" ((long)(arg1))); \
|
||||||
|
if (__res >= 0) \
|
||||||
|
return (type) __res; \
|
||||||
|
errno = -__res; \
|
||||||
|
return -1; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _syscall2(type,name,type1,arg1,type2,arg2) \
|
||||||
|
type name(type1 arg1,type2 arg2) \
|
||||||
|
{ \
|
||||||
|
long __res; \
|
||||||
|
__asm__ volatile ("int $0x80" \
|
||||||
|
: "=a" (__res) \
|
||||||
|
: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \
|
||||||
|
if (__res >= 0) \
|
||||||
|
return (type) __res; \
|
||||||
|
errno = -__res; \
|
||||||
|
return -1; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
|
||||||
|
type name(type1 arg1,type2 arg2,type3 arg3) \
|
||||||
|
{ \
|
||||||
|
long __res; \
|
||||||
|
__asm__ volatile ("int $0x80" \
|
||||||
|
: "=a" (__res) \
|
||||||
|
: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
|
||||||
|
"d" ((long)(arg3))); \
|
||||||
|
if (__res>=0) \
|
||||||
|
return (type) __res; \
|
||||||
|
errno=-__res; \
|
||||||
|
return -1; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
|
||||||
|
type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
|
||||||
|
{ \
|
||||||
|
long __res; \
|
||||||
|
__asm__ volatile ("int $0x80" \
|
||||||
|
: "=a" (__res) \
|
||||||
|
: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
|
||||||
|
"d" ((long)(arg3)),"S" ((long)(arg4))); \
|
||||||
|
if (__res>=0) \
|
||||||
|
return (type) __res; \
|
||||||
|
errno=-__res; \
|
||||||
|
return -1; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
|
||||||
|
type5,arg5) \
|
||||||
|
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
|
||||||
|
{ \
|
||||||
|
long __res; \
|
||||||
|
__asm__ volatile ("int $0x80" \
|
||||||
|
: "=a" (__res) \
|
||||||
|
: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
|
||||||
|
"d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
|
||||||
|
if (__res>=0) \
|
||||||
|
return (type) __res; \
|
||||||
|
errno=-__res; \
|
||||||
|
return -1; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __KERNEL_SYSCALLS__
|
||||||
|
|
||||||
|
/*
|
||||||
|
* we need this inline - forking from kernel space will result
|
||||||
|
* in NO COPY ON WRITE (!!!), until an execve is executed. This
|
||||||
|
* is no problem, but for the stack. This is handled by not letting
|
||||||
|
* main() use the stack at all after fork(). Thus, no function
|
||||||
|
* calls - which means inline code for fork too, as otherwise we
|
||||||
|
* would use the stack upon exit from 'fork()'.
|
||||||
|
*
|
||||||
|
* Actually only pause and fork are needed inline, so that there
|
||||||
|
* won't be any messing with the stack from main(), but we define
|
||||||
|
* some others too.
|
||||||
|
*/
|
||||||
|
#define __NR__exit __NR_exit
|
||||||
|
static inline _syscall0(int,idle)
|
||||||
|
static inline _syscall0(int,fork)
|
||||||
|
static inline _syscall2(int,clone,unsigned long,flags,char *,esp)
|
||||||
|
static inline _syscall0(int,pause)
|
||||||
|
static inline _syscall0(int,setup)
|
||||||
|
static inline _syscall0(int,sync)
|
||||||
|
static inline _syscall0(pid_t,setsid)
|
||||||
|
static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
|
||||||
|
static inline _syscall1(int,dup,int,fd)
|
||||||
|
static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
|
||||||
|
static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
|
||||||
|
static inline _syscall1(int,close,int,fd)
|
||||||
|
static inline _syscall1(int,_exit,int,exitcode)
|
||||||
|
static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
|
||||||
|
|
||||||
|
static inline pid_t wait(int * wait_stat)
|
||||||
|
{
|
||||||
|
return waitpid(-1,wait_stat,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is the mechanism for creating a new kernel thread.
|
||||||
|
*
|
||||||
|
* NOTE! Only a kernel-only process(ie the swapper or direct descendants
|
||||||
|
* who haven't done an "execve()") should use this: it will work within
|
||||||
|
* a system call from a "real" process, but the process memory space will
|
||||||
|
* not be free'd until both the parent and the child have exited.
|
||||||
|
*/
|
||||||
|
static inline pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
|
||||||
|
{
|
||||||
|
long retval;
|
||||||
|
|
||||||
|
__asm__ __volatile__(
|
||||||
|
"movl %%esp,%%esi\n\t"
|
||||||
|
"int $0x80\n\t" /* Linux/i386 system call */
|
||||||
|
"cmpl %%esp,%%esi\n\t" /* child or parent? */
|
||||||
|
"je 1f\n\t" /* parent - jump */
|
||||||
|
"pushl %3\n\t" /* push argument */
|
||||||
|
"call *%4\n\t" /* call fn */
|
||||||
|
"movl %2,%0\n\t" /* exit */
|
||||||
|
"int $0x80\n"
|
||||||
|
"1:\t"
|
||||||
|
:"=a" (retval)
|
||||||
|
:"0" (__NR_clone), "i" (__NR_exit),
|
||||||
|
"r" (arg), "r" (fn),
|
||||||
|
"b" (flags | CLONE_VM)
|
||||||
|
:"si");
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _ASM_I386_UNISTD_H_ */
|
||||||
1
kernel/table20/version.h
Normal file
1
kernel/table20/version.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#define _TABLE_VERSION 1
|
||||||
4
kernel/table21/.cvsignore
Normal file
4
kernel/table21/.cvsignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
kernel.patch
|
||||||
|
.main.o.flags
|
||||||
|
.table.o.flags
|
||||||
|
.module.o.flags
|
||||||
16
kernel/table21/Makefile
Normal file
16
kernel/table21/Makefile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# Makefile for the linux system information tables.
|
||||||
|
#
|
||||||
|
# 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 := table.o
|
||||||
|
OX_OBJS := main.o
|
||||||
|
|
||||||
|
M_TARGET := table_mod.o
|
||||||
|
MX_OBJS := module.o
|
||||||
|
|
||||||
|
include $(TOPDIR)/Rules.make
|
||||||
21
kernel/table21/README
Normal file
21
kernel/table21/README
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
This is a new system call `table ()' for the Linux table. It is faster
|
||||||
|
than reading from /proc and can be used to fetch all information required
|
||||||
|
for libgtop until whe have some other function (extended sysctl, ...) in
|
||||||
|
standard kernels.
|
||||||
|
|
||||||
|
I didn't want to change sysctl or some other function myself cause this may
|
||||||
|
cause other applications relying upon those function to fail. This is
|
||||||
|
something for the ``real'' kernel gurus ...
|
||||||
|
|
||||||
|
To use this new system call for libgtop, do the following:
|
||||||
|
|
||||||
|
* Copy this directory to /usr/src/linux/table
|
||||||
|
* Make /usr/src/linux/include/linux/table.h symlink to /usr/src/linux/table/table.h
|
||||||
|
* Apply the patch `kernel.patch' to the kernel, compile, install and reboot
|
||||||
|
* Recompile libgtop (remove `config.cache' and run the `autogen.sh' again).
|
||||||
|
|
||||||
|
If you want to change and/or add something - feel free to do so !
|
||||||
|
|
||||||
|
Have fun,
|
||||||
|
|
||||||
|
Martin
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user