Compare commits
10 Commits
LIBGTOP_1_
...
solaris_ma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26b4615262 | ||
|
|
c4ccf53aad | ||
|
|
8fe9163e6b | ||
|
|
293995a277 | ||
|
|
991da49977 | ||
|
|
cbf3bc895e | ||
|
|
75c105d65d | ||
|
|
e83cb0acf7 | ||
|
|
db4d801792 | ||
|
|
f17e45bcc3 |
241
ANNOUNCE-0.25
241
ANNOUNCE-0.25
@@ -1,241 +0,0 @@
|
|||||||
[Posted to the Gnome Mailing List on Fri Aug 21 1998]
|
|
||||||
|
|
||||||
About this release:
|
|
||||||
------------------
|
|
||||||
|
|
||||||
LibGTop 0.25 is a stable release.
|
|
||||||
|
|
||||||
Of cause it has its bug like any software has, I'm planning
|
|
||||||
to fix as many bugs as possible in _this_ release and then
|
|
||||||
re-release it as libgtop-0.26 or even libgtop-0.30.
|
|
||||||
|
|
||||||
Especially portings to new operating systems should be made
|
|
||||||
in this release.
|
|
||||||
|
|
||||||
This also means that we can safely use this version of LibGTop
|
|
||||||
all over the GNOME project.
|
|
||||||
|
|
||||||
Currently LibGTop-Apps is still a little bit under development -
|
|
||||||
especially the LibGTop-Apps GTop does not yet have the full
|
|
||||||
functionallity of the real GTop.
|
|
||||||
|
|
||||||
We should test this extensively and then decide whether to continue
|
|
||||||
with the `libgtop-apps' module or whether to merge all its code
|
|
||||||
back into the modules it came from. I'd like to hear some comments
|
|
||||||
about this from you !
|
|
||||||
|
|
||||||
Please look at the release notes below for more details about this
|
|
||||||
release.
|
|
||||||
|
|
||||||
Where to get the sources
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
The sources can be found at:
|
|
||||||
|
|
||||||
ftp://ftp.home-of-linux.org/pub/
|
|
||||||
|
|
||||||
Tarballs:
|
|
||||||
|
|
||||||
libgtop-0.25.0.tar.gz
|
|
||||||
libgtop-apps-0.25.0.tar.gz
|
|
||||||
|
|
||||||
Source RPM:
|
|
||||||
|
|
||||||
libgtop-0.25.0-REL.src.rpm
|
|
||||||
libgtop-apps-0.25.0-REL.src.rpm
|
|
||||||
|
|
||||||
Binary RPMS:
|
|
||||||
|
|
||||||
libgtop-0.25.0-REL.i386.rpm
|
|
||||||
libgtop-devel-0.25.0-REL.i386.rpm
|
|
||||||
libgtop-examples-0.25.0-REL.i386.rpm
|
|
||||||
libgtop-apps-0.25.0-REL.i386.rpm
|
|
||||||
|
|
||||||
There is some little problem with the binary RPMS of `libgtop-apps':
|
|
||||||
|
|
||||||
Most of its files will conflict with ones from `gnome-core' and `gnome-utils',
|
|
||||||
so you'll need to use the `--force' parameter to install it.
|
|
||||||
|
|
||||||
Getting the sources from CVS:
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
You can also fetch the sources from the GNOME CVS tree
|
|
||||||
(see http://www.gnome.org/ for details).
|
|
||||||
|
|
||||||
To get the latest sources:
|
|
||||||
|
|
||||||
$ cvs checkout libgtop
|
|
||||||
$ cvs checkout libgtop-apps
|
|
||||||
|
|
||||||
To get the sources of *this* release:
|
|
||||||
|
|
||||||
$ cvs checkout -r LIBGTOP_0_25 libgtop
|
|
||||||
$ cvs checkout -r LIBGTOP_0_25 libgtop-apps
|
|
||||||
|
|
||||||
To get the sources of this release with all bug-fixes applied:
|
|
||||||
|
|
||||||
$ cvs checkout -r LIBGTOP_0_25_PATCHES libgtop
|
|
||||||
$ cvs checkout -r LIBGTOP_0_25_PATCHES libgtop-apps
|
|
||||||
|
|
||||||
To get a patch to apply to the tarballs to get all bug-fixes:
|
|
||||||
|
|
||||||
$ cvs rdiff -r LIBGTOP_0_25 -r LIBGTOP_0_25_PATCHES libgtop
|
|
||||||
$ cvs rdiff -r LIBGTOP_0_25 -r LIBGTOP_0_25_PATCHES libgtop-apps
|
|
||||||
|
|
||||||
[Note for people having write access to the GNOME CVS tree:
|
|
||||||
|
|
||||||
Please apply bug fixes to the `LIBGTOP_0_25_PATCHES' branch and
|
|
||||||
merge them into the main trunk.
|
|
||||||
|
|
||||||
After merging, please re-tag the branch `libgtop_0_25_after_merge'.
|
|
||||||
|
|
||||||
This will help us to re-release this package when all bugs are
|
|
||||||
fixed.
|
|
||||||
]
|
|
||||||
|
|
||||||
RELEASE NOTES FOR LIBGTOP 0.25 STABLE
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
OVERVIEW
|
|
||||||
--------
|
|
||||||
|
|
||||||
LibGTop is a library that read information about processes and the running
|
|
||||||
systems. This information include:
|
|
||||||
|
|
||||||
General System Information
|
|
||||||
|
|
||||||
cpu - CPU Usage
|
|
||||||
mem - Memory Usage
|
|
||||||
swap - Swap Usage (including paging activity)
|
|
||||||
loadavg - Load average (including nr_running, nr_tasks, last_pid)
|
|
||||||
uptime - Uptime and Idle time, can be calculated from CPU usage
|
|
||||||
|
|
||||||
SYS V IPC Limits:
|
|
||||||
|
|
||||||
shm_limits - Shared Memory Limits
|
|
||||||
msg_limits - Message Queue Limits
|
|
||||||
sem_limits - Semaphore Set Limits
|
|
||||||
|
|
||||||
Process List:
|
|
||||||
|
|
||||||
proclist - List of processes
|
|
||||||
|
|
||||||
Process information:
|
|
||||||
|
|
||||||
proc_state - cmd, state, uid, gid
|
|
||||||
proc_uid - uid,euid,gid,egid,pid,ppid,pgrp
|
|
||||||
session,tty,tpgid,priority,nice
|
|
||||||
proc_mem - size,vsize,resident,share,rss,rss_rlim
|
|
||||||
proc_time - start_time,rtime,utime,stime,cutime,cstime
|
|
||||||
timeout,it_real_value,frequency
|
|
||||||
proc_signal - signal,blocked,sigignore,sigcatch
|
|
||||||
proc_kernel - k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt
|
|
||||||
kstk_esp,kstk_eip,nwchan,wchan
|
|
||||||
proc_segment - text_rss,shlib_rss,data_rss,stack_rss,dirty_size
|
|
||||||
start_code,end_code,start_stack
|
|
||||||
|
|
||||||
Process maps:
|
|
||||||
|
|
||||||
proc_map - Process map (/proc/<pid>/maps under Linux)
|
|
||||||
|
|
||||||
File system usage:
|
|
||||||
|
|
||||||
mountlist - List of currently mounted filesystems
|
|
||||||
fsusage - File system usage
|
|
||||||
|
|
||||||
PORTABILITY:
|
|
||||||
-----------
|
|
||||||
|
|
||||||
LibGtop is designed to be as portable as possible. None of the functions
|
|
||||||
and retrieved information should be specific to a specific operating
|
|
||||||
system. So you only need to port the system dependent part of the library
|
|
||||||
to a new system and all application programs can then use libgtop on this
|
|
||||||
new system.
|
|
||||||
|
|
||||||
CLIENT/SERVER MODEL:
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Some systems like DEC OSF/1 or BSD require special priviledges for the calling
|
|
||||||
proces to fetch the required information (SUID root/SGID kmem). To solve this
|
|
||||||
problem, I designed a client/server model which makes a call to a SUID/SGID
|
|
||||||
server which fetches the required information whenever it is required. This
|
|
||||||
server is only called for features that really require priviledges, otherwise
|
|
||||||
the sysdeps code is called directory (every user can get the CPU usage on
|
|
||||||
DEC OSF/1, but only root can get information about processes other than the
|
|
||||||
current one).
|
|
||||||
|
|
||||||
There is also some kind of daemon which can be used to fetch information from
|
|
||||||
remote systems (still experimental). This daemon normally runs as nobody and
|
|
||||||
calls the SUID/SGID itself when needed.
|
|
||||||
|
|
||||||
GNOME APPLETS:
|
|
||||||
--------------
|
|
||||||
|
|
||||||
There are some applets and applications which already use LibGTop. They can
|
|
||||||
be found in the `libgtop-apps' module in the GNOME CVS tree:
|
|
||||||
|
|
||||||
* Applets: cpuload, cpumemusage - they need LibGTop to get their information
|
|
||||||
on all systems other than Linux.
|
|
||||||
|
|
||||||
* Applets: diskusage - just uses the mountlist/fsusage features of LibGTop,
|
|
||||||
the one in gnome-core also works on other systems.
|
|
||||||
|
|
||||||
* Applets: multiload - I enhanced the cpuload applet a little bit, it is
|
|
||||||
now a multi applet and can display CPU, Memory and
|
|
||||||
Swap usages.
|
|
||||||
|
|
||||||
GTOP:
|
|
||||||
----
|
|
||||||
|
|
||||||
This cool GNOME app has been ported to use LibGTop. It can be found in
|
|
||||||
`libgtop-apps/gtop' in the GNOME CVS tree.
|
|
||||||
|
|
||||||
You can now use nearly the full functionality of GTop on FreeBSD !
|
|
||||||
|
|
||||||
|
|
||||||
PLATTFORM SPECIFIC NOTES FOR LINUX:
|
|
||||||
==================================
|
|
||||||
|
|
||||||
Under Linux, LibGTop should work without problems and read everything
|
|
||||||
from /proc.
|
|
||||||
|
|
||||||
There is also an experimental kernel interface to read this information
|
|
||||||
directly from the kernel with a system call - but this is still experimental
|
|
||||||
and not well tested while I made this release.
|
|
||||||
|
|
||||||
PLATTFORM SPECIFIC NOTES FOR FREEBSD:
|
|
||||||
====================================
|
|
||||||
|
|
||||||
LibGTop should now work under FreeBSD and give you the full functionality
|
|
||||||
of GTop.
|
|
||||||
|
|
||||||
There are a few caveats:
|
|
||||||
|
|
||||||
* You need to manually make the `$(prefix)/bin/libgtop_server' SGID to kmem
|
|
||||||
after installation and mount the /proc filesystem of FreeBSD
|
|
||||||
(/proc/<pid>/mem is used withing kvm_uread ()).
|
|
||||||
|
|
||||||
* To get the filenames of the process maps displayed in GTop, you need to
|
|
||||||
configure with the `--with-libgtop-inodedb' option (you need GDBM for this
|
|
||||||
to work).
|
|
||||||
|
|
||||||
* You have then to create an inode database which is used to look up to
|
|
||||||
filenames. This is done using the `mkinodedb' program which comes along
|
|
||||||
with libgtop.
|
|
||||||
|
|
||||||
See the file src/inodedb/README for details:
|
|
||||||
|
|
||||||
The `mkinodedb' program which is build in this directory takes two
|
|
||||||
command line arguments: the full pathname of the database to be created
|
|
||||||
and the name of a configuration file consisting of directory and file names
|
|
||||||
each on a line by itself - see `/etc/ld.so.conf' for an example.
|
|
||||||
|
|
||||||
Putting a directory name in this file means all regular files found in this
|
|
||||||
directory are included in the database, but it will not recursively descend
|
|
||||||
into subdirectories (for instance, we want everythink in `/usr/lib' but not
|
|
||||||
every single file in `/usr/lib/sgml'). You can also use filenames to include
|
|
||||||
a single file.
|
|
||||||
|
|
||||||
Have fun,
|
|
||||||
|
|
||||||
Martin <martin@home-of-linux.org>
|
|
||||||
69
ANNOUNCE-1.0
69
ANNOUNCE-1.0
@@ -1,69 +0,0 @@
|
|||||||
[Will be posted to the Gnome Announce List after the release is made]
|
|
||||||
|
|
||||||
About this release:
|
|
||||||
------------------
|
|
||||||
|
|
||||||
LibGTop 1.0 is a stable release that will be released together with
|
|
||||||
GNOME 1.0.
|
|
||||||
|
|
||||||
Please look at the release notes below for more details about this
|
|
||||||
release.
|
|
||||||
|
|
||||||
Where to get the sources
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
The sources can be found at:
|
|
||||||
|
|
||||||
ftp://ftp.home-of-linux.org/pub/
|
|
||||||
|
|
||||||
and at:
|
|
||||||
|
|
||||||
ftp://ftp.gnome.org/pub/GNOME/sources/libgtop/
|
|
||||||
|
|
||||||
Tarballs:
|
|
||||||
|
|
||||||
libgtop-1.0.0.tar.gz
|
|
||||||
|
|
||||||
Source RPM:
|
|
||||||
|
|
||||||
libgtop-1.0.0-REL.src.rpm
|
|
||||||
|
|
||||||
Binary RPMS:
|
|
||||||
|
|
||||||
libgtop-1.0.0-REL.i386.rpm
|
|
||||||
libgtop-devel-1.0.0-REL.i386.rpm
|
|
||||||
libgtop-examples-1.0.0-REL.i386.rpm
|
|
||||||
|
|
||||||
Getting the sources from CVS:
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
You can also fetch the sources from the GNOME CVS tree
|
|
||||||
(see http://www.gnome.org/ for details).
|
|
||||||
|
|
||||||
To get the latest sources:
|
|
||||||
|
|
||||||
$ cvs checkout libgtop
|
|
||||||
|
|
||||||
To get the sources of *this* release:
|
|
||||||
|
|
||||||
$ cvs checkout -r LIBGTOP_1_0 libgtop
|
|
||||||
|
|
||||||
To get the sources of this release with all bug-fixes applied:
|
|
||||||
|
|
||||||
$ cvs checkout -r LIBGTOP_1_0_PATCHES libgtop
|
|
||||||
|
|
||||||
To get a patch to apply to the tarballs to get all bug-fixes:
|
|
||||||
|
|
||||||
$ cvs rdiff -r LIBGTOP_1_0 -r LIBGTOP_1_0_PATCHES libgtop
|
|
||||||
|
|
||||||
[Note for people having write access to the GNOME CVS tree:
|
|
||||||
|
|
||||||
Please apply bug fixes to the `LIBGTOP_1_0_PATCHES' branch and
|
|
||||||
merge them into the main trunk.
|
|
||||||
|
|
||||||
After merging, please re-tag the branch `libgtop_1_0_after_merge'.
|
|
||||||
|
|
||||||
This will help us to re-release this package when all bugs are
|
|
||||||
fixed.
|
|
||||||
]
|
|
||||||
|
|
||||||
17
ChangeLog
17
ChangeLog
@@ -1,5 +1,22 @@
|
|||||||
|
1999-03-01 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.1.
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.0.1 binary age 0,
|
||||||
|
interface age 0.
|
||||||
|
|
||||||
|
1999-03-01 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* configure.in (LIBGTOP_LIBS): Move `-lgtop_common' last to
|
||||||
|
make it work with static-only libs. Thanks to Roderik Muit
|
||||||
|
for pointing this out.
|
||||||
|
(PERL): First check for `perl5', then for `perl'. Thanks again
|
||||||
|
to Roderik Muit.
|
||||||
|
|
||||||
1999-02-24 Martin Baulig <martin@home-of-linux.org>
|
1999-02-24 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
Released LibGTop 1.0.0.
|
||||||
|
|
||||||
* LIBGTOP-VERSION: Set version number to 1.0.0 binary age 0,
|
* LIBGTOP-VERSION: Set version number to 1.0.0 binary age 0,
|
||||||
interface age 0.
|
interface age 0.
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
#
|
#
|
||||||
LIBGTOP_MAJOR_VERSION=1
|
LIBGTOP_MAJOR_VERSION=1
|
||||||
LIBGTOP_MINOR_VERSION=0
|
LIBGTOP_MINOR_VERSION=0
|
||||||
LIBGTOP_MICRO_VERSION=0
|
LIBGTOP_MICRO_VERSION=1
|
||||||
|
|
||||||
LIBGTOP_INTERFACE_AGE=0
|
LIBGTOP_INTERFACE_AGE=0
|
||||||
LIBGTOP_BINARY_AGE=0
|
LIBGTOP_BINARY_AGE=0
|
||||||
|
|
||||||
# Increase each time you change the client/server protocol.
|
# Increase each time you change the client/server protocol.
|
||||||
LIBGTOP_SERVER_VERSION=4
|
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
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ include_HEADERS = glibtop.h
|
|||||||
|
|
||||||
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 ANNOUNCE-0.25 ANNOUNCE-1.0 \
|
RELNOTES-1.0 libgtop-sysdeps.m4 README NEWS.old libgtop-mirror.sh
|
||||||
README NEWS.old libgtop-mirror.sh
|
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
cp libgtop.spec $(distdir)
|
cp libgtop.spec $(distdir)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ AC_CHECK_PROGS(AWK, gawk awk, )
|
|||||||
test -z "$AWK" && AC_MSG_ERROR([Sorry, you need a working awk interpreter.])
|
test -z "$AWK" && AC_MSG_ERROR([Sorry, you need a working awk interpreter.])
|
||||||
|
|
||||||
dnl Most people should have a working perl interpreter on their system
|
dnl Most people should have a working perl interpreter on their system
|
||||||
AC_PATH_PROG(PERL,perl)
|
AC_CHECK_PROGS(PERL, perl5 perl)
|
||||||
test -z "$PERL" && AC_MSG_ERROR([You need to have a working perl interpreter.])
|
test -z "$PERL" && AC_MSG_ERROR([You need to have a working perl interpreter.])
|
||||||
|
|
||||||
AC_CHECK_TOOL(CC,gcc)
|
AC_CHECK_TOOL(CC,gcc)
|
||||||
@@ -326,8 +326,8 @@ fi
|
|||||||
|
|
||||||
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS"
|
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS"
|
||||||
|
|
||||||
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_common -lgtop -lgtop_sysdeps"
|
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop -lgtop_sysdeps -lgtop_common"
|
||||||
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_common -lgtop -lgtop_sysdeps"
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop -lgtop_sysdeps -lgtop_common"
|
||||||
|
|
||||||
LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names"
|
LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names"
|
||||||
LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names -lgtop_names"
|
LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names -lgtop_names"
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
|
|
||||||
%doc RELNOTES-0.25 RELNOTES-1.0 AUTHORS ChangeLog NEWS README
|
%doc RELNOTES-0.25 RELNOTES-1.0 AUTHORS ChangeLog NEWS README
|
||||||
%doc ANNOUNCE-0.25 ANNOUNCE-1.0 TODO NEWS.old copyright.txt
|
%doc TODO NEWS.old copyright.txt
|
||||||
%doc src/inodedb/README.inodedb
|
%doc src/inodedb/README.inodedb
|
||||||
|
|
||||||
%{prefix}/lib/lib*.so.*
|
%{prefix}/lib/lib*.so.*
|
||||||
|
|||||||
2
po/de.po
2
po/de.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: libgtop VERSION\n"
|
"Project-Id-Version: libgtop VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: Martin Baulig <martin@home-of-linux.org>\n"
|
"Last-Translator: Martin Baulig <martin@home-of-linux.org>\n"
|
||||||
"Language-Team: Martin Baulig <martin@home-of-linux.org>\n"
|
"Language-Team: Martin Baulig <martin@home-of-linux.org>\n"
|
||||||
|
|||||||
22
po/es.po
22
po/es.po
@@ -1,7 +1,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: glibtop 0.99.3\n"
|
"Project-Id-Version: glibtop 1.0.0\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
|
"PO-Revision-Date: 1998-12-13 04:38+0100\n"
|
||||||
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
|
"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
|
||||||
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
|
"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
|
||||||
@@ -690,27 +690,27 @@ msgstr "Tiempo CPU multi procesador en modo n
|
|||||||
|
|
||||||
#: sysdeps/names/procuid.c:56
|
#: sysdeps/names/procuid.c:56
|
||||||
msgid "Uid"
|
msgid "Uid"
|
||||||
msgstr ""
|
msgstr "Uid"
|
||||||
|
|
||||||
#: sysdeps/names/procuid.c:56
|
#: sysdeps/names/procuid.c:56
|
||||||
msgid "EUid"
|
msgid "EUid"
|
||||||
msgstr ""
|
msgstr "EUid"
|
||||||
|
|
||||||
#: sysdeps/names/procuid.c:56
|
#: sysdeps/names/procuid.c:56
|
||||||
msgid "Gid"
|
msgid "Gid"
|
||||||
msgstr ""
|
msgstr "Gid"
|
||||||
|
|
||||||
#: sysdeps/names/procuid.c:56
|
#: sysdeps/names/procuid.c:56
|
||||||
msgid "EGid"
|
msgid "EGid"
|
||||||
msgstr ""
|
msgstr "EGid"
|
||||||
|
|
||||||
#: sysdeps/names/procuid.c:56
|
#: sysdeps/names/procuid.c:56
|
||||||
msgid "Pid"
|
msgid "Pid"
|
||||||
msgstr ""
|
msgstr "Pid"
|
||||||
|
|
||||||
#: sysdeps/names/procuid.c:57
|
#: sysdeps/names/procuid.c:57
|
||||||
msgid "PPid"
|
msgid "PPid"
|
||||||
msgstr ""
|
msgstr "PPid"
|
||||||
|
|
||||||
#: sysdeps/names/procuid.c:57
|
#: sysdeps/names/procuid.c:57
|
||||||
msgid "PGrp"
|
msgid "PGrp"
|
||||||
@@ -722,7 +722,7 @@ msgstr "Sesi
|
|||||||
|
|
||||||
#: sysdeps/names/procuid.c:57
|
#: sysdeps/names/procuid.c:57
|
||||||
msgid "Tty"
|
msgid "Tty"
|
||||||
msgstr ""
|
msgstr "Tty"
|
||||||
|
|
||||||
#: sysdeps/names/procuid.c:58
|
#: sysdeps/names/procuid.c:58
|
||||||
msgid "TPGid"
|
msgid "TPGid"
|
||||||
@@ -986,7 +986,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: sysdeps/names/uptime.c:44
|
#: sysdeps/names/uptime.c:44
|
||||||
msgid "Time in seconds since system boot"
|
msgid "Time in seconds since system boot"
|
||||||
msgstr "Tiempo en segungos desde el inicio del sistema"
|
msgstr "Tiempo en segundos desde el inicio del sistema"
|
||||||
|
|
||||||
#: sysdeps/names/uptime.c:45
|
#: sysdeps/names/uptime.c:45
|
||||||
msgid "Time in seconds the system spent in the idle task since system boot"
|
msgid "Time in seconds the system spent in the idle task since system boot"
|
||||||
@@ -1106,7 +1106,7 @@ msgstr "Invocado desde inetd"
|
|||||||
|
|
||||||
#: src/daemon/gnuserv.c:451
|
#: src/daemon/gnuserv.c:451
|
||||||
msgid "INETD"
|
msgid "INETD"
|
||||||
msgstr ""
|
msgstr "INETD"
|
||||||
|
|
||||||
#: src/daemon/gnuserv.c:485
|
#: src/daemon/gnuserv.c:485
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
2
po/fr.po
2
po/fr.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: libgtop VERSION\n"
|
"Project-Id-Version: libgtop VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: Vincent Renardias <vincent@waw.com>\n"
|
"Last-Translator: Vincent Renardias <vincent@waw.com>\n"
|
||||||
"Language-Team: Vincent Renardias <vincent@waw.com>\n"
|
"Language-Team: Vincent Renardias <vincent@waw.com>\n"
|
||||||
|
|||||||
2
po/ja.po
2
po/ja.po
@@ -4,7 +4,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: libgtop VERSION\n"
|
"Project-Id-Version: libgtop VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: 1998-12-11 06:53+09:00\n"
|
"PO-Revision-Date: 1998-12-11 06:53+09:00\n"
|
||||||
"Last-Translator: Eiichiro ITANI <emu@ceres.dti.ne.jp>\n"
|
"Last-Translator: Eiichiro ITANI <emu@ceres.dti.ne.jp>\n"
|
||||||
"Language-Team: <gnome@lists.hypercore.co.jp>\n"
|
"Language-Team: <gnome@lists.hypercore.co.jp>\n"
|
||||||
|
|||||||
2
po/ko.po
2
po/ko.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: libgtop VERSION\n"
|
"Project-Id-Version: libgtop VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: 1999-02-04 14:31:38+0900\n"
|
"PO-Revision-Date: 1999-02-04 14:31:38+0900\n"
|
||||||
"Last-Translator: Sung-Hyun Nam <namsh@lgic.co.kr>\n"
|
"Last-Translator: Sung-Hyun Nam <namsh@lgic.co.kr>\n"
|
||||||
"Language-Team: Korean <ko@li.org>\n"
|
"Language-Team: Korean <ko@li.org>\n"
|
||||||
|
|||||||
2
po/no.po
2
po/no.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: libgtop 0.99.3\n"
|
"Project-Id-Version: libgtop 0.99.3\n"
|
||||||
"POT-Creation-Date: 1999-02-27 22:24+0100\n"
|
"POT-Creation-Date: 1999-03-01 22:58+0100\n"
|
||||||
"PO-Revision-Date: 1999-01-27 23:22+0100\n"
|
"PO-Revision-Date: 1999-01-27 23:22+0100\n"
|
||||||
"Last-Translator: Kjartan Maraas <kmaraas@fib.hl.no>\n"
|
"Last-Translator: Kjartan Maraas <kmaraas@fib.hl.no>\n"
|
||||||
"Language-Team: Norwegian <no@li.org>\n"
|
"Language-Team: Norwegian <no@li.org>\n"
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ glibtop_init_swap_p (glibtop *server)
|
|||||||
glibtop_warn_io_r (server, "kvm_nlist (swap)");
|
glibtop_warn_io_r (server, "kvm_nlist (swap)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (kvm_nlist (server->machine.kd, nlst2) != 0) {
|
if (kvm_nlist (server->machine.kd, nlst2) != 0) {
|
||||||
|
|||||||
18
sysdeps/solaris/Makefile.am
Normal file
18
sysdeps/solaris/Makefile.am
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||||
|
|
||||||
|
INCLUDES = @INCLUDES@
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libgtop_sysdeps.la
|
||||||
|
|
||||||
|
libgtop_sysdeps_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \
|
||||||
|
uptime.c loadavg.c shm_limits.c msg_limits.c \
|
||||||
|
sem_limits.c proclist.c procstate.c procuid.c \
|
||||||
|
proctime.c procmem.c procsignal.c prockernel.c \
|
||||||
|
procsegment.c procargs.c procmap.c netload.c \
|
||||||
|
ppp.c procdata.c
|
||||||
|
|
||||||
|
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||||
|
|
||||||
|
include_HEADERS = glibtop_server.h glibtop_machine.h
|
||||||
|
noinst_HEADERS = glibtop_private.h
|
||||||
|
|
||||||
30
sysdeps/solaris/close.c
Normal file
30
sysdeps/solaris/close.c
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop/close.h>
|
||||||
|
|
||||||
|
/* Closes pipe to gtop server. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_close_s (glibtop *server)
|
||||||
|
{ }
|
||||||
43
sysdeps/solaris/cpu.c
Normal file
43
sysdeps/solaris/cpu.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/cpu.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_cpu = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_cpu_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides information about cpu usage. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_cpu));
|
||||||
|
}
|
||||||
46
sysdeps/solaris/glibtop_machine.h
Normal file
46
sysdeps/solaris/glibtop_machine.h
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_MACHINE_H__
|
||||||
|
#define __GLIBTOP_MACHINE_H__
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <procfs.h>
|
||||||
|
#include <kstat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
BEGIN_LIBGTOP_DECLS
|
||||||
|
|
||||||
|
typedef struct _glibtop_machine glibtop_machine;
|
||||||
|
|
||||||
|
struct _glibtop_machine
|
||||||
|
{
|
||||||
|
uid_t uid, euid;
|
||||||
|
gid_t gid, egid;
|
||||||
|
|
||||||
|
kstat_ctl_t *kstat;
|
||||||
|
};
|
||||||
|
|
||||||
|
END_LIBGTOP_DECLS
|
||||||
|
|
||||||
|
#endif __GLIBTOP_MACHINE_H__
|
||||||
45
sysdeps/solaris/glibtop_private.h
Normal file
45
sysdeps/solaris/glibtop_private.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_PRIVATE_H__
|
||||||
|
#define __GLIBTOP_PRIVATE_H__
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <procfs.h>
|
||||||
|
#include <kstat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
BEGIN_LIBGTOP_DECLS
|
||||||
|
|
||||||
|
/* Read /proc/<pid>/psinfo */
|
||||||
|
int glibtop_get_proc_data_psinfo_s (glibtop *server, struct psinfo *psinfo, pid_t pid);
|
||||||
|
|
||||||
|
/* Read /proc/<pid>/usage */
|
||||||
|
int glibtop_get_proc_data_usage_s (glibtop *server, struct prusage *prusage, pid_t pid);
|
||||||
|
|
||||||
|
END_LIBGTOP_DECLS
|
||||||
|
|
||||||
|
#endif __GLIBTOP_PRIVATE_H__
|
||||||
52
sysdeps/solaris/glibtop_server.h
Normal file
52
sysdeps/solaris/glibtop_server.h
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_SERVER_H__
|
||||||
|
#define __GLIBTOP_SERVER_H__
|
||||||
|
|
||||||
|
BEGIN_LIBGTOP_DECLS
|
||||||
|
|
||||||
|
#define GLIBTOP_SUID_CPU 0
|
||||||
|
#define GLIBTOP_SUID_MEM 0
|
||||||
|
#define GLIBTOP_SUID_SWAP 0
|
||||||
|
#define GLIBTOP_SUID_UPTIME 0
|
||||||
|
#define GLIBTOP_SUID_LOADAVG 0
|
||||||
|
#define GLIBTOP_SUID_SHM_LIMITS 0
|
||||||
|
#define GLIBTOP_SUID_MSG_LIMITS 0
|
||||||
|
#define GLIBTOP_SUID_SEM_LIMITS 0
|
||||||
|
#define GLIBTOP_SUID_PROCLIST 0
|
||||||
|
#define GLIBTOP_SUID_PROC_STATE 0
|
||||||
|
#define GLIBTOP_SUID_PROC_UID 0
|
||||||
|
#define GLIBTOP_SUID_PROC_MEM 0
|
||||||
|
#define GLIBTOP_SUID_PROC_TIME 0
|
||||||
|
#define GLIBTOP_SUID_PROC_SIGNAL 0
|
||||||
|
#define GLIBTOP_SUID_PROC_KERNEL 0
|
||||||
|
#define GLIBTOP_SUID_PROC_SEGMENT 0
|
||||||
|
#define GLIBTOP_SUID_PROC_ARGS 0
|
||||||
|
#define GLIBTOP_SUID_PROC_MAP 0
|
||||||
|
#define GLIBTOP_SUID_NETLOAD 0
|
||||||
|
#define GLIBTOP_SUID_PPP 0
|
||||||
|
|
||||||
|
END_LIBGTOP_DECLS
|
||||||
|
|
||||||
|
#endif
|
||||||
51
sysdeps/solaris/loadavg.c
Normal file
51
sysdeps/solaris/loadavg.c
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/loadavg.h>
|
||||||
|
|
||||||
|
#include <sys/loadavg.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_loadavg =
|
||||||
|
(1 << GLIBTOP_LOADAVG_LOADAVG);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_loadavg_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides load averange. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_loadavg));
|
||||||
|
|
||||||
|
if (getloadavg (buf->loadavg, 3))
|
||||||
|
return;
|
||||||
|
|
||||||
|
buf->flags = _glibtop_sysdeps_loadavg;
|
||||||
|
}
|
||||||
43
sysdeps/solaris/mem.c
Normal file
43
sysdeps/solaris/mem.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/mem.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_mem = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_mem_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.mem = _glibtop_sysdeps_mem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides information about memory usage. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_mem));
|
||||||
|
}
|
||||||
43
sysdeps/solaris/msg_limits.c
Normal file
43
sysdeps/solaris/msg_limits.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/msg_limits.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_msg_limits = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_msg_limits_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides information about sysv ipc limits. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_msg_limits));
|
||||||
|
}
|
||||||
45
sysdeps/solaris/netload.c
Normal file
45
sysdeps/solaris/netload.c
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/netload.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_netload = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_netload_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides network statistics. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
||||||
|
const char *interface)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_netload));
|
||||||
|
}
|
||||||
38
sysdeps/solaris/open.c
Normal file
38
sysdeps/solaris/open.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop/open.h>
|
||||||
|
|
||||||
|
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_open_s (glibtop *server, const char *program_name,
|
||||||
|
const unsigned long features, const unsigned flags)
|
||||||
|
{
|
||||||
|
server->name = program_name;
|
||||||
|
|
||||||
|
server->machine.kstat = kstat_open ();
|
||||||
|
|
||||||
|
if (!server->machine.kstat)
|
||||||
|
glibtop_error_io_r (server, "kstat_open ()");
|
||||||
|
}
|
||||||
44
sysdeps/solaris/ppp.c
Normal file
44
sysdeps/solaris/ppp.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/ppp.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_ppp = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_ppp_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides PPP/ISDN information. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_ppp));
|
||||||
|
}
|
||||||
47
sysdeps/solaris/procargs.c
Normal file
47
sysdeps/solaris/procargs.c
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/xmalloc.h>
|
||||||
|
#include <glibtop/procargs.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_args = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_args_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
char *
|
||||||
|
glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
|
||||||
|
pid_t pid, unsigned max_len)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_args));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
73
sysdeps/solaris/procdata.c
Normal file
73
sysdeps/solaris/procdata.c
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop_private.h>
|
||||||
|
|
||||||
|
/* Read /proc/<pid>/psinfo. */
|
||||||
|
|
||||||
|
int
|
||||||
|
glibtop_get_proc_data_psinfo_s (glibtop *server, struct psinfo *psinfo, pid_t pid)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
char buffer [BUFSIZ];
|
||||||
|
|
||||||
|
sprintf (buffer, "/proc/%d/psinfo", (int) pid);
|
||||||
|
fd = open (buffer, O_RDONLY);
|
||||||
|
if (fd < 0) {
|
||||||
|
glibtop_warn_io_r (server, "open (%s)", buffer);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (read (fd, psinfo, sizeof (struct psinfo)) != sizeof (struct psinfo)) {
|
||||||
|
close (fd);
|
||||||
|
glibtop_warn_io_r (server, "read (%s)", buffer);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
close (fd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
glibtop_get_proc_data_usage_s (glibtop *server, struct prusage *prusage, pid_t pid)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
char buffer [BUFSIZ];
|
||||||
|
|
||||||
|
sprintf (buffer, "/proc/%d/usage", (int) pid);
|
||||||
|
fd = open (buffer, O_RDONLY);
|
||||||
|
if (fd < 0) {
|
||||||
|
glibtop_warn_io_r (server, "open (%s)", buffer);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (read (fd, prusage, sizeof (struct prusage)) != sizeof (struct prusage)) {
|
||||||
|
close (fd);
|
||||||
|
glibtop_warn_io_r (server, "read (%s)", buffer);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
close (fd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
44
sysdeps/solaris/prockernel.c
Normal file
44
sysdeps/solaris/prockernel.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/prockernel.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_kernel = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_kernel_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
|
||||||
|
pid_t pid)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
||||||
|
}
|
||||||
162
sysdeps/solaris/proclist.c
Normal file
162
sysdeps/solaris/proclist.c
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/proclist.h>
|
||||||
|
#include <glibtop/xmalloc.h>
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#define GLIBTOP_PROCLIST_FLAGS 3
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proclist =
|
||||||
|
(1 << GLIBTOP_PROCLIST_TOTAL) + (1 << GLIBTOP_PROCLIST_NUMBER) +
|
||||||
|
(1 << GLIBTOP_PROCLIST_SIZE);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proclist_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define BLOCK_COUNT 256
|
||||||
|
#define BLOCK_SIZE (BLOCK_COUNT * sizeof (unsigned))
|
||||||
|
|
||||||
|
/* Fetch list of currently running processes.
|
||||||
|
*
|
||||||
|
* IMPORTANT NOTE:
|
||||||
|
* On error, this function MUST return NULL and set buf->flags to zero !
|
||||||
|
* On success, it returnes a pointer to a list of buf->number elements
|
||||||
|
* each buf->size big. The total size is stored in buf->total. */
|
||||||
|
|
||||||
|
unsigned *
|
||||||
|
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
|
||||||
|
int64_t which, int64_t arg)
|
||||||
|
{
|
||||||
|
DIR *proc;
|
||||||
|
struct dirent *entry;
|
||||||
|
char buffer [BUFSIZ];
|
||||||
|
unsigned count, total, pid;
|
||||||
|
unsigned pids [BLOCK_COUNT], *pids_chain = NULL;
|
||||||
|
unsigned pids_size = 0, pids_offset = 0, new_size;
|
||||||
|
struct stat statb;
|
||||||
|
int len, i, ok;
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_proclist));
|
||||||
|
|
||||||
|
proc = opendir ("/proc");
|
||||||
|
if (!proc) return NULL;
|
||||||
|
|
||||||
|
/* read every every entry in /proc */
|
||||||
|
|
||||||
|
for (count = total = 0, entry = readdir (proc);
|
||||||
|
entry; entry = readdir (proc)) {
|
||||||
|
ok = 1; len = strlen (entry->d_name);
|
||||||
|
|
||||||
|
/* does it consist entirely of digits? */
|
||||||
|
|
||||||
|
for (i = 0; i < len; i++)
|
||||||
|
if (!isdigit (entry->d_name [i])) ok = 0;
|
||||||
|
if (!ok) continue;
|
||||||
|
|
||||||
|
/* convert it in a number */
|
||||||
|
|
||||||
|
if (sscanf (entry->d_name, "%u", &pid) != 1) continue;
|
||||||
|
|
||||||
|
/* is it really a directory? */
|
||||||
|
|
||||||
|
sprintf (buffer, "/proc/%d", pid);
|
||||||
|
|
||||||
|
if (stat (buffer, &statb)) continue;
|
||||||
|
|
||||||
|
if (!S_ISDIR (statb.st_mode)) continue;
|
||||||
|
|
||||||
|
/* Fine. Now we first try to store it in pids. If this buffer is
|
||||||
|
* full, we copy it to the pids_chain. */
|
||||||
|
|
||||||
|
if (count >= BLOCK_COUNT) {
|
||||||
|
/* The following call to glibtop_realloc will be
|
||||||
|
* equivalent to glibtop_malloc () if `pids_chain' is
|
||||||
|
* NULL. We just calculate the new size and copy `pids'
|
||||||
|
* to the beginning of the newly allocated block. */
|
||||||
|
|
||||||
|
new_size = pids_size + BLOCK_SIZE;
|
||||||
|
|
||||||
|
pids_chain = glibtop_realloc_r
|
||||||
|
(server, pids_chain, new_size);
|
||||||
|
|
||||||
|
memcpy (pids_chain + pids_offset, pids, BLOCK_SIZE);
|
||||||
|
|
||||||
|
pids_size = new_size;
|
||||||
|
|
||||||
|
pids_offset += BLOCK_COUNT;
|
||||||
|
|
||||||
|
count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* pids is now big enough to hold at least one single pid. */
|
||||||
|
|
||||||
|
pids [count++] = pid;
|
||||||
|
|
||||||
|
total++;
|
||||||
|
}
|
||||||
|
|
||||||
|
closedir (proc);
|
||||||
|
|
||||||
|
/* count is only zero if an error occured (one a running Linux system,
|
||||||
|
* we have at least one single process). */
|
||||||
|
|
||||||
|
if (!count) return NULL;
|
||||||
|
|
||||||
|
/* The following call to glibtop_realloc will be equivalent to
|
||||||
|
* glibtop_malloc if pids_chain is NULL. We just calculate the
|
||||||
|
* new size and copy pids to the beginning of the newly allocated
|
||||||
|
* block. */
|
||||||
|
|
||||||
|
new_size = pids_size + count * sizeof (unsigned);
|
||||||
|
|
||||||
|
pids_chain = glibtop_realloc_r (server, pids_chain, new_size);
|
||||||
|
|
||||||
|
memcpy (pids_chain + pids_offset, pids, count * sizeof (unsigned));
|
||||||
|
|
||||||
|
pids_size = new_size;
|
||||||
|
|
||||||
|
pids_offset += BLOCK_COUNT;
|
||||||
|
|
||||||
|
/* Since everything is ok now, we can set buf->flags, fill in the
|
||||||
|
* remaining fields and return the `pids_chain'. */
|
||||||
|
|
||||||
|
buf->flags = _glibtop_sysdeps_proclist;
|
||||||
|
|
||||||
|
buf->size = sizeof (unsigned);
|
||||||
|
buf->number = total;
|
||||||
|
|
||||||
|
buf->total = total * sizeof (unsigned);
|
||||||
|
|
||||||
|
return pids_chain;
|
||||||
|
}
|
||||||
50
sysdeps/solaris/procmap.c
Normal file
50
sysdeps/solaris/procmap.c
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/xmalloc.h>
|
||||||
|
#include <glibtop/procmap.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_map = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_map_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
glibtop_map_entry *
|
||||||
|
glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
|
||||||
|
{
|
||||||
|
glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0);
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_map));
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
44
sysdeps/solaris/procmem.c
Normal file
44
sysdeps/solaris/procmem.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/procmem.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_mem = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_mem_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
|
||||||
|
pid_t pid)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_mem));
|
||||||
|
}
|
||||||
44
sysdeps/solaris/procsegment.c
Normal file
44
sysdeps/solaris/procsegment.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/procsegment.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_segment = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_segment_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
|
||||||
|
pid_t pid)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_segment));
|
||||||
|
}
|
||||||
44
sysdeps/solaris/procsignal.c
Normal file
44
sysdeps/solaris/procsignal.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/procsignal.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_signal = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_signal_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
|
||||||
|
pid_t pid)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_signal));
|
||||||
|
}
|
||||||
59
sysdeps/solaris/procstate.c
Normal file
59
sysdeps/solaris/procstate.c
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/procstate.h>
|
||||||
|
|
||||||
|
#include <glibtop_private.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_state =
|
||||||
|
(1 << GLIBTOP_PROC_STATE_UID) + (1 << GLIBTOP_PROC_STATE_GID) +
|
||||||
|
(1 << GLIBTOP_PROC_STATE_CMD);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_state_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
|
||||||
|
{
|
||||||
|
struct psinfo psinfo;
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||||
|
|
||||||
|
if (glibtop_get_proc_data_psinfo_s (server, &psinfo, pid))
|
||||||
|
return;
|
||||||
|
|
||||||
|
buf->uid = psinfo.pr_uid;
|
||||||
|
buf->gid = psinfo.pr_gid;
|
||||||
|
|
||||||
|
strncpy (buf->cmd, psinfo.pr_fname, 39);
|
||||||
|
|
||||||
|
buf->flags = _glibtop_sysdeps_proc_state;
|
||||||
|
}
|
||||||
65
sysdeps/solaris/proctime.c
Normal file
65
sysdeps/solaris/proctime.c
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/proctime.h>
|
||||||
|
|
||||||
|
#include <glibtop_private.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_time =
|
||||||
|
(1 << GLIBTOP_PROC_TIME_START_TIME) + (1 << GLIBTOP_PROC_TIME_RTIME) +
|
||||||
|
(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_STIME);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_time_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
|
||||||
|
pid_t pid)
|
||||||
|
{
|
||||||
|
struct prusage prusage;
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_time));
|
||||||
|
|
||||||
|
if (glibtop_get_proc_data_usage_s (server, &prusage, pid))
|
||||||
|
return;
|
||||||
|
|
||||||
|
buf->start_time = prusage.pr_create.tv_sec * 1E+6 +
|
||||||
|
prusage.pr_create.tv_nsec / 1E+3;
|
||||||
|
|
||||||
|
buf->rtime = prusage.pr_rtime.tv_sec * 1E+6 +
|
||||||
|
prusage.pr_rtime.tv_nsec / 1E+3;
|
||||||
|
buf->utime = prusage.pr_utime.tv_sec * 1E+6 +
|
||||||
|
prusage.pr_utime.tv_nsec / 1E+3;
|
||||||
|
buf->stime = prusage.pr_stime.tv_sec * 1E+6 +
|
||||||
|
prusage.pr_stime.tv_nsec / 1E+3;
|
||||||
|
|
||||||
|
buf->flags = _glibtop_sysdeps_proc_time;
|
||||||
|
}
|
||||||
69
sysdeps/solaris/procuid.c
Normal file
69
sysdeps/solaris/procuid.c
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/procuid.h>
|
||||||
|
|
||||||
|
#include <glibtop_private.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_proc_uid =
|
||||||
|
(1 << GLIBTOP_PROC_UID_EUID) + (1 << GLIBTOP_PROC_UID_UID) +
|
||||||
|
(1 << GLIBTOP_PROC_UID_EGID) + (1 << GLIBTOP_PROC_UID_GID) +
|
||||||
|
(1 << GLIBTOP_PROC_UID_PID) + (1 << GLIBTOP_PROC_UID_PPID) +
|
||||||
|
(1 << GLIBTOP_PROC_UID_PGRP) + (1 << GLIBTOP_PROC_UID_SESSION) +
|
||||||
|
(1 << GLIBTOP_PROC_UID_TTY);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_proc_uid_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides detailed information about a process. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid)
|
||||||
|
{
|
||||||
|
struct psinfo psinfo;
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_proc_uid));
|
||||||
|
|
||||||
|
if (glibtop_get_proc_data_psinfo_s (server, &psinfo, pid))
|
||||||
|
return;
|
||||||
|
|
||||||
|
buf->euid = psinfo.pr_euid;
|
||||||
|
buf->uid = psinfo.pr_uid;
|
||||||
|
buf->egid = psinfo.pr_egid;
|
||||||
|
buf->gid = psinfo.pr_gid;
|
||||||
|
|
||||||
|
buf->pid = psinfo.pr_pid;
|
||||||
|
buf->ppid = psinfo.pr_ppid;
|
||||||
|
buf->pgrp = psinfo.pr_pgid;
|
||||||
|
|
||||||
|
buf->session = psinfo.pr_sid;
|
||||||
|
buf->tty = psinfo.pr_ttydev;
|
||||||
|
|
||||||
|
buf->flags = _glibtop_sysdeps_proc_uid;
|
||||||
|
}
|
||||||
43
sysdeps/solaris/sem_limits.c
Normal file
43
sysdeps/solaris/sem_limits.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/sem_limits.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_sem_limits = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_sem_limits_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides information about sysv sem limits. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_sem_limits));
|
||||||
|
}
|
||||||
43
sysdeps/solaris/shm_limits.c
Normal file
43
sysdeps/solaris/shm_limits.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/shm_limits.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_shm_limits = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_shm_limits_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides information about sysv ipc limits. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_shm_limits));
|
||||||
|
}
|
||||||
28
sysdeps/solaris/siglist.c
Normal file
28
sysdeps/solaris/siglist.c
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/signal.h>
|
||||||
|
|
||||||
|
const glibtop_signame glibtop_sys_siglist [] =
|
||||||
|
{ { 0, NULL, NULL } };
|
||||||
43
sysdeps/solaris/swap.c
Normal file
43
sysdeps/solaris/swap.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/swap.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_swap = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_swap_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.swap = _glibtop_sysdeps_swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides information about swap usage. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_swap));
|
||||||
|
}
|
||||||
43
sysdeps/solaris/uptime.c
Normal file
43
sysdeps/solaris/uptime.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/uptime.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_uptime = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_init_uptime_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides uptime and idle time. */
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_uptime));
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user