diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 0f8f342c..00000000 --- a/.cvsignore +++ /dev/null @@ -1,34 +0,0 @@ -Makefile -Makefile.in -aclocal.m4 -config.cache -config.h -config.h.in -config.log -config.sub -config.guess -config.status -configure -gtopConf.sh -i386-bsdi -i686-pc-linux-gnu -intl -libgtop-0.01.tar.gz -libgtop-mirror.sh.swp -libgtopConf.sh -libtool -ltconfig -ltmain.sh -macros -stamp-h -sun4 -sun4sol2 -support -i386-freebsd -alpha-dec-osf3.0 -i686-pc-linux-gnu-linux -libgtop-config -ABOUT-NLS -libgtop.spec -libgtop-0.99.*.tar.gz -libgtop-0.99.* diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 8148100d..00000000 --- a/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Martin Baulig (martin@home-of-linux.org) -Josh Sled diff --git a/ChangeLog b/ChangeLog index 9ba3d6d1..9b84bdd9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-05-03 Martin Baulig + + This is the `LIBGTOP_STABLE_1_0' branch in CVS; please do only + commit bug fixes here. + + * LIBGTOP-VERSION: Set version number to 1.0.2 binary age 1, + interface age 0. + 1999-03-01 Martin Baulig Released LibGTop 1.0.1. diff --git a/LIBGTOP-VERSION b/LIBGTOP-VERSION index 9aa2e879..ab0e1a8a 100644 --- a/LIBGTOP-VERSION +++ b/LIBGTOP-VERSION @@ -8,10 +8,10 @@ # LIBGTOP_MAJOR_VERSION=1 LIBGTOP_MINOR_VERSION=0 -LIBGTOP_MICRO_VERSION=1 +LIBGTOP_MICRO_VERSION=2 -LIBGTOP_INTERFACE_AGE=0 -LIBGTOP_BINARY_AGE=0 +LIBGTOP_INTERFACE_AGE=1 +LIBGTOP_BINARY_AGE=1 # Increase each time you change the client/server protocol. LIBGTOP_SERVER_VERSION=5 diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index efe69a9b..00000000 --- a/Makefile.am +++ /dev/null @@ -1,86 +0,0 @@ -## Process this file with automake to produce Makefile.in. - -if EXAMPLES -examples_SUBDIRS = examples -else -examples_SUBDIRS = -endif - -if BUILD_GNOME_SUPPORT -support = support -endif - -SUBDIRS = po intl $(support) macros misc include sysdeps lib src \ - $(examples_SUBDIRS) - -include_HEADERS = glibtop.h - -EXTRA_DIST = autogen.sh libgtop.spec.in copyright.txt libgtopConf.sh.in \ - LIBGTOP-VERSION features.def libgtop-config.in RELNOTES-0.25 \ - RELNOTES-1.0 libgtop-sysdeps.m4 README NEWS.old libgtop-mirror.sh - -dist-hook: - cp libgtop.spec $(distdir) - -release: - $(MAKE) dist distdir=$(PACKAGE)-$(VERSION) - -## Put `exec' in the name because this should be installed by -## `install-exec', not `install-data'. -confexecdir = $(libdir) -confexec_DATA = $(top_builddir)/libgtopConf.sh \ - $(top_builddir)/libgtop-features.def - -bin_SCRIPTS = $(top_builddir)/libgtop-config - -## to automatically rebuild aclocal.m4 if any of the macros in -## `macros/' change -@MAINT@ include macros/macros.dep -@MAINT@macros/macros.dep: macros/Makefile.am -@MAINT@ cd macros && $(MAKE) macros.dep - -@MAINT@$(top_srcdir)/aclocal.m4: libgtop-sysdeps.m4 - -## We create libgtopConf.sh here and not from configure because we want -## to get the paths expanded correctly. Macros like srcdir are given -## the value NONE in configure if the user doesn't specify them (this -## is an autoconf feature, not a bug). -libgtopConf.sh: libgtopConf.sh.in Makefile -## Use sed and then mv to avoid problems if the user interrupts. - sed -e 's#\@LIBGTOP_LIBDIR\@#$(libdir)#g' \ - -e 's#\@LIBGTOP_INCLUDEDIR\@#$(includedir)#g' \ - -e 's#\@LIBGTOP_DATADIR\@#$(datadir)#g' \ - -e 's#\@LIBGTOP_EXTRA_LIBS\@#$(LIBGTOP_EXTRA_LIBS)#g' \ - -e 's#\@LIBGTOP_LIBS\@#$(LIBGTOP_LIBS)#g' \ - -e 's#\@LIBGTOP_INCS\@#$(LIBGTOP_INCS)#g' \ - -e 's#\@LIBGTOP_NAMES_LIBS\@#$(LIBGTOP_NAMES_LIBS)#g' \ - -e 's#\@LIBGTOP_NAMES_INCS\@#$(LIBGTOP_NAMES_INCS)#g' \ - -e 's#\@LIBGTOP_GUILE_LIBS\@#$(LIBGTOP_GUILE_LIBS)#g' \ - -e 's#\@LIBGTOP_GUILE_INCS\@#$(LIBGTOP_GUILE_INCS)#g' \ - -e 's#\@LIBGTOP_GUILE_NAMES_LIBS\@#$(LIBGTOP_GUILE_NAMES_LIBS)#g' \ - -e 's#\@LIBGTOP_GUILE_NAMES_INCS\@#$(LIBGTOP_GUILE_NAMES_INCS)#g' \ - -e 's#\@LIBGTOP_BINDIR\@#$(LIBGTOP_BINDIR)#g' \ - -e 's#\@LIBGTOP_SERVER\@#$(LIBGTOP_SERVER)#g' \ - -e 's#\@LIBGTOP_MAJOR_VERSION\@#$(LIBGTOP_MAJOR_VERSION)#g' \ - -e 's#\@LIBGTOP_MINOR_VERSION\@#$(LIBGTOP_MINOR_VERSION)#g' \ - -e 's#\@LIBGTOP_MICRO_VERSION\@#$(LIBGTOP_MICRO_VERSION)#g' \ - -e 's#\@LIBGTOP_VERSION\@#$(LIBGTOP_VERSION)#g' \ - -e 's#\@LIBGTOP_VERSION_CODE\@#$(LIBGTOP_VERSION_CODE)#g' \ - -e 's#\@LIBGTOP_SERVER_VERSION\@#$(LIBGTOP_SERVER_VERSION)#g' \ - -e 's#\@libgtop_sysdeps_dir\@#$(libgtop_sysdeps_dir)#g' \ - -e 's#\@libgtop_need_server\@#$(libgtop_need_server)#g' \ - -e 's#\@libgtop_use_machine_h\@#$(libgtop_use_machine_h)#g' \ - -e 's#\@libgtop_guile_found\@#$(libgtop_guile_found)#g' \ - -e 's#\@libgtop_want_examples\@#$(libgtop_want_examples)#g' \ - < $(srcdir)/libgtopConf.sh.in > libgtopConf.tmp \ - && mv libgtopConf.tmp libgtopConf.sh - -libgtop-config: libgtop-config.in Makefile - sed -e 's#\@LIBGTOP_LIBDIR\@#$(libdir)#g' \ - < $(srcdir)/libgtop-config.in > libgtop-config.tmp \ - && mv libgtop-config.tmp libgtop-config && \ - chmod 755 libgtop-config - -libgtop-features.def: features.def - @LN_S@ $< $@ - diff --git a/NEWS b/NEWS deleted file mode 100644 index e69de29b..00000000 diff --git a/NEWS.old b/NEWS.old deleted file mode 100644 index f886566e..00000000 --- a/NEWS.old +++ /dev/null @@ -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_' - 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 - - * 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_' now start with 1. - - * include/glibtop/*.h: we now #define 'glibtop_get_' - as 'glibtop_get___l' and 'glibtop_get___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 - - * src/server/main.c: we now use the '__p' functions, - but only if the appropriate 'GLIBTOP_SUID_' - 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_' 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_' - being either 'GLIBTOP_SYSDEPS_'+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). diff --git a/README b/README deleted file mode 100644 index 20129586..00000000 --- a/README +++ /dev/null @@ -1,8 +0,0 @@ -$Id$ - -LATEST NEWS: -=========== - -Please look also in the file 'NEWS' for latest news. - -Martin diff --git a/RELNOTES-0.25 b/RELNOTES-0.25 deleted file mode 100644 index d00152e4..00000000 --- a/RELNOTES-0.25 +++ /dev/null @@ -1,146 +0,0 @@ -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//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//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 diff --git a/RELNOTES-1.0 b/RELNOTES-1.0 deleted file mode 100644 index e2708f1f..00000000 --- a/RELNOTES-1.0 +++ /dev/null @@ -1,163 +0,0 @@ -RELEASE NOTES FOR LIBGTOP 1.0 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 - -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//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: ------------------ - -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 ... - -Although LibGTop is not specific to GNOME and under LGPL license, I -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). - -However, you can also give its configure.in script the `--without-gnome' -parameter and then use it fully without GNOME in your own applications. - -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. - -Currently my primary aim is to help the GNOME people with our 1.0 release -so I won't have much time to test it with any other system than Linux. - -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: -================================== - -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: -==================================== - -Since so many people were asking me about this: - -LibGTop currently does not have any support for Solaris, and it will -never have until some volunteer writes the code for it. I can't do this -myself since I do not have any machine to test it on. - -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//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 diff --git a/TODO b/TODO deleted file mode 100644 index 7be02768..00000000 --- a/TODO +++ /dev/null @@ -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 diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index 9da7413a..00000000 --- a/acconfig.h +++ /dev/null @@ -1,161 +0,0 @@ - -/* Define if gethostname () must be declared. */ -#undef NEED_DECLARATION_GETHOSTNAME - -/* Define if setreuid () must be declared. */ -#undef NEED_DECLARATION_SETREUID - -/* Define if setregid () must be declared. */ -#undef NEED_DECLARATION_SETREGID - -/* Define if getpagesize () must be declared. */ -#undef NEED_DECLARATION_GETPAGESIZE - -/* Define if program_invocation_name must be declared. */ -#undef NEED_DECLARATION_PROGRAM_INVOCATION_NAME - -@TOP@ - -#undef ENABLE_NLS -#undef HAVE_CATGETS -#undef HAVE_GETTEXT -#undef HAVE_LC_MESSAGES -#undef HAVE_STPCPY -#undef HAVE_STRUCT_OSOCKADDR -#undef PACKAGE -#undef VERSION -#undef HAVE_LIBSM -#undef HAVE_LIBINTL_H -#undef HAVE_GTK_SIGNAL_HANDLER_PENDING - -/* Do not remove this comments and the empty lines; they are needed */ -#undef HAVE_PROGRAM_INVOCATION_SHORT_NAME -/* Define if you have the Andrew File System. */ -#undef AFS - -/* Define one of the following to indicate how a program can - get a list of mounted filesystems. */ - -/* Define if there is no specific function for reading the list of - mounted filesystems. fread will be used to read /etc/mnttab. [SVR2] */ -#undef MOUNTED_FREAD - -/* Define if (like SVR2) there is no specific function for reading the - list of mounted filesystems, and your system has these header files: - and . [SVR3] */ -#undef MOUNTED_FREAD_FSTYP - -/* Define if there is a function named getfsstat for reading the list - of mounted filesystems. [DEC Alpha running OSF/1] */ -#undef MOUNTED_GETFSSTAT - -/* Define if there is a function named getmnt for reading the list of - mounted filesystems. [Ultrix] */ -#undef MOUNTED_GETMNT - -/* Define if there is a function named getmntent for reading the list - of mounted filesystems, and that function takes a single argument. - [4.3BSD, SunOS, HP-UX, Dynix, Irix] */ -#undef MOUNTED_GETMNTENT1 - -/* Define if there is a function named getmntent for reading the list of - mounted filesystems, and that function takes two arguments. [SVR4] */ -#undef MOUNTED_GETMNTENT2 - -/* Define if there is a function named getmntinfo for reading the list - of mounted filesystems. [4.4BSD] */ -#undef MOUNTED_GETMNTINFO - -/* Define if there is a function named listmntent that can be used to - list all mounted filesystems. [UNICOS] */ -#undef MOUNTED_LISTMNTENT - -/* Define if there is a function named mntctl that can be used to read - the list of mounted filesystems, and there is a system header file - that declares `struct vmount.' [AIX] */ -#undef MOUNTED_VMOUNT - -/* Define one of the following to indicate how a program can obtain - filesystems usage information. */ - -/* Define if statfs takes 3 args. [DEC Alpha running OSF/1] */ -#undef STAT_STATFS3_OSF1 - -/* Define if there is no specific function for reading filesystems usage - information and you have the header file. [SVR2] */ -#undef STAT_READ_FILSYS - -/* Define if statfs takes 2 args and struct statfs has a field named f_bsize. - [4.3BSD, SunOS 4, HP-UX, AIX PS/2] */ -#undef STAT_STATFS2_BSIZE - -/* Define if statfs takes 2 args and struct statfs has a field named f_fsize. - [4.4BSD, NetBSD] */ -#undef STAT_STATFS2_FSIZE - -/* Define if statfs takes 2 args and the second argument has - type struct fs_data. [Ultrix] */ -#undef STAT_STATFS2_FS_DATA - -/* Define if statfs takes 4 args. [SVR3, Dynix, Irix, Dolphin] */ -#undef STAT_STATFS4 - -/* Define if there is a function named statvfs. [SVR4] */ -#undef STAT_STATVFS - -/* Define if the block counts reported by statfs may be truncated to 2GB - and the correct values may be stored in the f_spare array. - [SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem. - SunOS 4.1.1 seems not to be affected.] */ -#undef STATFS_TRUNCATES_BLOCK_COUNTS - - -/* to fix a bug in autoheader on DEC OSF1. */ -#undef HAVE_PROGRAM_INVOCATION_NAME - -#undef HAVE_SOCKETS -#undef HAVE_SOCKADDR_SUN_LEN - -#undef HAVE_LIBJPEG -#undef HAVE_LIBGIF -#undef HAVE_LIBTIFF -#undef HAVE_LIBZ -#undef HAVE_LIBPNG -#undef HAVE_GMP2_INCLUDE_DIR -#undef HAVE_GUILE - -#undef ssize_t -#undef u_int64_t -#undef int64_t - -#undef HAVE_GLIBTOP_MACHINE_H - -#undef GLIBTOP_NAMES -#undef GLIBTOP_GUILE -#undef GLIBTOP_GUILE_NAMES -#undef GLIBTOP_EXAMPLES -#undef GLIBTOP_INODEDB - -#undef NEED_LIBGTOP - -#undef HAVE_LINUX_TABLE -#undef HAVE_LIBGTOP_SMP - -#undef HAVE_XAUTH - -/* Define if your have the I4B package. */ -#undef HAVE_I4B -#undef HAVE_I4B_ACCT - -/* Define to enable debugging. */ -#undef LIBGTOP_ENABLE_DEBUG -#undef LIBGTOP_FATAL_WARNINGS - -/* Same as LINUX_VERSION_CODE either from or from - * the running kernel (if we don't have configured kernel sources). - */ -#undef GLIBTOP_LINUX_VERSION_CODE - -/* Define if you want to use LibGTop without GNOME. */ -#undef WITHOUT_GNOME - diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 13ee7e0c..00000000 --- a/autogen.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -PKG_NAME="Gnome Top Library" - -(test -f $srcdir/configure.in \ - && test -f $srcdir/copyright.txt \ - && test -d $srcdir/sysdeps) || { - echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" - echo " top-level gnome directory" - exit 1 -} - -. $srcdir/macros/autogen.sh diff --git a/configure.in b/configure.in deleted file mode 100644 index e86160ab..00000000 --- a/configure.in +++ /dev/null @@ -1,410 +0,0 @@ -dnl -dnl Configure script for the Gnome library -dnl - -AC_INIT(copyright.txt) -AM_CONFIG_HEADER(config.h) -AC_CANONICAL_SYSTEM - -dnl This is required at several places -AC_CHECK_PROG(ac_dc_found, dc, yes, no) -if test x$ac_dc_found != xyes ; then -AC_MSG_ERROR([ -*** The "dc" utility was not found on your system. -*** -*** When using RedHat Linux, you need to install the "bc" package. -***]) -fi - -. $srcdir/LIBGTOP-VERSION -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) - -AC_SUBST(LIBGTOP_MAJOR_VERSION) -AC_SUBST(LIBGTOP_MINOR_VERSION) -AC_SUBST(LIBGTOP_MICRO_VERSION) -AC_SUBST(LIBGTOP_INTERFACE_AGE) -AC_SUBST(LIBGTOP_BINARY_AGE) -AC_SUBST(LIBGTOP_SERVER_VERSION) -AC_SUBST(LIBGTOP_VERSION) -AC_SUBST(LIBGTOP_VERSION_CODE) - -# libtool versioning -LT_RELEASE=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION -LT_CURRENT=`expr $LIBGTOP_MICRO_VERSION - $LIBGTOP_INTERFACE_AGE` -LT_REVISION=$LIBGTOP_INTERFACE_AGE -LT_AGE=`expr $LIBGTOP_BINARY_AGE - $LIBGTOP_INTERFACE_AGE` -LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}' -AC_SUBST(LT_VERSION_INFO) -AC_SUBST(LT_RELEASE) -AC_SUBST(LT_CURRENT) -AC_SUBST(LT_REVISION) -AC_SUBST(LT_AGE) - -AM_ACLOCAL_INCLUDE(. macros) - -AC_ISC_POSIX -AC_PROG_CC -AC_STDC_HEADERS -AC_ARG_PROGRAM - -dnl We don't use `AC_PROG_AWK' since it checks for mawk first which -dnl does not work for libgtop. -AC_CHECK_PROGS(AWK, gawk awk, ) -test -z "$AWK" && AC_MSG_ERROR([Sorry, you need a working awk interpreter.]) - -dnl Most people should have a working perl interpreter on their system -AC_CHECK_PROGS(PERL, perl5 perl) -test -z "$PERL" && AC_MSG_ERROR([You need to have a working perl interpreter.]) - -AC_CHECK_TOOL(CC,gcc) -AC_CHECK_TOOL(RANLIB,ranlib) -AC_CHECK_TOOL(AS,as) -AC_CHECK_TOOL(AR,ar) -AC_CHECK_TOOL(NM,nm) - -NM=`which $NM` -export CC CXX RANLIB LD AS AR NM - -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET - -export cross_compiling - -AM_PROG_LIBTOOL - -dnl Let the user enable compiler warnings -GNOME_COMPILE_WARNINGS - -GNOME_INIT_HOOK(gnome_found=yes) - -if test "x$gnome_found" != xyes; then - if test "x$want_gnome" != xno ; then - AC_MSG_ERROR([ -*** GNOME was not found on this system. *** - -*** If you want to use LibGTop without GNOME, you need -*** to give configure the --without-gnome parameter. -]) - 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_TYPES - -AC_ARG_WITH(libgtop-guile, -[ --with-libgtop-guile Build the libgtop guile interface (default=no)], -[build_guile="$withval"], [build_guile=yes]) - -if test x$build_guile != xno ; then - GNOME_CHECK_GUILE -fi - -AC_ARG_WITH(libgtop-inodedb, -[ --with-libgtop-inodedb Build the inodedb stuff (default=no)], -[build_inodedb="$withval"], [build_inodedb=no]) - -LIBGTOP_EXTRA_LIBS= - -if test x$build_inodedb = xyes ; then - AC_CHECK_LIB(gdbm, gdbm_open, LIBGTOP_EXTRA_LIBS='-lgdbm', build_inodedb=no) -fi - -AM_CONDITIONAL(INODEDB, test x$build_inodedb = xyes) - -if test x$build_inodedb = xyes ; then - AC_DEFINE(GLIBTOP_INODEDB) -fi - -AC_DEFINE(GLIBTOP_NAMES) - -if test x$ac_cv_guile_found = xyes ; then - AC_DEFINE(GLIBTOP_GUILE) - AC_DEFINE(GLIBTOP_GUILE_NAMES) - libgtop_guile_found=yes - guile_examples='third' - guile_static_examples='third_static' - guile_subdirs='guile' -else - libgtop_guile_found=no - guile_examples= - guile_static_examples= - guile_subdirs= -fi - -if test x$libgtop_smp = xyes ; then - smp_examples='smp' - smp_static_examples='smp_static' -else - smp_examples= - smp_static_examples= -fi - -if test "x$enable_static" != xno; then - static_targets="first_static second_static mountlist_static procmap_static netload_static sysdeps_static $guile_static_examples $smp_static_examples" -else - static_targets="" -fi - -AC_SUBST(static_targets) -AC_SUBST(smp_examples) -AC_SUBST(guile_examples) -AC_SUBST(guile_subdirs) - -AM_PROG_LIBTOOL - -AM_PATH_GLIB(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 libGTop without Gnome. -dnl GNOME_SUPPORT_CHECKS - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE -AC_TYPE_OFF_T -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_STRUCT_ST_RDEV -AC_HEADER_TIME -AC_STRUCT_TM -AC_TYPE_UID_T - -dnl For SunOS -AC_CHECK_TYPE(ssize_t, int) -AC_CHECK_HEADERS(memory.h) -AC_CHECK_HEADERS(string.h strings.h, break) -AC_REPLACE_FUNCS(strerror) -AC_CHECK_LIB(kvm, kvm_open) - -dnl For DEC OSF1 -AC_CHECK_LIB(mach, vm_statistics) - -dnl For some broken libc5 systems (Debian 1.3) -saved_CFLAGS=$CFLAGS -CFLAGS="$CFLAGS -D_GNU_SOURCE" -GCC_NEED_DECLARATION(program_invocation_name, [ -#include -#include -#include -#include -]) -CFLAGS=$saved_CFLAGS - -dnl Check for Internet sockets. -AC_CHECK_FUNC(socket, - [AC_CHECK_HEADER(netinet/in.h, - [AC_CHECK_HEADER(arpa/inet.h, [ - AC_DEFINE(HAVE_SOCKETS) - AC_MSG_CHECKING("for sun_len member in struct sockaddr_un") - AC_TRY_LINK([ -#include -#include -#include - ], - [static struct sockaddr_un x; x.sun_len = 1;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)], - [AC_MSG_RESULT(no)])])])]) - -dnl Checks for library functions. -AC_FUNC_ALLOCA -AC_FUNC_MMAP -AC_TYPE_SIGNAL -AC_FUNC_STRFTIME -AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname) - -dnl ## all 'es_??' are only needed for format numbers different of 'es' -ALL_LINGUAS="de es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fr ko no ja" -AM_GNOME_GETTEXT - -AC_PATH_XTRA - -dnl For Solaris -dnl Please don't move this before AC_PATH_XTRA -AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)]) -AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)]) -AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton)]) - -dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n -dnl So we use the following instead. -dnl XE_SPACE(var, words) -define([XE_SPACE],[ -T="" -for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done -$1="$T" -])dnl - -dnl Autodetect Xauth -dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs -saved_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $X_CFLAGS" -test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) } -test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no, $X_LIBS) } -test -z "$with_xauth" && with_xauth=yes -if test "$with_xauth" = "yes"; then - AC_DEFINE(HAVE_XAUTH) - XE_SPACE(libs_xauth, $X_LIBS -lXau) -fi -CPPFLAGS="$saved_CPPFLAGS" -AC_SUBST(libs_xauth) - -dnl For diskusage stuff -GNOME_FILEUTILS_CHECKS - -dnl Debugging -AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],AC_DEFINE(LIBGTOP_ENABLE_DEBUG),) -AC_ARG_ENABLE(fatal-warnings, [ --enable-fatal-warnings make all warnings fatal [debug=no]],AC_DEFINE(LIBGTOP_FATAL_WARNINGS),) - -if test "x$gnome_found" = xyes ; then - LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport" - SUPPORTINCS="$GNOME_INCLUDEDIR" -else - LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la' - SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support' -fi - -dnl Some ugly hack; if '-lgnomesupport' is part of $GNOME_LIBS, -dnl we include it here. -case "$GNOME_LIBS" in - '*-lgnomesupport*' ) - LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport" - SUPPORTINCS="$GNOME_INCLUDEDIR" ;; -esac -AC_SUBST(LIBSUPPORT) -AC_SUBST(SUPPORTINCS) - -dnl These definitions are expanded in make. -LIBGTOP_LIBS='-L$(libdir)' -LIBGTOP_INCS='-I$(includedir)' - -if test x$libgtop_use_machine_h = xyes ; then - LIBGTOP_INCS="$LIBGTOP_INCS -DHAVE_GLIBTOP_MACHINE_H" -fi - -if test x$build_inodedb = xyes ; then - LIBGTOP_INCS="$LIBGTOP_INCS -DGLIBTOP_INODEDB" -fi - -if test x$libgtop_smp = xyes ; then - LIBGTOP_INCS="$LIBGTOP_INCS -DHAVE_LIBGTOP_SMP" -fi - -if test x$libgtop_have_sysinfo = xyes ; then - LIBGTOP_INCS="$LIBGTOP_INCS -DHAVE_LIBGTOP_SYSINFO" -fi - -LIBGTOP_INCS="$LIBGTOP_INCS $SUPPORTINCS $GLIB_CFLAGS" - -LIBGTOP_GUILE_LIBS="$LIBGTOP_LIBS" -LIBGTOP_GUILE_INCS="$LIBGTOP_INCS" -LIBGTOP_BINDIR='$(bindir)' -LIBGTOP_SERVER='$(bindir)/libgtop_server' - -sysdeps_dir="$libgtop_sysdeps_dir" -AC_SUBST(sysdeps_dir) - -if test x$ac_cv_guile_found = xyes ; then - LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile" - libgtop_guile_found=yes -else - libgtop_guile_found=no -fi - -AC_SUBST(libgtop_guile_found) - -if test -z "$LIBGTOP_EXTRA_LIBS" ; then - LIBGTOP_EXTRA_LIBS="$libs_xauth" -else - LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $libs_xauth" -fi - -LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS" - -LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop -lgtop_sysdeps -lgtop_common" -LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop -lgtop_sysdeps -lgtop_common" - -LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names" -LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names -lgtop_names" - -LIBGTOP_LIBS="$LIBGTOP_LIBS" -LIBGTOP_NAMES_LIBS="$LIBGTOP_NAMES_LIBS" -LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS" -LIBGTOP_GUILE_NAMES_LIBS="$LIBGTOP_GUILE_NAMES_LIBS" - -LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS $GUILE_LIBS" -LIBGTOP_GUILE_INCS="$LIBGTOP_GUILE_INCS $GUILE_INCS -DGLIBTOP_GUILE" - -LIBGTOP_NAMES_INCS="$LIBGTOP_INCS -DGLIBTOP_NAMES" -LIBGTOP_GUILE_NAMES_INCS="$LIBGTOP_GUILE_INCS -DGLIBTOP_GUILE_NAMES" -LIBGTOP_GUILE_NAMES_INCS="$LIBGTOP_GUILE_INCS -DGLIBTOP_NAMES" - -machine_incs="-I\$(top_srcdir)/sysdeps/$sysdeps_dir" - -AC_SUBST(machine_incs) - -if test x$libgtop_guile_found = xyes ; then - guile_def="-DGLIBTOP_GUILE -DGLIBTOP_GUILE_NAMES $GUILE_INCS " -else - guile_def="" -fi - -INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_srcdir)/intl $SUPPORTINCS $GLIB_CFLAGS $CFLAGS $X_CFLAGS $guile_def "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\"' - -AC_SUBST(INCLUDES) - -AC_SUBST(LIBGTOP_EXTRA_LIBS) - -AC_SUBST(LIBGTOP_LIBS) -AC_SUBST(LIBGTOP_INCS) -AC_SUBST(LIBGTOP_NAMES_LIBS) -AC_SUBST(LIBGTOP_NAMES_INCS) -AC_SUBST(LIBGTOP_GUILE_LIBS) -AC_SUBST(LIBGTOP_GUILE_INCS) -AC_SUBST(LIBGTOP_GUILE_NAMES_LIBS) -AC_SUBST(LIBGTOP_GUILE_NAMES_INCS) -AC_SUBST(LIBGTOP_BINDIR) -AC_SUBST(LIBGTOP_SERVER) - -if test x$libgtop_need_server = xyes ; then - sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid.la" - server_programs='libgtop_server' -else - sysdeps_suid_lib= - server_programs= -fi -AC_SUBST(sysdeps_suid_lib) -AC_SUBST(server_programs) - -AC_OUTPUT([ -Makefile -libgtop.spec -po/Makefile.in -intl/Makefile -misc/Makefile -include/Makefile -include/glibtop/Makefile -sysdeps/Makefile -sysdeps/common/Makefile -sysdeps/names/Makefile -sysdeps/guile/Makefile -sysdeps/guile/names/Makefile -sysdeps/stub/Makefile -sysdeps/stub_suid/Makefile -sysdeps/sun4/Makefile -sysdeps/osf1/Makefile -sysdeps/linux/Makefile -sysdeps/kernel/Makefile -sysdeps/freebsd/Makefile -src/Makefile -src/daemon/Makefile -src/inodedb/Makefile -lib/Makefile -examples/Makefile -support/Makefile -macros/Makefile]) diff --git a/copyright.txt b/copyright.txt deleted file mode 100644 index ec056b34..00000000 --- a/copyright.txt +++ /dev/null @@ -1,23 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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. -*/ - diff --git a/examples/.cvsignore b/examples/.cvsignore deleted file mode 100644 index 377ff1a1..00000000 --- a/examples/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -first -first_linux -first_static -second -third -third_linux -third_static -second_static -second_linux -smp sysdeps netload procmap mountlist diff --git a/examples/ChangeLog b/examples/ChangeLog deleted file mode 100644 index 141bd27b..00000000 --- a/examples/ChangeLog +++ /dev/null @@ -1,62 +0,0 @@ -1998-11-22 Martin Baulig - - * netload.c: Call inet_ntoa () to get address and subnet - in quatted dot notation (like 136.199.14.201) and not just - as a number (like 0xc90ec788). - -1998-11-02 Martin Baulig - - * sysdeps.c: New example. - -1998-10-26 Martin Baulig - - * netload.c: New file. Gets network load for the interface - given as command line argument. - -1998-10-26 Martin Baulig - - * first.c (glibtop_get_proc_args): Get command line arguments. - * second.c: Likewise. - -1998-10-25 Martin Baulig - - * first.c (glibtop_get_ppp): Get PPP/ISDN statistics. - -1998-09-28 Martin Baulig - - * Makefile.am: Install everything in $(libexecdir)/libgtop. - -1998-09-09 Martin Baulig - - * smp.c: New file. Nice tool to show CPU statistics on SMP systems. - -1998-08-25 Martin Baulig - - * first.c, second.c, procmap.c: Fixed some compiler warnings. - -1998-08-18 Martin Baulig - - * procmap.c: We now display filenames when compiled - `--with-libgtop-inodedb'. - -1998-08-12 Martin Baulig - - * second.c: Works a little bit more like `ps' - you can - give an optional command line argument to get information - about a single process. - -1998-07-22 Martin Baulig - - * mountlist.c: New file. - -1998-06-12 Martin Baulig - - * test.scm: New file. - -1998-06-07 Martin Baulig - - * Makefile.am (CFLAGS): Disable optimize. - - * first.c (PROFILE_COUNT): Number of times each function - should be called. Defaults to 1; to profile the code, you - can increase this when compiling. diff --git a/examples/Makefile.am b/examples/Makefile.am deleted file mode 100644 index 4f1d0581..00000000 --- a/examples/Makefile.am +++ /dev/null @@ -1,110 +0,0 @@ -## Process this file with automake to produce Makefile.in - -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -DEFS = @DEFS@ - -# We install it in `libexec' since this will make it more easy -# to put the examples into an extra RPM package. - -libgtopdir = $(libexecdir)/libgtop - -libgtop_PROGRAMS = first second\ - mountlist procmap netload sysdeps\ - @static_targets@ @guile_examples@ @smp_examples@ - -EXTRA_PROGRAMS = first_static second_static \ - mountlist_static procmap_static \ - third third_static smp smp_static \ - netload_static sysdeps_static - -first_SOURCES = first.c -first_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - -first_static_SOURCES = $(first_SOURCES) -first_static_LDADD = $(first_LDADD) -first_static_LDFLAGS = -static - -second_SOURCES = second.c -second_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - -second_static_SOURCES = $(second_SOURCES) -second_static_LDADD = $(second_LDADD) -second_static_LDFLAGS = -static - -procmap_SOURCES = procmap.c -procmap_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - - - -procmap_static_SOURCES = $(procmap_SOURCES) -procmap_static_LDADD = $(procmap_LDADD) -procmap_static_LDFLAGS = -static - -netload_SOURCES = netload.c -netload_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - -netload_static_SOURCES = $(netload_SOURCES) -netload_static_LDADD = $(netload_LDADD) -netload_static_LDFLAGS = -static - -sysdeps_SOURCES = sysdeps.c -sysdeps_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - -sysdeps_static_SOURCES = $(sysdeps_SOURCES) -sysdeps_static_LDADD = $(sysdeps_LDADD) -sysdeps_static_LDFLAGS = -static - -third_guile_names_LIBS = $(top_builddir)/sysdeps/guile/names/libgtop_guile_names.la -third_names_LIBS = $(top_builddir)/sysdeps/names/libgtop_names.la - -third_SOURCES = third.c -third_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile.la \ - $(third_guile_names_LIBS) $(third_names_LIBS) \ - $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @GUILE_LIBS@ @LIBSUPPORT@ @INTLLIBS@ - -third_static_SOURCES = $(third_SOURCES) -third_static_LDADD = $(third_LDADD) -third_static_LDFLAGS = -static - -mountlist_SOURCES = mountlist.c -mountlist_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - -mountlist_static_SOURCES= $(mountlist_SOURCES) -mountlist_static_LDADD = $(mountlist_LDADD) -mountlist_static_LDFLAGS= -static - - -smp_SOURCES = smp.c -smp_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - -smp_static_SOURCES = $(smp_SOURCES) -smp_static_LDADD = $(smp_LDADD) -smp_static_LDFLAGS = -static - diff --git a/examples/first.c b/examples/first.c deleted file mode 100644 index 2d28995b..00000000 --- a/examples/first.c +++ /dev/null @@ -1,575 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include -#include -#include - -#include - -#include -#include - -#include - -#ifndef PROFILE_COUNT -#define PROFILE_COUNT 1 -#endif - -int -main (int argc, char *argv []) -{ - glibtop_union data; - glibtop_sysdeps sysdeps; - unsigned c, method, count, port, i, *ptr; - char buffer [BUFSIZ]; - pid_t pid, ppid; - char *args; - - count = PROFILE_COUNT; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, GTOPLOCALEDIR); - textdomain (PACKAGE); - - glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN); - - glibtop_get_parameter (GLIBTOP_PARAM_METHOD, &method, sizeof (method)); - - printf ("Method = %d\n", method); - - count = glibtop_get_parameter (GLIBTOP_PARAM_COMMAND, buffer, BUFSIZ); - buffer [count] = 0; - - printf ("Command = '%s'\n", buffer); - - count = glibtop_get_parameter (GLIBTOP_PARAM_HOST, buffer, BUFSIZ); - buffer [count] = 0; - - glibtop_get_parameter (GLIBTOP_PARAM_PORT, &port, sizeof (port)); - - printf ("Host = '%s' - %u\n\n", buffer, port); - - glibtop_init_r (&glibtop_global_server, 0, 0); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_cpu (&data.cpu); - - printf ("CPU (0x%08lx): %lu, %lu, %lu, %lu, %lu, %lu\n", - (unsigned long) data.cpu.flags, - (unsigned long) data.cpu.total, - (unsigned long) data.cpu.user, - (unsigned long) data.cpu.nice, - (unsigned long) data.cpu.sys, - (unsigned long) data.cpu.idle, - (unsigned long) data.cpu.frequency); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_mem (&data.mem); - - printf ("Memory (0x%08lx): " - "%lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu\n", - (unsigned long) data.mem.flags, - (unsigned long) data.mem.total, - (unsigned long) data.mem.used, - (unsigned long) data.mem.free, - (unsigned long) data.mem.shared, - (unsigned long) data.mem.buffer, - (unsigned long) data.mem.cached, - (unsigned long) data.mem.user, - (unsigned long) data.mem.locked); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_swap (&data.swap); - - printf ("Swap (0x%08lx): %lu, %lu, %lu, %lu, %lu\n", - (unsigned long) data.swap.flags, - (unsigned long) data.swap.total, - (unsigned long) data.swap.used, - (unsigned long) data.swap.free, - (unsigned long) data.swap.pagein, - (unsigned long) data.swap.pageout); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_uptime (&data.uptime); - - printf ("Uptime (0x%08lx): %f, %f\n", - (unsigned long) data.uptime.flags, - data.uptime.uptime, data.uptime.idletime); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_loadavg (&data.loadavg); - - printf ("Loadavg (0x%08lx): %f, %f, %f - %lu, %lu, %lu\n", - (unsigned long) data.loadavg.flags, - (double) data.loadavg.loadavg [0], - (double) data.loadavg.loadavg [1], - (double) data.loadavg.loadavg [2], - (unsigned long) data.loadavg.nr_running, - (unsigned long) data.loadavg.nr_tasks, - (unsigned long) data.loadavg.last_pid); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_shm_limits (&data.shm_limits); - - printf ("Shm Limits (0x%08lx): %lu, %lu, %lu, %lu, %lu\n", - (unsigned long) data.shm_limits.flags, - (unsigned long) data.shm_limits.shmmax, - (unsigned long) data.shm_limits.shmmin, - (unsigned long) data.shm_limits.shmmni, - (unsigned long) data.shm_limits.shmseg, - (unsigned long) data.shm_limits.shmall); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_msg_limits (&data.msg_limits); - - printf ("Msg Limits (0x%08lx): %lu, %lu, %lu, %lu, %lu, %lu, %lu\n", - (unsigned long) data.msg_limits.flags, - (unsigned long) data.msg_limits.msgpool, - (unsigned long) data.msg_limits.msgmap, - (unsigned long) data.msg_limits.msgmax, - (unsigned long) data.msg_limits.msgmnb, - (unsigned long) data.msg_limits.msgmni, - (unsigned long) data.msg_limits.msgssz, - (unsigned long) data.msg_limits.msgtql); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_sem_limits (&data.sem_limits); - - printf ("Sem Limits (0x%08lx): " - "%lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu\n", - (unsigned long) data.sem_limits.flags, - (unsigned long) data.sem_limits.semmap, - (unsigned long) data.sem_limits.semmni, - (unsigned long) data.sem_limits.semmns, - (unsigned long) data.sem_limits.semmnu, - (unsigned long) data.sem_limits.semmsl, - (unsigned long) data.sem_limits.semopm, - (unsigned long) data.sem_limits.semume, - (unsigned long) data.sem_limits.semusz, - (unsigned long) data.sem_limits.semvmx, - (unsigned long) data.sem_limits.semaem); - - printf ("\n"); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_ppp (&data.ppp, 0); - - printf ("PPP (0x%08lx): %lu, %lu, %lu\n", - (unsigned long) data.ppp.flags, - (unsigned long) data.ppp.state, - (unsigned long) data.ppp.bytes_in, - (unsigned long) data.ppp.bytes_out); - - printf ("\n"); - - glibtop_get_sysdeps (&sysdeps); - - printf ("Sysdeps (0x%08lx): %lu, %lu, %lu, %lu, %lu, " - "%lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, " - "%lu, %lu, %lu, %lu, %lu, %lu\n", - (unsigned long) sysdeps.flags, - (unsigned long) sysdeps.cpu, - (unsigned long) sysdeps.mem, - (unsigned long) sysdeps.swap, - (unsigned long) sysdeps.uptime, - (unsigned long) sysdeps.loadavg, - (unsigned long) sysdeps.shm_limits, - (unsigned long) sysdeps.msg_limits, - (unsigned long) sysdeps.sem_limits, - (unsigned long) sysdeps.proclist, - (unsigned long) sysdeps.proc_state, - (unsigned long) sysdeps.proc_uid, - (unsigned long) sysdeps.proc_mem, - (unsigned long) sysdeps.proc_time, - (unsigned long) sysdeps.proc_signal, - (unsigned long) sysdeps.proc_kernel, - (unsigned long) sysdeps.proc_segment, - (unsigned long) sysdeps.proc_args, - (unsigned long) sysdeps.proc_map, - (unsigned long) sysdeps.mountlist, - (unsigned long) sysdeps.fsusage, - (unsigned long) sysdeps.netload, - (unsigned long) sysdeps.ppp); - - printf ("\n"); - - ptr = glibtop_get_proclist (&data.proclist, 0, 0); - - printf ("Proclist (0x%08lx): %lu, %lu, %lu\n", - (unsigned long) data.proclist.flags, - (unsigned long) data.proclist.number, - (unsigned long) data.proclist.size, - (unsigned long) data.proclist.total); - - if (ptr) { - printf ("\nProcess: "); - for (i = 0; i < data.proclist.number; i++) - printf ("%s%u", i ? ", " : "", ptr [i]); - printf ("\n"); - } - - glibtop_free (ptr); - - pid = getpid (); - ppid = getppid (); - - printf ("\n"); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_state (&data.proc_state, pid); - - printf ("Proc_State PID %5d (0x%08lx): '%s', %c, %lu, %lu\n", - (int) pid, (unsigned long) data.proc_state.flags, - data.proc_state.cmd, data.proc_state.state, - (unsigned long) data.proc_state.uid, - (unsigned long) data.proc_state.gid); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_uid (&data.proc_uid, pid); - - printf ("Proc_Uid PID %5d (0x%08lx): " - "%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) pid, - (unsigned long) data.proc_uid.flags, - data.proc_uid.uid, data.proc_uid.euid, - data.proc_uid.gid, data.proc_uid.egid, - 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); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_mem (&data.proc_mem, pid); - - printf ("Proc_Mem PID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu\n", (int) pid, - (unsigned long) data.proc_mem.flags, - (unsigned long) data.proc_mem.size, - (unsigned long) data.proc_mem.vsize, - (unsigned long) data.proc_mem.resident, - (unsigned long) data.proc_mem.share, - (unsigned long) data.proc_mem.rss, - (unsigned long) data.proc_mem.rss_rlim); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_segment (&data.proc_segment, pid); - - printf ("Proc_Segment PID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu\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_stack); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_time (&data.proc_time, pid); - - printf ("Proc_Time PID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid, - (unsigned long) data.proc_time.flags, - (unsigned long) data.proc_time.start_time, - (unsigned long) data.proc_time.rtime, - (unsigned long) data.proc_time.utime, - (unsigned long) data.proc_time.stime, - (unsigned long) data.proc_time.cutime, - (unsigned long) data.proc_time.cstime, - (unsigned long) data.proc_time.timeout, - (unsigned long) data.proc_time.it_real_value, - (unsigned long) data.proc_time.frequency); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_signal (&data.proc_signal, pid); - - printf ("Proc_Signal PID %5d (0x%08lx): " - "%lu %lu %lu %lu\n", (int) pid, - (unsigned long) data.proc_signal.flags, - (unsigned long) data.proc_signal.signal, - (unsigned long) data.proc_signal.blocked, - (unsigned long) data.proc_signal.sigignore, - (unsigned long) data.proc_signal.sigcatch); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_kernel (&data.proc_kernel, pid); - - printf ("Proc_Kernel PID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu (%s)\n", (int) pid, - (unsigned long) data.proc_kernel.flags, - (unsigned long) data.proc_kernel.k_flags, - (unsigned long) data.proc_kernel.min_flt, - (unsigned long) data.proc_kernel.maj_flt, - (unsigned long) data.proc_kernel.cmin_flt, - (unsigned long) data.proc_kernel.cmaj_flt, - (unsigned long) data.proc_kernel.kstk_esp, - (unsigned long) data.proc_kernel.kstk_eip, - (unsigned long) data.proc_kernel.nwchan, - data.proc_kernel.wchan); - - printf ("\n"); - - args = glibtop_get_proc_args (&data.proc_args, pid, 0); - - for (i = 0; i < data.proc_args.size; i++) { - if (args [i]) continue; - args [i] = '|'; - } - - printf ("Proc_Args PID %5d (0x%08lx): %lu - '%s'\n", (int) pid, - (unsigned long) data.proc_args.flags, - (unsigned long) data.proc_args.size, - args); - - glibtop_free (args); - - printf ("\n"); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_state (&data.proc_state, ppid); - - printf ("Proc_State PPID %5d (0x%08lx): '%s', %c, %lu, %lu\n", - (int) ppid, (unsigned long) data.proc_state.flags, - data.proc_state.cmd, data.proc_state.state, - (unsigned long) data.proc_state.uid, - (unsigned long) data.proc_state.gid); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_uid (&data.proc_uid, ppid); - - printf ("Proc_Uid PPID %5d (0x%08lx): " - "%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) ppid, - (unsigned long) data.proc_uid.flags, - data.proc_uid.uid, data.proc_uid.euid, - data.proc_uid.gid, data.proc_uid.egid, - 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); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_mem (&data.proc_mem, ppid); - - printf ("Proc_Mem PPID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu\n", (int) ppid, - (unsigned long) data.proc_mem.flags, - (unsigned long) data.proc_mem.size, - (unsigned long) data.proc_mem.vsize, - (unsigned long) data.proc_mem.resident, - (unsigned long) data.proc_mem.share, - (unsigned long) data.proc_mem.rss, - (unsigned long) data.proc_mem.rss_rlim); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_segment (&data.proc_segment, ppid); - - printf ("Proc_Segment PPID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu\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_stack); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_time (&data.proc_time, ppid); - - printf ("Proc_Time PPID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu %lu\n", (int) ppid, - (unsigned long) data.proc_time.flags, - (unsigned long) data.proc_time.start_time, - (unsigned long) data.proc_time.rtime, - (unsigned long) data.proc_time.utime, - (unsigned long) data.proc_time.stime, - (unsigned long) data.proc_time.cutime, - (unsigned long) data.proc_time.cstime, - (unsigned long) data.proc_time.timeout, - (unsigned long) data.proc_time.it_real_value, - (unsigned long) data.proc_time.frequency); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_signal (&data.proc_signal, ppid); - - printf ("Proc_Signal PPID %5d (0x%08lx): %lu %lu %lu %lu\n", - (int) ppid, (unsigned long) data.proc_signal.flags, - (unsigned long) data.proc_signal.signal, - (unsigned long) data.proc_signal.blocked, - (unsigned long) data.proc_signal.sigignore, - (unsigned long) data.proc_signal.sigcatch); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_kernel (&data.proc_kernel, ppid); - - printf ("Proc_Kernel PPID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu (%s)\n", (int) ppid, - (unsigned long) data.proc_kernel.flags, - (unsigned long) data.proc_kernel.k_flags, - (unsigned long) data.proc_kernel.min_flt, - (unsigned long) data.proc_kernel.maj_flt, - (unsigned long) data.proc_kernel.cmin_flt, - (unsigned long) data.proc_kernel.cmaj_flt, - (unsigned long) data.proc_kernel.kstk_esp, - (unsigned long) data.proc_kernel.kstk_eip, - (unsigned long) data.proc_kernel.nwchan, - data.proc_kernel.wchan); - - printf ("\n"); - - args = glibtop_get_proc_args (&data.proc_args, ppid, 0); - - for (i = 0; i < data.proc_args.size; i++) { - if (args [i]) continue; - args [i] = '|'; - } - - printf ("Proc_Args PID %5d (0x%08lx): %lu - '%s'\n", (int) ppid, - (unsigned long) data.proc_args.flags, - (unsigned long) data.proc_args.size, - args); - - glibtop_free (args); - - printf ("\n"); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_state (&data.proc_state, 1); - - printf ("Proc_State INIT %5d (0x%08lx): '%s', %c, %lu, %lu\n", 1, - (unsigned long) data.proc_state.flags, - data.proc_state.cmd, data.proc_state.state, - (unsigned long) data.proc_state.uid, - (unsigned long) data.proc_state.gid); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_uid (&data.proc_uid, 1); - - printf ("Proc_Uid INIT %5d (0x%08lx): " - "%d %d %d %d %d %d %d %d %d %d %d %d\n", 1, - (unsigned long) data.proc_uid.flags, - data.proc_uid.uid, data.proc_uid.euid, - data.proc_uid.gid, data.proc_uid.egid, - 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); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_mem (&data.proc_mem, 1); - - printf ("Proc_Mem INIT %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu\n", 1, - (unsigned long) data.proc_mem.flags, - (unsigned long) data.proc_mem.size, - (unsigned long) data.proc_mem.vsize, - (unsigned long) data.proc_mem.resident, - (unsigned long) data.proc_mem.share, - (unsigned long) data.proc_mem.rss, - (unsigned long) data.proc_mem.rss_rlim); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_segment (&data.proc_segment, 1); - - printf ("Proc_Segment INIT %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu\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_stack); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_time (&data.proc_time, 1); - - printf ("Proc_Time INIT %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu %lu\n", 1, - (unsigned long) data.proc_time.flags, - (unsigned long) data.proc_time.start_time, - (unsigned long) data.proc_time.rtime, - (unsigned long) data.proc_time.utime, - (unsigned long) data.proc_time.stime, - (unsigned long) data.proc_time.cutime, - (unsigned long) data.proc_time.cstime, - (unsigned long) data.proc_time.timeout, - (unsigned long) data.proc_time.it_real_value, - (unsigned long) data.proc_time.frequency); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_signal (&data.proc_signal, 1); - - printf ("Proc_Signal INIT %5d (0x%08lx): " - "%lu %lu %lu %lu\n", 1, - (unsigned long) data.proc_signal.flags, - (unsigned long) data.proc_signal.signal, - (unsigned long) data.proc_signal.blocked, - (unsigned long) data.proc_signal.sigignore, - (unsigned long) data.proc_signal.sigcatch); - - for (c = 0; c < PROFILE_COUNT; c++) - glibtop_get_proc_kernel (&data.proc_kernel, 1); - - printf ("Proc_Kernel INIT %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu (%s)\n", 1, - (unsigned long) data.proc_kernel.flags, - (unsigned long) data.proc_kernel.k_flags, - (unsigned long) data.proc_kernel.min_flt, - (unsigned long) data.proc_kernel.maj_flt, - (unsigned long) data.proc_kernel.cmin_flt, - (unsigned long) data.proc_kernel.cmaj_flt, - (unsigned long) data.proc_kernel.kstk_esp, - (unsigned long) data.proc_kernel.kstk_eip, - (unsigned long) data.proc_kernel.nwchan, - data.proc_kernel.wchan); - - printf ("\n"); - - args = glibtop_get_proc_args (&data.proc_args, 1, 0); - - for (i = 0; i < data.proc_args.size; i++) { - if (args [i]) continue; - args [i] = '|'; - } - - printf ("Proc_Args PID %5d (0x%08lx): %lu - '%s'\n", 1, - (unsigned long) data.proc_args.flags, - (unsigned long) data.proc_args.size, - args); - - glibtop_free (args); - - glibtop_close (); - - exit (0); -} diff --git a/examples/mountlist.c b/examples/mountlist.c deleted file mode 100644 index 486dd5e8..00000000 --- a/examples/mountlist.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include -#include -#include - -#include - -#include -#include - -#ifndef PROFILE_COUNT -#define PROFILE_COUNT 1000 -#endif - -int -main (int argc, char *argv []) -{ - glibtop_fsusage fsusage; - glibtop_mountlist mount_list; - glibtop_mountentry *mount_entries; - unsigned c, index, method, count, port; - char buffer [BUFSIZ]; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, GTOPLOCALEDIR); - textdomain (PACKAGE); - - glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN); - - glibtop_get_parameter (GLIBTOP_PARAM_METHOD, &method, sizeof (method)); - - printf ("Method = %d\n", method); - - count = glibtop_get_parameter (GLIBTOP_PARAM_COMMAND, buffer, BUFSIZ); - buffer [count] = 0; - - printf ("Command = '%s'\n", buffer); - - count = glibtop_get_parameter (GLIBTOP_PARAM_HOST, buffer, BUFSIZ); - buffer [count] = 0; - - glibtop_get_parameter (GLIBTOP_PARAM_PORT, &port, sizeof (port)); - - printf ("Host = '%s' - %u\n\n", buffer, port); - - printf ("sbrk (0) = %p\n\n", sbrk (0)); - - for (c = 0; c < PROFILE_COUNT; c++) { - mount_entries = glibtop_get_mountlist (&mount_list, 1); - - glibtop_free (mount_entries); - } - - printf ("sbrk (0) = %p\n\n", sbrk (0)); - - mount_entries = glibtop_get_mountlist (&mount_list, 1); - - if (mount_entries == NULL) - _exit (1); - - for (index = 0; index < mount_list.number; index++) - printf ("Mount_Entry: %-30s %-10s %-20s\n", - mount_entries [index].mountdir, - mount_entries [index].type, - mount_entries [index].devname); - - printf ("\n\n%-23s %9s %9s %9s %9s %9s\n\n", - "", "Blocks", "Free", "Avail", "Files", "Free"); - - for (index = 0; index < mount_list.number; index++) { - glibtop_get_fsusage (&fsusage, - mount_entries [index].mountdir); - - printf ("Usage: %-16s %9Lu %9Lu %9Lu %9Lu %9Lu\n", - mount_entries [index].mountdir, - fsusage.blocks, fsusage.bfree, - fsusage.bavail, fsusage.files, - fsusage.ffree); - } - - glibtop_free (mount_entries); - - printf ("\nsbrk (0) = %p\n\n", sbrk (0)); - - glibtop_close (); - - exit (0); -} diff --git a/examples/netload.c b/examples/netload.c deleted file mode 100644 index 6e905e2b..00000000 --- a/examples/netload.c +++ /dev/null @@ -1,125 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include -#include -#include - -#include - -#include - -#include -#include - -#ifndef PROFILE_COUNT -#define PROFILE_COUNT 1 -#endif - -int -main (int argc, char *argv []) -{ - glibtop_netload netload; - unsigned method, count, port, i; - struct in_addr addr, subnet; - char *address_string, *subnet_string; - char buffer [BUFSIZ]; - - count = PROFILE_COUNT; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, GTOPLOCALEDIR); - textdomain (PACKAGE); - - glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN); - - glibtop_get_parameter (GLIBTOP_PARAM_METHOD, &method, sizeof (method)); - - printf ("Method = %d\n", method); - - count = glibtop_get_parameter (GLIBTOP_PARAM_COMMAND, buffer, BUFSIZ); - buffer [count] = 0; - - printf ("Command = '%s'\n", buffer); - - count = glibtop_get_parameter (GLIBTOP_PARAM_HOST, buffer, BUFSIZ); - buffer [count] = 0; - - glibtop_get_parameter (GLIBTOP_PARAM_PORT, &port, sizeof (port)); - - printf ("Host = '%s' - %u\n\n", buffer, port); - - glibtop_init_r (&glibtop_global_server, 0, 0); - - if (argc != 2) - glibtop_error ("Usage: %s interface", argv [0]); - - glibtop_get_netload (&netload, argv [1]); - - addr.s_addr = netload.address; - subnet.s_addr = netload.subnet; - - address_string = glibtop_strdup (inet_ntoa (addr)); - subnet_string = glibtop_strdup (inet_ntoa (subnet)); - - printf ("Network Load (0x%08lx):\n\n" - "\tInterface Flags:\t0x%08lx\n" - "\tAddress:\t\t0x%08lx - %s\n" - "\tSubnet:\t\t\t0x%08lx - %s\n\n" - "\tMTU:\t\t\t%ld\n" - "\tCollisions:\t\t%ld\n\n" - "\tPackets In:\t\t%ld\n" - "\tPackets Out:\t\t%ld\n" - "\tPackets Total:\t\t%ld\n\n" - "\tBytes In:\t\t%ld\n" - "\tBytes Out:\t\t%ld\n" - "\tBytes Total:\t\t%ld\n\n" - "\tErrors In:\t\t%ld\n" - "\tErrors Out:\t\t%ld\n" - "\tErrors Total:\t\t%ld\n\n", - (unsigned long) netload.flags, - (unsigned long) netload.if_flags, - (unsigned long) netload.address, address_string, - (unsigned long) netload.subnet, subnet_string, - (unsigned long) netload.mtu, - (unsigned long) netload.collisions, - (unsigned long) netload.packets_in, - (unsigned long) netload.packets_out, - (unsigned long) netload.packets_total, - (unsigned long) netload.bytes_in, - (unsigned long) netload.bytes_out, - (unsigned long) netload.bytes_total, - (unsigned long) netload.errors_in, - (unsigned long) netload.errors_out, - (unsigned long) netload.errors_total); - - glibtop_free (address_string); - glibtop_free (subnet_string); - - glibtop_close (); - - exit (0); -} diff --git a/examples/procmap.c b/examples/procmap.c deleted file mode 100644 index 2c0ff929..00000000 --- a/examples/procmap.c +++ /dev/null @@ -1,147 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include -#include -#include - -#include - -#include - -#ifdef GLIBTOP_INODEDB -#include -#endif - -#include -#include - -#ifndef PROFILE_COUNT -#define PROFILE_COUNT 1 -#endif - -int -main (int argc, char *argv []) -{ -#ifdef GLIBTOP_INODEDB - glibtop_inodedb *inodedb; -#endif - glibtop_proc_map procmap; - glibtop_map_entry *maps; - unsigned method, count, port, i; - char buffer [BUFSIZ]; - pid_t pid; - - count = PROFILE_COUNT; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, GTOPLOCALEDIR); - textdomain (PACKAGE); - - glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN); - - glibtop_get_parameter (GLIBTOP_PARAM_METHOD, &method, sizeof (method)); - - printf ("Method = %d\n", method); - - count = glibtop_get_parameter (GLIBTOP_PARAM_COMMAND, buffer, BUFSIZ); - buffer [count] = 0; - - printf ("Command = '%s'\n", buffer); - - count = glibtop_get_parameter (GLIBTOP_PARAM_HOST, buffer, BUFSIZ); - buffer [count] = 0; - - glibtop_get_parameter (GLIBTOP_PARAM_PORT, &port, sizeof (port)); - - printf ("Host = '%s' - %u\n\n", buffer, port); - - glibtop_init_r (&glibtop_global_server, 0, 0); - - if ((argc != 2) || (sscanf (argv [1], "%d", (int *) &pid) != 1)) - glibtop_error ("Usage: %s pid", argv [0]); - -#ifdef GLIBTOP_INODEDB - inodedb = glibtop_inodedb_open (0, 0); -#endif - - fprintf (stderr, "Getting memory maps for pid %d.\n\n", (int) pid); - - maps = glibtop_get_proc_map (&procmap, pid); - - for (i = 0; i < procmap.number; i++) { - const char *filename = NULL; - unsigned device, device_major, device_minor; - char perm [5]; - - if (maps [i].flags & (1 << GLIBTOP_MAP_ENTRY_FILENAME)) - filename = maps [i].filename; - -#ifdef GLIBTOP_INODEDB - if (inodedb && !filename) - filename = glibtop_inodedb_lookup - (inodedb, maps [i].device, maps [i].inode); -#endif - - perm [0] = (maps [i].perm & GLIBTOP_MAP_PERM_READ) ? 'r' : '-'; - perm [1] = (maps [i].perm & GLIBTOP_MAP_PERM_WRITE) ? 'w' : '-'; - perm [2] = (maps [i].perm & GLIBTOP_MAP_PERM_EXECUTE) ? 'x' : '-'; - perm [3] = (maps [i].perm & GLIBTOP_MAP_PERM_SHARED) ? 's' : '-'; - perm [4] = (maps [i].perm & GLIBTOP_MAP_PERM_PRIVATE) ? 'p' : '-'; - - device = (unsigned long) maps [i].device; - device_minor = (device & 255); - device_major = ((device >> 8) & 255); - - if (filename) - fprintf (stderr, "%08lx-%08lx %08lx - " - "%02x:%02x %08lu - %4s - %s\n", - (unsigned long) maps [i].start, - (unsigned long) maps [i].end, - (unsigned long) maps [i].offset, - device_major, device_minor, - (unsigned long) maps [i].inode, - perm, filename); - else - fprintf (stderr, "%08lx-%08lx %08lx - " - "%02x:%02x %08lu - %4s\n", - (unsigned long) maps [i].start, - (unsigned long) maps [i].end, - (unsigned long) maps [i].offset, - device_major, device_minor, - (unsigned long) maps [i].inode, - perm); - - if (filename && (filename != maps [i].filename)) - glibtop_free (filename); - } - - glibtop_free (maps); - - glibtop_close (); - - exit (0); -} diff --git a/examples/second.c b/examples/second.c deleted file mode 100644 index 5a9cccfa..00000000 --- a/examples/second.c +++ /dev/null @@ -1,301 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include -#include -#include - -#include -#include - -#include - -static void -output (pid_t pid) -{ - glibtop_union data; - char *args; - unsigned i; - -#if HAVE_LIBGTOP_SMP - unsigned long total; - double p_total, p_utime, p_stime; - double b_total, b_utime, b_stime; - double s_total, s_utime, s_stime; - double my_utime, my_stime; - int ncpu; -#endif - - printf ("\n"); - - glibtop_get_proc_state (&data.proc_state, pid); - - printf ("Proc_State PID %5d (0x%08lx): " - "'%s', %c, %lu, %lu\n", (int) pid, - (unsigned long) data.proc_state.flags, - data.proc_state.cmd, data.proc_state.state, - (unsigned long) data.proc_state.uid, - (unsigned long) data.proc_state.gid); - - glibtop_get_proc_uid (&data.proc_uid, pid); - - printf ("Proc_Uid PID %5d (0x%08lx): " - "%d %d %d %d %d %d %d %d %d %d %d %d\n", (int) pid, - (unsigned long) data.proc_uid.flags, - data.proc_uid.uid, data.proc_uid.euid, - data.proc_uid.gid, data.proc_uid.egid, - 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); - - glibtop_get_proc_mem (&data.proc_mem, pid); - - printf ("Proc_Mem PID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu\n", (int) pid, - (unsigned long) data.proc_mem.flags, - (unsigned long) data.proc_mem.size, - (unsigned long) data.proc_mem.vsize, - (unsigned long) data.proc_mem.resident, - (unsigned long) data.proc_mem.share, - (unsigned long) data.proc_mem.rss, - (unsigned long) data.proc_mem.rss_rlim); - - glibtop_get_proc_segment (&data.proc_segment, pid); - - printf ("Proc_Segment PID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu\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_stack); - - glibtop_get_proc_time (&data.proc_time, pid); - - printf ("Proc_Time PID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid, - (unsigned long) data.proc_time.flags, - (unsigned long) data.proc_time.start_time, - (unsigned long) data.proc_time.rtime, - (unsigned long) data.proc_time.utime, - (unsigned long) data.proc_time.stime, - (unsigned long) data.proc_time.cutime, - (unsigned long) data.proc_time.cstime, - (unsigned long) data.proc_time.timeout, - (unsigned long) data.proc_time.it_real_value, - (unsigned long) data.proc_time.frequency); - - glibtop_get_proc_signal (&data.proc_signal, pid); - - printf ("Proc_Signal PID %5d (0x%08lx): " - "%lu %lu %lu %lu\n", (int) pid, - (unsigned long) data.proc_signal.flags, - (unsigned long) data.proc_signal.signal, - (unsigned long) data.proc_signal.blocked, - (unsigned long) data.proc_signal.sigignore, - (unsigned long) data.proc_signal.sigcatch); - - glibtop_get_proc_kernel (&data.proc_kernel, pid); - - printf ("Proc_Kernel PID %5d (0x%08lx): " - "%lu %lu %lu %lu %lu %lu %lu %lu (%s)\n", (int) pid, - (unsigned long) data.proc_kernel.flags, - (unsigned long) data.proc_kernel.k_flags, - (unsigned long) data.proc_kernel.min_flt, - (unsigned long) data.proc_kernel.maj_flt, - (unsigned long) data.proc_kernel.cmin_flt, - (unsigned long) data.proc_kernel.cmaj_flt, - (unsigned long) data.proc_kernel.kstk_esp, - (unsigned long) data.proc_kernel.kstk_eip, - (unsigned long) data.proc_kernel.nwchan, - data.proc_kernel.wchan); - - printf ("\n"); - - args = glibtop_get_proc_args (&data.proc_args, pid, 0); - - for (i = 0; i < data.proc_args.size; i++) { - if (args [i]) continue; - args [i] = '|'; - } - - printf ("Proc_Args PID %5d (0x%08lx): %lu - '%s'\n", (int) pid, - (unsigned long) data.proc_args.flags, - (unsigned long) data.proc_args.size, - args); - - glibtop_free (args); - - printf ("\n"); - -#if HAVE_LIBGTOP_SMP - ncpu = glibtop_global_server->ncpu; - - glibtop_get_proc_time (&data.proc_time, pid); - - total = (unsigned long) data.proc_time.utime + - (unsigned long) data.proc_time.stime; - - p_total = total ? (double) total : 1.0; - - p_utime = (double) data.proc_time.utime * 100.0 / p_total; - p_stime = (double) data.proc_time.stime * 100.0 / p_total; - - b_total = p_total / ncpu; - b_utime = (double) data.proc_time.utime / ncpu; - b_stime = (double) data.proc_time.stime / ncpu; - - s_total = 0.0; s_utime = 0.0; s_stime = 0.0; - - printf ("Proc_Time PID %5d (0x%08lx): %12lu %12lu %12lu\n", (int) pid, - (unsigned long) data.proc_time.flags, total, - (unsigned long) data.proc_time.utime, - (unsigned long) data.proc_time.stime); - - for (i = 0; i < ncpu; i++) { - unsigned long this_total; - - this_total = (unsigned long) data.proc_time.xcpu_utime [i] + - (unsigned long) data.proc_time.xcpu_stime [i]; - - printf ("CPU %3d PID %5d (0x%08lx): %12lu %12lu %12lu\n", i, - (int) pid, (unsigned long) data.proc_time.flags, this_total, - (unsigned long) data.proc_time.xcpu_utime [i], - (unsigned long) data.proc_time.xcpu_stime [i]); - - s_total += fabs (((double) this_total) - b_total); - s_utime += fabs (((double) data.proc_time.xcpu_utime [i]) - b_utime); - s_stime += fabs (((double) data.proc_time.xcpu_stime [i]) - b_stime); - } - - printf ("\n"); - - printf ("Proc_Time PID %5d (0x%08lx): %12.3f %12.3f %12.3f\n", (int) pid, - (unsigned long) data.proc_time.flags, 100.0, p_utime, p_stime); - - for (i = 0; i < ncpu; i++) { - double this_p_total, this_p_utime, this_p_stime; - unsigned long this_total; - - this_total = (unsigned long) data.proc_time.xcpu_utime [i] + - (unsigned long) data.proc_time.xcpu_stime [i]; - - this_p_total = (double) this_total * 100.0 / p_total; - - this_p_utime = (double) data.proc_time.xcpu_utime [i] * 100.0 / p_total; - this_p_stime = (double) data.proc_time.xcpu_stime [i] * 100.0 / p_total; - - printf ("CPU %3d PID %5d (0x%08lx): %12.3f %12.3f %12.3f\n", i, - (int) pid, (unsigned long) data.proc_time.flags, - this_p_total, this_p_utime, this_p_stime); - } - - printf ("\n"); - - my_utime = (unsigned long) data.proc_time.utime ? - (double) data.proc_time.utime : 1.0; - my_stime = (unsigned long) data.proc_time.stime ? - (double) data.proc_time.stime : 1.0; - - printf ("SPIN: %31s %12.3f %12.3f %12.3f\n", "", s_total * 100.0 / p_total, - s_utime * 100.0 / my_utime, s_stime * 100.0 / my_stime); - - printf ("\n"); -#endif -} - -int -main (int argc, char *argv []) -{ - glibtop_proclist proclist; - glibtop_sysdeps sysdeps; - unsigned *ptr, pid, i; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, GTOPLOCALEDIR); - textdomain (PACKAGE); - - glibtop_init (); - - glibtop_get_sysdeps (&sysdeps); - - printf ("Sysdeps (0x%08lx): %lu, %lu, %lu, %lu, %lu, " - "%lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu\n", - (unsigned long) sysdeps.flags, - (unsigned long) sysdeps.cpu, - (unsigned long) sysdeps.mem, - (unsigned long) sysdeps.swap, - (unsigned long) sysdeps.uptime, - (unsigned long) sysdeps.loadavg, - (unsigned long) sysdeps.shm_limits, - (unsigned long) sysdeps.msg_limits, - (unsigned long) sysdeps.sem_limits, - (unsigned long) sysdeps.proclist, - (unsigned long) sysdeps.proc_state, - (unsigned long) sysdeps.proc_uid, - (unsigned long) sysdeps.proc_mem, - (unsigned long) sysdeps.proc_time, - (unsigned long) sysdeps.proc_signal, - (unsigned long) sysdeps.proc_kernel, - (unsigned long) sysdeps.proc_segment); - - if ((argc == 2) && (sscanf (argv [1], "%d", &pid) == 1)) { - output (pid); - - exit (0); - } - - printf ("\n"); - - ptr = glibtop_get_proclist (&proclist, 0, 0); - - printf ("Proclist (0x%08lx): %lu, %lu, %lu\n", - (unsigned long) proclist.flags, - (unsigned long) proclist.number, - (unsigned long) proclist.size, - (unsigned long) proclist.total); - - if (!ptr) exit (1); - - for (i = 0; i < proclist.number; i++) { - - pid = ptr [i]; - - output (pid); - } - - glibtop_free (ptr); - - exit (0); -} - - - diff --git a/examples/smp.c b/examples/smp.c deleted file mode 100644 index 78e993e9..00000000 --- a/examples/smp.c +++ /dev/null @@ -1,126 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , September 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 - -#include -#include -#include - -#include - -int -main (int argc, char *argv []) -{ - glibtop_cpu cpu; - unsigned long frequency; - double total, user, nice, sys, idle; - double b_total, b_user, b_nice, b_sys, b_idle; - double s_total, s_user, s_nice, s_sys, s_idle; - char separator [BUFSIZ], buffer [BUFSIZ]; - int ncpu, i; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, GTOPLOCALEDIR); - textdomain (PACKAGE); - - glibtop_get_cpu (&cpu); - - ncpu = glibtop_global_server->ncpu ? glibtop_global_server->ncpu : 1; - - frequency = (unsigned long) cpu.frequency; - - total = ((unsigned long) cpu.total) ? ((double) cpu.total) : 1.0; - user = ((unsigned long) cpu.user) ? ((double) cpu.user) : 1.0; - nice = ((unsigned long) cpu.nice) ? ((double) cpu.nice) : 1.0; - sys = ((unsigned long) cpu.sys) ? ((double) cpu.sys) : 1.0; - idle = ((unsigned long) cpu.idle) ? ((double) cpu.idle) : 1.0; - - s_total = s_user = s_nice = s_sys = s_idle = 0.0; - - b_total = total / ncpu; - b_user = user / ncpu; - b_nice = nice / ncpu; - b_sys = sys / ncpu; - b_idle = idle / ncpu; - - memset (separator, '-', 91); - separator [92] = '\0'; - - sprintf (buffer, _("Ticks (%d per second):"), frequency); - - printf ("\n\n%-26s %12s %12s %12s %12s %12s\n%s\n", buffer, - _("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator); - - printf (_("CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n\n"), - (unsigned long) cpu.flags, total, user, nice, sys, idle); - - for (i = 0; i < glibtop_global_server->ncpu; i++) { - printf (_("CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"), i, - (unsigned long) cpu.flags, - (unsigned long) cpu.xcpu_total [i], - (unsigned long) cpu.xcpu_user [i], - (unsigned long) cpu.xcpu_nice [i], - (unsigned long) cpu.xcpu_sys [i], - (unsigned long) cpu.xcpu_idle [i]); - - s_total += fabs (((double) cpu.xcpu_total [i]) - b_total); - s_user += fabs (((double) cpu.xcpu_user [i]) - b_user); - s_nice += fabs (((double) cpu.xcpu_nice [i]) - b_nice); - s_sys += fabs (((double) cpu.xcpu_sys [i]) - b_sys); - s_idle += fabs (((double) cpu.xcpu_idle [i]) - b_idle); - } - - printf ("%s\n\n\n", separator); - - printf ("%-26s %12s %12s %12s %12s %12s\n%s\n", _("Percent:"), - _("Total (%)"), _("User (%)"), _("Nice (%)"), _("Sys (%)"), - _("Idle (%)"), separator); - - printf (_("CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n\n"), - (unsigned long) cpu.flags, (double) total * 100.0 / total, - (double) user * 100.0 / total, - (double) nice * 100.0 / total, - (double) sys * 100.0 / total, - (double) idle * 100.0 / total); - - for (i = 0; i < glibtop_global_server->ncpu; i++) { - double p_total, p_user, p_nice, p_sys, p_idle; - - p_total = ((double) cpu.xcpu_total [i]) * 100.0 / total; - p_user = ((double) cpu.xcpu_user [i]) * 100.0 / user; - p_nice = ((double) cpu.xcpu_nice [i]) * 100.0 / nice; - p_sys = ((double) cpu.xcpu_sys [i]) * 100.0 / sys; - p_idle = ((double) cpu.xcpu_idle [i]) * 100.0 / idle; - - printf (_("CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"), - i, (unsigned long) cpu.flags, p_total, p_user, p_nice, - p_sys, p_idle); - } - - printf ("%s\n%-26s %12.3f %12.3f %12.3f %12.3f %12.3f\n\n", separator, - _("Spin:"), s_total * 100.0 / total, s_user * 100.0 / user, - s_nice * 100.0 / nice, s_sys * 100.0 / sys, s_idle * 100.0 / idle); - - exit (0); -} diff --git a/examples/sysdeps.c b/examples/sysdeps.c deleted file mode 100644 index 62f87ff5..00000000 --- a/examples/sysdeps.c +++ /dev/null @@ -1,148 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include -#include -#include - -#include - -#ifndef PROFILE_COUNT -#define PROFILE_COUNT 1 -#endif - -int -main (int argc, char *argv []) -{ - glibtop_sysdeps sysdeps; - unsigned method, count, port, i; - char buffer [BUFSIZ]; - - count = PROFILE_COUNT; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, GTOPLOCALEDIR); - textdomain (PACKAGE); - - glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_OPEN); - - glibtop_get_parameter (GLIBTOP_PARAM_METHOD, &method, sizeof (method)); - - printf ("Method = %d\n", method); - - count = glibtop_get_parameter (GLIBTOP_PARAM_COMMAND, buffer, BUFSIZ); - buffer [count] = 0; - - printf ("Command = '%s'\n", buffer); - - count = glibtop_get_parameter (GLIBTOP_PARAM_HOST, buffer, BUFSIZ); - buffer [count] = 0; - - glibtop_get_parameter (GLIBTOP_PARAM_PORT, &port, sizeof (port)); - - printf ("Host = '%s' - %u\n\n", buffer, port); - - glibtop_init_r (&glibtop_global_server, 0, 0); - - glibtop_get_sysdeps (&sysdeps); - -#define FEATURE_CHECK(f) ((sysdeps.features & (1 << GLIBTOP_SYSDEPS_##f##)) ? 1 : 0) - - printf ("Sysdeps (0x%08lx):\n\n" - "\tfeatures:\t\t0x%08lx\n\n" - "\tcpu:\t\t%d\t0x%08lx\n" - "\tmem:\t\t%d\t0x%08lx\n" - "\tswap:\t\t%d\t0x%08lx\n\n" - "\tuptime:\t\t%d\t0x%08lx\n" - "\tloadavg:\t%d\t0x%08lx\n\n" - "\tshm_limits:\t%d\t0x%08lx\n" - "\tmsg_limits:\t%d\t0x%08lx\n" - "\tsem_limits:\t%d\t0x%08lx\n\n" - "\tproclist:\t%d\t0x%08lx\n\n" - "\tproc_state:\t%d\t0x%08lx\n" - "\tproc_uid:\t%d\t0x%08lx\n" - "\tproc_mem:\t%d\t0x%08lx\n" - "\tproc_time:\t%d\t0x%08lx\n" - "\tproc_signal:\t%d\t0x%08lx\n" - "\tproc_kernel:\t%d\t0x%08lx\n" - "\tproc_segment:\t%d\t0x%08lx\n\n" - "\tproc_args:\t%d\t0x%08lx\n" - "\tproc_map:\t%d\t0x%08lx\n\n" - "\tmountlist:\t%d\t0x%08lx\n" - "\tfsusage:\t%d\t0x%08lx\n\n" - "\tnetload:\t%d\t0x%08lx\n" - "\tppp:\t\t%d\t0x%08lx\n\n", - (unsigned long) sysdeps.flags, - (unsigned long) sysdeps.features, - FEATURE_CHECK(CPU), - (unsigned long) sysdeps.cpu, - FEATURE_CHECK(MEM), - (unsigned long) sysdeps.mem, - FEATURE_CHECK(SWAP), - (unsigned long) sysdeps.swap, - FEATURE_CHECK(UPTIME), - (unsigned long) sysdeps.uptime, - FEATURE_CHECK(LOADAVG), - (unsigned long) sysdeps.loadavg, - FEATURE_CHECK(SHM_LIMITS), - (unsigned long) sysdeps.shm_limits, - FEATURE_CHECK(MSG_LIMITS), - (unsigned long) sysdeps.msg_limits, - FEATURE_CHECK(SEM_LIMITS), - (unsigned long) sysdeps.sem_limits, - FEATURE_CHECK(PROCLIST), - (unsigned long) sysdeps.proclist, - FEATURE_CHECK(PROC_STATE), - (unsigned long) sysdeps.proc_state, - FEATURE_CHECK(PROC_UID), - (unsigned long) sysdeps.proc_uid, - FEATURE_CHECK(PROC_MEM), - (unsigned long) sysdeps.proc_mem, - FEATURE_CHECK(PROC_TIME), - (unsigned long) sysdeps.proc_time, - FEATURE_CHECK(PROC_SIGNAL), - (unsigned long) sysdeps.proc_signal, - FEATURE_CHECK(PROC_KERNEL), - (unsigned long) sysdeps.proc_kernel, - FEATURE_CHECK(PROC_SEGMENT), - (unsigned long) sysdeps.proc_segment, - FEATURE_CHECK(PROC_ARGS), - (unsigned long) sysdeps.proc_args, - FEATURE_CHECK(PROC_MAP), - (unsigned long) sysdeps.proc_map, - FEATURE_CHECK(MOUNTLIST), - (unsigned long) sysdeps.mountlist, - FEATURE_CHECK(FSUSAGE), - (unsigned long) sysdeps.fsusage, - FEATURE_CHECK(NETLOAD), - (unsigned long) sysdeps.netload, - FEATURE_CHECK(PPP), - (unsigned long) sysdeps.ppp); - - glibtop_close (); - - exit (0); -} diff --git a/examples/test.scm b/examples/test.scm deleted file mode 100644 index 893893f5..00000000 --- a/examples/test.scm +++ /dev/null @@ -1,80 +0,0 @@ -(display (glibtop-names-sysdeps)) (newline) -(display (glibtop-labels-sysdeps)) (newline) -(display (glibtop-descriptions-sysdeps)) (newline) -(display (glibtop-types-sysdeps)) (newline) - -(newline) - -(display (glibtop-names-cpu)) (newline) -(display (glibtop-names-mem)) (newline) -(display (glibtop-names-swap)) (newline) -(display (glibtop-names-uptime)) (newline) -(display (glibtop-names-loadavg)) (newline) -(display (glibtop-names-shm_limits)) (newline) -(display (glibtop-names-msg_limits)) (newline) -(display (glibtop-names-sem_limits)) (newline) -(display (glibtop-names-proclist)) (newline) -(display (glibtop-names-proc_state)) (newline) -(display (glibtop-names-proc_uid)) (newline) -(display (glibtop-names-proc_mem)) (newline) -(display (glibtop-names-proc_time)) (newline) -(display (glibtop-names-proc_signal)) (newline) -(display (glibtop-names-proc_kernel)) (newline) -(display (glibtop-names-proc_segment)) (newline) - -(newline) - -(display (glibtop-labels-cpu)) (newline) -(display (glibtop-labels-mem)) (newline) -(display (glibtop-labels-swap)) (newline) -(display (glibtop-labels-uptime)) (newline) -(display (glibtop-labels-loadavg)) (newline) -(display (glibtop-labels-shm_limits)) (newline) -(display (glibtop-labels-msg_limits)) (newline) -(display (glibtop-labels-sem_limits)) (newline) -(display (glibtop-labels-proclist)) (newline) -(display (glibtop-labels-proc_state)) (newline) -(display (glibtop-labels-proc_uid)) (newline) -(display (glibtop-labels-proc_mem)) (newline) -(display (glibtop-labels-proc_time)) (newline) -(display (glibtop-labels-proc_signal)) (newline) -(display (glibtop-labels-proc_kernel)) (newline) -(display (glibtop-labels-proc_segment)) (newline) - -(newline) - -(display (glibtop-descriptions-cpu)) (newline) -(display (glibtop-descriptions-mem)) (newline) -(display (glibtop-descriptions-swap)) (newline) -(display (glibtop-descriptions-uptime)) (newline) -(display (glibtop-descriptions-loadavg)) (newline) -(display (glibtop-descriptions-shm_limits)) (newline) -(display (glibtop-descriptions-msg_limits)) (newline) -(display (glibtop-descriptions-sem_limits)) (newline) -(display (glibtop-descriptions-proclist)) (newline) -(display (glibtop-descriptions-proc_state)) (newline) -(display (glibtop-descriptions-proc_uid)) (newline) -(display (glibtop-descriptions-proc_mem)) (newline) -(display (glibtop-descriptions-proc_time)) (newline) -(display (glibtop-descriptions-proc_signal)) (newline) -(display (glibtop-descriptions-proc_kernel)) (newline) -(display (glibtop-descriptions-proc_segment)) (newline) - -(newline) - -(display (glibtop-types-cpu)) (newline) -(display (glibtop-types-mem)) (newline) -(display (glibtop-types-swap)) (newline) -(display (glibtop-types-uptime)) (newline) -(display (glibtop-types-loadavg)) (newline) -(display (glibtop-types-shm_limits)) (newline) -(display (glibtop-types-msg_limits)) (newline) -(display (glibtop-types-sem_limits)) (newline) -(display (glibtop-types-proclist)) (newline) -(display (glibtop-types-proc_state)) (newline) -(display (glibtop-types-proc_uid)) (newline) -(display (glibtop-types-proc_mem)) (newline) -(display (glibtop-types-proc_time)) (newline) -(display (glibtop-types-proc_signal)) (newline) -(display (glibtop-types-proc_kernel)) (newline) -(display (glibtop-types-proc_segment)) (newline) diff --git a/examples/third.c b/examples/third.c deleted file mode 100644 index 2bbc12d1..00000000 --- a/examples/third.c +++ /dev/null @@ -1,57 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include - -#include -#include -#include - -#include -#include - -void main_prog(int argc, char *argv[]); - -int -main (int argc, char *argv[]) -{ - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, GTOPLOCALEDIR); - textdomain (PACKAGE); - - gh_enter (argc, argv, main_prog); - exit (0); -} - -void -main_prog (int argc, char *argv[]) -{ - glibtop_boot_guile (); -#ifdef GLIBTOP_GUILE_NAMES - glibtop_boot_guile_names (); -#endif - - gh_repl (argc, argv); -} diff --git a/features.def b/features.def deleted file mode 100644 index eedaf73a..00000000 --- a/features.def +++ /dev/null @@ -1,22 +0,0 @@ -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|swap|ulong(total,used,free,pagein,pageout) -void|uptime|double(uptime,idletime) -void|loadavg|double(loadavg[3]):ulong(nr_running,nr_tasks,last_pid) -void|shm_limits|ulong(shmmax,shmmin,shmmni,shmseg,shmall) -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) -unsigned *|proclist|ulong(number,size,total)|long(which,arg) -void|proc_state|str(cmd):char(state):ulong(uid,gid)|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_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_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_stack)|pid_t(pid) -char *|proc_args|ulong(size)|pid_t(pid):unsigned(max_len) -glibtop_map_entry *|proc_map|ulong(number,size,total)|pid_t(pid) -glibtop_mountentry *|@mountlist|ulong(number,size,total)|int(all_fs) -void|@fsusage|ulong(blocks,bfree,bavail,files,ffree)|string|mount_dir -void|netload|ulong(if_flags,mtu,subnet,address,packets_in,packets_out,packets_total,bytes_in,bytes_out,bytes_total,errors_in,errors_out,errors_total,collisions)|string|interface -void|ppp|ulong(state,bytes_in,bytes_out)|ushort(device) diff --git a/glibtop.h b/glibtop.h deleted file mode 100644 index 6a5727ab..00000000 --- a/glibtop.h +++ /dev/null @@ -1,107 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_H__ -#define __GLIBTOP_H__ - -#include - -#include -#include - -#ifdef HAVE_GLIBTOP_MACHINE_H -#include -#endif - -#ifndef GLIBTOP_MOUNTENTRY_LEN -#define GLIBTOP_MOUNTENTRY_LEN 79 -#endif - -typedef struct _glibtop glibtop; - -#include - -struct _glibtop -{ - unsigned flags; - unsigned method; /* Server Method */ - unsigned error_method; /* Error Method */ -#ifdef HAVE_GLIBTOP_MACHINE_H - glibtop_machine machine; /* Machine dependent data */ -#endif - int input [2]; /* Pipe client <- server */ - int output [2]; /* Pipe client -> server */ - int socket; /* Accepted connection of a socket */ - int ncpu; /* Number of CPUs, zero if single-processor */ - unsigned long os_version_code; /* Version code of the operating system */ - const char *name; /* Program name for error messages */ - const char *server_command; /* Command used to invoke server */ - const char *server_host; /* Host the server should run on */ - const char *server_user; /* Name of the user on the target host */ - const char *server_rsh; /* Command used to connect to the target host */ - unsigned long features; /* Server is required for this features */ - unsigned long server_port; /* Port on which daemon is listening */ - glibtop_sysdeps sysdeps; /* Detailed feature list */ - glibtop_sysdeps required; /* Required feature list */ - pid_t pid; /* PID of the server */ -}; - -extern glibtop *glibtop_global_server; - -extern const unsigned long glibtop_server_features; - -#define glibtop_init() glibtop_init_r(&glibtop_global_server, 0, 0); - -#define glibtop_close() glibtop_close_r(glibtop_global_server); - -glibtop * -glibtop_init_r (glibtop **server_ptr, - unsigned long features, - unsigned flags); - -glibtop * -glibtop_init_s (glibtop **server_ptr, - unsigned long features, - unsigned flags); - -#ifdef GLIBTOP_GUILE - -/* You need to link with -lgtop_guile to get this stuff here. */ - -void glibtop_boot_guile (void); - -#endif - -#ifdef GLIBTOP_GUILE_NAMES - -/* You need to link with -lgtop_guile_names to get this stuff here. */ - -void glibtop_boot_guile_names (void); - -#ifndef GLIBTOP_NAMES -#define GLIBTOP_NAMES -#endif - -#endif - -#endif diff --git a/include/.cvsignore b/include/.cvsignore deleted file mode 100644 index 282522db..00000000 --- a/include/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index 4832afc3..00000000 --- a/include/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = glibtop - diff --git a/include/glibtop/.cvsignore b/include/glibtop/.cvsignore deleted file mode 100644 index 282522db..00000000 --- a/include/glibtop/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/include/glibtop/Makefile.am b/include/glibtop/Makefile.am deleted file mode 100644 index 1b89e905..00000000 --- a/include/glibtop/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -glibtopdir = $(includedir)/glibtop - -glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \ - sem_limits.h uptime.h command.h mem.h proclist.h \ - proctime.h shm_limits.h version.h cpu.h msg_limits.h \ - procmem.h procuid.h swap.h write.h error.h open.h \ - procsegment.h read.h sysdeps.h xmalloc.h global.h \ - procsignal.h read_data.h union.h types.h gnuserv.h \ - parameter.h mountlist.h fsusage.h procmap.h signal.h \ - inodedb.h sysinfo.h ppp.h procargs.h netload.h diff --git a/include/glibtop/close.h b/include/glibtop/close.h deleted file mode 100644 index 98bde6cd..00000000 --- a/include/glibtop/close.h +++ /dev/null @@ -1,38 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_CLOSE_H__ -#define __GLIBTOP_CLOSE_H__ - -#include - -BEGIN_LIBGTOP_DECLS - -void glibtop_close_r (glibtop *server); - -void glibtop_close_s (glibtop *server); -void glibtop_close_p (glibtop *server); - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/command.h b/include/glibtop/command.h deleted file mode 100644 index 02eced03..00000000 --- a/include/glibtop/command.h +++ /dev/null @@ -1,102 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_COMMAND_H__ -#define __GLIBTOP_COMMAND_H__ - -#include -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_CMND_QUIT 0 -#define GLIBTOP_CMND_SYSDEPS 1 - -#define GLIBTOP_CMND_CPU 2 -#define GLIBTOP_CMND_MEM 3 -#define GLIBTOP_CMND_SWAP 4 -#define GLIBTOP_CMND_UPTIME 5 -#define GLIBTOP_CMND_LOADAVG 6 -#define GLIBTOP_CMND_SHM_LIMITS 7 -#define GLIBTOP_CMND_MSG_LIMITS 8 -#define GLIBTOP_CMND_SEM_LIMITS 9 -#define GLIBTOP_CMND_PROCLIST 10 - -#define GLIBTOP_CMND_PROC_STATE 11 -#define GLIBTOP_CMND_PROC_UID 12 -#define GLIBTOP_CMND_PROC_MEM 13 -#define GLIBTOP_CMND_PROC_TIME 14 -#define GLIBTOP_CMND_PROC_SIGNAL 15 -#define GLIBTOP_CMND_PROC_KERNEL 16 -#define GLIBTOP_CMND_PROC_SEGMENT 17 -#define GLIBTOP_CMND_PROC_ARGS 18 -#define GLIBTOP_CMND_PROC_MAP 19 - -#define GLIBTOP_CMND_MOUNTLIST 20 -#define GLIBTOP_CMND_FSUSAGE 21 -#define GLIBTOP_CMND_NETLOAD 22 -#define GLIBTOP_CMND_PPP 23 - -#define GLIBTOP_MAX_CMND 24 - -#define _GLIBTOP_PARAM_SIZE 16 - -typedef struct _glibtop_command glibtop_command; - -typedef struct _glibtop_response glibtop_response; -typedef union _glibtop_response_union glibtop_response_union; - -struct _glibtop_command -{ - u_int64_t command; - u_int64_t size, data_size; - char parameter [_GLIBTOP_PARAM_SIZE]; -}; - -union _glibtop_response_union -{ - glibtop_union data; - glibtop_sysdeps sysdeps; -}; - -struct _glibtop_response -{ - int64_t offset; - u_int64_t size, data_size; - glibtop_response_union u; -}; - -#define glibtop_call(p1, p2, p3, p4) glibtop_call_r(glibtop_global_server, p1, p2, p3, p4) - -void * -glibtop_call_l (glibtop *server, unsigned command, size_t send_size, - const void *send_buf, size_t recv_size, void *recv_buf); - -void * -glibtop_call_s (glibtop *server, unsigned command, size_t send_size, - const void *send_buf, size_t recv_size, void *recv_buf); - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h deleted file mode 100644 index 96dd6200..00000000 --- a/include/glibtop/cpu.h +++ /dev/null @@ -1,99 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_CPU_H__ -#define __GLIBTOP_CPU_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_CPU_TOTAL 0 -#define GLIBTOP_CPU_USER 1 -#define GLIBTOP_CPU_NICE 2 -#define GLIBTOP_CPU_SYS 3 -#define GLIBTOP_CPU_IDLE 4 -#define GLIBTOP_CPU_FREQUENCY 5 - -#define GLIBTOP_XCPU_TOTAL 6 -#define GLIBTOP_XCPU_USER 7 -#define GLIBTOP_XCPU_NICE 8 -#define GLIBTOP_XCPU_SYS 9 -#define GLIBTOP_XCPU_IDLE 10 - -#define GLIBTOP_MAX_CPU 11 - -/* Nobody should really be using more than 4 processors. */ -#define GLIBTOP_NCPU 4 - -typedef struct _glibtop_cpu glibtop_cpu; - -struct _glibtop_cpu -{ - u_int64_t flags, - total, /* GLIBTOP_CPU_TOTAL */ - user, /* GLIBTOP_CPU_USER */ - nice, /* GLIBTOP_CPU_NICE */ - sys, /* GLIBTOP_CPU_SYS */ - idle, /* GLIBTOP_CPU_IDLE */ - frequency, /* GLIBTOP_CPU_FREQUENCY */ - xcpu_total [GLIBTOP_NCPU], /* GLIBTOP_XCPU_TOTAL */ - xcpu_user [GLIBTOP_NCPU], /* GLIBTOP_XCPU_USER */ - xcpu_nice [GLIBTOP_NCPU], /* GLIBTOP_XCPU_NICE */ - xcpu_sys [GLIBTOP_NCPU], /* GLIBTOP_XCPU_SYS */ - xcpu_idle [GLIBTOP_NCPU]; /* GLIBTOP_XCPU_IDLE */ -}; - -#define glibtop_get_cpu(cpu) glibtop_get_cpu_l(glibtop_global_server, cpu) - -#if GLIBTOP_SUID_CPU -#define glibtop_get_cpu_r glibtop_get_cpu_p -#else -#define glibtop_get_cpu_r glibtop_get_cpu_s -#endif - -void glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf); - -#if GLIBTOP_SUID_CPU -void glibtop_init_cpu_p (glibtop *server); -void glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf); -#else -void glibtop_init_cpu_s (glibtop *server); -void glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_cpu []; -extern const unsigned glibtop_types_cpu []; -extern const char *glibtop_labels_cpu []; -extern const char *glibtop_descriptions_cpu []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/error.h b/include/glibtop/error.h deleted file mode 100644 index 30f45f4d..00000000 --- a/include/glibtop/error.h +++ /dev/null @@ -1,127 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_ERROR_H__ -#define __GLIBTOP_ERROR_H__ - -#include - -BEGIN_LIBGTOP_DECLS - -void glibtop_error_vr (glibtop *server, char *format, va_list args); -void glibtop_warn_vr (glibtop *server, char *format, va_list args); - -void glibtop_error_io_vr (glibtop *server, char *format, int, va_list args); -void glibtop_warn_io_vr (glibtop *server, char *format, int, va_list args); - -static void -glibtop_error_r (glibtop *server, char *format, ...) -{ - va_list args; - - va_start (args, format); - glibtop_error_vr (server, format, args); - va_end (args); -} - -static void -glibtop_warn_r (glibtop *server, char *format, ...) -{ - va_list args; - - va_start (args, format); - glibtop_warn_vr (server, format, args); - va_end (args); -} - -static void -glibtop_error_io_r (glibtop *server, char *format, ...) -{ - va_list args; - - va_start (args, format); - glibtop_error_io_vr (server, format, errno, args); - va_end (args); -} - -static void -glibtop_warn_io_r (glibtop *server, char *format, ...) -{ - va_list args; - - va_start (args, format); - glibtop_warn_io_vr (server, format, errno, args); - va_end (args); -} - -#ifdef __GNUC__ - -#define glibtop_error(p1, args...) glibtop_error_r(glibtop_global_server , p1 , ## args) -#define glibtop_warn(p1, args...) glibtop_warn_r(glibtop_global_server , p1 , ## args) - -#define glibtop_error_io(p1, args...) glibtop_error_io_r(glibtop_global_server , p1 , ## args) -#define glibtop_warn_io(p1, args...) glibtop_warn_io_r(glibtop_global_server , p1 , ## args) - -#else /* no __GNUC__ */ - -static void -glibtop_error (char *format, ...) -{ - va_list args; - va_start (args, format); - glibtop_error_vr (glibtop_global_server, format, args); - va_end (args); -} - -static void -glibtop_warn (char *format, ...) -{ - va_list args; - va_start (args, format); - glibtop_warn_vr (glibtop_global_server, format, args); - va_end (args); -} - -static void -glibtop_error_io (char *format, ...) -{ - va_list args; - va_start (args, format); - glibtop_error_io_vr (glibtop_global_server, format, errno, args); - va_end (args); -} - -static void -glibtop_warn_io (char *format, ...) -{ - va_list args; - va_start (args, format); - glibtop_warn_io_vr (glibtop_global_server, format, errno, args); - va_end (args); -} - -#endif /* no __GNUC__ */ - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/fsusage.h b/include/glibtop/fsusage.h deleted file mode 100644 index 2b90552c..00000000 --- a/include/glibtop/fsusage.h +++ /dev/null @@ -1,72 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_FSUSAGE_H__ -#define __GLIBTOP_FSUSAGE_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_FSUSAGE_BLOCKS 0 -#define GLIBTOP_FSUSAGE_BFREE 1 -#define GLIBTOP_FSUSAGE_BAVAIL 2 -#define GLIBTOP_FSUSAGE_FILES 3 -#define GLIBTOP_FSUSAGE_FFREE 4 - -#define GLIBTOP_MAX_FSUSAGE 5 - -typedef struct _glibtop_fsusage glibtop_fsusage; - -struct _glibtop_fsusage -{ - u_int64_t flags, - blocks, /* Total blocks. */ - bfree, /* Free blocks available to superuser. */ - bavail, /* Free blocks available to non-superuser. */ - files, /* Total file nodes. */ - ffree; /* Free file nodes. */ -}; - -#define glibtop_get_fsusage(fsusage,disk) glibtop_get_fsusage_l(glibtop_global_server, fsusage, disk) - -#define glibtop_get_fsusage_r glibtop_get_fsusage_s - -void glibtop_get_fsusage_l (glibtop *server, glibtop_fsusage *buf, const char *mount_dir); -void glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf, const char *mount_dir); - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_fsusage []; -extern const unsigned glibtop_types_fsusage []; -extern const char *glibtop_labels_fsusage []; -extern const char *glibtop_descriptions_fsusage []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/global.h b/include/glibtop/global.h deleted file mode 100644 index 65ff0544..00000000 --- a/include/glibtop/global.h +++ /dev/null @@ -1,142 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_GLOBAL_H__ -#define __GLIBTOP_GLOBAL_H__ - -#ifdef _IN_LIBGTOP -#include -#endif - -/* - * All declarations are enclosed in BEGIN_LIBGTOP_DECLS and - * END_LIBGTOP_DECLS so that C++ compilers don't mangle their names. - * - */ - -#undef BEGIN_LIBGTOP_DECLS -#undef END_LIBGTOP_DECLS -#ifdef __cplusplus -# define BEGIN_LIBGTOP_DECLS extern "C" { -# define END_LIBGTOP_DECLS } -#else -# define BEGIN_LIBGTOP_DECLS /* empty */ -# define END_LIBGTOP_DECLS /* empty */ -#endif - -#ifdef _IN_LIBGTOP - -/* Provide macros to feature the GCC function attribute. - */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#define G_GNUC_NORETURN \ - __attribute__((noreturn)) -#define G_GNUC_CONST \ - __attribute__((const)) -#define G_GNUC_UNUSED \ - __attribute__((unused)) -#else /* !__GNUC__ */ -#define G_GNUC_NORETURN -#define G_GNUC_CONST -#define G_GNUC_UNUSED -#endif /* !__GNUC__ */ - -#endif /* _IN_LIBGTOP */ - -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#ifdef NEED_GNOMESUPPORT_H -#include -#endif - -#ifdef WITHOUT_GUILE -#undef GLIBTOP_GUILE -#undef GLIBTOP_GUILE_NAMES -#endif - -#ifdef GLIBTOP_GUILE -#include -#endif - -#ifdef _IN_LIBGTOP -#if (defined HAVE_LIBINTL_H) || (defined HAVE_GETTEXT) -#include -#else -#include -#endif -#endif - -#include -#include - -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_MEMORY_H -#include -#endif - -#include - -#ifdef _IN_LIBGTOP - -#include -#include -#include -#include - -#endif /* _IN_LIBGTOP */ - -#include -#include - -#ifdef _IN_LIBGTOP - -BEGIN_LIBGTOP_DECLS - -#ifndef _ -#define _(String) dgettext (PACKAGE, String) -#define N_(String) (String) -#endif - -#ifndef HAVE_STRERROR -char *strerror (int errno); -#endif - -END_LIBGTOP_DECLS - -#endif /* _IN_LIBGTOP */ - -#endif diff --git a/include/glibtop/gnuserv.h b/include/glibtop/gnuserv.h deleted file mode 100644 index 6f945c71..00000000 --- a/include/glibtop/gnuserv.h +++ /dev/null @@ -1,161 +0,0 @@ -/* -*-C-*- - - Header file for the GNU Emacs server and client C code. - - This file is part of GNU Emacs. - - Copying is permitted under those conditions described by the GNU - General Public License. - - Copyright (C) 1989 Free Software Foundation, Inc. - - Author: Andy Norman (ange@hplb.hpl.hp.com), based on - 'etc/server.c' and 'etc/emacsclient.c' from the 18.52 GNU - Emacs distribution. - - Please mail bugs and suggestions to the author at the above address. -*/ - -/* HISTORY - * 11-Nov-1990 bristor@simba - * Added EOT stuff. - */ - -/* - * This file incorporates new features added by Bob Weiner , - * Darrell Kindred and Arup Mukherjee . - * Please see the note at the end of the README file for details. - * - * (If gnuserv came bundled with your emacs, the README file is probably - * ../etc/gnuserv.README relative to the directory containing this file) - */ - -#if 0 -static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup alpha !"; -#endif - -#define NO_SHORTNAMES - -#define PATCHLEVEL 2 - -#define NO_SHORTNAMES -/* gnuserv should not be compiled using SOCKS */ -#define DO_NOT_SOCKSIFY -#include -#include -#undef read -#undef write -#undef open -#undef close -#undef signal - -/* Define the communication method between server and clients: - * You can have either or both kinds of sockets, but you can't mix - * sockets with sysv ipc - */ - -#define INTERNET_DOMAIN_SOCKETS -#define UNIX_DOMAIN_SOCKETS - -/* - * Define additional authentication protocols to be used. These methods will - * be tried before falling back to the default gnuserv protocol (based on - * the GNU_SECURE environment variable). Currently, only MIT-MAGIC-COOKIE-1 - * is also supported. - * - * Comment out the next line(s) if you don't want to enable the - * appropriate authentication protocol. - */ - -#if defined (HAVE_XAUTH) -#define AUTH_MAGIC_COOKIE -#endif /* HAVE_XAUTH */ - -/* - * stuff related to supporting MIT-MAGIC-COOKIE-1 - */ - -#if 0 -#define MCOOKIE_SCREEN "42980" /* screen # to use as the gnuserv cookie */ -#endif -#define MCOOKIE_NAME "MAGIC-1" /* authentication protocol name */ -#define MCOOKIE_X_NAME "MIT-MAGIC-COOKIE-1" /* as needed by X */ - - -#define DEFAUTH_NAME "GNU-SECURE" /* name of default auth protocol */ -#define AUTH_TIMEOUT 15 /* # seconds to wait for auth data */ -#define AUTH_NAMESZ 15 /* max allows auth protocol name size */ - - -/* - * Pick a default communication scheme, if none was specified. - */ - -#if !defined(UNIX_DOMAIN_SOCKETS) && !defined(INTERNET_DOMAIN_SOCKETS) - -/* BSD systems use Unix Domain sockets by default */ - -#ifdef BSD -#define UNIX_DOMAIN_SOCKETS -#endif - -#endif /* No communication method pre-defined */ - -/* - * If you are using SYSV_IPC, you might want to make the buffer size bigger - * since it limits the size of requests and responses. Don't make it bigger - * than your system's max message size though (usually a couple of k) or else - * msgsend will start failing. For sockets, using the system BUFSIZ is usually - * what you want. - */ - -#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS) -#include -#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */ - -#ifdef INTERNET_DOMAIN_SOCKETS -#include -#include -#include -#define TABLE_SIZE 101 /* The number of entries in the hash table */ -#define HASH(host) host /* Rather simplistic hash function */ -#define DEFAULT_PORT 21490 /* default port number to use is - * DEFAULT_PORT + uid */ -#endif /* INTERNET_DOMAIN_SOCKETS */ - -#ifdef UNIX_DOMAIN_SOCKETS -#include -#define HIDE_UNIX_SOCKET /* put the unix socket in a protected dir */ -#endif /* UNIX_DOMAIN_SOCKETS */ - -#define HOSTNAMSZ 255 /* max size of a hostname */ -#define REPLYSIZ 300 /* max size of reply from server to client */ -#undef FALSE -#define FALSE 0 -#undef TRUE -#define TRUE 1 - -/* The casts shut Sun's compiler up and are safe in the context these - are actually used. */ -#define max2(x,y) (((int) (x) > (int) (y)) ? (x) : (y)) -#define min2(x,y) (((int) (x) < (int) (y)) ? (x) : (y)) - -#ifndef _NFILE /* rough guess at maximum number of open files */ -#define _NFILE 20 -#endif - -#define EOT_STR "\004" -#define EOT_CHR '\004' - -/* connection types */ -#define CONN_UNIX 0 -#define CONN_INTERNET 1 -#define CONN_IPC 2 - -/* function declarations */ -int glibtop_make_connection (const char *hostarg, int portarg, int *s); - -#ifdef INTERNET_DOMAIN_SOCKETS -long glibtop_internet_addr (const char *host); -#endif - diff --git a/include/glibtop/inodedb.h b/include/glibtop/inodedb.h deleted file mode 100644 index 5dc0017d..00000000 --- a/include/glibtop/inodedb.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_INODEDB_H__ -#define __GLIBTOP_INODEDB_H__ - -#include -#include - -#define GLIBTOP_INODEDB_SYSTEM 1 -#define GLIBTOP_INODEDB_USER 2 -#define GLIBTOP_INODEDB_CACHE 4 - -#define GLIBTOP_INODEDB_ALL 7 - -BEGIN_LIBGTOP_DECLS - -typedef struct _glibtop_inodedb glibtop_inodedb; - -typedef struct _glibtop_inodedb_key glibtop_inodedb_key; - -struct _glibtop_inodedb_key -{ - u_int64_t device, inode; -}; - -struct _glibtop_inodedb -{ - GDBM_FILE system_dbf, user_dbf; -}; - -#define glibtop_inodedb_open(p1,p2) glibtop_inodedb_open_s(glibtop_global_server, p1, p2) -#define glibtop_inodedb_lookup(p1,p2,p3) glibtop_inodedb_lookup_s(glibtop_global_server, p1, p2, p3) -#define glibtop_inodedb_close(p1) glibtop_inodedb_close_s(glibtop_global_server) - -glibtop_inodedb * -glibtop_inodedb_open_s (glibtop *server, unsigned databases, unsigned long cache_size); - -const char * -glibtop_inodedb_lookup_s (glibtop *server, - glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode); - -void -glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb); - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/loadavg.h b/include/glibtop/loadavg.h deleted file mode 100644 index ddcd08e6..00000000 --- a/include/glibtop/loadavg.h +++ /dev/null @@ -1,81 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_LOADAVG_H__ -#define __GLIBTOP_LOADAVG_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_LOADAVG_LOADAVG 0 -#define GLIBTOP_LOADAVG_NR_RUNNING 1 -#define GLIBTOP_LOADAVG_NR_TASKS 2 -#define GLIBTOP_LOADAVG_LAST_PID 3 - -#define GLIBTOP_MAX_LOADAVG 4 - -typedef struct _glibtop_loadavg glibtop_loadavg; - -struct _glibtop_loadavg -{ - u_int64_t flags; - double loadavg [3]; /* GLIBTOP_LOADAVG_LOADAVG */ - u_int64_t nr_running, /* GLIBTOP_LOADAVG_NR_RUNNING */ - nr_tasks, /* GLIBTOP_LOADAVG_NR_TASKS */ - last_pid; /* GLIBTOP_LOADAVG_LAST_PID */ -}; - -#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg_l(glibtop_global_server, loadavg) - -#if GLIBTOP_SUID_LOADAVG -#define glibtop_get_loadavg_r glibtop_get_loadavg_p -#else -#define glibtop_get_loadavg_r glibtop_get_loadavg_s -#endif - -void glibtop_get_loadavg_l (glibtop *server, glibtop_loadavg *buf); - -#if GLIBTOP_SUID_LOADAVG -void glibtop_init_loadavg_p (glibtop *server); -void glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf); -#else -void glibtop_init_loadavg_s (glibtop *server); -void glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_loadavg []; -extern const unsigned glibtop_types_loadavg []; -extern const char *glibtop_labels_loadavg []; -extern const char *glibtop_descriptions_loadavg []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/mem.h b/include/glibtop/mem.h deleted file mode 100644 index 2ae4d4b2..00000000 --- a/include/glibtop/mem.h +++ /dev/null @@ -1,89 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_MEM_H__ -#define __GLIBTOP_MEM_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_MEM_TOTAL 0 -#define GLIBTOP_MEM_USED 1 -#define GLIBTOP_MEM_FREE 2 -#define GLIBTOP_MEM_SHARED 3 -#define GLIBTOP_MEM_BUFFER 4 -#define GLIBTOP_MEM_CACHED 5 -#define GLIBTOP_MEM_USER 6 -#define GLIBTOP_MEM_LOCKED 7 - -#define GLIBTOP_MAX_MEM 8 - -typedef struct _glibtop_mem glibtop_mem; - -struct _glibtop_mem -{ - u_int64_t flags, - total, /* GLIBTOP_MEM_TOTAL */ - used, /* GLIBTOP_MEM_USED */ - free, /* GLIBTOP_MEM_FREE */ - shared, /* GLIBTOP_MEM_SHARED */ - buffer, /* GLIBTOP_MEM_BUFFER */ - cached, /* GLIBTOP_MEM_CACHED */ - user, /* GLIBTOP_MEM_USER */ - locked; /* GLIBTOP_MEM_LOCKED */ -}; - -#define glibtop_get_mem(mem) glibtop_get_mem_l(glibtop_global_server, mem) - -#if GLIBTOP_SUID_MEM -#define glibtop_get_mem_r glibtop_get_mem_p -#else -#define glibtop_get_mem_r glibtop_get_mem_s -#endif - -void glibtop_get_mem_l (glibtop *server, glibtop_mem *buf); - -#if GLIBTOP_SUID_MEM -void glibtop_init_mem_p (glibtop *server); -void glibtop_get_mem_p (glibtop *server, glibtop_mem *buf); -#else -void glibtop_init_mem_s (glibtop *server); -void glibtop_get_mem_s (glibtop *server, glibtop_mem *buf); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_mem []; -extern const unsigned glibtop_types_mem []; -extern const char *glibtop_labels_mem []; -extern const char *glibtop_descriptions_mem []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/mountlist.h b/include/glibtop/mountlist.h deleted file mode 100644 index 2927b5a7..00000000 --- a/include/glibtop/mountlist.h +++ /dev/null @@ -1,81 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_MOUNTLIST_H__ -#define __GLIBTOP_MOUNTLIST_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_MOUNTLIST_NUMBER 0 -#define GLIBTOP_MOUNTLIST_TOTAL 1 -#define GLIBTOP_MOUNTLIST_SIZE 2 - -#define GLIBTOP_MAX_MOUNTLIST 3 - -typedef struct _glibtop_mountentry glibtop_mountentry; - -typedef struct _glibtop_mountlist glibtop_mountlist; - -struct _glibtop_mountentry -{ - u_int64_t dev; - char devname [GLIBTOP_MOUNTENTRY_LEN+1]; - char mountdir [GLIBTOP_MOUNTENTRY_LEN+1]; - char type [GLIBTOP_MOUNTENTRY_LEN+1]; -}; - -struct _glibtop_mountlist -{ - u_int64_t flags, - number, /* GLIBTOP_MOUNTLIST_NUMBER */ - total, /* GLIBTOP_MOUNTLIST_TOTAL */ - size; /* GLIBTOP_MOUNTLIST_SIZE */ -}; - -#define glibtop_get_mountlist(mountlist,all_fs) glibtop_get_mountlist_l(glibtop_global_server, mountlist, all_fs) - -#define glibtop_get_mountlist_r glibtop_get_mountlist_s - -glibtop_mountentry * -glibtop_get_mountlist_l (glibtop *server, glibtop_mountlist *buf, int all_fs); - -glibtop_mountentry * -glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs); - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_mountlist []; -extern const unsigned glibtop_types_mountlist []; -extern const char *glibtop_labels_mountlist []; -extern const char *glibtop_descriptions_mountlist []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/msg_limits.h b/include/glibtop/msg_limits.h deleted file mode 100644 index b9208721..00000000 --- a/include/glibtop/msg_limits.h +++ /dev/null @@ -1,88 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_MSG_LIMITS_H__ -#define __GLIBTOP_MSG_LIMITS_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_IPC_MSGPOOL 0 -#define GLIBTOP_IPC_MSGMAP 1 -#define GLIBTOP_IPC_MSGMAX 2 -#define GLIBTOP_IPC_MSGMNB 3 -#define GLIBTOP_IPC_MSGMNI 4 -#define GLIBTOP_IPC_MSGSSZ 5 -#define GLIBTOP_IPC_MSGTQL 6 - -#define GLIBTOP_MAX_MSG_LIMITS 7 - -typedef struct _glibtop_msg_limits glibtop_msg_limits; - -struct _glibtop_msg_limits -{ - u_int64_t flags, - msgpool, /* GLIBTOP_IPC_MSGPOOL */ - msgmap, /* GLIBTOP_IPC_MSGMAP */ - msgmax, /* GLIBTOP_IPC_MSGMAX */ - msgmnb, /* GLIBTOP_IPC_MSGMNB */ - msgmni, /* GLIBTOP_IPC_MSGMNI */ - msgssz, /* GLIBTOP_IPC_MSGSSZ */ - msgtql; /* GLIBTOP_IPC_MSGTQL */ -}; - -#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits_l(glibtop_global_server, msg) - -#if GLIBTOP_SUID_MSG_LIMITS -#define glibtop_get_msg_limits_r glibtop_get_msg_limits_p -#else -#define glibtop_get_msg_limits_r glibtop_get_msg_limits_s -#endif - -void glibtop_get_msg_limits_l (glibtop *server, glibtop_msg_limits *buf); - -#if GLIBTOP_SUID_MSG_LIMITS -void glibtop_init_msg_limits_p (glibtop *server); -void glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf); -#else -void glibtop_init_msg_limits_s (glibtop *server); -void glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_msg_limits []; -extern const unsigned glibtop_types_msg_limits []; -extern const char *glibtop_labels_msg_limits []; -extern const char *glibtop_descriptions_msg_limits []; - -#endif - -END_LIBGTOP_DECLS - -#endif - diff --git a/include/glibtop/netload.h b/include/glibtop/netload.h deleted file mode 100644 index 90c09a5a..00000000 --- a/include/glibtop/netload.h +++ /dev/null @@ -1,120 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_NETLOAD_H__ -#define __GLIBTOP_NETLOAD_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_NETLOAD_IF_FLAGS 0 -#define GLIBTOP_NETLOAD_MTU 1 -#define GLIBTOP_NETLOAD_SUBNET 2 -#define GLIBTOP_NETLOAD_ADDRESS 3 -#define GLIBTOP_NETLOAD_PACKETS_IN 4 -#define GLIBTOP_NETLOAD_PACKETS_OUT 5 -#define GLIBTOP_NETLOAD_PACKETS_TOTAL 6 -#define GLIBTOP_NETLOAD_BYTES_IN 7 -#define GLIBTOP_NETLOAD_BYTES_OUT 8 -#define GLIBTOP_NETLOAD_BYTES_TOTAL 9 -#define GLIBTOP_NETLOAD_ERRORS_IN 10 -#define GLIBTOP_NETLOAD_ERRORS_OUT 11 -#define GLIBTOP_NETLOAD_ERRORS_TOTAL 12 -#define GLIBTOP_NETLOAD_COLLISIONS 13 - -#define GLIBTOP_MAX_NETLOAD 14 - -typedef struct _glibtop_netload glibtop_netload; - -enum { - GLIBTOP_IF_FLAGS_UP = 1, - GLIBTOP_IF_FLAGS_BROADCAST, - GLIBTOP_IF_FLAGS_DEBUG, - GLIBTOP_IF_FLAGS_LOOPBACK, - GLIBTOP_IF_FLAGS_POINTOPOINT, - GLIBTOP_IF_FLAGS_RUNNING, - GLIBTOP_IF_FLAGS_NOARP, - GLIBTOP_IF_FLAGS_PROMISC, - GLIBTOP_IF_FLAGS_ALLMULTI, - GLIBTOP_IF_FLAGS_OACTIVE, - GLIBTOP_IF_FLAGS_SIMPLEX, - GLIBTOP_IF_FLAGS_LINK0, - GLIBTOP_IF_FLAGS_LINK1, - GLIBTOP_IF_FLAGS_LINK2, - GLIBTOP_IF_FLAGS_ALTPHYS, - GLIBTOP_IF_FLAGS_MULTICAST -}; - -struct _glibtop_netload -{ - u_int64_t flags, - if_flags, /* GLIBTOP_NETLOAD_IF_FLAGS */ - mtu, /* GLIBTOP_NETLOAD_MTU */ - subnet, /* GLIBTOP_NETLOAD_SUBNET */ - address, /* GLIBTOP_NETLOAD_ADDRESS */ - packets_in, /* GLIBTOP_NETLOAD_PACKETS_IN */ - packets_out, /* GLIBTOP_NETLOAD_PACKETS_OUT */ - packets_total, /* GLIBTOP_NETLOAD_PACKETS_TOTAL*/ - bytes_in, /* GLIBTOP_NETLOAD_BYTES_IN */ - bytes_out, /* GLIBTOP_NETLOAD_BYTES_OUT */ - bytes_total, /* GLIBTOP_NETLOAD_BYTES_TOTAL */ - errors_in, /* GLIBTOP_NETLOAD_ERRORS_IN */ - errors_out, /* GLIBTOP_NETLOAD_ERRORS_OUT */ - errors_total, /* GLIBTOP_NETLOAD_ERRORS_TOTAL */ - collisions; /* GLIBTOP_NETLOAD_COLLISIONS */ -}; - -#define glibtop_get_netload(netload,interface) glibtop_get_netload_l(glibtop_global_server, netload, interface) - -#if GLIBTOP_SUID_NETLOAD -#define glibtop_get_netload_r glibtop_get_netload_p -#else -#define glibtop_get_netload_r glibtop_get_netload_s -#endif - -void glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface); - -#if GLIBTOP_SUID_NETLOAD -void glibtop_init_netload_p (glibtop *server); -void glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface); -#else -void glibtop_init_netload_s (glibtop *server); -void glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, const char *interface); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_netload []; -extern const unsigned glibtop_types_netload []; -extern const char *glibtop_labels_netload []; -extern const char *glibtop_descriptions_netload []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/open.h b/include/glibtop/open.h deleted file mode 100644 index 6c898dc2..00000000 --- a/include/glibtop/open.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_OPEN_H__ -#define __GLIBTOP_OPEN_H__ - -#include -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define _GLIBTOP_INIT_STATE_INIT 0x10000 -#define _GLIBTOP_INIT_STATE_OPEN 0x20000 -#define _GLIBTOP_INIT_STATE_SERVER 0x40000 -#define _GLIBTOP_INIT_STATE_SYSDEPS 0x80000 - -#define GLIBTOP_INIT_NO_OPEN 1 -#define GLIBTOP_INIT_NO_INIT 2 - -#define GLIBTOP_FEATURES_NO_SERVER 4 -#define GLIBTOP_FEATURES_EXCEPT 8 - -#define GLIBTOP_METHOD_DIRECT 1 -#define GLIBTOP_METHOD_PIPE 2 -#define GLIBTOP_METHOD_INET 3 -#define GLIBTOP_METHOD_UNIX 4 - -#define GLIBTOP_ERROR_METHOD_IGNORE 0 -#define GLIBTOP_ERROR_METHOD_WARN_ONCE 1 -#define GLIBTOP_ERROR_METHOD_WARN 2 -#define GLIBTOP_ERROR_METHOD_ABORT 3 - -#define GLIBTOP_ERROR_METHOD_DEFAULT GLIBTOP_ERROR_METHOD_WARN_ONCE - -void -glibtop_open_l (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags); - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags); - -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags); - -void -glibtop_open_s (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags); - - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/parameter.h b/include/glibtop/parameter.h deleted file mode 100644 index 1c09a406..00000000 --- a/include/glibtop/parameter.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PARAMETER_H__ -#define __GLIBTOP_PARAMETER_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PARAM_METHOD 1 -#define GLIBTOP_PARAM_FEATURES 2 -#define GLIBTOP_PARAM_COMMAND 3 -#define GLIBTOP_PARAM_HOST 4 -#define GLIBTOP_PARAM_PORT 5 -#define GLIBTOP_PARAM_ERROR_METHOD 6 -#define GLIBTOP_PARAM_REQUIRED 7 - -#define glibtop_get_parameter(p1,p2,p3) glibtop_get_parameter_l(glibtop_global_server,p1,p2,p3) -#define glibtop_set_parameter(p1,p2,p3) glibtop_set_parameter_l(glibtop_global_server,p1,p2,p3) - -size_t -glibtop_get_parameter_l (glibtop *server, const unsigned parameter, - void *data_ptr, size_t data_size); - -void -glibtop_set_parameter_l (glibtop *server, const unsigned parameter, - const void *data_ptr, size_t data_size); - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/ppp.h b/include/glibtop/ppp.h deleted file mode 100644 index 1a4ec64a..00000000 --- a/include/glibtop/ppp.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PPP_H__ -#define __GLIBTOP_PPP_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PPP_STATE 0 -#define GLIBTOP_PPP_BYTES_IN 1 -#define GLIBTOP_PPP_BYTES_OUT 2 - -#define GLIBTOP_MAX_PPP 3 - -typedef struct _glibtop_ppp glibtop_ppp; - -enum { - GLIBTOP_PPP_STATE_UNKNOWN = 0, - GLIBTOP_PPP_STATE_HANGUP, - GLIBTOP_PPP_STATE_ONLINE -}; - -struct _glibtop_ppp -{ - u_int64_t flags, - state, /* GLIBTOP_PPP_STATE */ - bytes_in, /* GLIBTOP_PPP_BYTES_IN */ - bytes_out; /* GLIBTOP_PPP_BYTES_OUT */ -}; - -#define glibtop_get_ppp(ppp,device) glibtop_get_ppp_l(glibtop_global_server, ppp, device) - -#if GLIBTOP_SUID_PPP -#define glibtop_get_ppp_r glibtop_get_ppp_p -#else -#define glibtop_get_ppp_r glibtop_get_ppp_s -#endif - -void glibtop_get_ppp_l (glibtop *server, glibtop_ppp *buf, unsigned short device); - -#if GLIBTOP_SUID_PPP -void glibtop_init_ppp_p (glibtop *server); -void glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device); -#else -void glibtop_init_ppp_s (glibtop *server); -void glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_ppp []; -extern const unsigned glibtop_types_ppp []; -extern const char *glibtop_labels_ppp []; -extern const char *glibtop_descriptions_ppp []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/procargs.h b/include/glibtop/procargs.h deleted file mode 100644 index c1a6016e..00000000 --- a/include/glibtop/procargs.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROC_ARGS_H__ -#define __GLIBTOP_PROC_ARGS_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_ARGS_SIZE 0 - -#define GLIBTOP_MAX_PROC_ARGS 1 - -typedef struct _glibtop_proc_args glibtop_proc_args; - -struct _glibtop_proc_args -{ - u_int64_t flags, - size; /* GLIBTOP_PROC_ARGS_SIZE */ -}; - -#define glibtop_get_proc_args(proc_args,pid,max_len) glibtop_get_proc_args_l(glibtop_global_server, proc_args, pid, max_len) - -#if GLIBTOP_SUID_PROC_ARGS -#define glibtop_get_proc_args_r glibtop_get_proc_args_p -#else -#define glibtop_get_proc_args_r glibtop_get_proc_args_s -#endif - -char * -glibtop_get_proc_args_l (glibtop *server, glibtop_proc_args *buf, - pid_t pid, unsigned max_len); - -#if GLIBTOP_SUID_PROC_ARGS -void glibtop_init_proc_args_p (glibtop *server); - -char * -glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf, - pid_t pid, unsigned max_len); -#else -void glibtop_init_proc_args_s (glibtop *server); - -char * -glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf, - pid_t pid, unsigned max_len); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_args []; -extern const unsigned glibtop_types_proc_args []; -extern const char *glibtop_labels_proc_args []; -extern const char *glibtop_descriptions_proc_args []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/prockernel.h b/include/glibtop/prockernel.h deleted file mode 100644 index 09d6ad31..00000000 --- a/include/glibtop/prockernel.h +++ /dev/null @@ -1,98 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROCKERNEL_H__ -#define __GLIBTOP_PROCKERNEL_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_KERNEL_K_FLAGS 0 -#define GLIBTOP_PROC_KERNEL_MIN_FLT 1 -#define GLIBTOP_PROC_KERNEL_MAJ_FLT 2 -#define GLIBTOP_PROC_KERNEL_CMIN_FLT 3 -#define GLIBTOP_PROC_KERNEL_CMAJ_FLT 4 -#define GLIBTOP_PROC_KERNEL_KSTK_ESP 5 -#define GLIBTOP_PROC_KERNEL_KSTK_EIP 6 -#define GLIBTOP_PROC_KERNEL_NWCHAN 7 -#define GLIBTOP_PROC_KERNEL_WCHAN 8 - -#define GLIBTOP_MAX_PROC_KERNEL 9 - -typedef struct _glibtop_proc_kernel glibtop_proc_kernel; - -/* Kernel stuff */ - -struct _glibtop_proc_kernel -{ - u_int64_t flags; - u_int64_t k_flags, /* kernel flags for the process */ - min_flt, /* number of minor page faults since - * process start */ - maj_flt, /* number of major page faults since - * process start */ - cmin_flt, /* cumulative min_flt of process and - * child processes */ - cmaj_flt, /* cumulative maj_flt of process and - * child processes */ - kstk_esp, /* kernel stack pointer */ - kstk_eip, /* kernel stack pointer */ - nwchan; /* address of kernel wait channel - * proc is sleeping in */ - char wchan [40]; -}; - -#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel_l(glibtop_global_server, p1, p2) - -#if GLIBTOP_SUID_PROC_KERNEL -#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_p -#else -#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_s -#endif - -void glibtop_get_proc_kernel_l (glibtop *server, glibtop_proc_kernel *buf, pid_t pid); - -#if GLIBTOP_SUID_PROC_KERNEL -void glibtop_init_proc_kernel_p (glibtop *server); -void glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf, pid_t pid); -#else -void glibtop_init_proc_kernel_s (glibtop *server); -void glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_kernel []; -extern const unsigned glibtop_types_proc_kernel []; -extern const char *glibtop_labels_proc_kernel []; -extern const char *glibtop_descriptions_proc_kernel []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/proclist.h b/include/glibtop/proclist.h deleted file mode 100644 index 00d3beed..00000000 --- a/include/glibtop/proclist.h +++ /dev/null @@ -1,104 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROCLIST_H__ -#define __GLIBTOP_PROCLIST_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROCLIST_NUMBER 0 -#define GLIBTOP_PROCLIST_TOTAL 1 -#define GLIBTOP_PROCLIST_SIZE 2 - -#define GLIBTOP_MAX_PROCLIST 3 - -/* You can use the folowing constants as the `which' member of - * glibtop_get_proclist () to specify which processes to fetch. */ - -#define GLIBTOP_KERN_PROC_ALL 0 /* all processes */ -#define GLIBTOP_KERN_PROC_PID 1 -#define GLIBTOP_KERN_PROC_PGRP 2 -#define GLIBTOP_KERN_PROC_SESSION 3 -#define GLIBTOP_KERN_PROC_TTY 4 -#define GLIBTOP_KERN_PROC_UID 5 -#define GLIBTOP_KERN_PROC_RUID 6 - -#define GLIBTOP_KERN_PROC_MASK 15 - -#define GLIBTOP_EXCLUDE_IDLE 0x1000 -#define GLIBTOP_EXCLUDE_SYSTEM 0x2000 -#define GLIBTOP_EXCLUDE_NOTTY 0x4000 - -typedef struct _glibtop_proclist glibtop_proclist; - -struct _glibtop_proclist -{ - u_int64_t flags, - number, /* GLIBTOP_PROCLIST_NUMBER */ - total, /* GLIBTOP_PROCLIST_TOTAL */ - size; /* GLIBTOP_PROCLIST_SIZE */ -}; - -#define glibtop_get_proclist(proclist,which,arg) glibtop_get_proclist_l(glibtop_global_server, proclist, which, arg) - -#if GLIBTOP_SUID_PROCLIST -#define glibtop_get_proclist_r glibtop_get_proclist_p -#else -#define glibtop_get_proclist_r glibtop_get_proclist_s -#endif - -unsigned * -glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf, - int64_t which, int64_t arg); - -#if GLIBTOP_SUID_PROCLIST -void glibtop_init_proclist_p (glibtop *server); - -unsigned * -glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf, - int64_t which, int64_t arg); -#else -void glibtop_init_proclist_s (glibtop *server); - -unsigned * -glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, - int64_t which, int64_t arg); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proclist []; -extern const unsigned glibtop_types_proclist []; -extern const char *glibtop_labels_proclist []; -extern const char *glibtop_descriptions_proclist []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/procmap.h b/include/glibtop/procmap.h deleted file mode 100644 index 0846bc28..00000000 --- a/include/glibtop/procmap.h +++ /dev/null @@ -1,110 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROC_MAP_H__ -#define __GLIBTOP_PROC_MAP_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_MAP_NUMBER 0 -#define GLIBTOP_PROC_MAP_TOTAL 1 -#define GLIBTOP_PROC_MAP_SIZE 2 - -#define GLIBTOP_MAX_PROC_MAP 3 - -#define GLIBTOP_MAP_ENTRY_START 1 -#define GLIBTOP_MAP_ENTRY_END 2 -#define GLIBTOP_MAP_ENTRY_OFFSET 3 -#define GLIBTOP_MAP_ENTRY_PERM 4 -#define GLIBTOP_MAP_ENTRY_INODE 5 -#define GLIBTOP_MAP_ENTRY_DEVICE 6 -#define GLIBTOP_MAP_ENTRY_FILENAME 7 - -#define GLIBTOP_MAX_MAP_ENTRY 8 - -#define GLIBTOP_MAP_FILENAME_LEN 215 - -#define GLIBTOP_MAP_PERM_READ 1 -#define GLIBTOP_MAP_PERM_WRITE 2 -#define GLIBTOP_MAP_PERM_EXECUTE 4 -#define GLIBTOP_MAP_PERM_SHARED 8 -#define GLIBTOP_MAP_PERM_PRIVATE 16 - -typedef struct _glibtop_map_entry glibtop_map_entry; - -typedef struct _glibtop_proc_map glibtop_proc_map; - -struct _glibtop_map_entry -{ - u_int64_t flags, start, end, offset, perm, inode, device; - char filename [GLIBTOP_MAP_FILENAME_LEN+1]; -}; - -struct _glibtop_proc_map -{ - u_int64_t flags, - number, /* GLIBTOP_PROC_MAP_NUMBER */ - total, /* GLIBTOP_PROC_MAP_TOTAL */ - size; /* GLIBTOP_PROC_MAP_SIZE */ -}; - -#define glibtop_get_proc_map(proc_map,pid) glibtop_get_proc_map_l(glibtop_global_server, proc_map, pid) - -#if GLIBTOP_SUID_PROC_MAP -#define glibtop_get_proc_map_r glibtop_get_proc_map_p -#else -#define glibtop_get_proc_map_r glibtop_get_proc_map_s -#endif - -glibtop_map_entry * -glibtop_get_proc_map_l (glibtop *server, glibtop_proc_map *buf, pid_t pid); - -#if GLIBTOP_SUID_PROC_MAP -void glibtop_init_proc_map_p (glibtop *server); - -glibtop_map_entry * -glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, pid_t pid); -#else -void glibtop_init_proc_map_s (glibtop *server); - -glibtop_map_entry * -glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_map []; -extern const unsigned glibtop_types_proc_map []; -extern const char *glibtop_labels_proc_map []; -extern const char *glibtop_descriptions_proc_map []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/procmem.h b/include/glibtop/procmem.h deleted file mode 100644 index 7738c711..00000000 --- a/include/glibtop/procmem.h +++ /dev/null @@ -1,89 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROCMEM_H__ -#define __GLIBTOP_PROCMEM_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_MEM_SIZE 0 -#define GLIBTOP_PROC_MEM_VSIZE 1 -#define GLIBTOP_PROC_MEM_RESIDENT 2 -#define GLIBTOP_PROC_MEM_SHARE 3 -#define GLIBTOP_PROC_MEM_RSS 4 -#define GLIBTOP_PROC_MEM_RSS_RLIM 5 - -#define GLIBTOP_MAX_PROC_MEM 6 - -typedef struct _glibtop_proc_mem glibtop_proc_mem; - -/* Memory section */ - -struct _glibtop_proc_mem -{ - u_int64_t flags, - size, /* total # of pages of memory */ - vsize, /* number of pages of virtual memory ... */ - resident, /* number of resident set - * (non-swapped) pages (4k) */ - share, /* number of pages of shared (mmap'd) memory */ - rss, /* resident set size */ - rss_rlim; /* current limit (in bytes) of the rss - * of the process; usually 2,147,483,647 */ -}; - -#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem_l(glibtop_global_server, p1, p2) - -#if GLIBTOP_SUID_PROC_MEM -#define glibtop_get_proc_mem_r glibtop_get_proc_mem_p -#else -#define glibtop_get_proc_mem_r glibtop_get_proc_mem_s -#endif - -void glibtop_get_proc_mem_l (glibtop *server, glibtop_proc_mem *buf, pid_t pid); - -#if GLIBTOP_SUID_PROC_MEM -void glibtop_init_proc_mem_p (glibtop *server); -void glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, pid_t pid); -#else -void glibtop_init_proc_mem_s (glibtop *server); -void glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_mem []; -extern const unsigned glibtop_types_proc_mem []; -extern const char *glibtop_labels_proc_mem []; -extern const char *glibtop_descriptions_proc_mem []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/procsegment.h b/include/glibtop/procsegment.h deleted file mode 100644 index e00444be..00000000 --- a/include/glibtop/procsegment.h +++ /dev/null @@ -1,92 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROCSEGMENT_H__ -#define __GLIBTOP_PROCSEGMENT_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_SEGMENT_TEXT_RSS 0 -#define GLIBTOP_PROC_SEGMENT_SHLIB_RSS 1 -#define GLIBTOP_PROC_SEGMENT_DATA_RSS 2 -#define GLIBTOP_PROC_SEGMENT_STACK_RSS 3 -#define GLIBTOP_PROC_SEGMENT_DIRTY_SIZE 4 -#define GLIBTOP_PROC_SEGMENT_START_CODE 5 -#define GLIBTOP_PROC_SEGMENT_END_CODE 6 -#define GLIBTOP_PROC_SEGMENT_START_STACK 7 - -#define GLIBTOP_MAX_PROC_SEGMENT 8 - -typedef struct _glibtop_proc_segment glibtop_proc_segment; - -/* Segment stuff */ - -struct _glibtop_proc_segment -{ - u_int64_t flags, - text_rss, /* text resident set size */ - shlib_rss, /* shared-lib resident set size */ - data_rss, /* data resident set size */ - stack_rss, /* stack resident set size */ - dirty_size, /* size of dirty pages */ - start_code, - /* address of beginning of code segment */ - end_code, /* address of end of code segment */ - start_stack; /* address of the bottom of stack segment */ -}; - -#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment_l(glibtop_global_server, p1, p2) - -#if GLIBTOP_SUID_PROC_SEGMENT -#define glibtop_get_proc_segment_r glibtop_get_proc_segment_p -#else -#define glibtop_get_proc_segment_r glibtop_get_proc_segment_s -#endif - -void glibtop_get_proc_segment_l (glibtop *server, glibtop_proc_segment *buf, pid_t pid); - -#if GLIBTOP_SUID_PROC_SEGMENT -void glibtop_init_proc_segment_p (glibtop *server); -void glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, pid_t pid); -#else -void glibtop_init_proc_segment_s (glibtop *server); -void glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf, pid_t pid); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_segment []; -extern const unsigned glibtop_types_proc_segment []; -extern const char *glibtop_labels_proc_segment []; -extern const char *glibtop_descriptions_proc_segment []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/procsignal.h b/include/glibtop/procsignal.h deleted file mode 100644 index 4a9bd162..00000000 --- a/include/glibtop/procsignal.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROCSIGNAL_H__ -#define __GLIBTOP_PROCSIGNAL_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_SIGNAL_SIGNAL 0 -#define GLIBTOP_PROC_SIGNAL_BLOCKED 1 -#define GLIBTOP_PROC_SIGNAL_SIGIGNORE 2 -#define GLIBTOP_PROC_SIGNAL_SIGCATCH 3 - -#define GLIBTOP_MAX_PROC_SIGNAL 4 - -typedef struct _glibtop_proc_signal glibtop_proc_signal; - -/* Signals section */ - -struct _glibtop_proc_signal -{ - u_int64_t flags, - signal [2], /* mask of pending signals */ - blocked [2], /* mask of blocked signals */ - sigignore [2], /* mask of ignored signals */ - sigcatch [2]; /* mask of caught signals */ -}; - -#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal_l(glibtop_global_server, p1, p2) - -#if GLIBTOP_SUID_PROC_SIGNAL -#define glibtop_get_proc_signal_r glibtop_get_proc_signal_p -#else -#define glibtop_get_proc_signal_r glibtop_get_proc_signal_s -#endif - -void glibtop_get_proc_signal_l (glibtop *server, glibtop_proc_signal *buf, pid_t pid); - -#if GLIBTOP_SUID_PROC_SIGNAL -void glibtop_init_proc_signal_p (glibtop *server); -void glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf, pid_t pid); -#else -void glibtop_init_proc_signal_s (glibtop *server); -void glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_signal []; -extern const unsigned glibtop_types_proc_signal []; -extern const char *glibtop_labels_proc_signal []; -extern const char *glibtop_descriptions_proc_signal []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/procstate.h b/include/glibtop/procstate.h deleted file mode 100644 index ae3fec18..00000000 --- a/include/glibtop/procstate.h +++ /dev/null @@ -1,90 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROCSTATE_H__ -#define __GLIBTOP_PROCSTATE_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_STATE_CMD 0 -#define GLIBTOP_PROC_STATE_STATE 1 -#define GLIBTOP_PROC_STATE_UID 2 -#define GLIBTOP_PROC_STATE_GID 3 - -#define GLIBTOP_MAX_PROC_STATE 4 - -typedef struct _glibtop_proc_state glibtop_proc_state; - -/* Name and status */ - -struct _glibtop_proc_state -{ - u_int64_t flags; - char cmd[40], /* basename of executable file in - * call to exec(2) */ - state; /* single-char code for process state - * (S=sleeping) */ - /* NOTE: when porting the library, TRY HARD to implement the - * following two fields. */ - /* IMPORTANT NOTICE: For security reasons, it is extremely important - * only to set the flags value for those two - * fields if their values are corrent ! */ - int uid, /* UID of process */ - gid; /* GID of process */ -}; - -#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state_l(glibtop_global_server, p1, p2) - -#if GLIBTOP_SUID_PROC_STATE -#define glibtop_get_proc_state_r glibtop_get_proc_state_p -#else -#define glibtop_get_proc_state_r glibtop_get_proc_state_s -#endif - -void glibtop_get_proc_state_l (glibtop *server, glibtop_proc_state *buf, pid_t pid); - -#if GLIBTOP_SUID_PROC_STATE -void glibtop_init_proc_state_p (glibtop *server); -void glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf, pid_t pid); -#else -void glibtop_init_proc_state_s (glibtop *server); -void glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_state []; -extern const unsigned glibtop_types_proc_state []; -extern const char *glibtop_labels_proc_state []; -extern const char *glibtop_descriptions_proc_state []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/proctime.h b/include/glibtop/proctime.h deleted file mode 100644 index 236af2e4..00000000 --- a/include/glibtop/proctime.h +++ /dev/null @@ -1,104 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROCTIME_H__ -#define __GLIBTOP_PROCTIME_H__ - -#include -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_TIME_START_TIME 0 -#define GLIBTOP_PROC_TIME_RTIME 1 -#define GLIBTOP_PROC_TIME_UTIME 2 -#define GLIBTOP_PROC_TIME_STIME 3 -#define GLIBTOP_PROC_TIME_CUTIME 4 -#define GLIBTOP_PROC_TIME_CSTIME 5 -#define GLIBTOP_PROC_TIME_TIMEOUT 6 -#define GLIBTOP_PROC_TIME_IT_REAL_VALUE 7 -#define GLIBTOP_PROC_TIME_FREQUENCY 8 -#define GLIBTOP_PROC_TIME_XCPU_UTIME 9 -#define GLIBTOP_PROC_TIME_XCPU_STIME 10 - -#define GLIBTOP_MAX_PROC_TIME 11 - -typedef struct _glibtop_proc_time glibtop_proc_time; - -/* Time section */ - -struct _glibtop_proc_time -{ - u_int64_t flags, - start_time, /* start time of process -- - * seconds since 1-1-70 */ - rtime, /* real time accumulated by process */ - utime, /* user-mode CPU time accumulated by process */ - stime, /* kernel-mode CPU time accumulated by process */ - cutime, /* cumulative utime of process and - * reaped children */ - cstime, /* cumulative stime of process and - * reaped children */ - timeout, /* The time (in jiffies) of the process's - * next timeout */ - it_real_value, /* The time (in jiffies) before the - * next SIGALRM is sent to the process - * due to an interval timer. */ - frequency, /* Tick frequency. */ - xcpu_utime [GLIBTOP_NCPU], /* utime and stime for all CPUs on */ - xcpu_stime [GLIBTOP_NCPU]; /* SMP machines. */ -}; - -#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time_l(glibtop_global_server, p1, p2) - -#if GLIBTOP_SUID_PROC_TIME -#define glibtop_get_proc_time_r glibtop_get_proc_time_p -#else -#define glibtop_get_proc_time_r glibtop_get_proc_time_s -#endif - -void glibtop_get_proc_time_l (glibtop *server, glibtop_proc_time *buf, pid_t pid); - -#if GLIBTOP_SUID_PROC_TIME -void glibtop_init_proc_time_p (glibtop *server); -void glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, pid_t pid); -#else -void glibtop_init_proc_time_s (glibtop *server); -void glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_time []; -extern const unsigned glibtop_types_proc_time []; -extern const char *glibtop_labels_proc_time []; -extern const char *glibtop_descriptions_proc_time []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h deleted file mode 100644 index 3be378db..00000000 --- a/include/glibtop/procuid.h +++ /dev/null @@ -1,99 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_PROCUID_H__ -#define __GLIBTOP_PROCUID_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_PROC_UID_UID 0 -#define GLIBTOP_PROC_UID_EUID 1 -#define GLIBTOP_PROC_UID_GID 2 -#define GLIBTOP_PROC_UID_EGID 3 -#define GLIBTOP_PROC_UID_PID 4 -#define GLIBTOP_PROC_UID_PPID 5 -#define GLIBTOP_PROC_UID_PGRP 6 -#define GLIBTOP_PROC_UID_SESSION 7 -#define GLIBTOP_PROC_UID_TTY 8 -#define GLIBTOP_PROC_UID_TPGID 9 -#define GLIBTOP_PROC_UID_PRIORITY 10 -#define GLIBTOP_PROC_UID_NICE 11 - -#define GLIBTOP_MAX_PROC_UID 12 - -typedef struct _glibtop_proc_uid glibtop_proc_uid; - -/* User, Group, Terminal and session */ - -struct _glibtop_proc_uid -{ - u_int64_t flags; - int uid, /* user id */ - euid, /* effective user id */ - gid, /* group id */ - egid, /* effective group id */ - pid, /* process id */ - ppid, /* pid of parent process */ - pgrp, /* process group id */ - session, /* session id */ - tty, /* full device number of controlling terminal */ - tpgid, /* terminal process group id */ - priority, /* kernel scheduling priority */ - nice; /* standard unix nice level of process */ -}; - -#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid_l(glibtop_global_server, p1, p2) - -#if GLIBTOP_SUID_PROC_UID -#define glibtop_get_proc_uid_r glibtop_get_proc_uid_p -#else -#define glibtop_get_proc_uid_r glibtop_get_proc_uid_s -#endif - -void glibtop_get_proc_uid_l (glibtop *server, glibtop_proc_uid *buf, pid_t pid); - -#if GLIBTOP_SUID_PROC_UID -void glibtop_init_proc_uid_p (glibtop *server); -void glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, pid_t pid); -#else -void glibtop_init_proc_uid_s (glibtop *server); -void glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_proc_uid []; -extern const unsigned glibtop_types_proc_uid []; -extern const char *glibtop_labels_proc_uid []; -extern const char *glibtop_descriptions_proc_uid []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/read.h b/include/glibtop/read.h deleted file mode 100644 index e4862ba6..00000000 --- a/include/glibtop/read.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_READ_H__ -#define __GLIBTOP_READ_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define glibtop_read(p1, p2) glibtop_read(glibtop_global_server, p1, p2) - -void glibtop_read_l (glibtop *server, size_t size, void *buf); -void glibtop_read_s (glibtop *server, size_t size, void *buf); - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/read_data.h b/include/glibtop/read_data.h deleted file mode 100644 index 07bfec05..00000000 --- a/include/glibtop/read_data.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_READ_DATA_H__ -#define __GLIBTOP_READ_DATA_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define glibtop_read_data() glibtop_read_data_r(glibtop_global_server) - -void *glibtop_read_data_l (glibtop *server); -void *glibtop_read_data_s (glibtop *server); - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/sem_limits.h b/include/glibtop/sem_limits.h deleted file mode 100644 index e9576ff7..00000000 --- a/include/glibtop/sem_limits.h +++ /dev/null @@ -1,93 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_SEM_LIMITS_H__ -#define __GLIBTOP_SEM_LIMITS_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_IPC_SEMMAP 0 -#define GLIBTOP_IPC_SEMMNI 1 -#define GLIBTOP_IPC_SEMMNS 2 -#define GLIBTOP_IPC_SEMMNU 3 -#define GLIBTOP_IPC_SEMMSL 4 -#define GLIBTOP_IPC_SEMOPM 5 -#define GLIBTOP_IPC_SEMUME 6 -#define GLIBTOP_IPC_SEMUSZ 7 -#define GLIBTOP_IPC_SEMVMX 8 -#define GLIBTOP_IPC_SEMAEM 9 - -#define GLIBTOP_MAX_SEM_LIMITS 10 - -typedef struct _glibtop_sem_limits glibtop_sem_limits; - -struct _glibtop_sem_limits -{ - u_int64_t flags, - semmap, /* GLIBTOP_IPC_SEMMAP */ - semmni, /* GLIBTOP_IPC_SEMMNI */ - semmns, /* GLIBTOP_IPC_SEMMNS */ - semmnu, /* GLIBTOP_IPC_SEMMNU */ - semmsl, /* GLIBTOP_IPC_SEMMSL */ - semopm, /* GLIBTOP_IPC_SEMOPM */ - semume, /* GLIBTOP_IPC_SEMUME */ - semusz, /* GLIBTOP_IPC_SEMUSZ */ - semvmx, /* GLIBTOP_IPC_SEMVMX */ - semaem; /* GLIBTOP_IPC_SEMAEM */ -}; - -#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits_l(glibtop_global_server, sem) - -#if GLIBTOP_SUID_SEM_LIMITS -#define glibtop_get_sem_limits_r glibtop_get_sem_limits_p -#else -#define glibtop_get_sem_limits_r glibtop_get_sem_limits_s -#endif - -void glibtop_get_sem_limits_l (glibtop *server, glibtop_sem_limits *buf); - -#if GLIBTOP_SUID_SEM_LIMITS -void glibtop_init_sem_limits_p (glibtop *server); -void glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf); -#else -void glibtop_init_sem_limits_s (glibtop *server); -void glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_sem_limits []; -extern const unsigned glibtop_types_sem_limits []; -extern const char *glibtop_labels_sem_limits []; -extern const char *glibtop_descriptions_sem_limits []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/shm_limits.h b/include/glibtop/shm_limits.h deleted file mode 100644 index db7db793..00000000 --- a/include/glibtop/shm_limits.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_SHM_LIMITS_H__ -#define __GLIBTOP_SHM_LIMITS_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_IPC_SHMMAX 0 -#define GLIBTOP_IPC_SHMMIN 1 -#define GLIBTOP_IPC_SHMMNI 2 -#define GLIBTOP_IPC_SHMSEG 3 -#define GLIBTOP_IPC_SHMALL 4 - -#define GLIBTOP_MAX_SHM_LIMITS 5 - -typedef struct _glibtop_shm_limits glibtop_shm_limits; - -struct _glibtop_shm_limits -{ - u_int64_t flags, - shmmax, /* GLIBTOP_IPC_SHMMAX */ - shmmin, /* GLIBTOP_IPC_SHMMIN */ - shmmni, /* GLIBTOP_IPC_SHMMNI */ - shmseg, /* GLIBTOP_IPC_SHMSEG */ - shmall; /* GLIBTOP_IPC_SHMALL */ -}; - -#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits_l(glibtop_global_server, shm) - -#if GLIBTOP_SUID_SHM_LIMITS -#define glibtop_get_shm_limits_r glibtop_get_shm_limits_p -#else -#define glibtop_get_shm_limits_r glibtop_get_shm_limits_s -#endif - -void glibtop_get_shm_limits_l (glibtop *server, glibtop_shm_limits *buf); - -#if GLIBTOP_SUID_SHM_LIMITS -void glibtop_init_shm_limits_p (glibtop *server); -void glibtop_get_shm_limits_p (glibtop *, glibtop_shm_limits *buf); -#else -void glibtop_init_shm_limits_s (glibtop *server); -void glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_shm_limits []; -extern const unsigned glibtop_types_shm_limits []; -extern const char *glibtop_labels_shm_limits []; -extern const char *glibtop_descriptions_shm_limits []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/signal.h b/include/glibtop/signal.h deleted file mode 100644 index f8235b40..00000000 --- a/include/glibtop/signal.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_SIGNAL_H__ -#define __GLIBTOP_SIGNAL_H__ - -#include - -#ifdef HAVE_SYS_SIGNAL_H -#include -#endif - -BEGIN_LIBGTOP_DECLS - -typedef struct _glibtop_signame glibtop_signame; - -struct _glibtop_signame -{ - const int number; - const char *name, *label; -}; - -extern const glibtop_signame glibtop_sys_siglist []; - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/swap.h b/include/glibtop/swap.h deleted file mode 100644 index 049c2c2f..00000000 --- a/include/glibtop/swap.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_SWAP_H__ -#define __GLIBTOP_SWAP_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_SWAP_TOTAL 0 -#define GLIBTOP_SWAP_USED 1 -#define GLIBTOP_SWAP_FREE 2 -#define GLIBTOP_SWAP_PAGEIN 3 -#define GLIBTOP_SWAP_PAGEOUT 4 - -#define GLIBTOP_MAX_SWAP 5 - -typedef struct _glibtop_swap glibtop_swap; - -struct _glibtop_swap -{ - u_int64_t flags, - total, /* GLIBTOP_SWAP_TOTAL */ - used, /* GLIBTOP_SWAP_USED */ - free, /* GLIBTOP_SWAP_FREE */ - pagein, /* GLIBTOP_SWAP_PAGEIN */ - pageout; /* GLIBTOP_SWAP_PAGEOUT */ -}; - -#define glibtop_get_swap(swap) glibtop_get_swap_l(glibtop_global_server, swap) - -#if GLIBTOP_SUID_SWAP -#define glibtop_get_swap_r glibtop_get_swap_p -#else -#define glibtop_get_swap_r glibtop_get_swap_s -#endif - -void glibtop_get_swap_l (glibtop *server, glibtop_swap *buf); - -#if GLIBTOP_SUID_SWAP -void glibtop_init_swap_p (glibtop *server); -void glibtop_get_swap_p (glibtop *server, glibtop_swap *buf); -#else -void glibtop_init_swap_s (glibtop *server); -void glibtop_get_swap_s (glibtop *server, glibtop_swap *buf); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_swap []; -extern const unsigned glibtop_types_swap []; -extern const char *glibtop_labels_swap []; -extern const char *glibtop_descriptions_swap []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/sysdeps.h b/include/glibtop/sysdeps.h deleted file mode 100644 index 125cdf01..00000000 --- a/include/glibtop/sysdeps.h +++ /dev/null @@ -1,110 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_SYSDEPS_H__ -#define __GLIBTOP_SYSDEPS_H__ - -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_SYSDEPS_FEATURES 0 -#define GLIBTOP_SYSDEPS_CPU 1 -#define GLIBTOP_SYSDEPS_MEM 2 -#define GLIBTOP_SYSDEPS_SWAP 3 -#define GLIBTOP_SYSDEPS_UPTIME 4 -#define GLIBTOP_SYSDEPS_LOADAVG 5 -#define GLIBTOP_SYSDEPS_SHM_LIMITS 6 -#define GLIBTOP_SYSDEPS_MSG_LIMITS 7 -#define GLIBTOP_SYSDEPS_SEM_LIMITS 8 -#define GLIBTOP_SYSDEPS_PROCLIST 9 -#define GLIBTOP_SYSDEPS_PROC_STATE 10 -#define GLIBTOP_SYSDEPS_PROC_UID 11 -#define GLIBTOP_SYSDEPS_PROC_MEM 12 -#define GLIBTOP_SYSDEPS_PROC_TIME 13 -#define GLIBTOP_SYSDEPS_PROC_SIGNAL 14 -#define GLIBTOP_SYSDEPS_PROC_KERNEL 15 -#define GLIBTOP_SYSDEPS_PROC_SEGMENT 16 -#define GLIBTOP_SYSDEPS_PROC_ARGS 17 -#define GLIBTOP_SYSDEPS_PROC_MAP 18 -#define GLIBTOP_SYSDEPS_MOUNTLIST 19 -#define GLIBTOP_SYSDEPS_FSUSAGE 20 -#define GLIBTOP_SYSDEPS_NETLOAD 21 -#define GLIBTOP_SYSDEPS_PPP 22 - -#define GLIBTOP_MAX_SYSDEPS 23 - -#define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1) - -typedef void (*glibtop_init_func_t) (glibtop *); -extern glibtop_init_func_t _glibtop_init_hook_s []; -extern glibtop_init_func_t _glibtop_init_hook_p []; - -typedef struct _glibtop_sysdeps glibtop_sysdeps; - -struct _glibtop_sysdeps -{ - u_int64_t flags, - features, /* server features */ - cpu, /* glibtop_cpu */ - mem, /* glibtop_mem */ - swap, /* glibtop_swap */ - uptime, /* glibtop_uptime */ - loadavg, /* glibtop_loadavg */ - shm_limits, /* glibtop_shm_limits */ - msg_limits, /* glibtop_msg_limits */ - sem_limits, /* glibtop_sem_limits */ - proclist, /* glibtop_proclist */ - proc_state, /* glibtop_proc_state */ - proc_uid, /* glibtop_proc_uid */ - proc_mem, /* glibtop_proc_mem */ - proc_time, /* glibtop_proc_time */ - proc_signal, /* glibtop_proc_signal */ - proc_kernel, /* glibtop_proc_kernel */ - proc_segment, /* glibtop_proc_segment */ - proc_args, /* glibtop_proc_args */ - proc_map, /* glibtop_proc_map */ - mountlist, /* glibtop_mountlist */ - fsusage, /* glibtop_fsusage */ - netload, /* glibtop_netload */ - ppp; /* glibtop_ppp */ -}; - -#define glibtop_get_sysdeps(sysdeps) glibtop_get_sysdeps_r(glibtop_global_server,sysdeps) - -void glibtop_get_sysdeps_r (glibtop *server, glibtop_sysdeps *buf); - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_sysdeps []; -extern const unsigned glibtop_types_sysdeps []; -extern const char *glibtop_labels_sysdeps []; -extern const char *glibtop_descriptions_sysdeps []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/sysinfo.h b/include/glibtop/sysinfo.h deleted file mode 100644 index 4dc53605..00000000 --- a/include/glibtop/sysinfo.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_SYSINFO_H__ -#define __GLIBTOP_SYSINFO_H__ - -#include -#include -#include - -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_SYSINFO_CPUINFO 0 - -#define GLIBTOP_MAX_SYSINFO 1 - -typedef struct _glibtop_sysinfo glibtop_sysinfo; - -typedef struct _glibtop_entry glibtop_entry; - -struct _glibtop_entry -{ - GPtrArray *labels; - GHashTable *values; - GHashTable *descriptions; -}; - -struct _glibtop_sysinfo -{ - u_int64_t flags, ncpu; - glibtop_entry cpuinfo [GLIBTOP_NCPU]; -}; - -#define glibtop_get_sysinfo() glibtop_get_sysinfo_s(glibtop_global_server) - -#define glibtop_get_sysinfo_r glibtop_get_sysinfo_s - -glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server); - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/types.h b/include/glibtop/types.h deleted file mode 100644 index ab052b08..00000000 --- a/include/glibtop/types.h +++ /dev/null @@ -1,38 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_TYPES_H__ -#define __GLIBTOP_TYPES_H__ - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_TYPE_LONG 1 -#define GLIBTOP_TYPE_ULONG 2 -#define GLIBTOP_TYPE_DOUBLE 3 -#define GLIBTOP_TYPE_INT 4 -#define GLIBTOP_TYPE_CHAR 5 -#define GLIBTOP_TYPE_STRING 6 - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/union.h b/include/glibtop/union.h deleted file mode 100644 index 22dfe67d..00000000 --- a/include/glibtop/union.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_UNION_H__ -#define __GLIBTOP_UNION_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -BEGIN_LIBGTOP_DECLS - -typedef union _glibtop_union glibtop_union; - -union _glibtop_union -{ - glibtop_cpu cpu; - glibtop_mem mem; - glibtop_swap swap; - glibtop_uptime uptime; - glibtop_loadavg loadavg; - glibtop_shm_limits shm_limits; - glibtop_msg_limits msg_limits; - glibtop_sem_limits sem_limits; - glibtop_proclist proclist; - glibtop_proc_state proc_state; - glibtop_proc_uid proc_uid; - glibtop_proc_mem proc_mem; - glibtop_proc_time proc_time; - glibtop_proc_signal proc_signal; - glibtop_proc_kernel proc_kernel; - glibtop_proc_segment proc_segment; - glibtop_proc_args proc_args; - glibtop_proc_map proc_map; - glibtop_mountlist mountlist; - glibtop_fsusage fsusage; - glibtop_netload netload; - glibtop_ppp ppp; -}; - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/uptime.h b/include/glibtop/uptime.h deleted file mode 100644 index a487eb47..00000000 --- a/include/glibtop/uptime.h +++ /dev/null @@ -1,77 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_UPTIME_H__ -#define __GLIBTOP_UPTIME_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_UPTIME_UPTIME 0 -#define GLIBTOP_UPTIME_IDLETIME 1 - -#define GLIBTOP_MAX_UPTIME 2 - -typedef struct _glibtop_uptime glibtop_uptime; - -struct _glibtop_uptime -{ - u_int64_t flags; - double uptime, /* GLIBTOP_UPTIME_UPTIME */ - idletime; /* GLIBTOP_UPTIME_IDLETIME */ -}; - -#define glibtop_get_uptime(uptime) glibtop_get_uptime_l(glibtop_global_server, uptime) - -#if GLIBTOP_SUID_UPTIME -#define glibtop_get_uptime_r glibtop_get_uptime_p -#else -#define glibtop_get_uptime_r glibtop_get_uptime_s -#endif - -void glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf); - -#if GLIBTOP_SUID_UPTIME -void glibtop_init_uptime_p (glibtop *server); -void glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf); -#else -void glibtop_init_uptime_s (glibtop *server); -void glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf); -#endif - -#ifdef GLIBTOP_NAMES - -/* You need to link with -lgtop_names to get this stuff here. */ - -extern const char *glibtop_names_uptime []; -extern const unsigned glibtop_types_uptime []; -extern const char *glibtop_labels_uptime []; -extern const char *glibtop_descriptions_uptime []; - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/version.h b/include/glibtop/version.h deleted file mode 100644 index 92354833..00000000 --- a/include/glibtop/version.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_VERSION_H__ -#define __GLIBTOP_VERSION_H__ - -#include -#include -#include -#include - -#define LIBGTOP_VERSION_STRING "Libgtop %s server version %s (%u,%u,%u,%u)." - -BEGIN_LIBGTOP_DECLS - -#if _IN_LIBGTOP - -void glibtop_send_version (glibtop *server, int fd); - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/write.h b/include/glibtop/write.h deleted file mode 100644 index bff8d4e7..00000000 --- a/include/glibtop/write.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_WRITE_H__ -#define __GLIBTOP_WRITE_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define glibtop_write(p1, p2) glibtop_write(glibtop_global_server, p1, p2) - -void glibtop_write_l (glibtop *server, size_t size, void *buf); -void glibtop_write_s (glibtop *server, size_t size, void *buf); - -END_LIBGTOP_DECLS - -#endif diff --git a/include/glibtop/xmalloc.h b/include/glibtop/xmalloc.h deleted file mode 100644 index 9f5eac06..00000000 --- a/include/glibtop/xmalloc.h +++ /dev/null @@ -1,46 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_XMALLOC_H__ -#define __GLIBTOP_XMALLOC_H__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#define glibtop_malloc(p1) glibtop_malloc_r(glibtop_global_server, p1) -#define glibtop_calloc(p1, p2) glibtop_calloc_r(glibtop_global_server, p1, p2) -#define glibtop_realloc(p1, p2) glibtop_realloc_r(glibtop_global_server, p1, p2) -#define glibtop_strdup(p1) glibtop_strdup_r(glibtop_global_server, p1) -#define glibtop_free(p1) glibtop_free_r(glibtop_global_server, p1) - -void *glibtop_malloc_r (glibtop *server, size_t size); -void *glibtop_calloc_r (glibtop *server, size_t nmemb, size_t size); -void *glibtop_realloc_r (glibtop *server, void *ptr, size_t size); -char *glibtop_strdup_r (glibtop *server, const char *string); -void glibtop_free_r (glibtop *server, const void *ptr); - -END_LIBGTOP_DECLS - -#endif diff --git a/kernel/ChangeLog b/kernel/ChangeLog deleted file mode 100644 index a3efd8d7..00000000 --- a/kernel/ChangeLog +++ /dev/null @@ -1,14 +0,0 @@ -1998-07-21 Martin Baulig - - * 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 - - * README: Added README. - - * kernel.patch: Patch for the Linux kernel to add the - new system call. diff --git a/kernel/table.h b/kernel/table.h deleted file mode 100644 index d4959370..00000000 --- a/kernel/table.h +++ /dev/null @@ -1,188 +0,0 @@ -#ifndef _LINUX_TABLE_H -#define _LINUX_TABLE_H - -#ifdef _KERNEL -#include -#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 */ - - diff --git a/kernel/table20/Makefile b/kernel/table20/Makefile deleted file mode 100644 index d24e3ba8..00000000 --- a/kernel/table20/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# -# 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 diff --git a/kernel/table20/README b/kernel/table20/README deleted file mode 100644 index 88d26bec..00000000 --- a/kernel/table20/README +++ /dev/null @@ -1,21 +0,0 @@ -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 diff --git a/kernel/table20/entry-i386.S b/kernel/table20/entry-i386.S deleted file mode 100644 index 994fe27c..00000000 --- a/kernel/table20/entry-i386.S +++ /dev/null @@ -1,706 +0,0 @@ -/* - * 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 -#include -#include -#define ASSEMBLY -#include - -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 diff --git a/kernel/table20/kernel.patch b/kernel/table20/kernel.patch deleted file mode 100644 index 37654b3d..00000000 --- a/kernel/table20/kernel.patch +++ /dev/null @@ -1,51 +0,0 @@ -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) \ diff --git a/kernel/table20/main.c b/kernel/table20/main.c deleted file mode 100644 index 97950afb..00000000 --- a/kernel/table20/main.c +++ /dev/null @@ -1,468 +0,0 @@ -/* - * linux/table/table_impl.c - * Copyright (C) 1998 Martin Baulig - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#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; -} diff --git a/kernel/table20/unistd-i386.h b/kernel/table20/unistd-i386.h deleted file mode 100644 index 0d5b4f8b..00000000 --- a/kernel/table20/unistd-i386.h +++ /dev/null @@ -1,324 +0,0 @@ -#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_ */ diff --git a/kernel/table20/version.h b/kernel/table20/version.h deleted file mode 100644 index d47411ee..00000000 --- a/kernel/table20/version.h +++ /dev/null @@ -1 +0,0 @@ -#define _TABLE_VERSION 1 diff --git a/kernel/table21/.cvsignore b/kernel/table21/.cvsignore deleted file mode 100644 index a7ab2843..00000000 --- a/kernel/table21/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -kernel.patch -.main.o.flags -.table.o.flags -.module.o.flags diff --git a/kernel/table21/Makefile b/kernel/table21/Makefile deleted file mode 100644 index 2eedd527..00000000 --- a/kernel/table21/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# -# 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 diff --git a/kernel/table21/README b/kernel/table21/README deleted file mode 100644 index 88d26bec..00000000 --- a/kernel/table21/README +++ /dev/null @@ -1,21 +0,0 @@ -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 diff --git a/kernel/table21/entry-i386.S b/kernel/table21/entry-i386.S deleted file mode 100644 index fb734fbc..00000000 --- a/kernel/table21/entry-i386.S +++ /dev/null @@ -1,571 +0,0 @@ -/* - * 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) - orig_eax - * 28(%esp) - %eip - * 2C(%esp) - %cs - * 30(%esp) - %eflags - * 34(%esp) - %oldesp - * 38(%esp) - %oldss - * - * "current" is in register %ebx during any slow entries. - */ - -#include -#include -#include -#define ASSEMBLY -#include - -EBX = 0x00 -ECX = 0x04 -EDX = 0x08 -ESI = 0x0C -EDI = 0x10 -EBP = 0x14 -EAX = 0x18 -DS = 0x1C -ES = 0x20 -ORIG_EAX = 0x24 -EIP = 0x28 -CS = 0x2C -EFLAGS = 0x30 -OLDESP = 0x34 -OLDSS = 0x38 - -CF_MASK = 0x00000001 -IF_MASK = 0x00000200 -NT_MASK = 0x00004000 -VM_MASK = 0x00020000 - -/* - * these are offsets into the task-struct. - */ -state = 0 -flags = 4 -sigpending = 8 -addr_limit = 12 -exec_domain = 16 -need_resched = 20 - -ENOSYS = 38 - - -#define SAVE_ALL \ - cld; \ - pushl %es; \ - pushl %ds; \ - pushl %eax; \ - pushl %ebp; \ - pushl %edi; \ - pushl %esi; \ - pushl %edx; \ - pushl %ecx; \ - pushl %ebx; \ - movl $(__KERNEL_DS),%edx; \ - movl %dx,%ds; \ - movl %dx,%es; - -#define RESTORE_ALL \ - popl %ebx; \ - popl %ecx; \ - popl %edx; \ - popl %esi; \ - popl %edi; \ - popl %ebp; \ - popl %eax; \ -1: popl %ds; \ -2: popl %es; \ -3: addl $4,%esp; \ - iret; \ -.section fixup,"ax"; \ -4: pushl $0; \ - popl %ds; \ - jmp 2b; \ -5: pushl $0; \ - popl %es; \ - jmp 3b; \ -.previous; \ -.section __ex_table,"a";\ - .align 4; \ - .long 1b,4b; \ - .long 2b,5b; \ -.previous - -#define GET_CURRENT(reg) \ - movl %esp, reg; \ - andl $-8192, reg; - -ENTRY(lcall7) - pushfl # We get a different stack layout with call gates, - pushl %eax # which has to be cleaned up later.. - SAVE_ALL - 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,%ebx - pushl %ebx - andl $-8192,%ebx # GET_CURRENT - movl exec_domain(%ebx),%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 - - -#ifdef __SMP__ - ALIGN - .globl ret_from_smpfork -ret_from_smpfork: - GET_CURRENT(%ebx) - btrl $0, SYMBOL_NAME(scheduler_lock) - jmp ret_from_sys_call -#endif /* __SMP__ */ - -/* - * Return to user mode is not as complex as all this looks, - * but we want the default path for a system call return to - * go as quickly as possible which is why some of this is - * less clear than it otherwise should be. - */ - -ENTRY(system_call) - pushl %eax # save orig_eax - SAVE_ALL - GET_CURRENT(%ebx) - cmpl $(NR_syscalls),%eax - jae badsys - testb $0x20,flags(%ebx) # PF_TRACESYS - jne tracesys - call *SYMBOL_NAME(sys_call_table)(,%eax,4) - movl %eax,EAX(%esp) # save the return value - ALIGN - .globl ret_from_sys_call - .globl ret_from_intr -ret_from_sys_call: - movl SYMBOL_NAME(bh_mask),%eax - andl SYMBOL_NAME(bh_active),%eax - jne handle_bottom_half -ret_with_reschedule: - cmpl $0,need_resched(%ebx) - jne reschedule - cmpl $0,sigpending(%ebx) - jne signal_return - RESTORE_ALL - ALIGN -signal_return: - testl $(VM_MASK),EFLAGS(%esp) - pushl %esp - jne v86_signal_return - pushl $0 - call SYMBOL_NAME(do_signal) - addl $8,%esp - RESTORE_ALL - ALIGN -v86_signal_return: - call SYMBOL_NAME(save_v86_state) - movl %eax,%esp - pushl %eax - pushl $0 - call SYMBOL_NAME(do_signal) - addl $8,%esp - RESTORE_ALL - ALIGN -tracesys: - movl $-ENOSYS,EAX(%esp) - 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 - call SYMBOL_NAME(syscall_trace) - jmp ret_from_sys_call -badsys: - movl $-ENOSYS,EAX(%esp) - jmp ret_from_sys_call - - ALIGN -ret_from_exception: - movl SYMBOL_NAME(bh_mask),%eax - andl SYMBOL_NAME(bh_active),%eax - jne handle_bottom_half - ALIGN -ret_from_intr: - GET_CURRENT(%ebx) - movl EFLAGS(%esp),%eax # mix EFLAGS and CS - movb CS(%esp),%al - testl $(VM_MASK | 3),%eax # return to VM86 mode or non-supervisor? - jne ret_with_reschedule - RESTORE_ALL - - ALIGN -handle_bottom_half: - pushl $ret_from_intr - jmp SYMBOL_NAME(do_bottom_half) - - ALIGN -reschedule: - pushl $ret_from_sys_call - jmp SYMBOL_NAME(schedule) # test - - -ENTRY(divide_error) - pushl $0 # no error code - pushl $ SYMBOL_NAME(do_divide_error) - ALIGN -error_code: - pushl %ds - pushl %eax - xorl %eax,%eax - pushl %ebp - pushl %edi - pushl %esi - pushl %edx - decl %eax # eax = -1 - pushl %ecx - pushl %ebx -#if 1 - xorl %ecx,%ecx # zero ecx - cld - mov %es,%cx # get the lower order bits of es -#else - cld -# Some older processors leave the top 16 bits of the 32 bit destination -# register undefined, rather than zeroed in the following instruction. -# This won't matter when restoring or loading a segment register from the -# stack. It may be a problem if any code reads the full 32 bit value. -# dosemu? kernel? Would somebody like to verify that this way is really OK? - movl %es,%cx -#endif - xchgl %eax, ORIG_EAX(%esp) # orig_eax (get the error code. ) - movl %esp,%edx - xchgl %ecx, ES(%esp) # get the address and save es. - pushl %eax # push the error code - pushl %edx - movl $(__KERNEL_DS),%edx - movl %dx,%ds - movl %dx,%es - GET_CURRENT(%ebx) - call *%ecx - addl $8,%esp - jmp ret_from_exception - -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 - GET_CURRENT(%ebx) - pushl $ret_from_exception - 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_lchown) - .long SYMBOL_NAME(sys_ni_syscall) /* old break syscall holder */ - .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_ni_syscall) /* old stty syscall holder */ - .long SYMBOL_NAME(sys_ni_syscall) /* old gtty syscall holder */ - .long SYMBOL_NAME(sys_access) - .long SYMBOL_NAME(sys_nice) - .long SYMBOL_NAME(sys_ni_syscall) /* 35 */ /* old ftime syscall holder */ - .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_ni_syscall) /* old prof syscall holder */ - .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_ni_syscall) /* old phys syscall holder */ - .long SYMBOL_NAME(sys_ni_syscall) /* old lock syscall holder */ - .long SYMBOL_NAME(sys_ioctl) - .long SYMBOL_NAME(sys_fcntl) /* 55 */ - .long SYMBOL_NAME(sys_ni_syscall) /* old mpx syscall holder */ - .long SYMBOL_NAME(sys_setpgid) - .long SYMBOL_NAME(sys_ni_syscall) /* old ulimit syscall holder */ - .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_ni_syscall) /* old profil syscall holder */ - .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 SYMBOL_NAME(sys_ni_syscall) /* 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 SYMBOL_NAME(sys_setresuid) - .long SYMBOL_NAME(sys_getresuid) /* 165 */ - .long SYMBOL_NAME(sys_vm86) - .long SYMBOL_NAME(sys_query_module) - .long SYMBOL_NAME(sys_poll) - .long SYMBOL_NAME(sys_nfsservctl) - .long SYMBOL_NAME(sys_setresgid) /* 170 */ - .long SYMBOL_NAME(sys_getresgid) - .long SYMBOL_NAME(sys_prctl) - .long SYMBOL_NAME(sys_rt_sigreturn) - .long SYMBOL_NAME(sys_rt_sigaction) - .long SYMBOL_NAME(sys_rt_sigprocmask) /* 175 */ - .long SYMBOL_NAME(sys_rt_sigpending) - .long SYMBOL_NAME(sys_rt_sigtimedwait) - .long SYMBOL_NAME(sys_rt_sigqueueinfo) - .long SYMBOL_NAME(sys_rt_sigsuspend) - .long SYMBOL_NAME(sys_pread) /* 180 */ - .long SYMBOL_NAME(sys_pwrite) - .long SYMBOL_NAME(sys_chown) - .long SYMBOL_NAME(sys_getcwd) - .long SYMBOL_NAME(sys_capget) - .long SYMBOL_NAME(sys_capset) /* 185 */ - .long SYMBOL_NAME(sys_sigaltstack) - .long SYMBOL_NAME(sys_sendfile) - .long SYMBOL_NAME(sys_ni_syscall) /* streams1 */ - .long SYMBOL_NAME(sys_ni_syscall) /* streams2 */ - .long SYMBOL_NAME(sys_table) /* 190 */ - - .rept NR_syscalls-190 - .long SYMBOL_NAME(sys_ni_syscall) - .endr diff --git a/kernel/table21/main.c b/kernel/table21/main.c deleted file mode 100644 index e6d1882b..00000000 --- a/kernel/table21/main.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * linux/table/table_impl.c - * Copyright (C) 1998 Martin Baulig - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include "version.h" - -extern void scheduling_functions_start_here(void); -extern void scheduling_functions_end_here(void); - -int (*table_function_ptr) (int, union table *, const void *) = 0; - -EXPORT_SYMBOL(table_function_ptr); - -EXPORT_SYMBOL(nr_running); -EXPORT_SYMBOL(pidhash); -EXPORT_SYMBOL(task); -EXPORT_SYMBOL(si_swapinfo); -EXPORT_SYMBOL(scheduling_functions_start_here); -EXPORT_SYMBOL(scheduling_functions_end_here); -EXPORT_SYMBOL(avenrun); -EXPORT_SYMBOL(nr_tasks); -EXPORT_SYMBOL(last_pid); -EXPORT_SYMBOL(page_cache_size); -EXPORT_SYMBOL(init_mm); - -asmlinkage int -sys_table (int type, union table *buf, const void *param) -{ - if (table_function_ptr == 0) - return -ENOSYS; - - return (*table_function_ptr) (type, buf, param); -} diff --git a/kernel/table21/module.c b/kernel/table21/module.c deleted file mode 100644 index 1c1fa9c2..00000000 --- a/kernel/table21/module.c +++ /dev/null @@ -1,607 +0,0 @@ -/* - * linux/table/table_impl.c - * Copyright (C) 1998 Martin Baulig - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include "version.h" - -extern int (*table_function_ptr) (int, union table *, const void *); - -int table_fkt (int, union table *, const void *); - -EXPORT_NO_SYMBOLS; - -int -init_module(void) -{ - printk ("init_module () = %p - %d, %d\n", - table_fkt, sizeof (union table), sizeof (sigset_t)); - table_function_ptr = table_fkt; - return 0; -} - -void -cleanup_module(void) -{ - table_function_ptr = 0; -} - -#define LOAD_INT(x) ((x) >> FSHIFT) -#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) - -#ifdef CONFIG_DEBUG_MALLOC -int get_malloc(char * buffer); -#endif - -static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign, - sigset_t *catch) -{ - struct k_sigaction *k; - int i; - - sigemptyset(ign); - sigemptyset(catch); - -#if 0 - printk ("collect_sigign_sigcatch: %p - %p\n", - p, p->sig); -#endif - - if (p->sig) { - k = p->sig->action; - for (i = 1; i <= _NSIG; ++i, ++k) { -#if 0 - printk ("signal: %d - %p (%p, %p)\n", - i, k->sa.sa_handler, SIG_IGN, SIG_DFL); -#endif - if (k->sa.sa_handler == SIG_IGN) - sigaddset(ign, i); - else if (k->sa.sa_handler != SIG_DFL) - sigaddset(catch, i); - } - } -} - -/* - * These bracket the sleeping functions.. - */ -extern void scheduling_functions_start_here(void); -extern void scheduling_functions_end_here(void); -#define first_sched ((unsigned long) scheduling_functions_start_here) -#define last_sched ((unsigned long) scheduling_functions_end_here) - -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 = 4096 + (unsigned long)p; - 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 < first_sched || eip >= last_sched) - 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 >= first_sched && pc < last_sched) { - schedule_frame = ((unsigned long *)p->tss.ksp)[6]; - return ((unsigned long *)schedule_frame)[12]; - } - return pc; - } -#elif defined(__mc68000__) - { - unsigned long fp, pc; - unsigned long stack_page; - int count = 0; - extern int sys_pause (void); - - stack_page = p->kernel_stack_page; - if (!stack_page) - return 0; - fp = ((struct switch_stack *)p->tss.ksp)->a6; - do { - if (fp < stack_page || fp >= 4088+stack_page) - return 0; - pc = ((unsigned long *)fp)[1]; - /* FIXME: This depends on the order of these functions. */ - if (pc < first_sched || pc >= last_sched) - return pc; - fp = *(unsigned long *) fp; - } while (count++ < 16); - } -#elif defined(__powerpc__) - return (p->tss.wchan); -#elif defined (CONFIG_ARM) - { - unsigned long fp, lr; - unsigned long stack_page; - int count = 0; - - stack_page = 4096 + (unsigned long)p; - fp = get_css_fp (&p->tss); - do { - if (fp < stack_page || fp > 4092+stack_page) - return 0; - lr = pc_pointer (((unsigned long *)fp)[-1]); - if (lr < first_sched || lr > last_sched) - return lr; - fp = *(unsigned long *) (fp - 12); - } while (count ++ < 16); - } -#endif - return 0; -} - -#if defined(__i386__) -# define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1019]) -# define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[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 *)(PT_REG(pc) + PAGE_SIZE + (unsigned long)(tsk))) -# define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->tss.usp) -#elif defined(CONFIG_ARM) -# define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1022]) -# define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1020]) -#elif defined(__mc68000__) -#define KSTK_EIP(tsk) \ - ({ \ - unsigned long eip = 0; \ - if ((tsk)->tss.esp0 > PAGE_SIZE && \ - MAP_NR((tsk)->tss.esp0) < max_mapnr) \ - eip = ((struct pt_regs *) (tsk)->tss.esp0)->pc; \ - eip; }) -#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->tss.usp) -#elif defined(__powerpc__) -#define KSTK_EIP(tsk) ((tsk)->tss.regs->nip) -#define KSTK_ESP(tsk) ((tsk)->tss.regs->gpr[1]) -#elif defined (__sparc_v9__) -# define KSTK_EIP(tsk) ((tsk)->tss.kregs->tpc) -# define KSTK_ESP(tsk) ((tsk)->tss.kregs->u_regs[UREG_FP]) -#elif defined(__sparc__) -# define KSTK_EIP(tsk) ((tsk)->tss.kregs->pc) -# define KSTK_ESP(tsk) ((tsk)->tss.kregs->u_regs[UREG_FP]) -#endif - -/* Gcc optimizes away "strlen(x)" for constant x */ -#define ADDBUF(buffer, string) \ -do { memcpy(buffer, string, strlen(string)); \ - buffer += strlen(string); } while (0) - -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 (MAP_NR(pte_page(page)) >= max_mapnr) - continue; - if (atomic_read(&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++; - } -} - -int -table_fkt (int type, union table *buf, const void *param) -{ - union table tbl; - struct sysinfo i; - struct task_struct *tsk = NULL; - struct proclist_args plistargs; - int index, tindex, err, tty; - sigset_t sigign, sigcatch; - 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; - copy_from_user (&pid, param, sizeof (pid_t)); - - read_lock (&tasklist_lock); - tsk = find_task_by_pid (pid); - /* FIXME!! This should be done after the last use */ - read_unlock(&tasklist_lock); - - if (tsk == NULL) - return -ESRCH; - break; - case TABLE_PROCLIST: - err = verify_area (VERIFY_READ, param, - sizeof (struct proclist_args)); - if (err) - return err; - copy_from_user (&plistargs, param, - sizeof (struct proclist_args)); - break; - } - - /* Main function dispatcher */ - - switch (type) { - case TABLE_PROCLIST: - tsk = task [0]; - read_lock (&tasklist_lock); - for (index = tindex = 0; index < nr_tasks; - index++, tsk = tsk->next_task) { - if (tsk->pid == 0) continue; - switch (plistargs.which & TABLE_KERN_PROC_MASK) { - case TABLE_KERN_PROC_PID: - if (tsk->pid != plistargs.arg) continue; - break; - case TABLE_KERN_PROC_PGRP: - if (tsk->pgrp != plistargs.arg) continue; - break; - case TABLE_KERN_PROC_SESSION: - if (tsk->session != plistargs.arg) continue; - case TABLE_KERN_PROC_TTY: - tty = tsk->tty ? - kdev_t_to_nr (tsk->tty->device) : 0; - if (tty != plistargs.arg) continue; - break; - case TABLE_KERN_PROC_UID: - if (tsk->uid != plistargs.arg) continue; - break; - case TABLE_KERN_PROC_RUID: - if (tsk->euid != plistargs.arg) continue; - break; - } - - if ((plistargs.which & TABLE_EXCLUDE_IDLE) && - (tsk->state != 0)) - continue; - - if ((plistargs.which & TABLE_EXCLUDE_NOTTY) && - (tsk->tty == NULL)) - continue; - - tbl.proclist.pids [tindex++] = tsk->pid; - } - tbl.proclist.nr_running = nr_running; - tbl.proclist.last_pid = last_pid; - tbl.proclist.nr_tasks = tindex; - read_unlock(&tasklist_lock); - 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; - 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]->times.tms_utime + - task[0]->times.tms_stime; - break; - case TABLE_PROC_STATE: - tbl.proc_state.uid = tsk->uid; - tbl.proc_state.gid = tsk->gid; - 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: - memcpy (&tbl.proc_signal.signal, &tsk->signal, - sizeof (tbl.proc_signal.signal)); - - memcpy (&tbl.proc_signal.blocked, &tsk->blocked, - sizeof (tbl.proc_signal.blocked)); - - collect_sigign_sigcatch (tsk, &sigign, &sigcatch); - - memcpy (&tbl.proc_signal.ignored, &sigign, - sizeof (tbl.proc_signal.ignored)); - - memcpy (&tbl.proc_signal.caught, &sigcatch, - sizeof (tbl.proc_signal.caught)); - -#if 0 - printk ("PROC_SIGNAL: (%lu, %lu) - (%lu, %lu)\n", - tbl.proc_signal.ignored.sig [0], - tbl.proc_signal.ignored.sig [1], - tbl.proc_signal.caught.sig [0], - tbl.proc_signal.caught.sig [1]); -#endif - 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->mmap ? - tsk->mm->mmap->vm_start : 0; - 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 << PAGE_SHIFT; - 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, srs = 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; - - /* Well, shared library seem to get mapped - * above 0x40000000 and are executable, - * so I use this hack to get their size. - */ - - if (vma->vm_flags & VM_GROWSDOWN) - srs += pages; /* stack */ - else if ((vma->vm_flags & VM_EXEC) && - (vma->vm_start > 0x40000000)) - lrs += pages; /* library */ - else if (vma->vm_flags & VM_EXECUTABLE) - trs += pages; /* text */ - else - drs += pages; - - vma = vma->vm_next; - } - - tbl.proc_segment.vsize = vsize; - tbl.proc_segment.size = size << PAGE_SHIFT; - tbl.proc_segment.resident = resident << PAGE_SHIFT; - tbl.proc_segment.shared = share << PAGE_SHIFT; - tbl.proc_segment.trs = trs << PAGE_SHIFT; - tbl.proc_segment.lrs = lrs << PAGE_SHIFT; - tbl.proc_segment.drs = drs << PAGE_SHIFT; - tbl.proc_segment.srs = srs << PAGE_SHIFT; - tbl.proc_segment.dt = dt << PAGE_SHIFT; - } - break; - case TABLE_PROC_TIME: - tbl.proc_time.utime = tsk->times.tms_utime; - tbl.proc_time.stime = tsk->times.tms_stime; - tbl.proc_time.cutime = tsk->times.tms_cutime; - tbl.proc_time.cstime = tsk->times.tms_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 = KSTK_ESP(tsk); - tbl.proc_kernel.keip = KSTK_EIP(tsk); - - tbl.proc_kernel.nswap = tsk->nswap; - tbl.proc_kernel.cnswap = tsk->cnswap; - - tbl.proc_kernel.wchan = get_wchan (tsk); - break; - default: - return -EINVAL; - } - - err = verify_area (VERIFY_WRITE, buf, sizeof (struct table)); - if (err) - return err; - - copy_to_user (buf, &tbl, sizeof (union table)); - - return 0; -} diff --git a/kernel/table21/unistd-i386.h b/kernel/table21/unistd-i386.h deleted file mode 100644 index a7c30c83..00000000 --- a/kernel/table21/unistd-i386.h +++ /dev/null @@ -1,344 +0,0 @@ -#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_lchown 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_vm86old 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_setresuid 164 -#define __NR_getresuid 165 -#define __NR_vm86 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread 180 -#define __NR_pwrite 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_streams1 188 /* some people actually want it */ -#define __NR_streams2 189 /* some people actually want it */ -#define __NR_table 190 - -/* user-visible error numbers are in the range -1 - -122: see */ - -#define __syscall_return(type, res) \ -do { \ - if ((unsigned long)(res) >= (unsigned long)(-125)) { \ - errno = -(res); \ - res = -1; \ - } \ - return (type) (res); \ -} while (0) - -/* 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)); \ -__syscall_return(type,__res); \ -} - -#define _syscall1(type,name,type1,arg1) \ -type name(type1 arg1) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1))); \ -__syscall_return(type,__res); \ -} - -#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))); \ -__syscall_return(type,__res); \ -} - -#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))); \ -__syscall_return(type,__res); \ -} - -#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))); \ -__syscall_return(type,__res); \ -} - -#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))); \ -__syscall_return(type,__res); \ -} - -#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,pause) -static inline _syscall1(int,setup,int,magic) -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 _syscall3(int,read,int,fd,char *,buf,off_t,count) -static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,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 _syscall1(int,delete_module,const char *,name) - -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_ */ diff --git a/kernel/table21/version.h b/kernel/table21/version.h deleted file mode 100644 index d47411ee..00000000 --- a/kernel/table21/version.h +++ /dev/null @@ -1 +0,0 @@ -#define _TABLE_VERSION 1 diff --git a/kernel/version.h b/kernel/version.h deleted file mode 100644 index d47411ee..00000000 --- a/kernel/version.h +++ /dev/null @@ -1 +0,0 @@ -#define _TABLE_VERSION 1 diff --git a/lib/.cvsignore b/lib/.cvsignore deleted file mode 100644 index 558ee27c..00000000 --- a/lib/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -libgtop.la -*.lo -lib.c diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index 7120f4ca..00000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop.la - -libgtop_la_SOURCES = init.c open.c close.c command.c read.c \ - read_data.c write.c lib.c parameter.c \ - sysdeps.c - -libgtop_la_LDFLAGS = $(LT_VERSION_INFO) - -BUILT_SOURCES = lib.c - -lib.c: lib.pl $(top_builddir)/config.h $(top_srcdir)/features.def - $(PERL) $(srcdir)/lib.pl < $(top_srcdir)/features.def > lib-t - mv lib-t lib.c - -EXTRA_DIST = lib.pl - -CLEANFILES = lib.c - diff --git a/lib/close.c b/lib/close.c deleted file mode 100644 index 2d851c70..00000000 --- a/lib/close.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -/* Closes server. */ - -void -glibtop_close_r (glibtop *server) -{ - switch (server->method) { - case GLIBTOP_METHOD_UNIX: - case GLIBTOP_METHOD_INET: - glibtop_call_l (server, GLIBTOP_CMND_QUIT, - 0, NULL, 0, NULL); - - if (close (server->socket)) - glibtop_warn_io ("close"); - - break; - case GLIBTOP_METHOD_PIPE: - kill (server->pid, SIGKILL); - close (server->input [0]); - close (server->output [1]); - break; - } -} diff --git a/lib/command.c b/lib/command.c deleted file mode 100644 index be59c38d..00000000 --- a/lib/command.c +++ /dev/null @@ -1,77 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include -#include - -void * -glibtop_call_l (glibtop *server, unsigned command, size_t send_size, - const void *send_buf, size_t recv_size, void *recv_buf) -{ - glibtop_command cmnd; - glibtop_response response; - - glibtop_init_r (&server, 0, 0); - - memset (&cmnd, 0, sizeof (glibtop_command)); - - cmnd.command = command; - - /* If send_size is less than _GLIBTOP_PARAM_SIZE (normally 16 Bytes), we - * send it together with command, so we only need one system call instead - * of two. */ - - if (send_size <= _GLIBTOP_PARAM_SIZE) { - memcpy (cmnd.parameter, send_buf, send_size); - cmnd.size = send_size; - } else { - cmnd.data_size = send_size; - } - - glibtop_write_l (server, sizeof (glibtop_command), &cmnd); - - glibtop_read_l (server, sizeof (glibtop_response), &response); - -#ifdef DEBUG - fprintf (stderr, "RESPONSE: %lu - %d\n", - response.offset, response.data_size); -#endif - - if (recv_buf) - memcpy (recv_buf, ((char *) &response) + response.offset, - recv_size); - - if (response.data_size) { - void *ptr = glibtop_malloc_r (server, response.data_size); - - glibtop_read_l (server, response.data_size, ptr); - - return ptr; - } - - return NULL; -} diff --git a/lib/init.c b/lib/init.c deleted file mode 100644 index 38299612..00000000 --- a/lib/init.c +++ /dev/null @@ -1,251 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -#ifndef DEFAULT_PORT -#define DEFAULT_PORT 42800 -#endif - -static glibtop _glibtop_global_server; -glibtop *glibtop_global_server = &_glibtop_global_server; - -static void -_init_server (glibtop *server, const unsigned features) -{ - char *command, *temp; - - /* Try to get server command, but don't override if already - * set via glibtop_set_parameter () */ - - if (server->server_command == NULL) { - const char *temp = getenv ("LIBGTOP_SERVER") ? - getenv ("LIBGTOP_SERVER") : LIBGTOP_SERVER; - - server->server_command = glibtop_strdup_r (server, temp); - } - - if (server->server_rsh == NULL) { - const char *temp = getenv ("LIBGTOP_RSH") ? - getenv ("LIBGTOP_RSH") : "/usr/bin/ssh"; - - server->server_rsh = glibtop_strdup_r (server, temp); - } - - /* Try to get server method, but don't override if already - * set via glibtop_set_parameter () */ - - if (server->method) return; - - /* If server->command doesn't start with a colon, then it is - * the full pathname of the server executable. */ - - if (server->server_command [0] != ':') { - if (features & glibtop_server_features) { - /* We really need the server. */ - server->method = GLIBTOP_METHOD_PIPE; - } else { - /* Fine. No server is needed, so we call the - * sysdeps functions directly. */ - server->method = GLIBTOP_METHOD_DIRECT; - } - - return; - } - - - /* If the first character of 'server_command' is a colon, - * the first field is the method to connect to the server. */ - - /* Everything up to the next colon is the method. */ - - command = glibtop_strdup_r (server, server->server_command+1); - temp = strstr (command, ":"); - if (temp) *temp = 0; - - /* Dispatch method. */ - - if (!strcmp (command, "direct")) { - /* Use sysdeps dir instead of connecting to server - * even if using the server would be required on - * the current system. */ - server->method = GLIBTOP_METHOD_DIRECT; - - } else if (!strcmp (command, "inet")) { - - server->method = GLIBTOP_METHOD_INET; - - /* Connect to internet server. */ - - if (temp == NULL) { - /* If no value was set, we use 'localhost'. */ - if (server->server_host == NULL) - server->server_host = glibtop_strdup_r - (server, "localhost"); - } else { - char *temp2 = strstr (temp+1, ":"); - if (temp2) *temp2 = 0; - - /* Override default. */ - if (server->server_host) - glibtop_free_r (server, - (char *) server->server_host); - - server->server_host = glibtop_strdup_r - (server, temp+1); - - temp = temp2; - } - - if (temp == NULL) { - /* If no value was set, we use DEFAULT_PORT. */ - if (server->server_port == 0) - server->server_port = DEFAULT_PORT; - } else { - char *temp2 = strstr (temp+1, ":"); - if (temp2) *temp2 = 0; - - if (sscanf (temp+1, "%ld", &server->server_port) != 1) - server->server_port = DEFAULT_PORT; - - temp = temp2 ? temp2 + 1 : temp2; - } - - } else if (!strcmp (command, "unix")) { - - /* Connect to unix domain socket. */ - server->method = GLIBTOP_METHOD_UNIX; - - } else if (!strcmp (command, "pipe")) { - - /* Open pipe to server. */ - server->method = GLIBTOP_METHOD_PIPE; - - } else { - - glibtop_error_r (server, "Unknown server method '%s'", - server->server_command+1); - - } - - glibtop_free_r (server, command); -} - -glibtop * -glibtop_init_r (glibtop **server_ptr, unsigned long features, unsigned flags) -{ - glibtop *server; - - if (server_ptr == NULL) - return NULL; - - if (*server_ptr == NULL) - *server_ptr = glibtop_global_server; - - server = *server_ptr; - - /* Should we do the initialization? */ - - if (flags & GLIBTOP_INIT_NO_INIT) - return server; - - /* Do the initialization, but only if not already initialized. */ - - if ((server->flags & _GLIBTOP_INIT_STATE_INIT) == 0) { - if (flags & GLIBTOP_FEATURES_EXCEPT) - features = ~features & GLIBTOP_SYSDEPS_ALL; - - if (features == 0) - features = GLIBTOP_SYSDEPS_ALL; - - if (flags & GLIBTOP_FEATURES_NO_SERVER) { - server->method = GLIBTOP_METHOD_DIRECT; - features = 0; - } - - server->features = features; - - _init_server (server, features); - - server->flags |= _GLIBTOP_INIT_STATE_INIT; - - switch (server->method) { - case GLIBTOP_METHOD_PIPE: - case GLIBTOP_METHOD_UNIX: - if (glibtop_server_features & features) - break; - - server->method = GLIBTOP_METHOD_DIRECT; - break; - } - } - - /* Should we open the server? */ - - if (flags & GLIBTOP_INIT_NO_OPEN) - return server; - - /* Open server, but only if not already opened. */ - - if ((server->flags & _GLIBTOP_INIT_STATE_OPEN) == 0) - glibtop_open_l (glibtop_global_server, "glibtop", - features, flags); - - return server; -} - -glibtop * -glibtop_init_s (glibtop **server_ptr, unsigned long features, unsigned flags) -{ - glibtop *server; - glibtop_init_func_t *init_fkt; - - if (server_ptr == NULL) - return NULL; - - if (*server_ptr == NULL) - *server_ptr = glibtop_global_server; - - server = *server_ptr; - - /* Should we do the initialization? */ - - if (flags & GLIBTOP_INIT_NO_INIT) - return server; - - /* Do the initialization, but only if not already initialized. */ - - if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) { - glibtop_open_s (server, "glibtop", features, flags); - - for (init_fkt = _glibtop_init_hook_s; *init_fkt; init_fkt++) - (*init_fkt) (server); - - server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS; - } - - return server; -} diff --git a/lib/inodedb.c b/lib/inodedb.c deleted file mode 100644 index d78d3905..00000000 --- a/lib/inodedb.c +++ /dev/null @@ -1,117 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -#include -#include - -#ifndef SYSTEM_INODEDB -#define SYSTEM_INODEDB "/usr/var/libgtop/inodedb.db" -#endif - -glibtop_inodedb * -glibtop_inodedb_open_s (glibtop *server, unsigned databases, - unsigned long cachesize) -{ - glibtop_inodedb *inodedb; - char filename [BUFSIZ]; - struct passwd *pwd; - struct stat statb; - - if (!databases) - databases = GLIBTOP_INODEDB_ALL; - - inodedb = glibtop_calloc_r (server, 1, sizeof (glibtop_inodedb)); - - if (stat (SYSTEM_INODEDB, &statb)) - databases &= ~GLIBTOP_INODEDB_SYSTEM; - - if (databases & GLIBTOP_INODEDB_SYSTEM) { - inodedb->system_dbf = gdbm_open - (SYSTEM_INODEDB, 0, GDBM_READER, 0, 0); - if (!inodedb->system_dbf) - glibtop_error_io_r - (server, "gdbm_open (%s)", SYSTEM_INODEDB); - } - - pwd = getpwuid (getuid ()); - if (!pwd) glibtop_error_io_r (server, "getpwuid"); - - sprintf (filename, "%s/var/libgtop/inodedb.db", pwd->pw_dir); - - if (stat (filename, &statb)) - databases &= ~GLIBTOP_INODEDB_USER; - - if (databases & GLIBTOP_INODEDB_USER) { - inodedb->user_dbf = gdbm_open - (filename, 0, GDBM_READER, 0, 0); - if (!inodedb->user_dbf) - glibtop_error_io_r - (server, "gdbm_open (%s)", filename); - } - - return inodedb; -} - -const char * -glibtop_inodedb_lookup_s (glibtop *server, - glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode) -{ - glibtop_inodedb_key key; - datum d_key, d_content; - - d_key.dptr = (void *) &key; - d_key.dsize = sizeof (key); - - key.device = device; - key.inode = inode; - - if (inodedb->system_dbf) { - d_content = gdbm_fetch (inodedb->system_dbf, d_key); - if (d_content.dptr) return d_content.dptr; - } - - if (inodedb->user_dbf) { - d_content = gdbm_fetch (inodedb->user_dbf, d_key); - if (d_content.dptr) return d_content.dptr; - } - - return NULL; -} - -void -glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb) -{ - if (inodedb->system_dbf) - gdbm_close (inodedb->system_dbf); - - if (inodedb->user_dbf) - gdbm_close (inodedb->user_dbf); - - glibtop_free_r (server, inodedb); -} diff --git a/lib/lib.pl b/lib/lib.pl deleted file mode 100755 index 5fb09eac..00000000 --- a/lib/lib.pl +++ /dev/null @@ -1,227 +0,0 @@ -#!/usr/bin/perl - -$[ = 1; # set array base to 1 -$, = ' '; # set output field separator -$\ = "\n"; # set output record separator - -sub toupper { - local($_) = @_; - tr/a-z/A-Z/; - return $_; -} - -sub tolower { - local($_) = @_; - tr/A-Z/a-z/; - return $_; -} - -print '/* lib.c */'; -print "/* This is a generated file. Please modify `lib.pl' */"; -print ''; - -print '#include '; -print '#include '; -print ''; -print '#include '; -print '#include '; -print ''; -print '#include '; - -print ''; -print '/* Some required fields are missing. */'; -print ''; - -print 'static void'; -print '_glibtop_missing_feature (glibtop *server, const char *feature,'; -print "\t\t\t const u_int64_t present, u_int64_t *required)"; -print '{'; -print "\tswitch (server->error_method) {"; -print "\tcase GLIBTOP_ERROR_METHOD_WARN_ONCE:"; -print "\t\t*required &= present;"; -print "\tcase GLIBTOP_ERROR_METHOD_WARN:"; -print "\t\tglibtop_warn_r (server,"; -print "\t\t\t\t_(\"glibtop_get_%s (): Client requested \""; -print "\t\t\t\t \"field mask %05Lx, but only have %05Lx.\"),"; -print "\t\t\t\t feature, required, present);"; -print "\t\tbreak;"; -print "\tcase GLIBTOP_ERROR_METHOD_ABORT:"; -print "\t\tglibtop_error_r (server,"; -print "\t\t\t\t _(\"glibtop_get_%s (): Client requested \""; -print "\t\t\t\t \"field mask %05x, but only have %05x.\"),"; -print "\t\t\t\t feature, required, present);"; -print "\t\tbreak;"; -print "\t}"; -print '}'; - -print ''; -print '/* Library functions. */'; -print ''; - -$convert{'long'} = 'int64_t'; -$convert{'ulong'} = 'u_int64_t'; -$convert{'pid_t'} = 'pid_t'; -$convert{'int'} = 'int'; -$convert{'ushort'} = 'unsigned short'; -$convert{'unsigned'} = 'unsigned'; - -while (<>) { - chop; # strip record separator - - if (/^[^#]/) { - &output($_); - } -} - -sub output { - local($line) = @_; - @line_fields = split(/\|/, $line, 9999); - $retval = $line_fields[1]; - $feature = $line_fields[2]; - $param_def = $line_fields[4]; - - $orig = $feature; - $feature =~ s/^@//; - $space = $feature; - $space =~ s/./ /g; - - print $retval; - if ($retval !~ /^void$/) { - $prefix = 'retval = '; - $prefix_space = ' '; - } - else { - $prefix = ''; - $prefix_space = ''; - } - - if ($param_def eq 'string') { - $call_param = ', ' . $line_fields[5]; - $param_decl = ",\n " . $space . ' const char *' . - - $line_fields[5]; - $send_ptr = "\n\tconst void *send_ptr = " . $line_fields[5] . ';'; - $send_size = "\n\tconst size_t send_size =\n\t\tstrlen (" . - - $line_fields[5] . ') + 1;'; - } - else { - $call_param = ''; - $param_decl = ''; - $send_size = ''; - $send_ptr = ''; - $nr_params = (@params = split(/:/, $param_def, 9999)); - for ($param = 1; $param <= $nr_params; $param++) { - $list = $params[$param]; - $type = $params[$param]; - $type =~ s/\(.*//; - $list =~ s/^.*\(//; - $list =~ s/\)$//; - $count = (@fields = split(/,/, $list, 9999)); - for ($field = 1; $field <= $count; $field++) { - if ($param_decl eq '') { - $param_decl = ",\n " . $space . ' '; - } - else { - $param_decl = $param_decl . ', '; - } - $param_decl = $param_decl . '' . $convert{$type} . ' ' . - - $fields[$field]; - $call_param = $call_param . ', ' . $fields[$field]; - if ($send_ptr eq '') { - $send_ptr = "\n\tconst void *send_ptr = &" . - - $fields[$field] . ';'; - } - if ($send_size eq '') { - $send_size = "\n\tconst size_t send_size =\n\t\t"; - } - else { - $send_size = $send_size . ' + '; - } - $send_size = $send_size . 'sizeof (' . $fields[$field] . ')'; - } - } - if ($send_size ne '') { - $send_size = $send_size . ';'; - } - else { - $send_size = "\n\tconst size_t send_size = 0;"; - } - if ($send_ptr eq '') { - $send_ptr = "\n\tconst void *send_ptr = NULL;"; - } - } - - print 'glibtop_get_' . $feature . '_l (glibtop *server, glibtop_' . - - $feature . ' *buf' . $param_decl . ')'; - - print '{' . $send_ptr . '' . $send_size; - if ($retval !~ /^void$/) { - print "\t" . $retval . ' retval = (' . $retval . ') 0;'; - } - print ''; - - print "\tglibtop_init_r (&server, (1 << GLIBTOP_SYSDEPS_" . - - &toupper($feature) . '), 0);'; - - print ''; - print "\t/* If neccessary, we ask the server for the requested"; - print "\t * feature. If not, we call the sysdeps function. */"; - print ''; - - print "\tif ((server->flags & _GLIBTOP_INIT_STATE_SERVER) &&"; - print "\t (server->features & (1 << GLIBTOP_SYSDEPS_" . - - &toupper($feature) . ')))'; - print "\t{"; - - print "\t\t" . $prefix . 'glibtop_call_l (server, GLIBTOP_CMND_' . - - &toupper($feature) . ','; - print "\t\t\t\t" . $prefix_space . 'send_size, send_ptr,'; - print "\t\t\t\t" . $prefix_space . 'sizeof (glibtop_' . $feature . - - '), buf);'; - - print "\t} else {"; - - if ($orig !~ /^@/) { - print '#if (!GLIBTOP_SUID_' . &toupper($feature) . ')'; - } - print "\t\t" . $prefix . 'glibtop_get_' . $feature . '_s (server, buf' . - - $call_param . ');'; - - if ($orig !~ /^@/) { - print '#else'; - print "\t\terrno = ENOSYS;"; - print "\t\tglibtop_error_io_r (server, \"glibtop_get_" . $feature . - - "\");"; - print '#endif'; - } - - print "\t}"; - - print ''; - print "\t/* Make sure that all required fields are present. */"; - print ''; - - print "\tif (buf->flags & server->required." . $feature . ')'; - print "\t\t_glibtop_missing_feature (server, \"" . $feature . - - "\", buf->flags,"; - print "\t\t\t\t\t &server->required." . $feature . ');'; - - if ($retval !~ /^void$/) { - print "\n\t/* Now we can return. */"; - print "\n\treturn retval;"; - } - - print '}'; - print ''; -} diff --git a/lib/open.c b/lib/open.c deleted file mode 100644 index abc5724f..00000000 --- a/lib/open.c +++ /dev/null @@ -1,182 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include -#include -#include - -#include - -/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */ - -void -glibtop_open_l (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) -{ - int connect_type; - - server->name = program_name; - - /* It is important to set _GLIBTOP_INIT_STATE_OPEN here when we - * do recursive calls to glibtop_init_r (). */ - - server->flags |= _GLIBTOP_INIT_STATE_OPEN; - - server->error_method = GLIBTOP_ERROR_METHOD_DEFAULT; - -#ifdef DEBUG - fprintf (stderr, "SIZEOF: %u - %u - %u - %u - %u - %u\n", - sizeof (glibtop_command), sizeof (glibtop_response), - sizeof (glibtop_mountentry), sizeof (glibtop_union), - sizeof (glibtop_sysdeps), sizeof (glibtop_response_union)); -#endif - - switch (server->method) { - case GLIBTOP_METHOD_DIRECT: - server->features = 0; - break; - case GLIBTOP_METHOD_INET: -#ifdef DEBUG - fprintf (stderr, "Connecting to '%s' port %ld.\n", - server->server_host, server->server_port); -#endif - - connect_type = glibtop_make_connection - (server->server_host, server->server_port, - &server->socket); - -#ifdef DEBUG - fprintf (stderr, "Connect Type is %d.\n", connect_type); -#endif - - server->flags |= _GLIBTOP_INIT_STATE_SERVER; - - server->features = -1; - break; - case GLIBTOP_METHOD_UNIX: -#ifdef DEBUG - fprintf (stderr, "Connecting to Unix Domain Socket.\n"); -#endif - - connect_type = glibtop_make_connection - ("unix", 0, &server->socket); - -#ifdef DEBUG - fprintf (stderr, "Connect Type is %d.\n", connect_type); -#endif - - server->flags |= _GLIBTOP_INIT_STATE_SERVER; - - server->features = -1; - break; - case GLIBTOP_METHOD_PIPE: -#ifdef DEBUG - fprintf (stderr, "Opening pipe to server (%s).\n", - LIBGTOP_SERVER); -#endif - - if (pipe (server->input) || pipe (server->output)) - glibtop_error_io_r (server, "cannot make a pipe"); - - server->pid = fork (); - - if (server->pid < 0) { - glibtop_error_io_r (server, "fork failed"); - } else if (server->pid == 0) { - close (0); close (1); - close (server->input [0]); close (server->output [1]); - dup2 (server->input [1], 1); - dup2 (server->output [0], 0); - execl (LIBGTOP_SERVER, "libgtop-server", NULL); - glibtop_error_io_r (server, "execl (%s)", - LIBGTOP_SERVER); - _exit (2); - } - - close (server->input [1]); - close (server->output [0]); - - server->flags |= _GLIBTOP_INIT_STATE_SERVER; - - server->features = -1; - break; - } - - /* If the server has been started, ask it for its features. */ - - if (server->flags & _GLIBTOP_INIT_STATE_SERVER) { - char version [BUFSIZ], buffer [BUFSIZ]; - glibtop_sysdeps sysdeps; - size_t size, nbytes; - - /* First check whether the server version is correct. */ - - sprintf (version, LIBGTOP_VERSION_STRING, - LIBGTOP_VERSION, LIBGTOP_SERVER_VERSION, - sizeof (glibtop_command), - sizeof (glibtop_response), - sizeof (glibtop_union), - sizeof (glibtop_sysdeps)); - - size = strlen (version) + 1; - - glibtop_read_l (server, sizeof (nbytes), &nbytes); - - if (nbytes != size) - glibtop_error_r (server, - "Requested %u bytes but got %u.", - size, nbytes); - - glibtop_read_l (server, nbytes, buffer); - - if (memcmp (version, buffer, size)) - glibtop_error_r (server, "server version is not %s", - LIBGTOP_VERSION); - - /* Now ask it for its features. */ - - glibtop_call_l (server, GLIBTOP_CMND_SYSDEPS, 0, NULL, - sizeof (glibtop_sysdeps), &sysdeps); - - server->features = sysdeps.features; - - memcpy (&server->sysdeps, &sysdeps, sizeof (glibtop_sysdeps)); - -#ifdef DEBUG - fprintf (stderr, "Server features are %lu.\n", - server->features); -#endif - } - - /* In any case, we call the open functions of our own sysdeps - * directory. */ - -#ifdef DEBUG - fprintf (stderr, "Calling sysdeps open function.\n"); -#endif - - glibtop_init_s (&server, features, flags); -} diff --git a/lib/parameter.c b/lib/parameter.c deleted file mode 100644 index 83a8bfe7..00000000 --- a/lib/parameter.c +++ /dev/null @@ -1,98 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#define _write_data(ptr,size) \ - if ((data_ptr == NULL) || (data_size < size)) return -size; \ - if (ptr == NULL) { strcpy (data_ptr, ""); return 1; } \ - memcpy (data_ptr, ptr, size); \ - return size; - -#define _check_data(size) \ - if ((data_ptr == NULL) || (data_size != size)) { \ - glibtop_warn_r (server, "glibtop_set_parameter (%d): " \ - "Expected %lu bytes but got %lu.", \ - parameter, size, data_size); \ - return; \ - } - -#define _strlen(ptr) (ptr ? strlen (ptr) : 0) - -size_t -glibtop_get_parameter_l (glibtop *server, const unsigned parameter, - void *data_ptr, size_t data_size) -{ - switch (parameter) { - case GLIBTOP_PARAM_METHOD: - _write_data (&server->method, - sizeof (server->method)); - case GLIBTOP_PARAM_FEATURES: - _write_data (&server->features, - sizeof (server->features)); - case GLIBTOP_PARAM_COMMAND: - _write_data (server->server_command, - _strlen(server->server_command)); - case GLIBTOP_PARAM_HOST: - _write_data (server->server_host, - _strlen(server->server_host)); - case GLIBTOP_PARAM_PORT: - _write_data (&server->server_port, - sizeof (server->server_port)); - case GLIBTOP_PARAM_ERROR_METHOD: - _write_data (&server->error_method, - sizeof (server->error_method)); - case GLIBTOP_PARAM_REQUIRED: - _write_data (&server->required, - sizeof (server->required)); - } - - return 0; -} - -void -glibtop_set_parameter_l (glibtop *server, const unsigned parameter, - const void *data_ptr, size_t data_size) -{ - switch (parameter) { - case GLIBTOP_PARAM_METHOD: - _check_data (sizeof (server->method)); - memcpy (&server->method, data_ptr, data_size); - break; - case GLIBTOP_PARAM_FEATURES: - /* You should not be allowed to set this field. */ - glibtop_warn_r (server, "glibtop_set_parameter (%d): " \ - "Cannot modify read-only value.", - parameter); - break; - case GLIBTOP_PARAM_ERROR_METHOD: - _check_data (sizeof (server->error_method)); - memcpy (&server->error_method, data_ptr, data_size); - break; - case GLIBTOP_PARAM_REQUIRED: - _check_data (sizeof (server->required)); - memcpy (&server->required, data_ptr, data_size); - break; - } -} diff --git a/lib/read.c b/lib/read.c deleted file mode 100644 index 3a1c9f23..00000000 --- a/lib/read.c +++ /dev/null @@ -1,72 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Reads some data from server. */ - -static void -do_read (int s, void *ptr, size_t total_size) -{ - int nread; - size_t already_read = 0, remaining = total_size; - - while (already_read < total_size) { - nread = recv (s, ptr, remaining, 0); - - if (nread == 0) { - close (s); - continue; - } - - if (nread <= 0) { - glibtop_error_io ("recv"); - return; - } - - already_read += nread; - remaining -= nread; - (char *) ptr += nread; - } -} - -void -glibtop_read_l (glibtop *server, size_t size, void *buf) -{ - int ret = 0; - - glibtop_init_r (&server, 0, 0); - -#ifdef DEBUG - fprintf (stderr, "LIBRARY: really reading %d bytes.\n", size); -#endif - - if (server->socket) { - do_read (server->socket, buf, size); - } else { - ret = read (server->input [0], buf, size); - } - - if (ret < 0) - glibtop_error_io_r (server, _("read %d bytes"), size); -} diff --git a/lib/read_data.c b/lib/read_data.c deleted file mode 100644 index 8c1bc416..00000000 --- a/lib/read_data.c +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -/* Reads some data from server. */ - -void * -glibtop_read_data_l (glibtop *server) -{ - size_t size; - void *ptr; - int ret; - - glibtop_init_r (&server, 0, 0); - -#ifdef DEBUG - fprintf (stderr, "LIBRARY: reading %d data bytes.\n", sizeof (size_t)); -#endif - - if (server->socket) { - ret = recv (server->socket, (void *)&size, sizeof (size_t), 0); - } else { - ret = read (server->input [0], (void *)&size, sizeof (size_t)); - } - - if (ret < 0) - glibtop_error_io_r (server, _("read data size")); - -#ifdef DEBUG - fprintf (stderr, "LIBRARY: really reading %d data bytes (ret = %d).\n", size, ret); -#endif - - if (!size) return NULL; - - ptr = glibtop_malloc_r (server, size); - - if (server->socket) { - ret = recv (server->socket, ptr, size, 0); - } else { - ret = read (server->input [0], ptr, size); - } - - if (ret < 0) - glibtop_error_io_r (server, _("read data %d bytes")); - - return ptr; -} diff --git a/lib/sysdeps.c b/lib/sysdeps.c deleted file mode 100644 index 88bb9854..00000000 --- a/lib/sysdeps.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -const unsigned long glibtop_server_features = -GLIBTOP_SUID_CPU + -GLIBTOP_SUID_MEM + -GLIBTOP_SUID_SWAP + -GLIBTOP_SUID_UPTIME + -GLIBTOP_SUID_LOADAVG + -GLIBTOP_SUID_SHM_LIMITS + -GLIBTOP_SUID_MSG_LIMITS + -GLIBTOP_SUID_SEM_LIMITS + -GLIBTOP_SUID_PROCLIST + -GLIBTOP_SUID_PROC_STATE + -GLIBTOP_SUID_PROC_UID + -GLIBTOP_SUID_PROC_MEM + -GLIBTOP_SUID_PROC_TIME + -GLIBTOP_SUID_PROC_SIGNAL + -GLIBTOP_SUID_PROC_KERNEL + -GLIBTOP_SUID_PROC_SEGMENT + -GLIBTOP_SUID_PROC_MAP + -GLIBTOP_SUID_NETLOAD + -GLIBTOP_SUID_PPP; - -glibtop_init_func_t _glibtop_init_hook_s [] = { -#if !GLIBTOP_SUID_CPU - glibtop_init_cpu_s, -#endif -#if !GLIBTOP_SUID_MEM - glibtop_init_mem_s, -#endif -#if !GLIBTOP_SUID_SWAP - glibtop_init_swap_s, -#endif -#if !GLIBTOP_SUID_UPTIME - glibtop_init_uptime_s, -#endif -#if !GLIBTOP_SUID_LOADAVG - glibtop_init_loadavg_s, -#endif -#if !GLIBTOP_SUID_SHM_LIMITS - glibtop_init_shm_limits_s, -#endif -#if !GLIBTOP_SUID_MSG_LIMITS - glibtop_init_msg_limits_s, -#endif -#if !GLIBTOP_SUID_SEM_LIMITS - glibtop_init_sem_limits_s, -#endif -#if !GLIBTOP_SUID_PROCLIST - glibtop_init_proclist_s, -#endif -#if !GLIBTOP_SUID_PROC_STATE - glibtop_init_proc_state_s, -#endif -#if !GLIBTOP_SUID_PROC_UID - glibtop_init_proc_uid_s, -#endif -#if !GLIBTOP_SUID_PROC_MEM - glibtop_init_proc_mem_s, -#endif -#if !GLIBTOP_SUID_PROC_TIME - glibtop_init_proc_time_s, -#endif -#if !GLIBTOP_SUID_PROC_SIGNAL - glibtop_init_proc_signal_s, -#endif -#if !GLIBTOP_SUID_PROC_KERNEL - glibtop_init_proc_kernel_s, -#endif -#if !GLIBTOP_SUID_PROC_SEGMENT - glibtop_init_proc_segment_s, -#endif -#if !GLIBTOP_SUID_PROC_ARGS - glibtop_init_proc_args_s, -#endif -#if !GLIBTOP_SUID_PROC_MAP - glibtop_init_proc_map_s, -#endif -#if !GLIBTOP_SUID_NETLOAD - glibtop_init_netload_s, -#endif -#if !GLIBTOP_SUID_PPP - glibtop_init_ppp_s, -#endif - NULL -}; - -/* Checks which features are implemented. */ - -void -glibtop_get_sysdeps_r (glibtop *server, glibtop_sysdeps *buf) -{ - memcpy (buf, &server->sysdeps, sizeof (glibtop_sysdeps)); -} diff --git a/lib/write.c b/lib/write.c deleted file mode 100644 index 591badd2..00000000 --- a/lib/write.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Writes some data to server. */ - -void -glibtop_write_l (glibtop *server, size_t size, void *buf) -{ - int ret; - - glibtop_init_r (&server, 0, 0); - - if (size == 0) return; - -#ifdef DEBUG - fprintf (stderr, "LIBRARY: really writing %d bytes.\n", size); -#endif - - if (server->socket) { - ret = send (server->socket, buf, size, 0); - } else { - ret = write (server->output [1], buf, size); - } - - if (ret < 0) - glibtop_error_io_r (server, _("write %d bytes"), size); -} diff --git a/libgtop-config.in b/libgtop-config.in deleted file mode 100644 index cbd3055a..00000000 --- a/libgtop-config.in +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -usage="\ - Usage: libgtop-config [--version] [--config] [--features-def-file]" - -config_file="@LIBGTOP_LIBDIR@/libgtopConf.sh" -. $config_file - -features_def_file="@LIBGTOP_LIBDIR@/libgtop-features.def" - -if test $# -eq 0; then - echo "${usage}" 1>&2 - exit 1 -fi - -while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --version) - echo $LIBGTOP_VERSION - ;; - --config) - echo $config_file - ;; - --features-def-file) - echo $features_def_file - ;; - *) - echo "${usage}" 1>&2 - exit 1 - esac - shift -done diff --git a/libgtop-mirror.sh b/libgtop-mirror.sh deleted file mode 100755 index 385ad0b1..00000000 --- a/libgtop-mirror.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -AUTODIR=/home/norwegen/auto -CVSROOT=/pub/master/home-of-linux -CVSHOST=cvs: -MODULE=libgtop - -rm -rf $AUTODIR || exit 1 -mkdir $AUTODIR || exit 1 -cd $AUTODIR || exit 1 - -echo "Making cpio archive out of $CVSROOT/$MODULE ..." - -find $CVSROOT/$MODULE | cpio -o --format=crc | gzip -9f > $MODULE-current-cvs.cpio.gz || exit 1 - -echo "Checking out $MODULE" - -cvs -d $CVSHOST$CVSROOT co $MODULE || exit 1 - -echo "Making cpio archive out of checked out sources ..." - -find $MODULE | cpio -o --format=crc | gzip -9f > $MODULE-current.cpio.gz || exit 1 - -for file in README LIESMICH NEWS ChangeLog ; do - if [ -s $MODULE/$file ] ; then - cp $MODULE/$file . || exit 1 - fi -done - -tar cvf - $MODULE | gzip -9f > $MODULE-current.tar.gz || exit 1 - -find $MODULE/doc -maxdepth 1 -type f -exec cp {} . \; - -# echo "Making documentation ..." -# jade -D /usr/lib/sgml/jade_dsl -d libgtop.dsl -t sgml -V %no-make-index% libgtop.sgml > /dev/null || exit 1 - -# echo "Making TeX documentation ..." -# jade -D /usr/lib/sgml/jade_dsl -D /usr/lib/sgml/stylesheets -d docbook.dsl -t tex libgtop.sgml || exit 1 -# jadetex libgtop.tex || exit 1 -# jadetex libgtop.tex || exit 1 -# dvips libgtop || exit 1 - -echo "Cleaning up ..." - -rm -rf $MODULE - -echo "Done." diff --git a/libgtop-sysdeps.m4 b/libgtop-sysdeps.m4 deleted file mode 100644 index a055e53a..00000000 --- a/libgtop-sysdeps.m4 +++ /dev/null @@ -1,270 +0,0 @@ -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]) - - case "$host_os" in - linux*) - AC_ARG_WITH(linux-table, - [ --with-linux-table Use the table () function from Martin Baulig],[ - linux_table="$withval"],[linux_table=auto]) - 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 -#include - -#include -#include -#include - -#include - -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 - AM_CONDITIONAL(LINUX_TABLE, test $linux_table = yes) - ;; - 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="$withval"], [hacker_mode=no]) - - AM_CONDITIONAL(HACKER_MODE, test x"$hacker_mode" = xyes) - - if test x$hacker_mode = xyes ; then - LIBGTOP_HACKER_TESTS - fi - - 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 - ;; - *) - 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*) - 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' - ;; - *) - if test x$hacker_mode = xyes ; then - case "$host_os" in - sunos4*) - 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 -#include - -#include -#include - -#ifdef HAVE_NET_IF_VAR_H -#include -#endif - -#include -#include - -#ifdef __FreeBSD__ -#include -#else -#include -#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 -#include - -#include -#include - -#ifdef HAVE_NET_IF_VAR_H -#include -#endif - -#include -#include - -#ifdef __FreeBSD__ -#include -#else -#include -#endif - -#include -],[ - 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) - ;; - 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) -]) - diff --git a/libgtop.spec.in b/libgtop.spec.in deleted file mode 100644 index 85b2e657..00000000 --- a/libgtop.spec.in +++ /dev/null @@ -1,125 +0,0 @@ -# Note that this is NOT a relocatable package -%define ver @VERSION@ -%define rel SNAP -%define prefix /usr - -Summary: LibGTop library -Name: libgtop -Version: %ver -Release: %rel -Copyright: LGPL -Group: X11/Libraries -Source: ftp://ftp.gnome.org/pub/GNOME/sources/libgtop/libgtop-%{ver}.tar.gz -BuildRoot: /tmp/libgtop-root -Packager: Martin Baulig -URL: http://www.home-of-linux.org/gnome/libgtop/ -Prereq: /sbin/install-info -Docdir: %{prefix}/doc - -%description - -A library that fetches information about the running system such as -cpu and memory usage, active processes etc. - -On Linux systems, these information are taken directly from the /proc -filesystem while on other systems a server is used to read those -information from /dev/kmem or whatever. - -%package devel -Summary: Libraries, includes, etc to develop LibGTop applications -Group: X11/libraries -Requires: libgtop - -%description devel -Libraries, include files, etc you can use to develop GNOME applications. - -%package examples -Summary: Examples for LibGTop -Group: X11/libraries -Requires: libgtop - -%description examples -Examples for LibGTop. - - -%changelog - -* Tue Aug 19 1998 Martin Baulig - -- released LibGTop 0.25.0 - -* Sun Aug 16 1998 Martin Baulig - -- first version of the RPM - -%prep -%setup - -%build -# Needed for snapshot releases. -if [ ! -f configure ]; then - CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --without-linux-table --with-libgtop-inodedb --with-libgtop-examples --with-libgtop-guile --with-libgtop-smp -else -%ifarch alpha - CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix --without-linux-table --with-libgtop-inodedb --with-libgtop-examples --with-libgtop-guile --with-libgtop-smp -%else - CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --without-linux-table --with-libgtop-inodedb --with-libgtop-examples --with-libgtop-guile --with-libgtop-smp -%endif -fi - -if [ "$SMP" != "" ]; then - (make "MAKE=make -k -j $SMP"; exit 0) - make -else - make -fi - -%install -rm -rf $RPM_BUILD_ROOT - -make prefix=$RPM_BUILD_ROOT%{prefix} install - -# -# msf - remove these as they are really supposed to come from gnome-libs -# -# martin - don't remove since they are no longer installed if build -# with GNOME -# -# rm -f $RPM_BUILD_ROOT/%{prefix}/lib/libgnomesupport.a -# rm -f $RPM_BUILD_ROOT/%{prefix}/lib/libgnomesupport.la -# rm -f $RPM_BUILD_ROOT/%{prefix}/lib/libgnomesupport.so.0 -# rm -f $RPM_BUILD_ROOT/%{prefix}/lib/libgnomesupport.so.0.0.0 - -rm -fr $RPM_BUILD_ROOT/%{prefix}/include/libgtop - -%clean -rm -rf $RPM_BUILD_ROOT - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%files -%defattr(-, root, root) - -%doc RELNOTES-0.25 RELNOTES-1.0 AUTHORS ChangeLog NEWS README -%doc TODO NEWS.old copyright.txt -%doc src/inodedb/README.inodedb - -%{prefix}/lib/lib*.so.* -%{prefix}/share/* -%{prefix}/bin/* - -%files devel -%defattr(-, root, root) - -%{prefix}/lib/lib*.so -%{prefix}/lib/*a -%{prefix}/lib/*.sh -%{prefix}/lib/*.def -%{prefix}/include/* - -%files examples -%defattr(-,root,root) - -%{prefix}/libexec/libgtop/* diff --git a/libgtopConf.sh.in b/libgtopConf.sh.in deleted file mode 100644 index c8a013d0..00000000 --- a/libgtopConf.sh.in +++ /dev/null @@ -1,42 +0,0 @@ -# -# Configuration of the libgtop package -# - -LIBGTOP_LIBDIR="@LIBGTOP_LIBDIR@" -LIBGTOP_INCLUDEDIR="@LIBGTOP_INCLUDEDIR@" - -LIBGTOP_DATADIR="@LIBGTOP_DATADIR@" - -LIBGTOP_EXTRA_LIBS="@LIBGTOP_EXTRA_LIBS@" - -LIBGTOP_LIBS="@LIBGTOP_LIBS@" -LIBGTOP_INCS="@LIBGTOP_INCS@" - -LIBGTOP_NAMES_LIBS="@LIBGTOP_NAMES_LIBS@" -LIBGTOP_NAMES_INCS="@LIBGTOP_NAMES_INCS@" - -LIBGTOP_GUILE_LIBS="@LIBGTOP_GUILE_LIBS@" -LIBGTOP_GUILE_INCS="@LIBGTOP_GUILE_INCS@" - -LIBGTOP_GUILE_NAMES_LIBS="@LIBGTOP_GUILE_NAMES_LIBS@" -LIBGTOP_GUILE_NAMES_INCS="@LIBGTOP_GUILE_NAMES_INCS@" - -LIBGTOP_BINDIR="@LIBGTOP_BINDIR@" -LIBGTOP_SERVER="@LIBGTOP_SERVER@" - -LIBGTOP_MAJOR_VERSION="@LIBGTOP_MAJOR_VERSION@" -LIBGTOP_MINOR_VERSION="@LIBGTOP_MINOR_VERSION@" -LIBGTOP_MICRO_VERSION="@LIBGTOP_MICRO_VERSION@" - -LIBGTOP_VERSION="@LIBGTOP_VERSION@" -LIBGTOP_VERSION_CODE="@LIBGTOP_VERSION_CODE@" - -LIBGTOP_SERVER_VERSION="@LIBGTOP_SERVER_VERSION@" - -libgtop_sysdeps_dir="@libgtop_sysdeps_dir@" -libgtop_need_server="@libgtop_need_server@" -libgtop_use_machine_h="@libgtop_use_machine_h@" - -libgtop_guile_found="@libgtop_guile_found@" - -libgtop_want_examples="@libgtop_want_examples@" diff --git a/misc/.cvsignore b/misc/.cvsignore deleted file mode 100644 index 3dda7298..00000000 --- a/misc/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/misc/Makefile.am b/misc/Makefile.am deleted file mode 100644 index 4f9aa50d..00000000 --- a/misc/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_DIST = i4b_acct.h i4b_acct.txt - diff --git a/misc/i4b_acct.h b/misc/i4b_acct.h deleted file mode 100644 index b5c3e479..00000000 --- a/misc/i4b_acct.h +++ /dev/null @@ -1,75 +0,0 @@ -/* This file contains modified code from `/usr/src/i4b/driver/i4b_isppp.c' - * which belongs to the I4B package. - * - * The original copyright of this file [/usr/src/i4b/driver/i4b_isppp.c] is - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 1997 Joerg Wunsch. All rights reserved. - * - * Copyright (c) 1997, 1998 Hellmuth Michaelis. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * 4. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software and/or documentation. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * ----------------------------------------------------------------------------- - */ - -#define I4BISPPPACCT 1 /* enable accounting messages */ - -struct i4bisppp_softc { - /* - * struct sppp starts with a struct ifnet, but we gotta allocate - * more space for it. NB: do not relocate this union, it must - * be first in isppp_softc. The tls and tlf hooks below want to - * convert a ``struct sppp *'' into a ``struct isppp_softc *''. - */ - union { - struct ifnet scu_if; - struct sppp scu_sp; - } sc_if_un; -#define sc_if sc_if_un.scu_if - int sc_state; /* state of the interface */ -#ifndef __FreeBSD__ - int sc_unit; /* unit number for Net/OpenBSD */ -#endif - void *sc_cdp; /* ptr to call descriptor */ - -#ifdef I4BISPPPACCT - int sc_iinb; /* isdn driver # of inbytes */ - int sc_ioutb; /* isdn driver # of outbytes */ - int sc_inb; /* # of bytes rx'd */ - int sc_outb; /* # of bytes tx'd */ - int sc_linb; /* last # of bytes rx'd */ - int sc_loutb; /* last # of bytes tx'd */ - int sc_fn; /* flag, first null acct */ -#endif - -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 - struct callout_handle sc_ch; -#endif -}; diff --git a/misc/i4b_acct.txt b/misc/i4b_acct.txt deleted file mode 100644 index 4fd7d024..00000000 --- a/misc/i4b_acct.txt +++ /dev/null @@ -1,96 +0,0 @@ -To get ISDN statistics with the I4B package do the following: - -* Look at the declaration of `struct i4bisppp_softc' in - /usr/src/i4b/driver/i4b_isppp.c. - - It is looking like this: - - struct i4bisppp_softc { - /* - * struct sppp starts with a struct ifnet, but we gotta allocate - * more space for it. NB: do not relocate this union, it must - * be first in isppp_softc. The tls and tlf hooks below want to - * convert a ``struct sppp *'' into a ``struct isppp_softc *''. - */ - union { - struct ifnet scu_if; - struct sppp scu_sp; - } sc_if_un; - #define sc_if sc_if_un.scu_if - int sc_state; /* state of the interface */ - #ifndef __FreeBSD__ - int sc_unit; /* unit number for Net/OpenBSD */ - #endif - call_desc_t *sc_cdp; /* ptr to call descriptor */ - - #ifdef I4BISPPPACCT - int sc_iinb; /* isdn driver # of inbytes */ - int sc_ioutb; /* isdn driver # of outbytes */ - int sc_inb; /* # of bytes rx'd */ - int sc_outb; /* # of bytes tx'd */ - int sc_linb; /* last # of bytes rx'd */ - int sc_loutb; /* last # of bytes tx'd */ - int sc_fn; /* flag, first null acct */ - #endif - - #if defined(__FreeBSD__) && __FreeBSD__ >= 3 - struct callout_handle sc_ch; - #endif - } i4bisppp_softc[NI4BISPPP]; - -* Create a new file /usr/include/machine/i4b_acct.h and put the declaration - of this structure in this file. - -* Replace `call_desc_t *' with `void *' in it. - -* The result should look like this: - - struct i4bisppp_softc { - /* - * struct sppp starts with a struct ifnet, but we gotta allocate - * more space for it. NB: do not relocate this union, it must - * be first in isppp_softc. The tls and tlf hooks below want to - * convert a ``struct sppp *'' into a ``struct isppp_softc *''. - */ - union { - struct ifnet scu_if; - struct sppp scu_sp; - } sc_if_un; - #define sc_if sc_if_un.scu_if - int sc_state; /* state of the interface */ - #ifndef __FreeBSD__ - int sc_unit; /* unit number for Net/OpenBSD */ - #endif - void *sc_cdp; /* ptr to call descriptor */ - - #ifdef I4BISPPPACCT - int sc_iinb; /* isdn driver # of inbytes */ - int sc_ioutb; /* isdn driver # of outbytes */ - int sc_inb; /* # of bytes rx'd */ - int sc_outb; /* # of bytes tx'd */ - int sc_linb; /* last # of bytes rx'd */ - int sc_loutb; /* last # of bytes tx'd */ - int sc_fn; /* flag, first null acct */ - #endif - - #if defined(__FreeBSD__) && __FreeBSD__ >= 3 - struct callout_handle sc_ch; - #endif - }; - -* Put a - - #define I4BISPPPACCT 1 /* enable accounting messages */ - - at the top of your /usr/include/machine/i4b_acct.h - -* This file should now look about like `misc/i4b_acct.h' in the LibGTop - source directory. - -* Done. - -This is necessary since LibGTop reads its data directly out of the kernel -and the `struct i4bisppp_softc' is only defined there and in no header file -(someone can tell the I4B people to put it in some header file ?). - -Martin diff --git a/misc/porting-libgtop.txt b/misc/porting-libgtop.txt deleted file mode 100644 index 62f524d9..00000000 --- a/misc/porting-libgtop.txt +++ /dev/null @@ -1,81 +0,0 @@ -There are a few instructions as I write them here (I'll at this file -to CVS as well). - -First, there is a new 0.99.9 tarball. You should use this one when -porting libgtop to Solaris, it has a lot of fixes in the header files -and I just tested it with DEC OSF/1 3.2 native `cc' and BSDI 3.1; both -compiled without problems. - -The tarball is not yet on ftp.gnome.org since I want to fix the broken -DEC OSF/1 port and check whether it works with Digital Unix 3.2C this -weekend. - -Here the instructions: - -======================================================================== - -* Edit libgtop-sysdeps.m4: - - Somewhere in the GNOME_LIBGTOP_SYSDEPS macro you'll find - - freebsd*|netbsd*|openbsd*) - 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' - ;; - - add something like - - solaris*) - libgtop_sysdeps_dir=solaris - libgtop_use_machine_h=yes - libgtop_need_server=yes - libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server' - ;; - - there. - - Until you port is stable, please add it to the - - if test x$hacker_mode = xyes ; then - case "$host_os" in - ... - esac - - section so this will look like - - if test x$hacker_mode = xyes ; then - case "$host_os" in - solaris*) - libgtop_sysdeps_dir=solaris - libgtop_use_machine_h=yes - libgtop_need_server=yes - libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server' - ;; - - - If you add the check there configure will only detect Solaris as a - valid system if you give it the `--enable-hacker-mode' parameter so - it doesn't matter if it does not compile or not work, it won't get - compiled for "normal" users. - -* Copy sysdeps/stub_suid to sysdeps/solaris - -* Run configure with --enable-hacker-mode and try a make, it should - compile without problems. - - If not, please let me know - in this case the `stub_suid' directory - is broken. - -* Now you can start porting LibGTop ... - -I don't know how similar Solaris and Sun4 are, but perhaps you can -use some code from my very old and broken sun4 port in sysdeps/sun4. - -========================================================================= - -If you have any more questions, feel free to ask them ... - -Happy porting, -Martin diff --git a/po/.cvsignore b/po/.cvsignore deleted file mode 100644 index 0cacdd26..00000000 --- a/po/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -Makefile.in -POTFILES -cat-id-tbl.c -*.gmo -libgtop.pot -Makefile.in.in diff --git a/po/ChangeLog b/po/ChangeLog deleted file mode 100644 index 0fbb46e7..00000000 --- a/po/ChangeLog +++ /dev/null @@ -1,30 +0,0 @@ -1999-01-27 Kjartan Maraas - - * no.po: Updated translation - -1998-12-22 Yukihiro Nakai - - * ja.po: New file - added Japanese translation - -1998-10-11 Martin Baulig - - * POTFILES.in: Removed `sysdeps/linux/procdata.c'. - -1998-10-11 Kjartan Maraas - - * no.po: New file - added norwegian translation. - -1998-10-07 Martin Baulig - - * de.po: New file - added german translation. - - * POTFILES.in: Regenerated. - -Sun, 31 May 1998 22:38:59 +0200 Vincent Renardias - - * fr.po: new file - ChangeLog isn't empty anymore _(; - -1998-05-21 Martin Baulig - - * ChangeLog: new file - currently empty - diff --git a/po/LEEME.es b/po/LEEME.es deleted file mode 100644 index 7d532841..00000000 --- a/po/LEEME.es +++ /dev/null @@ -1,26 +0,0 @@ -[ This file explains why there are various incomplete es_??.po in adition - to the es.po; that is on purpose ] - -Los diferentes archivos para las locales es_DO, es_GT, es_HN, es_MX, es_PA, -es_PE y es_SV; solo existen porque en esos paises se usa una representación -de los números diferente de la que se usa en los demás paises de habla -castellan (usan el sistema anglosajón, esdecir 1,000 en vez de 1.000 para -'mil'). - -Por ello solo es necesario traducir aquellas ocurrencias donde aparezcan -números; no hace falta perder el tiempo traduciendo en doble lo demás; -el sistema de internacionalización de GNU gettext es lo suficientemente -inteligente como para buscar las traducciones en la locale 'es' cuando no -las encuentra en una 'es_XX' más específica. - -También podriase crear un es_ES para traducir aquellos terminos que difieren -en España y América (ej: computadora/ordenador, archivo/fichero, ícono/icono), -si algún español tiene ganas de encargarse de ello, bienvenido. -Notese que solo es necesario traducir aquellas cadenas de texto para las -cuales se usan terminos diferentes en España; no es necesario traducir las -demás, con que estén en la traducción general 'es' ya basta. - -Pablo Saratxaga - - - diff --git a/po/POTFILES.in b/po/POTFILES.in deleted file mode 100644 index 706f05b0..00000000 --- a/po/POTFILES.in +++ /dev/null @@ -1,110 +0,0 @@ -sysdeps/names/cpu.c -sysdeps/names/fsusage.c -sysdeps/names/loadavg.c -sysdeps/names/mem.c -sysdeps/names/mountlist.c -sysdeps/names/msg_limits.c -sysdeps/names/prockernel.c -sysdeps/names/proclist.c -sysdeps/names/procmap.c -sysdeps/names/procmem.c -sysdeps/names/procsegment.c -sysdeps/names/procsignal.c -sysdeps/names/procstate.c -sysdeps/names/proctime.c -sysdeps/names/procuid.c -sysdeps/names/sem_limits.c -sysdeps/names/shm_limits.c -sysdeps/names/swap.c -sysdeps/names/sysdeps.c -sysdeps/names/uptime.c -support/easy-vsnprintf.c -support/error.c -support/error.h -support/getopt.c -lib/close.c -lib/command.c -lib/init.c -lib/open.c -lib/parameter.c -lib/read.c -lib/read_data.c -lib/sysdeps.c -lib/write.c -include/glibtop/close.h -include/glibtop/command.h -include/glibtop/cpu.h -include/glibtop/error.h -include/glibtop/fsusage.h -include/glibtop/global.h -include/glibtop/gnuserv.h -include/glibtop/inodedb.h -include/glibtop/loadavg.h -include/glibtop/mem.h -include/glibtop/mountlist.h -include/glibtop/msg_limits.h -include/glibtop/open.h -include/glibtop/parameter.h -include/glibtop/prockernel.h -include/glibtop/proclist.h -include/glibtop/procmap.h -include/glibtop/procmem.h -include/glibtop/procsegment.h -include/glibtop/procsignal.h -include/glibtop/procstate.h -include/glibtop/proctime.h -include/glibtop/procuid.h -include/glibtop/read.h -include/glibtop/read_data.h -include/glibtop/sem_limits.h -include/glibtop/shm_limits.h -include/glibtop/signal.h -include/glibtop/swap.h -include/glibtop/sysdeps.h -include/glibtop/sysinfo.h -include/glibtop/types.h -include/glibtop/union.h -include/glibtop/uptime.h -include/glibtop/version.h -include/glibtop/write.h -include/glibtop/xmalloc.h -src/inodedb/file_by_inode.c -src/inodedb/mkinodedb.c -src/daemon/gnuserv.c -src/daemon/io.c -src/daemon/main.c -src/daemon/server.c -src/daemon/slave.c -src/daemon/version.c -sysdeps/common/error.c -sysdeps/common/fsusage.c -sysdeps/common/gnuslib.c -sysdeps/common/inodedb.c -sysdeps/common/mountlist.c -sysdeps/common/sysdeps_suid.c -sysdeps/common/xmalloc.c -sysdeps/common/fsusage.h -sysdeps/common/mountlist.h -sysdeps/linux/close.c -sysdeps/linux/cpu.c -sysdeps/linux/loadavg.c -sysdeps/linux/mem.c -sysdeps/linux/msg_limits.c -sysdeps/linux/open.c -sysdeps/linux/prockernel.c -sysdeps/linux/proclist.c -sysdeps/linux/procmap.c -sysdeps/linux/procmem.c -sysdeps/linux/procsegment.c -sysdeps/linux/procsignal.c -sysdeps/linux/procstate.c -sysdeps/linux/proctime.c -sysdeps/linux/procuid.c -sysdeps/linux/sem_limits.c -sysdeps/linux/shm_limits.c -sysdeps/linux/siglist.c -sysdeps/linux/swap.c -sysdeps/linux/sysinfo.c -sysdeps/linux/uptime.c -sysdeps/linux/glibtop_machine.h -sysdeps/linux/glibtop_server.h diff --git a/po/de.po b/po/de.po deleted file mode 100644 index c9627653..00000000 --- a/po/de.po +++ /dev/null @@ -1,1074 +0,0 @@ -# libgtop de.po -# Copyright (C) 1998 Free Software Foundation, Inc. -# Martin Baulig , 1998. -# -msgid "" -msgstr "" -"Project-Id-Version: libgtop VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Martin Baulig \n" -"Language-Team: Martin Baulig \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "CPU-Zeit insgesamt" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "CPU-Zeit in Benutzer-Mode" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "CPU-Zeit in Benutzer-Mode (Priorität)" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "CPU-Zeit in System-Mode" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "CPU-Zeit im Leerlaufprozess" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "Takt-Frequenz" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "CPU-Zeit aller Prozessoren insgesamt" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "CPU-Zeit aller Prozessoren im Benutzer-Mode" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "CPU-Zeit aller Prozessoren im Benutzer-Mode (Priorität)" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "CPU-Zeit aller Prozessoren im System-Mode" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "CPU-Zeit aller Prozessoren im Leerlaufprozess" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "Anzahl der Clock-Ticks seit Systemboot" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "Anzahl der Clock-Ticks, die das System im Benutzer-Mode verbracht hat" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" -"Anzahl der Clock-Ticks, die das System im Benutzer-Mode mit erhöhter " -"Priorität verbracht hat" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "Anzahl der Clock-Ticks, die das System im Kernel-Mode verbracht hat" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "Anzahl der Clock-Ticks, die das System im Leerlauf war" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "Tickfrequenz (Default ist 100)" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "Blöcke insgesamt" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "Freie Blöcke" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "Für Benutzer verfügbare Blöcke" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "Knoten insgesamt" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "Freie Knoten" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "Freie Blöcke inclusive für den Administrator reservierter Blöcke" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "Für Benutzer verfügbare Blöcke" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "Systemlast" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "Laufende Jobs" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "Anzahl Jobs" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "Letzte PID" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "Anzahl gleichzeitig laufender Jobs im Mittel über 1, 5 und 15 Minuten" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "Anzahl der momentan laufenden Jobs" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "Anzahl Jobs insgesamt" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "Arbeitsspeicher insgesamt" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "Benutzer Arbeitspeicher" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "Freier Arbeitsspeicher" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "Gemeinsam genutzer Speicher" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "Pufferspeicher" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "Temporärer Zwischenspeicher" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "Von Benutzern belegter Speicher" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "Gesperrter Speicher" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "Physikalischer Speicher insgesamt in kB" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "Belegter Speicher in kB" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "Freier Speicher in kB" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "Gemeinsam genutzter Speicher in kB" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "Größe der Dateipuffer in kB" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "Größe des temporären Zwischenspeichers in kB" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "Von Benutzerprozessen belegter Speicher in kB" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "Speicher in gesperrten Seiten in kB" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "Anzahl der Elemente in der Liste" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "Größe (in Bytes) der Liste" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "Größe eines einzigen Listenelements" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "Größe des Nachrichtenbereiches in Kilobyte" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "Anzahl der Einträge in der Nachrichtentabelle" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "Maximale Größe einer Nachricht" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "Standardmäßige Größe der Warteschlange" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "Maximale Anzahl der Warteschlangen systemweit" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "Größe des Nachrichtensegments" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "Anzahl der Systemnachrichtenköpfe" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "K_Flags" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "Min_Flt" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "Maj_Flt" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "CMin_Flt" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "CMaj_Flt" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "KStk_ESP" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "KStk_EIP" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "NWChan" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "WChan" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" -"Anzahl weniger schwerer Seitenfehler eines Prozesses, d.h. diejenigen die es " -"nicht erforderlich gemacht haben, eine Seite von der Platte zu laden." - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" -"Anzahl schwerwiegender Seitenfehler eines Prozesses, d.h. diejenigen, die es " -"erforderten eine Seite von der Platte zu laden." - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" -"Anzahl weniger schwerer Seitenfehler eines Prozesses und seiner Kinder, d.h. " -"diejenigen die es nicht erforderlich gemacht haben, eine Seite von der " -"Platte zu laden." - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" -"Anzahl schwerwiegender Seitenfehler eines Prozesses und seiner Kinder, d.h. " -"diejenigen, die es erforderten eine Seite von der Platte zu laden." - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" -"Aktueller Wert des 32-Bit Stapelzeigers des Kernels entnommen aus der " -"Stapelseite des Prozesses im Kernel." - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "Aktueller 32-Bit Befehlszeiger des Prozessors." - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" -"Dies ist der \"Kanal\" in dem der Prozess gerade wartet. Es handelt sich " -"dabei um die Adresse eines Systemaufrufs dessen Namen man in der Namensliste " -"finden kann (wenn Sie eine aktuelle 'etc/psdatabase' haben, versuchen Sie " -"'ps -l' um das WCHAN-Feld in Aktion zu sehen)." - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "Dies ist der Text-Name des `nwchan' Feldes" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "Prozessgröße" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "Virtuelle Prozessgröße" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "Residente Prozessgröße" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "Größe des gemeinsam genutzten Speichers" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "Größe des permanent belegten Speichers" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "Maximale Größe des permanent belegten Speichers" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "Anzahl Speicherseiten insgesamt" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "Anzahl virtueller Speicherseiten" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "Anzahl nichtausgelagerter Speicherseiten" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "Anzahl gemeinsam genutzter Speicherseiten (via mmap())" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" -"Anzahl der Seiten, die der Prozess im Speicher hält minus drei für " -"administrative Zwecke, d.h. alle Seiten im Text, Daten und Stapelbereich " -"ohne solche die nur bei Bedarf geladen werden (und momentan nicht geladen " -"sind) und ausgelagerte Seiten." - -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Gegenwärtiges Limit in Bytes für die RSS des Prozesses (normalerweise " -"2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "Text_RSS" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "Bibliothek_RSS" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "Daten_RSS" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "Stapel_RSS" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "Größe des \"schmutzigen\" Speichers" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "Start_Code" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "Ende_Code" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "Start_Stapel" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "Größe des permanenten Textsegments" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "Größe permanenter Bibliotheken" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "Gröse des permanenten Datensegments" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "Größe des permanenten Stapelsegments" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "Anzahl \"schmutziger\" Seiten insgesamt" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "Adresse, an der das Programmcode-Segment anfängt" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "Addresse, an der das Programmcode-Segment aufhört" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "Adresse des unteren Endes des Stapelsegments" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "Signal" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "Blockiert" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "Signal Ignoriert" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "Signal Erhalten" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "Maske ausstehender Signale" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "Maske blockierter Signale" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "Maske ignorierter Signale" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "Maske erhaltener Signale" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "Befehl" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "Status" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "UID" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "GID" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "Dateiname des Programms im Aufruf von exec()" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "Prozessstatus (S=schläft)" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "UID des Prozesses" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "GID des Prozesses" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "Startzeit" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "RZeit" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "BZeit" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "SZeit" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "CBZeit" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "CSZeit" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "TimeOut" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "It_Real_Value" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "Frequenz" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "Startzeit des Prozesses in Sekunden seit dem 1. Januar 1970" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "Realzeit des Prozesses (sollte utime + stime sein)" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "Zeit, die der Prozess im Benutzer-Modus verbracht hat" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "Zeit, die der Prozess im Kernel verbracht hat" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" -"Zeit, die der Prozess und seine bereits gestorbe Kinder im Benutzer-Mode " -"verbracht haben" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" -"Zeit, die der Prozess und seine bereits gestorbe Kinder im Kernel verbracht " -"haben" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" -"Zeit (in 1/100stel Sekunden) bis der Prozess seinen nächsten Timeout empfängt" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" -"Zeit (in 1/100stel Sekunden) bevor das nächste SIGALRM Signal aufgrund eines " -"Intervall-Timers an den Prozess geschickt wird" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "Taktfrequenz" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "Zeit aller Prozessoren, die der Prozess im Benutzer-Mode verbracht hat" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "Zeit aller Prozessoren, die der Prozess im Kernel-Mode verbracht hat" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "Uid" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "EUid" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "Gid" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "EGid" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "Pid" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "PPid" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "PGrp" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "Sitzung" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "Tty" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "TPGid" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "Priorität" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "Nice" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "Benutzer-ID" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "Effektive Benutzer-ID" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "Gruppen-ID" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "Effektive Gruppen-ID" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "Prozess-ID" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "PID des Vaterprozesses" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "Prozessgruppen-ID" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "Sitzungs-ID" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "Volle Gerätenummer des kontrolierenden Terminals" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "Terminalprozessgruppen-ID" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "Kernelbehandlungspriorität" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "Standard UNIX 'nice' Wert des Prozesses" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "Auslagerungsspeicher insgesamt" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "Belegter Auslagerungsspeicher" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "Freier Auslagerungsspeicher" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "Eingelagerte Seiten" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "Ausgelagerte Seiten" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" -"Anzahl der Seiten, die insgesamt seit dem letzten Systemstart ausgelagert " -"wurden" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" -"Anzahl der Seiten, die insgesamt seit dem letzten Systemstart eingelagert " -"wurden" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "Server Features" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "Prozessorlast" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "Speicherbelegung" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "Auslagerungsspeicher" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "Laufzeit des Systems" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "Systemlast" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "Limits für gemeinsam genutzten Speicher" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "Limits für Nachrichtenwarteschlangen" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "Prozessliste" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "Prozess Status" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "Prozess Eigentümer und Terminal" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "Speicherbelegung des Prozesses" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "" - -#: sysdeps/names/sysdeps.c:66 -#, fuzzy -msgid "Process Arguments" -msgstr "Prozessgruppen-ID" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "Netzlast" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "PPP Statistik" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "Kommandozeilenparameter des Prozesses" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "Liste gegenwärtig gemounteter Dateisysteme" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "Leerlaufzeit" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "Zeit in Sekunden seit System-Boot" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "Unbekannter Systemfehler" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/es.po b/po/es.po deleted file mode 100644 index b3bf8034..00000000 --- a/po/es.po +++ /dev/null @@ -1,1142 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: glibtop 1.0.0\n" -"POT-Creation-Date: 1999-02-23 13:48+0100\n" -"PO-Revision-Date: 1998-12-13 04:38+0100\n" -"Last-Translator: Pablo Saratxaga \n" -"Language-Team: Pablo Saratxaga \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" -"Date: 1998-12-13 01:56:01+0100\n" -"From: Pablo Saratxaga \n" -"Xgettext-Options: --default-domain=libgtop --directory=.. --add-comments " -"--keyword=_ --keyword=N_ --files-from=./POTFILES.in\n" -"Files: sysdeps/names/cpu.c sysdeps/names/fsusage.c sysdeps/names/loadavg.c " -"sysdeps/names/mem.c sysdeps/names/mountlist.c sysdeps/names/msg_limits.c " -"sysdeps/names/prockernel.c sysdeps/names/proclist.c sysdeps/names/procmap.c " -"sysdeps/names/procmem.c sysdeps/names/procsegment.c " -"sysdeps/names/procsignal.c sysdeps/names/procstate.c " -"sysdeps/names/proctime.c sysdeps/names/procuid.c sysdeps/names/sem_limits.c " -"sysdeps/names/shm_limits.c sysdeps/names/swap.c sysdeps/names/sysdeps.c " -"sysdeps/names/uptime.c support/argp-fmtstream.h support/argp-parse.c " -"support/argp.h support/easy-vsnprintf.c support/error.c support/error.h " -"support/getopt.c lib/close.c lib/command.c lib/init.c lib/open.c " -"lib/parameter.c lib/read.c lib/read_data.c lib/sysdeps.c lib/write.c " -"include/glibtop/close.h include/glibtop/command.h include/glibtop/cpu.h " -"include/glibtop/error.h include/glibtop/fsusage.h include/glibtop/global.h " -"include/glibtop/gnuserv.h include/glibtop/inodedb.h " -"include/glibtop/loadavg.h include/glibtop/mem.h include/glibtop/mountlist.h " -"include/glibtop/msg_limits.h include/glibtop/open.h " -"include/glibtop/parameter.h include/glibtop/prockernel.h " -"include/glibtop/proclist.h include/glibtop/procmap.h " -"include/glibtop/procmem.h include/glibtop/procsegment.h " -"include/glibtop/procsignal.h include/glibtop/procstate.h " -"include/glibtop/proctime.h include/glibtop/procuid.h include/glibtop/read.h " -"include/glibtop/read_data.h include/glibtop/sem_limits.h " -"include/glibtop/shm_limits.h include/glibtop/signal.h include/glibtop/swap.h " -"include/glibtop/sysdeps.h include/glibtop/sysinfo.h include/glibtop/types.h " -"include/glibtop/union.h include/glibtop/uptime.h include/glibtop/version.h " -"include/glibtop/write.h include/glibtop/xmalloc.h " -"src/inodedb/file_by_inode.c src/inodedb/mkinodedb.c src/daemon/gnuserv.c " -"src/daemon/io.c src/daemon/main.c src/daemon/server.c src/daemon/slave.c " -"src/daemon/version.c sysdeps/common/error.c sysdeps/common/fsusage.c " -"sysdeps/common/gnuslib.c sysdeps/common/inodedb.c sysdeps/common/mountlist.c " -"sysdeps/common/sysdeps_suid.c sysdeps/common/xmalloc.c " -"sysdeps/common/fsusage.h sysdeps/common/mountlist.h sysdeps/linux/close.c " -"sysdeps/linux/cpu.c sysdeps/linux/loadavg.c sysdeps/linux/mem.c " -"sysdeps/linux/msg_limits.c sysdeps/linux/open.c sysdeps/linux/prockernel.c " -"sysdeps/linux/proclist.c sysdeps/linux/procmap.c sysdeps/linux/procmem.c " -"sysdeps/linux/procsegment.c sysdeps/linux/procsignal.c " -"sysdeps/linux/procstate.c sysdeps/linux/proctime.c sysdeps/linux/procuid.c " -"sysdeps/linux/sem_limits.c sysdeps/linux/shm_limits.c " -"sysdeps/linux/siglist.c sysdeps/linux/swap.c sysdeps/linux/sysinfo.c " -"sysdeps/linux/uptime.c sysdeps/linux/glibtop_machine.h " -"sysdeps/linux/glibtop_server.h\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "Tiempo CPU total" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "Tiempo CPU en modo usuario" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "Tiempo CPU en modo usuario (nice)" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "Tiempo CPU en modo sistema" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "Tiempo CPU en tareas detenidas" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "Frecuencia del tick" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "Tiempo CPU total SMP" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "Tiempo CPU SMP en modo usuario" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "Tiempo CPU SMP en modo usuario (nice)" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "Tiempo CPU SMP en modo sistema" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "Tiempo CPU SMP en tareas detenidas" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "Cantidad de ticks desde el inicio del sistema" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "Cantidad de ticks pasados en modo usuario" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "Cantidad de ticks pasados en modo usuario (nice)" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "Cantidad de ticks pasados en modo sistema" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "Cantidad de ticks pasados en tareas detenidas" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "Frecuencia del tick (frecuencia de base es 100)" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "Total de bloques" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "Bloques libres" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "Bloques disponibles" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "Total de nodos de archivos" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "Nodos de archivo libres" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "Bloques libres disponibles para el superusuario" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "Bloques libres disponibles para usuarios comunes" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "Carga media" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "Tareas activas" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "Cantidad de tareas" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "Último PID" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" -"Cantidad de procesos corriendo simultaneamente, media de los últimos 1, 5 y " -"15 minutos" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "Cantidad de tareas actualmente activas" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "Cantidad total de tareas" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "Total de la memoria" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "Memoria en uso" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "Memoria libre" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "Memoria compartida" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "Buffers" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "Caché" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "Usuario" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "Bloqueada" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "Total de memoria física (en KB)" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "Memoria en uso (en KB)" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "Memoria libre (en KB)" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "Memoria compartida (en KB)" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "Tamaño de los buffers (en KB)" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "Tamaño del caché (en KB)" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "Memoria usada por procesos usuario (en KB)" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "Memoria en páginas bloqueadas (en KB)" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "Cantidad de elementos de la lista" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "Tamaño total de la lista" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "Tamaño de un solo elemento de la lista" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "Tamaño del pool de mensajes (en KB)" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "Cantidad de entradas en un mapa de mensajes" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "Tamaño máximo de un mensaje" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "Tamaño máximo por omisión de la cola" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "Colas de tamaño máximo en todo el sistema" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "Tamaño de un mensaje segmento" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "Cantidad de cabeceras de mensajes sistema" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" -"Flags de núcleo del proceso.\n" -"\n" -"En Linux, actualmente todos los flags tienen el bit 'math' activado, porque " -"crt0.s busca el emulador matemático, así que este bit no es incluido en " -"salida.\n" -"\n" -"Esto es probablemente un bug, ya que no todos los procesos son programas C " -"compilados.\n" -"\n" -"El bit 'math' debería ser un 4 decimal, el bit seguido es un 10 decimal." - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" -"La cantidad de faltas menores que hizo el proceso, aquellas que no " -"requisieron cargar una página desde el disco." - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" -"La cantidad de faltas menores que hizo el proceso, aquellas que requisieron " -"cargar una página desde el disco." - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "La cantidad de faltas mayores que hicieron el proceso y sus hijos." - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "La cantidad de faltas mayores que hicieron el proceso y sus hijos." - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" -"El valor actual de esp (puntero de pila 32-bits), tal cual en la página de " -"pila del núcleo para ese proceso." - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "El valor actual de EIP (puntero de instrucción 32-bits)" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" -"Este es el \"canal\" en el cual el proceso está esperando. Esta es la " -"dirección de una llamada sistema, y puede ser buscada en una lista de " -"nombres si necesita un nombre textual. (Si tiene un /etc/psdatabasa " -"actualizado, entonces pruebe \"ps -l\" para ver el campo WCHAN en acción)" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "Este es el nombre textual del campo `nwchan'." - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "Tamaño" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "Virtual" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "Residente" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "Compartido" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "Tamaño conjunto compartido" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "Límite tamaño conjunto compartido" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "Cantidad total de páginas de memoria" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "Cantidad de páginas de memoria virtual" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "Cantidad de páginas de conjuntos compartidos (que no estan en swap)" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "Cantidad de páginas de memoria compartida (mmap)" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" -"Cantidad de páginas del proceso en memoria real, menos 3 par administración. " -"Esto es solo las páginas que se cuentan entre texto, datos, o espacio de " -"pila. Esto no incluye páginas que no han sido cargadas a la demanda, o que " -"se encuentran en el dispositivo de swap." - -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Limite actual en bytes de conjunto compartido (RSS) del proceso " -"(habitualmente 2.147.483.647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "Tamaño conjunto residente de texto" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "Tamaño conjunto residente de bibliotecas compartidas" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "Tamaño conjunto residente de datos" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "Tamaño conjunto residente de pila" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "Tamaño total de páginas recientemente modificadas" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "Dirección de inicio del segmento de código" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "Dirección de fin del segmento de código" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "Dirección de la base del segmento de pila" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "Señal" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "Bloqueado" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "Máscara de señales pendientes" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "Máscara de señales bloqueados" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "Máscara de señales ignorados" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "Máscar de señales recogidos" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "Estado" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "nombre (sin ruta) del archivo ejecutable llamado por exec()" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "Código de una letra para el estado del proceso (S=sleeping)" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "UID del proceso" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "GID del proceso" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "Frecuencia" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "Momento de inicio del proceso, en segundos des \"la Época\"" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "Tiempo real acumulado por el proceso (debe ser utime + stime)" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "Tiempo CPU en modo usuario acumulado por el proceso" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "Tiempo cpu en modo núcleo acumulado por el proceso" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "Tiempo utime cumulado del proceso y sus hijos" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "Tiempo stime cumulado del proceso y sus hijos" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "Tiempo (en jiffies) para la próxima expiración del proceso" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" -"Tiempo (en jiffies) antes de que sea enviada la próxima SIGALRM al proceso " -"debido a que transcurrió un intervalo del timer." - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "Frecuencia del tick" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "Tiempo CPU multi procesador en modo usuario acumulado por el proceso" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "Tiempo CPU multi procesador en modo núcleo acumulado por el proceso" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "Uid" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "EUid" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "Gid" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "EGid" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "Pid" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "PPid" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "Sesión" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "Tty" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "Prioridad" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "ID de usuario" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "ID de usuario efectivo" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "ID de grupo" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "ID de grupo efectivo" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "ID de proceso" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "PID del proceso padre" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "GID del proceso" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "ID de sesión" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "Número completo del dispositivo del terminal que controla el proceso" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "ID de grupo de procesos del terminal" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "Prioridad de la planificación de tareas del núcleo" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "Nivel del 'nice' unix estándar del proceso" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "Cantidad de entradas en el mapa de semáforos" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "Cantidad máxima de tablas" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "Cantidad máxima de semáforos en el sistema" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "Cantidad de estructuras de 'undo' en el sistema" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "Cantidad máxima de semáforos por tabla" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "Cantidad máxima de entradas de 'undo' por proceso" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "Valor máximo de un semáforo" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "Ajustar al valor máximo de salida" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "Tamaño máximo de segmento" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "Tamaño mínimo de segmento" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "Cantidad máxima de segmentos" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "Cantidad máxima de segmentos compartidos por proceso" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "Total máximo de memoria compartida" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "Espacio de swap total" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "Espacio de swap usado" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "Espacio de swap libre" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "Páginas Entradas" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "Páginas Salidas" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" -"Cantidad total de páginas que han sido entradas al swap, desde el inicio del " -"sistema" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" -"Cantidad total de páginas que han sido sacadas del swap, desde el inicio del " -"sistema" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "Particularidades del Servidor" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "Uso del CPU" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "Uso de la Memoria" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "Uso del Swap" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "Uptime del sistema" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "Carga Promedio" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "Límites de la Memoria Compartida" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "Límites de la Cola de Mensajes" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "Límites del conjunto de Semáforos" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "Lista de Procesos activos" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "Información sobre el estado del proceso" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "Información sobre UID y TTY del proceso" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "Información sobre la memoria del proceso" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "Información sobre el Tiempo del proceso" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "Información sobre las señales del proceso" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "Información sobre los datos a nivel de núcleo del proceso" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "Información sobre los segmentos del proceso" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "Argumentos del proceso" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "Mapa de la memoria del proceso" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "Lista de Montaje" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "Uso del Sistema de Archivos" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "Carga de la Red" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "Estadísticas de PPP" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "Argumentos de la línea de comando del proceso" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "Lista de los sistemas de archivos actualmente montados" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "Uptime" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "Tiempo en segundos desde el inicio del sistema" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" -"Tiempo en segundos pasado por el sistema desocupado, desde el inicio del " -"sistema" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "Error sistema desconocido" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "%s: la opción `%s' es ambigua\n" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "%s: la opción `--%s' no admite un argumento\n" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "%s: la opción `%c%s' no admite un argumento\n" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "%s: la opción `%s' requiere un argumento\n" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "%s: opción no reconocida `--%s'\n" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "%s: opción no reconocida `%c%s'\n" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "%s: opción ilegal -- %c\n" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "%s: opción no válida -- %c\n" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: la opción require un argumento -- %c\n" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "%s: la opción `-W %s' es ambigua\n" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "%s: la opción `-W %s' no admite argumentos\n" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "leídos %d bytes" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "leído tamaño de datos" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "leídos %d bytes de datos" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "escritos %d bytes" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "Activar depuración" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "DEPURACIÓN" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "Activa salida detallada" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "No abrir un proceso de fondo" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "Invocado desde inetd" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "INETD" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" -"Error con la opción %s: %s.\n" -"Lance '%s --help' para ver una lista completa de las opciones disponibles.\n" - -#~ msgid "(PROGRAM ERROR) Option should have been recognized!?" -#~ msgstr "(ERROR PROGRAMA) ¿¡La opción debería haber sido reconocida!?" - -#~ msgid "%s: Too many arguments\n" -#~ msgstr "%s: Demasiados argumentos\n" - -#~ msgid "(PROGRAM ERROR) No version known!?" -#~ msgstr "(ERROR PROGRAMA) ¿¡ Sin versión !?" - -#~ msgid "Print program version" -#~ msgstr "Muestra la versión del programa" - -#~ msgid "Hang for SECS seconds (default 3600)" -#~ msgstr "Colgar por SECS segundos (3600 por omisión)" - -#~ msgid "Set the program name" -#~ msgstr "Define el nombre del programa" - -#~ msgid "Give a short usage message" -#~ msgstr "Muestra una síntesis del uso de la memoria" - -#~ msgid "Give this help list" -#~ msgstr "Muestra esta lista de ayuda" diff --git a/po/es_DO.po b/po/es_DO.po deleted file mode 100644 index f77ea9c6..00000000 --- a/po/es_DO.po +++ /dev/null @@ -1,1051 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -# -# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru -# and El Salvador, Number formats are the same as in the US, so no -# translation is required for them. -# But the msgstr MUST be filled; otherwise it will default to es.po -# which uses different, non US, format for numbers. -# On the other hand, strings that are the same here and in es.po can -# be left out. -# -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Limite actual en bytes de conjunto compartido (RSS) del proceso " -"(habitualmente 2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/es_GT.po b/po/es_GT.po deleted file mode 100644 index f77ea9c6..00000000 --- a/po/es_GT.po +++ /dev/null @@ -1,1051 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -# -# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru -# and El Salvador, Number formats are the same as in the US, so no -# translation is required for them. -# But the msgstr MUST be filled; otherwise it will default to es.po -# which uses different, non US, format for numbers. -# On the other hand, strings that are the same here and in es.po can -# be left out. -# -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Limite actual en bytes de conjunto compartido (RSS) del proceso " -"(habitualmente 2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/es_HN.po b/po/es_HN.po deleted file mode 100644 index f77ea9c6..00000000 --- a/po/es_HN.po +++ /dev/null @@ -1,1051 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -# -# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru -# and El Salvador, Number formats are the same as in the US, so no -# translation is required for them. -# But the msgstr MUST be filled; otherwise it will default to es.po -# which uses different, non US, format for numbers. -# On the other hand, strings that are the same here and in es.po can -# be left out. -# -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Limite actual en bytes de conjunto compartido (RSS) del proceso " -"(habitualmente 2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/es_MX.po b/po/es_MX.po deleted file mode 100644 index f77ea9c6..00000000 --- a/po/es_MX.po +++ /dev/null @@ -1,1051 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -# -# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru -# and El Salvador, Number formats are the same as in the US, so no -# translation is required for them. -# But the msgstr MUST be filled; otherwise it will default to es.po -# which uses different, non US, format for numbers. -# On the other hand, strings that are the same here and in es.po can -# be left out. -# -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Limite actual en bytes de conjunto compartido (RSS) del proceso " -"(habitualmente 2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/es_PA.po b/po/es_PA.po deleted file mode 100644 index f77ea9c6..00000000 --- a/po/es_PA.po +++ /dev/null @@ -1,1051 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -# -# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru -# and El Salvador, Number formats are the same as in the US, so no -# translation is required for them. -# But the msgstr MUST be filled; otherwise it will default to es.po -# which uses different, non US, format for numbers. -# On the other hand, strings that are the same here and in es.po can -# be left out. -# -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Limite actual en bytes de conjunto compartido (RSS) del proceso " -"(habitualmente 2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/es_PE.po b/po/es_PE.po deleted file mode 100644 index f77ea9c6..00000000 --- a/po/es_PE.po +++ /dev/null @@ -1,1051 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -# -# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru -# and El Salvador, Number formats are the same as in the US, so no -# translation is required for them. -# But the msgstr MUST be filled; otherwise it will default to es.po -# which uses different, non US, format for numbers. -# On the other hand, strings that are the same here and in es.po can -# be left out. -# -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Limite actual en bytes de conjunto compartido (RSS) del proceso " -"(habitualmente 2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/es_SV.po b/po/es_SV.po deleted file mode 100644 index f77ea9c6..00000000 --- a/po/es_SV.po +++ /dev/null @@ -1,1051 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -# -# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru -# and El Salvador, Number formats are the same as in the US, so no -# translation is required for them. -# But the msgstr MUST be filled; otherwise it will default to es.po -# which uses different, non US, format for numbers. -# On the other hand, strings that are the same here and in es.po can -# be left out. -# -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"Limite actual en bytes de conjunto compartido (RSS) del proceso " -"(habitualmente 2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/fr.po b/po/fr.po deleted file mode 100644 index ce1feaa4..00000000 --- a/po/fr.po +++ /dev/null @@ -1,1042 +0,0 @@ -# libgtop fr.po -# Copyright (C) 1998 Free Software Foundation, Inc. -# Vincent Renardias , 1998. -# -msgid "" -msgstr "" -"Project-Id-Version: libgtop VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Vincent Renardias \n" -"Language-Team: Vincent Renardias \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "Temps CPU Total" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "Temps CPU en mode utilisateur" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "Temps CPU en mode utilisateur (nice)" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "Temps CPU en mode système" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "Temps CPU pour la tache inactive" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "Fréquence des ticks" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "Charge Moyenne" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "" -"Nombre de processus tournant simultannement en moyenne sur 1, 5 et 15 minutes" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "Mémoire Totale" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "Mémoire Utilisée" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "Mémoire Libre" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "Mémoire Partagée" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "Tampons" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "Dans le cache" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "Utilisateur" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "Vérouillé" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "Mémoire physique totalle en Ko" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "Mémoire utilisée en Ko" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "Mémoire libre en Ko" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "Mémoire partagée en Ko" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "Taille des tampons en Ko" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "Taille de la mémoire dans le cache en Ko" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "Mémoire utilisée par les processus utilisateurs en Ko" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "Mémoire dans les pages vérouillées en Ko" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "Taille totalle de la liste" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "Taille en kilo-octets du pool de messages" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "Taille maximum des messages" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "Taille maximum par défaut de la queue" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "Nombre maximum de queues dans le système" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "Taille des segments de messages" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "Nombre d'entetes de messages système" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "Nombre maximum de tables" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "Nombre maximum de sémaphores dans le système" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "Nombre de structures 'undo' dans le système" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "Nombre maximum de sémaphores par table" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "sizeof struct sem_undo" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "Valeur maximum d'un sémaphore" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "Taille maximum des segments" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "Taille minimum des segments" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "Nombre maximum des segments" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "Nombre maximum de segments partagés par processus" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "Taille totalle de la mémoire partagée" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "Taille totalle de la zone d'échange" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "Taille utilisée de la zone d'échange" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "Espace libre de la zone d'échange" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "Utilisation CPU" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "Utilisation Mémoire" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "Utilisation du Swap" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "Uptime du système" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "Charge moyenne" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "Limites de la mémoire partagée" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "Limites de la queue de messages" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "Limites de l'ensemble de sémaphores" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "Liste des taches en cours d'éxécution" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "Information sur l'état du processus" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "Information UID et TTY du processus" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "Information Mémoire du Processus" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "Information Temporelle sur le processus" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "Information sur les signaux du processus" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "Information sur les données noyau du processus" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "Information sur la segmentation du processus" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "Uptime" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "Idletime" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "Temps en secondes depuis le démarrage du système" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "" -"Temps en secondes passé dans le processus inactif depuis le démarrage du " -"système" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/ja.po b/po/ja.po deleted file mode 100644 index 1f157fba..00000000 --- a/po/ja.po +++ /dev/null @@ -1,1063 +0,0 @@ -# Copyright (C) 1998 Free Software Foundation, Inc. -# Eiichiro ITANI , 1998 -# -msgid "" -msgstr "" -"Project-Id-Version: libgtop VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: 1998-12-11 06:53+09:00\n" -"Last-Translator: Eiichiro ITANI \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=euc-japan\n" -"Content-Transfer-Encoding: 8bit\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "ÎßÀÑCPU»þ´Ö" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "¥æ¡¼¥¶¥â¡¼¥É¤Ç¤ÎCPU»þ´Ö" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "¥æ¡¼¥¶¥â¡¼¥É¤Ç¤ÎCPU»þ´Ö (nice)" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "¥·¥¹¥Æ¥à¥â¡¼¥É¤Ç¤ÎCPU»þ´Ö" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "µÙÌ²Ãæ¥¿¥¹¥¯¤Ç¤ÎCPU»þ´Ö" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "¥Á¥Ã¥¯¼þÇÈ¿ô" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "SMPÎßÀÑCPU»þ´Ö" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "¥æ¡¼¥¶¥â¡¼¥É¤Ç¤ÎSMP CPU»þ´Ö" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "¥æ¡¼¥¶¥â¡¼¥É¤Ç¤ÎSMP CPU»þ´Ö(nice)" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "¥·¥¹¥Æ¥à¥â¡¼¥É¤Ç¤ÎSMP CPU»þ´Ö" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "µÙÌ²Ãæ¥¿¥¹¥¯¤Ç¤ÎSMP CPU»þ´Ö" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "¥·¥¹¥Æ¥à¤¬µ¯Æ°¤·¤¿¸å·Ð²á¤·¤¿¥Á¥Ã¥¯¿ô" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "¥æ¡¼¥¶¥â¡¼¥É¤ÇÈñ¤ä¤·¤¿ÎßÀÑ¥Á¥Ã¥¯¿ô" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "¥æ¡¼¥¶¥â¡¼¥É¤ÇÈñ¤ä¤·¤¿ÎßÀÑ¥Á¥Ã¥¯¿ô(nice)" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "¥·¥¹¥Æ¥à¥â¡¼¥É¤ÇÈñ¤ä¤·¤¿ÎßÀÑ¥Á¥Ã¥¯¿ô" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "µÙÌ²Ãæ¤Î¥¿¥¹¥¯¤ËÈñ¤ä¤·¤¿ÎßÀÑ¥Á¥Ã¥¯¿ô" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "¥Á¥Ã¥¯¼þÇÈ¿ô(¥Ç¥Õ¥©¥ë¥È¤Ï 100)" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "ÎßÀÑ¥Ö¥í¥Ã¥¯¿ô" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "¶õ¥Ö¥í¥Ã¥¯" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "»ÈÍѲÄǽ¥Ö¥í¥Ã¥¯" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "ÎßÀÑ¥Õ¥¡¥¤¥ë¥Î¡¼¥É¿ô" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "¶õ¤­¥Õ¥¡¥¤¥ë¥Î¡¼¥É¿ô" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "ÆÃ¸¢¥æ¡¼¥¶¤¬ÍøÍѤǤ­¤ë¤Î¶õ¥Ö¥í¥Ã¥¯" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "ÈóÆÃ¸¢¥æ¡¼¥¶¤¬ÍøÍѤǤ­¤ë¶õ¥Ö¥í¥Ã¥¯" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "Éé²ÙÊ¿¶Ñ" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "¼Â¹ÔÃæ¤Î¥¿¥¹¥¯" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "¥¿¥¹¥¯¿ô" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "ºÇ¿· PID" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "²áµî1¡¢5¡¢15ʬ´Ö¤Ë¼Â¹Ô¤µ¤ì¤¿¥¸¥ç¥Ö¤ÎÊ¿¶Ñ¿ô" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "¸½ºß¼Â¹ÔÃæ¤Î¥¿¥¹¥¯¿ô" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "ÎßÀÑ¥¿¥¹¥¯¿ô" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "Áí¥á¥â¥ê" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "»ÈÍÑÃæ¥á¥â¥ê" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "̤»ÈÍÑ¥á¥â¥ê" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "¶¦Í­¥á¥â¥ê" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "¥Ð¥Ã¥Õ¥¡" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "¥­¥ã¥Ã¥·¥åÃæ" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "¥æ¡¼¥¶" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "¥í¥Ã¥¯Ãæ" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "Á´ÊªÍý¥á¥â¥êÎÌ(kB)" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "»ÈÍÑÃæ¥á¥â¥êÎÌ(kB)" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "̤»ÈÍÑ¥á¥â¥êÎÌ(kB)" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "¶¦Í­¥á¥â¥êÎÌ(kB)" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "¥Ð¥Ã¥Õ¥¡¥µ¥¤¥º(kB)" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "¥­¥ã¥Ã¥·¥å¥á¥â¥êÎÌ(kB)" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "¥æ¡¼¥¶¥×¥í¥»¥¹¤¬»ÈÍѤ·¤¿¥á¥â¥êÎÌ(kB)" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "¥í¥Ã¥¯¤µ¤ì¤¿¥Ú¡¼¥¸¤Î¥á¥â¥êÎÌ(kb)" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "¥ê¥¹¥È¤ÎÍ×ÁÇ¿ô" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "¥ê¥¹¥ÈÁ´ÂΤÎÂ礭¤µ" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "¥ê¥¹¥ÈÍ×Áǰì¤Ä¤ÎÂ礭¤µ" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "¥á¥Ã¥»¡¼¥¸¥Ö¡¼¥ë¤ÎÂ礭¤µ(kB)" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "¥á¥Ã¥»¡¼¥¸¥Þ¥Ã¥×Ãæ¤Î¥¨¥ó¥È¥ê¿ô" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "¥á¥Ã¥»¡¼¥¸¤ÎºÇÂ祵¥¤¥º" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "¥Ç¥Õ¥©¥ë¥È¤Î¥­¥å¡¼¤ÎºÇÂ祵¥¤¥º" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "¥·¥¹¥Æ¥àÁ´ÂΤǤκÇÂ祭¥å¡¼¿ô" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "¥á¥Ã¥»¡¼¥¸¥»¥°¥á¥ó¥È¥µ¥¤¥º" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "¥·¥¹¥Æ¥à¥á¥Ã¥»¡¼¥¸¥Ø¥Ã¥À¤Î¿ô" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" -"¥×¥í¥»¥¹¤Î¥«¡¼¥Í¥ë¥Õ¥é¥°\n" -"\n" -"Linux¤Ç¤Ï¡¢crt0.s ¤¬ math emulation ¤Î¤¿¤á¤Ë»È¤¦ÌÜŪ¤Î¤¿¤á¡¢ Á´¤Æ¤Î¥Õ¥é¥°¤Î\n" -"math ¥Ó¥Ã¥È¤¬Î©¤Ã¤Æ¤¤¤Þ¤¹¡£ ¤Ç¤¹¤«¤é¤³¤ì¤Ï½ÐÎÏ¤Ë´Þ¤á¤Æ¤¤¤Þ¤»¤ó¡£\n" -"\n" -"Á´¤Æ¤Î¥×¥í¥»¥¹¤¬ C " -"¤Ç½ñ¤«¤ì¤Æ¤¤¤ë¤Î¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢¥Ð¥°¤È¸À¤¨¤ë¤«¤âÃΤì¤Þ¤»¤ó¡£\n" -"\n" -"math ¥Ó¥Ã¥È¤Ï10¿Ê¤Î4¤Î¤Ï¤º¤Ç¡¢ traced ¥Ó¥Ã¥È¤Ï10¿Ê¤Î10¤Ç¤¹¡£" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" -"¥«¡¼¥Í¥ë¤ÇȯÀ¸¤·¤¿¡¢ ¥Ç¥£¥¹¥¯¤«¤é¤Î¥á¥â¥ê¥Ú¡¼¥¸¤ÎÆÉ¤ß¹þ¤ß¤òɬÍפȤ·¤Ê¤¤ " -"¥Þ¥¤¥Ê¡¼¥Õ¥©¡¼¥ë¥È¤ÎȯÀ¸¿ô¤Ç¤¹¡£" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" -"¥«¡¼¥Í¥ë¤ÇȯÀ¸¤·¤¿¡¢¥Ç¥£¥¹¥¯¤«¤é¤Î¥á¥â¥ê¥Ú¡¼¥¸¤ÎÆÉ¤ß¹þ¤ß¤¬É¬Í×¤Ê " -"¥á¥¸¥ã¡¼¥Õ¥©¡¼¥ë¥È¤ÎȯÀ¸¿ô¤Ç¤¹¡£" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "³ºÅö¥×¥í¥»¥¹¤È¤½¤Î»Ò¥×¥í¥»¥¹¤¬µ¯¤³¤·¤¿¥Þ¥¤¥Ê¡¼¥Õ¥©¡¼¥ë¥È¤ÎȯÀ¸¿ô¤Ç¤¹¡£" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "³ºÅö¥×¥í¥»¥¹¤È¤½¤Î»Ò¥×¥í¥»¥¹¤¬µ¯¤³¤·¤¿¥á¥¸¥ã¡¼¥Õ¥©¡¼¥ë¥È¤ÎȯÀ¸¿ô¤Ç¤¹¡£" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" -"¥«¡¼¥Í¥ë¤Î¥¹¥¿¥Ã¥¯¥Ú¡¼¥¸¤Ëµ­Ï¿¤µ¤ì¤Æ¤¤¤ë¡¢ ³ºÅö¥×¥í¥»¥¹¤Î ESP " -"(32¥Ó¥Ã¥È¥¹¥¿¥Ã¥¯¥Ý¥¤¥ó¥¿) ¤Î¸½ºß¤ÎÃͤǤ¹¡£" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "¸½ºß¤Î EIP (32¥Ó¥Ã¥È¥¤¥ó¥¹¥È¥é¥¯¥·¥ç¥ó¥Ý¥¤¥ó¥¿)¡£" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" -"¤³¤ì¤ÏÂÔµ¡Ãæ¥×¥í¥»¥¹¤Î\"¥Á¥ã¥Í¥ë\"¤Ç¤¹¡£ ¤³¤ì¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤Î¥¢¥É¥ì¥¹¤Ç¡¢ " -"ʸ»úɽµ­¤Î̾Á°¤¬É¬Íפʻþ¤Ë¤Ï namelist ¤«¤é¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ " -"(¹¹¿·ºÑ¤ß¤Î /etc/psupdate ¤¬¤¢¤ë¾ì¹ç¤Ï¡¢ ps -l ¤Î WCHAN ɽ¼¨¤Ç³Îǧ¤Ç¤­¤Þ¤¹)" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "`nwchan' ¥Õ¥£¡¼¥ë¥É¤Îʸ»úɽµ­¤Î̾Á°¤Ç¤¹¡£" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "¥µ¥¤¥º" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "²¾ÁÛ" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "¾ïÃó" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "¶¦Í­" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "¾ïÃ󥻥åȥµ¥¤¥º" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "¾ïÃ󥻥åȥµ¥¤¥º¥ê¥ß¥Ã¥È" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "¥á¥â¥ê¤Î¥Ú¡¼¥¸¤ÎÁí¿ô" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "²¾ÁÛ¥á¥â¥ê¤Î¥Ú¡¼¥¸¿ô" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "¾ïÃ󥻥åÈ(¥¹¥ï¥Ã¥×¤µ¤ì¤Ê¤¤)¥Ú¡¼¥¸¿ô" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "¶¦Í­(mmap¤µ¤ì¤¿)¥á¥â¥ê¤Î¥Ú¡¼¥¸¿ô" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" -"¼Â¥á¥â¥êÃæ¤Ë¸ºß¤¹¤ë³ºÅö¥×¥í¥»¥¹¤Î¥Ú¡¼¥¸¿ô¤«¤é¡¢´ÉÍýÍѤÎ3¤Ä¤ò°ú¤¤¤¿¤â¤Î¡£ " -"ñ¤Ë ¥Æ¥­¥¹¥È¡¢¥Ç¡¼¥¿¤È¥¹¥¿¥Ã¥¯¶õ´Ö¤Ë ¿ô¤¨¤é¤ì¤Æ¤¤¤ë¥Ú¡¼¥¸¤Ç¤¹¡£ " -"¤Þ¤ÀÆÉ¤ß¹þ¤àɬÍפ¬À¸¤¸¤Æ¤¤¤Ê¤¤Éôʬ¤ä¡¢¥¹¥ï¥Ã¥×¥¢¥¦¥È¤µ¤ì¤Æ¤¤¤ë¥Ú¡¼¥¸¤Ï´Þ¤ß¤Þ¤" -"»¤ó¡£" - -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" -"¸½»þÅÀ¤Ç¤Î³ºÅö¥×¥í¥»¥¹¤Î RSS ¥ê¥ß¥Ã¥È¤Î¥Ð¥¤¥Èɽµ­(°ìÈÌ¤Ë¤Ï 2,147,483,647)¡£" - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "¥Æ¥­¥¹¥È¾ïÃ󥻥åȥµ¥¤¥º" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "¶¦Í­¥é¥¤¥Ö¥é¥ê¾ïÃ󥻥åȥµ¥¤¥º" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "¥Ç¡¼¥¿¾ïÃ󥻥åȥµ¥¤¥º" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "¥¹¥¿¥Ã¥¯¾ïÃ󥻥åȥµ¥¤¥º" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "¥À¡¼¥Æ¥£¥Ú¡¼¥¸¤ÎÁí¿ô" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "¥³¡¼¥É¥»¥°¥á¥ó¥È»ÏÅÀ¤Î¥¢¥É¥ì¥¹" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "¥³¡¼¥É¥»¥°¥á¥ó¥È¤Î½ªÅÀ¥¢¥É¥ì¥¹" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "¥¹¥¿¥Ã¥¯¥»¥°¥á¥ó¥È¤ÎÄì¤Î¥¢¥É¥ì¥¹" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "¥·¥°¥Ê¥ë" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "¥Ö¥í¥Ã¥¯" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "¥Ú¥ó¥Ç¥£¥ó¥°¤µ¤ì¤¿¥·¥°¥Ê¥ë¤Î¥Þ¥¹¥¯" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "¥Ö¥í¥Ã¥¯¤¹¤ë¥·¥°¥Ê¥ë¤Î¥Þ¥¹¥¯" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "̵»ë¤¹¤ë¥·¥°¥Ê¥ë¤Î¥Þ¥¹¥¯" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "Ê᪤¹¤ë¥·¥°¥Ê¥ë¤Î¥Þ¥¹¥¯" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "exec¥³¡¼¥ë¤Ç¤Î¼Â¹Ô¥Õ¥¡¥¤¥ë¤Î¥Ù¡¼¥¹Ì¾" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "¥×¥í¥»¥¹¾õÂÖ¤Î1ʸ»ú¤Ç¤Îɽ¸½ (S=µÙÌ²Ãæ)" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "¥×¥í¥»¥¹UID" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "¥×¥í¥»¥¹GID" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "µ¯Æ°»þ¹ï" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "¥×¥í¥»¥¹¤Îµ¯Æ°»þ´Ö¤òepoch¤«¤é¤ÎÉÿô¤Çɽµ­¤·¤¿¤â¤Î" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "¥×¥í¥»¥¹¤¬»ÈÍѤ·¤¿¼Â»þ´Ö(utime¤Èstime¤ÎϤΤϤº)" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "¥×¥í¥»¥¹¤¬¥æ¡¼¥¶¥â¡¼¥É¤Ç»ÈÍѤ·¤¿CPU»þ´Ö" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "¥×¥í¥»¥¹¤¬¥«¡¼¥Í¥ë¥â¡¼¥É¤Ç»ÈÍѤ·¤¿CPU»þ´Ö" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "¥×¥í¥»¥¹¤È¤½¤Î»Ò¤¬»ÈÍѤ·¤¿ utime ¤ÎÁíÎÌ" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "¥×¥í¥»¥¹¤È¤½¤Î»Ò¤¬»ÈÍѤ·¤¿ stime ¤ÎÁíÎÌ" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "¥×¥í¥»¥¹¤¬¼¡¤Ë¥¿¥¤¥à¥¢¥¦¥È¤¹¤ë»þ´Ö(in jiffies)" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" -"¥¤¥ó¥¿¡¼¥Ð¥ë¥¿¥¤¥Þ¡¼¤Ë¤è¤Ã¤Æ¼¡¤Ë¥×¥í¥»¥¹¤Ë SIGALRM ¤¬Á÷¤é¤ì¤ë¤Þ¤Ç¤Î»þ´Ö(in " -"jiffies)" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "¥Á¥Ã¥¯¼þÇÈ¿ô" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "¥×¥í¥»¥¹¤¬¥æ¡¼¥¶¥â¡¼¥É¤Ç»ÈÍѤ·¤¿ SMP CPU»þ´Ö" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "¥×¥í¥»¥¹¤¬¥«¡¼¥Í¥ë¥â¡¼¥É¤Ç»ÈÍѤ·¤¿ SMP CPU»þ´Ö" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "¥æ¡¼¥¶ID" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "¼Â¸ú¥æ¡¼¥¶ID" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "¥°¥ë¡¼¥×ID" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "¼Â¸ú¥°¥ë¡¼¥×ID" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "¥×¥í¥»¥¹ID" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "¿Æ¥×¥í¥»¥¹¤ÎPID" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "¥×¥í¥»¥¹¥°¥ë¡¼¥×ID" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "¥»¥Ã¥·¥ç¥óID" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "À©¸æÃ¼Ëö¤Î´°Á´¤Ê¥Ç¥Ð¥¤¥¹Ì¾" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "üËö¥×¥í¥»¥¹¤Î¥°¥ë¡¼¥×ID" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "¥«¡¼¥Í¥ë¥¹¥±¥¸¥å¡¼¥ê¥ó¥°Í¥ÀèÅÙ" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "¥×¥í¥»¥¹¤Îɸ½à unix nice ¥ì¥Ù¥ë" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "¥»¥Þ¥Õ¥©¥Þ¥Ã¥×Ãæ¤Î¥¨¥ó¥È¥ê¿ô" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "ÇÛÎó¤ÎºÇÂç¿ô" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "¥·¥¹¥Æ¥àÁ´ÂΤǤκÇÂ祻¥Þ¥Õ¥©¿ô" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "¥·¥¹¥Æ¥àÁ´ÂΤǤκÇÂç undo ¹½Â¤Âοô" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "ÇÛÎóËè¤ÎºÇÂ祻¥Þ¥Õ¥©¿ô" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "semop¥³¡¼¥ë¤ÎºÇÂçÁàºî¿ô" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "¥×¥í¥»¥¹Ëè¤Îundo¥¨¥ó¥È¥êºÇÂç¿ô" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "sem_undo¹½Â¤ÂΤΥµ¥¤¥º" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "¥»¥Þ¥Õ¥©¤ÎºÇÂçÃÍ" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "ºÇÂ祻¥°¥á¥ó¥È¥µ¥¤¥º" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "ºÇ¾®¥»¥°¥á¥ó¥È¥µ¥¤¥º" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "¥»¥°¥á¥ó¥È¤ÎºÇÂç¿ô" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "¥×¥í¥»¥¹Ëè¤ÎºÇÂ綦ͭ¥»¥°¥á¥ó¥È" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "¶¦Í­¥á¥â¥ê¤ÎºÇÂçÎÌ" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "Á´¥¹¥ï¥Ã¥×¶õ´Ö" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "»ÈÍÑÃæ¤Î¥¹¥ï¥Ã¥×¶õ´Ö" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "̤»ÈÍѤΥ¹¥ï¥Ã¥×¶õ´Ö" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "¥Ú¡¼¥¸¥¤¥ó" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "¥Ú¡¼¥¸¥¢¥¦¥È" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "¥·¥¹¥Æ¥àµ¯Æ°¸å¤ËÆÉ¤ß¹þ¤Þ¤ì¤¿¥¹¥ï¥Ã¥×¥Ú¡¼¥¸¤ÎÎßÀÑÎÌ" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "¥·¥¹¥Æ¥àµ¯Æ°¸å¤Ë½ñ¤­½Ð¤µ¤ì¤¿¥¹¥ï¥Ã¥×¥Ú¡¼¥¸¤ÎÎßÀÑÎÌ" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "¥µ¡¼¥Ð¡¼¤ÎÆÃÀ­" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "CPU»ÈÍÑÎÌ" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "¥á¥â¥ê»ÈÍÑÎÌ" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "¥¹¥ï¥Ã¥×»ÈÍÑÎÌ" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "¥·¥¹¥Æ¥à²ÔƯ»þ´Ö" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "Éé²ÙÊ¿¶Ñ" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "¶¦Í­¥á¥â¥ê¥ê¥ß¥Ã¥È" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¥ê¥ß¥Ã¥È" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "¥»¥Þ¥Õ¥©¥»¥Ã¥È¥ê¥ß¥Ã¥È" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "Áö¹ÔÃæ¥×¥í¥»¥¹°ìÍ÷" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "¥×¥í¥»¥¹¾õÂ֤ξðÊó" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "¥×¥í¥»¥¹¤ÎUID¤ÈTTY¾ðÊó" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "¥×¥í¥»¥¹¤Î¥á¥â¥ê¾ðÊó" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "¥×¥í¥»¥¹¤Î»þ´Ö¾ðÊó" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¾ðÊó" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "¥×¥í¥»¥¹¤Î¥«¡¼¥Í¥ë¥Ç¡¼¥¿¾ðÊó" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "¥×¥í¥»¥¹¤Î¥»¥°¥á¥ó¥È¾ðÊó" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "¥×¥í¥»¥¹°ú¿ô" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "¥×¥í¥»¥¹¤Î¥á¥â¥ê¥Þ¥Ã¥×" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "¥Þ¥¦¥ó¥È°ìÍ÷" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à»ÈÍѾõ¶·" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "¥Í¥Ã¥È¥ï¡¼¥¯Éé²Ù" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "PPPÅý·×" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "¥×¥í¥»¥¹¤Î¥³¥Þ¥ó¥É¹Ô°ú¿ô" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "¸½ºß¥Þ¥¦¥ó¥ÈÃæ¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à°ìÍ÷" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "²ÔƯ»þ´Ö" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "µÙ̲»þ´Ö" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "¥·¥¹¥Æ¥àµ¯Æ°¸å¤Î»þ´Ö(ÉÃ)" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "¥·¥¹¥Æ¥àµ¯Æ°°Ê¸åµÙÌ²Ãæ¤Î¥¿¥¹¥¯¤ËÈñ¤ä¤·¤¿»þ´Ö(ÉÃ)" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "ÉÔÌÀ¤Ê¥·¥¹¥Æ¥à¥¨¥é¡¼" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/ko.po b/po/ko.po deleted file mode 100644 index 96785c73..00000000 --- a/po/ko.po +++ /dev/null @@ -1,1039 +0,0 @@ -# libgtop ko.po -# Copyright (C) 1998 Free Software Foundation, Inc. -# Sung-Hyun Nam , 1998 -# -msgid "" -msgstr "" -"Project-Id-Version: libgtop VERSION\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: 1999-02-04 14:31:38+0900\n" -"Last-Translator: Sung-Hyun Nam \n" -"Language-Team: Korean \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=euc-kr\n" -"Content-Transfer-Encoding: 8bit\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "ÃÑ CPU ½Ã°£" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "»ç¿ëÀÚ ¸ðµå¿¡¼­ÀÇ CPU ½Ã°£" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "»ç¿ëÀÚ ¸ðµå¿¡¼­ÀÇ CPU ½Ã°£ (nice)" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "½Ã½ºÅÛ ¸ðµå¿¡¼­ÀÇ CPU ½Ã°£" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "À¯ÈÞ Å½ºÅ©¿¡¼­ÀÇ CPU Time" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "ƽ Á֯ļö" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "SMP ÃÑ CPU ½Ã°£" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "SMP »ç¿ëÀÚ ¸ðµå CPU ½Ã°£" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "SMP »ç¿ëÀÚ ¸ðµå CPU ½Ã°£ (nice)" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "SMP ½Ã½ºÅÛ ¸ðµå CPU ½Ã°£" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "SMP À¯ÈÞ Å½ºÅ© CPU ½Ã°£" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "½Ã½ºÅÛ ºÎÆÃÈÄÀÇ Å¬·° ƽ °¹¼ö" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "»ç¿ëÀÚ ¸ðµå¿¡¼­ »ç¿ëµÈ ½Ã½ºÅÛ Å¬·° ƽ °¹¼ö" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "»ç¿ëÀÚ ¸ðµå¿¡¼­ »ç¿ëµÈ ½Ã½ºÅÛ Å¬·° ƽ °¹¼ö (nice)" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "½Ã½ºÅÛ ¸ðµå¿¡¼­ »ç¿ëµÈ ½Ã½ºÅÛ Å¬·° ƽ °¹¼ö" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "À¯ÈÞ Å½ºÅ©¿¡¼­ »ç¿ëµÈ ½Ã½ºÅÛ Å¬·° ƽ °¹¼ö" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "ƽ Á֯ļö (±âº»°ªÀº 100)" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "ÃÑ ºí·°" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "ºó ºí·°" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "»ç¿ë°¡´ÉÇÑ ºí·°" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "ÃÑ ÆÄÀÏ ³ëµå" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "À¯ÈÞ ÆÄÀÏ ³ëµå" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "¼öÆÛÀ¯Àú°¡ »ç¿ë°¡´ÉÇÑ ºó ºí·°" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "ÀϹÝÀ¯Àú°¡ »ç¿ë°¡´ÉÇÑ ºó ºí·°" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "·Îµå Æò±Õ" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "½ÇÇàÁßÀΠŽºÅ©" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "ŽºÅ© °¹¼ö" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "¸¶Áö¸· PID" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "1, 5 ±×¸®°í 15ºÐ µ¿¾ÈÀ» Æò±ÕÇØ¼­ µ¿½Ã¿¡ ¼öÇàÁßÀÎ ÀÏÀÇ °¹¼ö" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "ÇöÀç ½ÇÇàÁßÀΠŽºÅ© °¹¼ö" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "ÃÑ Å½ºÅ© °¹¼ö" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "ÃÑ ¸Þ¸ð¸®" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "»ç¿ë ¸Þ¸ð¸®" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "¿©À¯ ¸Þ¸ð¸®" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "°øÀ¯ ¸Þ¸ð¸®" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "¹öÆÛµé" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "ij½¬µÊ" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "»ç¿ëÀÚ" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "¸·Èû" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "ÃÑ ¹°¸® ¸Þ¸ð¸® (kB)" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "»ç¿ëµÈ ¸Þ¸ð¸® Å©±â (kB)" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "¿©À¯ ¸Þ¸ð¸® Å©±â (kB)" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "°øÀ¯ ¸Þ¸ð¸® Å©±â (kB)" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "¹öÆÛ Å©±â (kB)" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "ij½¬ ¸Þ¸ð¸® Å©±â (kB)" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "»ç¿ëÀÚ ÇÁ·Î¼¼½º°¡ Â÷ÁöÇÑ ¸Þ¸ð¸® (kB)" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "¸·Èù ÆäÀÌÁö ¸Þ¸ð¸® (kB)" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "¸ñ·Ï ¿ä¼ÒÀÇ °¹¼ö" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "¸ñ·ÏÀÇ ÃÑ Å©±â" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "¸ñ·Ï ¿ä¼Ò ÇϳªÀÇ Å©±â" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "¸Þ½ÃÁö Ç®ÀÇ Å©±â (Kbytes)" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "¸Þ½ÃÁö ¸ÊÀÇ ¿£Æ®¸® °¹¼ö" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "¸Þ½ÃÁöÀÇ ÃÖ´ë Å©±â" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "Å¥ÀÇ ±âº» ÃÖ´ë Å©±â" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "½Ã½ºÅÛ Àüü ÃÖ´ë Å¥" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "¸Þ½ÃÁö ¼¼±×¸ÕÆ® Å©±â" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "½Ã½ºÅÛ ¸Þ½ÃÁö Çì´õÀÇ °¹¼ö" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "" - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "" - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "" - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" - -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "ÃÖ´ë ¼¼±×¸ÕÆ® Å©±â" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "ÃÖ¼Ò ¼¼±×¸ÕÆ® Å©±â" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "ÃÖ´ë ¼¼±×¸ÕÆ® °¹¼ö" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "ÇÁ·Î¼¼½º´ç ÃÖ´ë °øÀ¯ ¼¼±×¸ÕÆ®" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "ÃÖ´ë ÃÑ °øÀ¯ ¸Þ¸ð¸®" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "ÃÑ ½º¿Ò °ø°£" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "»ç¿ëµÈ ½º¿Ò °ø°£" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "¿©À¯ ½º¿Ò °ø°£" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "½Ã½ºÅÛ ½Ãµ¿ÈÄ µµÀÔÇÑ ÃÑ ½º¿Ò ÆäÀÌÁö ¼ö" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "½Ã½ºÅÛ ½Ãµ¿ÈÄ ³»º¸³½ ÃÑ ½º¿Ò ÆäÀÌÁö ¼ö" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "CPU »ç¿ë·®" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "¸Þ¸ð¸® »ç¿ë·®" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "½º¿Ò »ç¿ë·®" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "°øÀ¯ ¸Þ¸ð¸® ÇѰè" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "¸Þ½ÃÁö Å¥ ÇѰè" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "¼¼¸¶Æ÷¾î ¼¼Æ® ÇѰè" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "µ¹°í ÀÖ´Â ÇÁ·Î¼¼½º ¸ñ·Ï" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "ÇÁ·Î¼¼½º »óÅ Á¤º¸" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "ÇÁ·Î¼¼½º UID¿Í TTY Á¤º¸" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "ÇÁ·Î¼¼½º ¸Þ¸ð¸® Á¤º¸" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "ÇÁ·Î¼¼½º ½Ã°£ Á¤º¸" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "ÇÁ·Î¼¼½º ½Ã±×³Î Á¤º¸" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "ÇÁ·Î¼¼½º Ä¿³Î ÀÚ·á Á¤º¸" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "ÇÁ·Î¼¼½º ¼¼±×¸ÕÆ® Á¤º¸" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "ÇÁ·Î¼¼½º ¸Þ¸ð¸® ¸Ê" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "¸¶¿îÆ® ¸ñ·Ï" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "ÆÄÀÏ ½Ã½ºÅÛ »ç¿ë" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "ÇöÀç ¸¶¿îÆ®µÈ ÆÄÀϽýºÅÛÀÇ ¸ñ·Ï" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "À¯È޽ð£" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "½Ã½ºÅÛ ½Ãµ¿ÈÄÀÇ ÃÊ ´ÜÀ§ÀÇ ½Ã°£" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "½Ã½ºÅÛ ½Ãµ¿ÈÄ¿¡ À¯ÈÞ Å½ºÅ©°¡ ¼ÒºñÇÑ ÃÊ ´ÜÀ§ÀÇ ½Ã°£" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "¾Ë·ÁÁöÁö ¾ÊÀº ½Ã½ºÅÛ ¿¡·¯" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "%s: `%s' ¿É¼ÇÀÌ ¸ðÈ£ÇÕ´Ï´Ù\n" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "%s: `--%s' ¿É¼ÇÀº ÀÎÀÚ°¡ ÇÊ¿ä¾ø½À´Ï´Ù\n" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "%s: `%c%s' ¿É¼ÇÀº ÀÎÀÚ°¡ ÇÊ¿ä¾ø½À´Ï´Ù\n" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "%s: `%s' ¿É¼ÇÀº ÀÎÀÚ°¡ ÇÊ¿äÇÕ´Ï´Ù\n" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "%s: ¾Ë¼ö ¾ø´Â ¿É¼Ç `--%s'\n" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "%s: ¾Ë¼ö ¾ø´Â ¿É¼Ç `%c%s'\n" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "%s: ºñÁ¤»óÀûÀÎ ¿É¼Ç -- %c\n" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "%s: Áö¿øÇÏÁö ¾Ê´Â ¿É¼Ç -- %c\n" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: ¿É¼ÇÀº ÀÎÀÚ°¡ ÇÊ¿äÇÕ´Ï´Ù -- %c\n" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "%s: `-W %s' ¿É¼ÇÀÌ ¸ðÈ£ÇÕ´Ï´Ù\n" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "%s: `-W %s' ¿É¼ÇÀº ÀÎÀÚ°¡ ÇÊ¿ä¾ø½À´Ï´Ù\n" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" diff --git a/po/no.po b/po/no.po deleted file mode 100644 index 8c02da75..00000000 --- a/po/no.po +++ /dev/null @@ -1,1066 +0,0 @@ -# Norwegian translation for Libgtop (bokmål dialect) -# Copyright (C) 1998 Free Software Foundation, Inc. -# Kjartan Maraas , 1998,1999. -# -msgid "" -msgstr "" -"Project-Id-Version: libgtop 0.99.3\n" -"POT-Creation-Date: 1999-02-27 22:24+0100\n" -"PO-Revision-Date: 1999-01-27 23:22+0100\n" -"Last-Translator: Kjartan Maraas \n" -"Language-Team: Norwegian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8-bit\n" - -#: sysdeps/names/cpu.c:43 -msgid "Total CPU Time" -msgstr "Total prosessortid" - -#: sysdeps/names/cpu.c:44 -msgid "CPU Time in User Mode" -msgstr "Prosessortid i brukermodus" - -#: sysdeps/names/cpu.c:45 -msgid "CPU Time in User Mode (nice)" -msgstr "Prosessortid i brukermodus (nice)" - -#: sysdeps/names/cpu.c:46 -msgid "CPU Time in System Mode" -msgstr "Prosessortid i systemmodus" - -#: sysdeps/names/cpu.c:47 -msgid "CPU Time in the Idle Task" -msgstr "Prosessortid i Idle Task" - -#: sysdeps/names/cpu.c:48 -msgid "Tick Frequency" -msgstr "Tikkfrekvens" - -#: sysdeps/names/cpu.c:49 -msgid "SMP Total CPU Time" -msgstr "SMP Total prosessortid" - -#: sysdeps/names/cpu.c:50 -msgid "SMP CPU Time in User Mode" -msgstr "SMP Prosessortid i brukermodus" - -#: sysdeps/names/cpu.c:51 -msgid "SMP CPU Time in User Mode (nice)" -msgstr "SMP Prosessortid i brukermodus (nice)" - -#: sysdeps/names/cpu.c:52 -msgid "SMP CPU Time in System Mode" -msgstr "SMP Prosessortid i systemmodus" - -#: sysdeps/names/cpu.c:53 -msgid "SMP CPU Time in the Idle Task" -msgstr "SMP Prosessortid i Idle Task" - -#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64 -msgid "Number of clock ticks since system boot" -msgstr "Antall klokketikk siden systemoppstart" - -#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65 -msgid "Number of clock ticks the system spent in user mode" -msgstr "Antall klokketikk systemet har tilbrakt i brukermodus" - -#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66 -msgid "Number of clock ticks the system spent in user mode (nice)" -msgstr "Antall klokketikk systemet har tilbrakt i brukermodus (nice)" - -#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67 -msgid "Number of clock ticks the system spent in system mode" -msgstr "Antall klokketikk systemet har tilbrakt i systemmodus" - -#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68 -msgid "Number of clock ticks the system spent in the idle task" -msgstr "Antall klokketikk systemet har tilbrakt i idle task" - -#: sysdeps/names/cpu.c:63 -msgid "Tick frequency (default is 100)" -msgstr "Tikkfrekvens (forvalgt er 100)" - -#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48 -msgid "Total blocks" -msgstr "Totalt antall blokker" - -#: sysdeps/names/fsusage.c:40 -msgid "Free blocks" -msgstr "Ledige blokker" - -#: sysdeps/names/fsusage.c:41 -msgid "Available blocks" -msgstr "Tilgjengelige blokker" - -#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51 -msgid "Total file nodes" -msgstr "Antall filnoder" - -#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52 -msgid "Free file nodes" -msgstr "Ledige filnoder" - -#: sysdeps/names/fsusage.c:49 -msgid "Free blocks available to the superuser" -msgstr "Ledige blokker tilgjengelig for superbruker" - -#: sysdeps/names/fsusage.c:50 -msgid "Free blocks available to non-superusers" -msgstr "Ledige blokker tilgjengelige til ikke-superbrukere" - -#: sysdeps/names/loadavg.c:39 -msgid "Load Average" -msgstr "Gjennomsnittsbelastning" - -#: sysdeps/names/loadavg.c:40 -msgid "Running Tasks" -msgstr "Kjørende oppgaver" - -#: sysdeps/names/loadavg.c:41 -msgid "Number of Tasks" -msgstr "Antall oppgaver" - -#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50 -msgid "Last PID" -msgstr "Siste PID" - -#: sysdeps/names/loadavg.c:47 -msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes" -msgstr "Antall samtidig kjørende jobber med snitt over 1, 5 og 15 minutter" - -#: sysdeps/names/loadavg.c:48 -msgid "Number of tasks currently running" -msgstr "Antall oppgaver som kjører nå" - -#: sysdeps/names/loadavg.c:49 -msgid "Total number of tasks" -msgstr "Totalt antall oppgaver" - -#: sysdeps/names/mem.c:41 -msgid "Total Memory" -msgstr "Totalt minne" - -#: sysdeps/names/mem.c:42 -msgid "Used Memory" -msgstr "Brukt minne" - -#: sysdeps/names/mem.c:43 -msgid "Free Memory" -msgstr "Ledig minne" - -#: sysdeps/names/mem.c:44 -msgid "Shared Memory" -msgstr "Delt minne" - -#: sysdeps/names/mem.c:45 -msgid "Buffers" -msgstr "Buffere" - -#: sysdeps/names/mem.c:46 -msgid "Cached" -msgstr "Mellomlagret" - -#: sysdeps/names/mem.c:47 -msgid "User" -msgstr "Bruker" - -#: sysdeps/names/mem.c:48 -msgid "Locked" -msgstr "Låst" - -#: sysdeps/names/mem.c:53 -msgid "Total physical memory in kB" -msgstr "Totalt fysisk minne i kB" - -#: sysdeps/names/mem.c:54 -msgid "Used memory size in kB" -msgstr "Brukt minne i kB" - -#: sysdeps/names/mem.c:55 -msgid "Free memory size in kB" -msgstr "Ledig minne i kB" - -#: sysdeps/names/mem.c:56 -msgid "Shared memory size in kB" -msgstr "Delt minne i kB" - -#: sysdeps/names/mem.c:57 -msgid "Size of buffers kB" -msgstr "Størrelse på buffere i kB" - -#: sysdeps/names/mem.c:58 -msgid "Size of cached memory in kB" -msgstr "Størrelse på mellomlagret minne i kB" - -#: sysdeps/names/mem.c:59 -msgid "Memory used from user processes in kB" -msgstr "Minne brukt av brukerprosesser i kB" - -#: sysdeps/names/mem.c:60 -msgid "Memory in locked pages in kB" -msgstr "Minne i låste sider i kB" - -#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45 -#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45 -#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45 -msgid "Number of list elements" -msgstr "Antall elementer i listen" - -#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46 -#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46 -#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46 -msgid "Total size of list" -msgstr "Total størrelse på listen" - -#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47 -#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47 -#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47 -msgid "Size of a single list element" -msgstr "Størrelsen på et enkelt element i listen" - -#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51 -msgid "Size in kilobytes of message pool" -msgstr "Størrelse i kilobyte på meldingslageret" - -#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52 -msgid "Number of entries in message map" -msgstr "Antall oppføringer i meldingskartet" - -#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53 -msgid "Max size of message" -msgstr "Maks størrelse på meldingen" - -#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54 -msgid "Default max size of queue" -msgstr "Forvalgt størrelse på køen" - -#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55 -msgid "Max queues system wide" -msgstr "Maks antall køer på systemet" - -#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56 -msgid "Message segment size" -msgstr "Størrelse på meldingssegment" - -#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57 -msgid "Number of system message headers" -msgstr "Antall systemmeldingshoder" - -#: sysdeps/names/prockernel.c:42 -msgid "K_Flags" -msgstr "K_Flags" - -#: sysdeps/names/prockernel.c:42 -msgid "Min_Flt" -msgstr "Min_Flt" - -#: sysdeps/names/prockernel.c:42 -msgid "Maj_Flt" -msgstr "Maj_Flt" - -#: sysdeps/names/prockernel.c:42 -msgid "CMin_Flt" -msgstr "CMin_Flt" - -#: sysdeps/names/prockernel.c:43 -msgid "CMaj_Flt" -msgstr "CMaj_Flt" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_ESP" -msgstr "KStk_ESP" - -#: sysdeps/names/prockernel.c:43 -msgid "KStk_EIP" -msgstr "KStk_EIP" - -#: sysdeps/names/prockernel.c:43 -msgid "NWChan" -msgstr "NWChan" - -#: sysdeps/names/prockernel.c:44 -msgid "WChan" -msgstr "WChan" - -#. K_Flags -#: sysdeps/names/prockernel.c:50 -msgid "" -"Kernel flags of the process.\n" -"\n" -"On Linux, currently every flag has the math bit set, because crt0.s checks " -"for math emulation, so this is not included in the output.\n" -"\n" -"This is probably a bug, as not every process is a compiled C program.\n" -"\n" -"The math bit should be a decimal 4, and the traced bit is decimal 10." -msgstr "" -"Prosessens kjerneflagg.\n" -"\n" -"Under Linux har alle flagg mattebiten satt fordi crt0.s sjekker etter " -"matteemulering, så dette er ikke inkludert i utskriften.\n" -"\n" -"Dette er sannsynligvis en feil, siden ikke alle prosesser er et kompilert\n" -"C program.\n" -"Mattebiten skal være desimal 4, og den tracete biten er desimal 10." - -#. Min_Flt -#: sysdeps/names/prockernel.c:59 -msgid "" -"The number of minor faults the process has made, those which have not " -"required loading a memory page from disk." -msgstr "" -"Antallet mindre feil prosessen har laget; de som ikke har gjort det " -"nødvendig å lese en minneside inn fra disk." - -#. Maj_Flt -#: sysdeps/names/prockernel.c:62 -msgid "" -"The number of major faults the process has made, those which have required " -"loading a memory page from disk." -msgstr "" -"Antallet større feil prosessen har laget; de som har gjort det nødvendig å " -"lese en minneside inn fra disk." - -#. CMin_Flt -#: sysdeps/names/prockernel.c:65 -msgid "The number of minor faults that the process and its children have made." -msgstr "Antallet mindre feil prosessen og dens barn har laget." - -#. CMaj_Flt -#: sysdeps/names/prockernel.c:68 -msgid "The number of major faults that the process and its children have made." -msgstr "Antallet større feil prosessen og dens barn har laget." - -#. KStk_ESP -#: sysdeps/names/prockernel.c:71 -msgid "" -"The current value of esp (32-bit stack pointer), as found in the kernel " -"stack page for the process." -msgstr "" -"Den nåværende verdien til esp (32-bits stakkpeker), som funnet i kjernens " -"stakkside for prosessen." - -#. KStk_EIP -#: sysdeps/names/prockernel.c:74 -msgid "The current EIP (32-bit instruction pointer)." -msgstr "Den nåværende EIP (32-bits instruksjonspeker)." - -#. NWChan -#: sysdeps/names/prockernel.c:76 -msgid "" -"This is the \"channel\" in which the process is waiting. This is the " -"address of a system call, and can be looked up in a namelist if you need a " -"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to " -"see the WCHAN field in action)" -msgstr "" -"Dette er \"kanalen\" hvor prosessen venter. Dette er adressen til " -"systemkallet, og kan slås opp i en navneliste hvis du trenger et tekstnavn. " -"(Hvis du har en oppdatert /etc/psdatabase, så prøv ps -l for å se WCHAN " -"feltet i aksjon)" - -#. WChan -#: sysdeps/names/prockernel.c:81 -msgid "This is the textual name of the `nwchan' field." -msgstr "Dette er tekstnavnet til `nwchan' feltet." - -#: sysdeps/names/procmem.c:47 -msgid "Size" -msgstr "Størrelse" - -#: sysdeps/names/procmem.c:47 -msgid "Virtual" -msgstr "Virtuell" - -#: sysdeps/names/procmem.c:47 -msgid "Resident" -msgstr "Resident" - -#: sysdeps/names/procmem.c:47 -msgid "Share" -msgstr "Del" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size" -msgstr "Størrelse på resident sett" - -#: sysdeps/names/procmem.c:48 -msgid "Resident Set Size Limit" -msgstr "Størrelsesgrense på resident sett" - -#: sysdeps/names/procmem.c:53 -msgid "Total # of pages of memory" -msgstr "Total # av minnesider" - -#: sysdeps/names/procmem.c:54 -msgid "Number of pages of virtual memory" -msgstr "Antall sider virtuelt minne" - -#: sysdeps/names/procmem.c:55 -msgid "Number of residnet set (non-swapped) pages" -msgstr "Antallet resident sett (ikke swappete) sider" - -#: sysdeps/names/procmem.c:56 -msgid "Number of pages of shared (mmap'd) memory" -msgstr "Antall sider med delt (mmap'et) minne" - -#: sysdeps/names/procmem.c:57 -msgid "" -"Number of pages the process has in real memory, minus 3 for administrative " -"purposes. This is just the pages which count towards text, data, or stack " -"space. This does not include pages which have not been demand-loaded in, or " -"which are swapped out." -msgstr "" -"Antallet sider prosessen har i fysisk minne, minus 3 for administrative " -"hensikter. Dette er bare de sidene som teller av tekst, data eller stakk " -"plass. Dette inkluderer ikke sider som ikke er lastet ved behov, eller som " -"er swappet ut." - -#: sysdeps/names/procmem.c:62 -msgid "" -"Current limit in bytes on the rss of the process (usually 2,147,483,647)." -msgstr "Nåværende grense i bytes på prosessens rss (vanligvis 2,147,483,647)." - -#: sysdeps/names/procsegment.c:42 -msgid "Text_RSS" -msgstr "Text_RSS" - -#: sysdeps/names/procsegment.c:42 -msgid "ShLib_RSS" -msgstr "ShLib_RSS" - -#: sysdeps/names/procsegment.c:42 -msgid "Data_RSS" -msgstr "Data_RSS" - -#: sysdeps/names/procsegment.c:42 -msgid "Stack_RSS" -msgstr "Stack_RSS" - -#: sysdeps/names/procsegment.c:43 -msgid "Dirty Size" -msgstr "Skitten størrelse" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Code" -msgstr "Start_Code" - -#: sysdeps/names/procsegment.c:43 -msgid "End_Code" -msgstr "End_kode" - -#: sysdeps/names/procsegment.c:43 -msgid "Start_Stack" -msgstr "Start_Stack" - -#: sysdeps/names/procsegment.c:48 -msgid "Text resident set size" -msgstr "Størrelse på tekst resident sett" - -#: sysdeps/names/procsegment.c:49 -msgid "Shared-Lib resident set size" -msgstr "Størrelse på resident sett for delt biliotek" - -#: sysdeps/names/procsegment.c:50 -msgid "Data resident set size" -msgstr "Størrelse på resident sett for data" - -#: sysdeps/names/procsegment.c:51 -msgid "Stack resident set size" -msgstr "Størrelse på resident sett for stakk" - -#: sysdeps/names/procsegment.c:52 -msgid "Total size of dirty pages" -msgstr "Total størrelse på endrede sider" - -#: sysdeps/names/procsegment.c:53 -msgid "Address of beginning of code segment" -msgstr "Adressen til begynnelsen på kodesegmentet" - -#: sysdeps/names/procsegment.c:54 -msgid "Address of end of code segment" -msgstr "Adressen til slutten på kodesegmentet" - -#: sysdeps/names/procsegment.c:55 -msgid "Address of the bottom of stack segment" -msgstr "Adressen til bunnen på stakksegmentet" - -#: sysdeps/names/procsignal.c:40 -msgid "Signal" -msgstr "Signal" - -#: sysdeps/names/procsignal.c:40 -msgid "Blocked" -msgstr "Blokkert" - -#: sysdeps/names/procsignal.c:40 -msgid "SigIgnore" -msgstr "SigIgnore" - -#: sysdeps/names/procsignal.c:40 -msgid "SigCatch" -msgstr "SigCatch" - -#: sysdeps/names/procsignal.c:45 -msgid "Mask of pending signals" -msgstr "Maske av ventende signaler" - -#: sysdeps/names/procsignal.c:46 -msgid "Mask of blocked signals" -msgstr "Maske av blokkerte signaler" - -#: sysdeps/names/procsignal.c:47 -msgid "Mask of ignored signals" -msgstr "Maske av ignorerte signaler" - -#: sysdeps/names/procsignal.c:48 -msgid "Mask of caught signals" -msgstr "Maske av fangede signaler" - -#: sysdeps/names/procstate.c:40 -msgid "Cmd" -msgstr "Kmd" - -#: sysdeps/names/procstate.c:40 -msgid "State" -msgstr "Tilstand" - -#: sysdeps/names/procstate.c:40 -msgid "UID" -msgstr "UID (BrukerID)" - -#: sysdeps/names/procstate.c:40 -msgid "GID" -msgstr "GID (GruppeID)" - -#: sysdeps/names/procstate.c:45 -msgid "Basename of executable file in call to exec()" -msgstr "Basenavnet på den kjørbare filen i et kall til exec()" - -#: sysdeps/names/procstate.c:46 -msgid "Single-Char code for process state (S=sleeping)" -msgstr "Enkelttegnskode for prosessens tilstand (S=sovende)" - -#: sysdeps/names/procstate.c:47 -msgid "UID of process" -msgstr "Prosessens UID (BrukerID)" - -#: sysdeps/names/procstate.c:48 -msgid "GID of process" -msgstr "Prosessens GID (GruppeID)" - -#: sysdeps/names/proctime.c:44 -msgid "Start_Time" -msgstr "Start_tid" - -#: sysdeps/names/proctime.c:44 -msgid "RTime" -msgstr "RTid" - -#: sysdeps/names/proctime.c:44 -msgid "UTime" -msgstr "UTid" - -#: sysdeps/names/proctime.c:44 -msgid "STime" -msgstr "STid" - -#: sysdeps/names/proctime.c:45 -msgid "CUTime" -msgstr "CUTid" - -#: sysdeps/names/proctime.c:45 -msgid "CSTime" -msgstr "CSTid" - -#: sysdeps/names/proctime.c:45 -msgid "TimeOut" -msgstr "Tidsavbrudd" - -#: sysdeps/names/proctime.c:45 -msgid "It_Real_Value" -msgstr "It_Reell_Verdi" - -#: sysdeps/names/proctime.c:46 -msgid "Frequency" -msgstr "Frekvens" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_UTime" -msgstr "XCPU_UTid" - -#: sysdeps/names/proctime.c:46 -msgid "XCPU_STime" -msgstr "XCPU_STid" - -#: sysdeps/names/proctime.c:51 -msgid "Start time of process in seconds since the epoch" -msgstr "Prosessens starttid i sekunder siden epoken" - -#: sysdeps/names/proctime.c:52 -msgid "Real time accumulated by process (should be utime + stime)" -msgstr "Reell tid akkumulert av prosessen (skal være utid + stid)" - -#: sysdeps/names/proctime.c:53 -msgid "user-mode CPU time accumulated by process" -msgstr "bruker-modus prosessortid akkumulert av prosessen" - -#: sysdeps/names/proctime.c:54 -msgid "kernel-mode CPU time accumulated by process" -msgstr "kjerne-modus prosessortid akkumulert av prosessen" - -#: sysdeps/names/proctime.c:55 -msgid "cumulative utime of process and reaped children" -msgstr "kumultiv utime for prosessen og døde barn" - -#: sysdeps/names/proctime.c:56 -msgid "cumulative stime of process and reaped children" -msgstr "kumulativ stime for prosessen og dens døde barn" - -#: sysdeps/names/proctime.c:57 -msgid "The time (in jiffies) of the process's next timeout" -msgstr "Tiden (i jiffies) for prosessens neste tidsavbrudd" - -#: sysdeps/names/proctime.c:58 -msgid "" -"The time (in jiffies) before the next SIGALRM is sent to the process due to " -"an interval timer." -msgstr "" -"Tiden (i jiffies) før neste SIGALARM blir sendt til prosessen på grunn av en " -"intervallklokke." - -#: sysdeps/names/proctime.c:60 -msgid "Tick frequency" -msgstr "Tikkfrekvens" - -#: sysdeps/names/proctime.c:61 -msgid "SMP user-mode CPU time accumulated by process" -msgstr "SMP brukermodus prosessortid akkumulert av prosessen" - -#: sysdeps/names/proctime.c:62 -msgid "SMP kernel-mode CPU time accumulated by process" -msgstr "SMP kjernemodus prosessortid akkumulert av prosessen" - -#: sysdeps/names/procuid.c:56 -msgid "Uid" -msgstr "Uid" - -#: sysdeps/names/procuid.c:56 -msgid "EUid" -msgstr "EUid" - -#: sysdeps/names/procuid.c:56 -msgid "Gid" -msgstr "Gid" - -#: sysdeps/names/procuid.c:56 -msgid "EGid" -msgstr "EGid" - -#: sysdeps/names/procuid.c:56 -msgid "Pid" -msgstr "Pid" - -#: sysdeps/names/procuid.c:57 -msgid "PPid" -msgstr "PPid" - -#: sysdeps/names/procuid.c:57 -msgid "PGrp" -msgstr "PGrp" - -#: sysdeps/names/procuid.c:57 -msgid "Session" -msgstr "Sesjon" - -#: sysdeps/names/procuid.c:57 -msgid "Tty" -msgstr "Tty" - -#: sysdeps/names/procuid.c:58 -msgid "TPGid" -msgstr "TPGid" - -#: sysdeps/names/procuid.c:58 -msgid "Priority" -msgstr "Prioritet" - -#: sysdeps/names/procuid.c:58 -msgid "Nice" -msgstr "Nice" - -#: sysdeps/names/procuid.c:63 -msgid "User ID" -msgstr "BrukerID" - -#: sysdeps/names/procuid.c:64 -msgid "Effective User ID" -msgstr "Effektiv brukerID" - -#: sysdeps/names/procuid.c:65 -msgid "Group ID" -msgstr "GruppeID" - -#: sysdeps/names/procuid.c:66 -msgid "Effective Group ID" -msgstr "Effektiv gruppeID" - -#: sysdeps/names/procuid.c:67 -msgid "Process ID" -msgstr "ProsessID" - -#: sysdeps/names/procuid.c:68 -msgid "PID of parent process" -msgstr "PID til forelderprosessen" - -#: sysdeps/names/procuid.c:69 -msgid "Process group ID" -msgstr "Prosess gruppeID" - -#: sysdeps/names/procuid.c:70 -msgid "Session ID" -msgstr "SesjonsID" - -#: sysdeps/names/procuid.c:71 -msgid "Full device number of controlling terminal" -msgstr "Fullt enhetsnummer på kontrollerende terminal" - -#: sysdeps/names/procuid.c:72 -msgid "Terminal process group ID" -msgstr "Terminalprosessens gruppeID" - -#: sysdeps/names/procuid.c:73 -msgid "Kernel scheduling priority" -msgstr "Kernel scheduling prioritet" - -#: sysdeps/names/procuid.c:74 -msgid "Standard unix nice level of process" -msgstr "Standard unix nice-nivå for prosessen" - -#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56 -msgid "Number of entries in semaphore map" -msgstr "Antall oppføringer i semaforkartet" - -#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57 -msgid "Max number of arrays" -msgstr "Maks antall tabeller" - -#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58 -msgid "Max semaphores system wide" -msgstr "Maks antall semaforer på hele systemet" - -#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59 -msgid "Number of undo structures system wide" -msgstr "Antall gjenopprettingsstrukturer på hele systemet" - -#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60 -msgid "Max semaphores per array" -msgstr "Maks semaforer per tabell" - -#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61 -msgid "Max ops per semop call" -msgstr "Maks operasjoner per semop kall" - -#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62 -msgid "Max number of undo entries per process" -msgstr "Maks antall gjenopprettingsforsøk per prosess" - -#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63 -msgid "sizeof struct sem_undo" -msgstr "sizeof struct sem_undo" - -#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64 -msgid "Semaphore max value" -msgstr "Maksverdi for semafor" - -#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65 -msgid "Adjust on exit max value" -msgstr "Juster maksverdi ved utgang" - -#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48 -msgid "Max segment size" -msgstr "Maks segmentstørrelse" - -#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49 -msgid "Min segment size" -msgstr "Minimum segmentstørrelse" - -#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50 -msgid "Max number of segments" -msgstr "Maks antall segmenter" - -#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51 -msgid "Max shared segments per process" -msgstr "Maks delte segmenter per prosess" - -#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52 -msgid "Max total shared memory" -msgstr "Maks delt minne" - -#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48 -msgid "Total Swap Space" -msgstr "Total swap" - -#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49 -msgid "Used Swap Space" -msgstr "Brukt swap" - -#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50 -msgid "Free Swap Space" -msgstr "Ledig swap" - -#: sysdeps/names/swap.c:42 -msgid "Page In" -msgstr "Page In" - -#: sysdeps/names/swap.c:43 -msgid "Page Out" -msgstr "Page Out" - -#: sysdeps/names/swap.c:51 -msgid "Total number of swap pages that have been brought in since system boot" -msgstr "Totalt antall swap-sider som har blitt brakt inn siden systemoppstart" - -#: sysdeps/names/swap.c:53 -msgid "Total number of swap pages that have been brought out since system boot" -msgstr "Totalt antall swap-sider som har blitt hentet ut siden systemoppstart" - -#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76 -msgid "Server Features" -msgstr "Vertsegenskaper" - -#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77 -msgid "CPU Usage" -msgstr "Prosessorbruk" - -#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78 -msgid "Memory Usage" -msgstr "Minnebruk" - -#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79 -msgid "Swap Usage" -msgstr "Swapbruk" - -#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80 -msgid "System Uptime" -msgstr "Systemets oppetid" - -#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81 -msgid "Load Averange" -msgstr "Gjennomsnittsbelastning" - -#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82 -msgid "Shared Memory Limits" -msgstr "Grenser for delt minne" - -#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83 -msgid "Message Queue Limits" -msgstr "Grenser for meldingskøer" - -#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84 -msgid "Semaphore Set Limits" -msgstr "Grenser for semaforsett" - -#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85 -msgid "List of running Processes" -msgstr "Liste over kjørende prosesser" - -#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86 -msgid "Process Status information" -msgstr "Prosessens tilstandsinformasjon" - -#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87 -msgid "Process UID and TTY information" -msgstr "Prosessens UID- og TTY-informasjon" - -#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88 -msgid "Process Memory information" -msgstr "Prosessens minneinformasjon" - -#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89 -msgid "Process Time information" -msgstr "Prosessens tidsinformasjon" - -#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90 -msgid "Process Signal information" -msgstr "Prosessens signalinformasjon" - -#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91 -msgid "Process Kernel Data information" -msgstr "Prosessens kjernedatainformasjon" - -#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92 -msgid "Process Segment information" -msgstr "Prosessens segmentinformasjon" - -#: sysdeps/names/sysdeps.c:66 -msgid "Process Arguments" -msgstr "Prosessargumenter" - -#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94 -msgid "Process Memory Map" -msgstr "Prosessens minnekart" - -#: sysdeps/names/sysdeps.c:68 -msgid "Mount List" -msgstr "Monteringsliste" - -#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96 -msgid "File System Usage" -msgstr "Bruk av filsystemer" - -#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97 -msgid "Network Load" -msgstr "Nettverksbelastning" - -#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98 -msgid "PPP Statistics" -msgstr "PPP-statistikk" - -#: sysdeps/names/sysdeps.c:93 -msgid "Command line arguments of the process" -msgstr "Prosessens kommandolinjeargumenter" - -#: sysdeps/names/sysdeps.c:95 -msgid "List of currently mounted filesystems" -msgstr "Liste over monterte filsystemer" - -#: sysdeps/names/uptime.c:38 -msgid "Uptime" -msgstr "Oppetid" - -#: sysdeps/names/uptime.c:39 -msgid "Idletime" -msgstr "Idletid" - -#: sysdeps/names/uptime.c:44 -msgid "Time in seconds since system boot" -msgstr "Tid siden oppstart i sekunder" - -#: sysdeps/names/uptime.c:45 -msgid "Time in seconds the system spent in the idle task since system boot" -msgstr "Tid systemet har brukt i Idle Task siden oppstart i sekunder" - -#: support/error.c:109 -msgid "Unknown system error" -msgstr "Ukjent systemfeil" - -#: support/getopt.c:669 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "%s: flagget `%s' er flertydig\n" - -#: support/getopt.c:693 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "%s: flagget `--%s' tar ikke argumenter\n" - -#: support/getopt.c:698 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "%s: flagget `%c%s' tar ikke argumenter\n" - -#: support/getopt.c:715 support/getopt.c:888 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "%s: flagget `%s' krever et argument\n" - -#. --option -#: support/getopt.c:744 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "%s: ukjent flagg `--%s'\n" - -#. +option or -option -#: support/getopt.c:748 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "%s: ukjent flagg `%c%s'\n" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:774 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "%s: ulovlig flagg -- %c\n" - -#: support/getopt.c:777 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "%s: ugyldig flagg -- %c\n" - -#. 1003.2 specifies the format of this message. -#: support/getopt.c:807 support/getopt.c:937 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: flagget kerver et argument -- %c\n" - -#: support/getopt.c:854 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "%s: flagget `-W %s' er flertydig\n" - -#: support/getopt.c:872 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "%s: flagget `-W %s' tar ikke argumenter\n" - -#: lib/read.c:71 -#, c-format -msgid "read %d bytes" -msgstr "les %d bytes" - -#: lib/read_data.c:49 -msgid "read data size" -msgstr "les størrelse på data" - -#: lib/read_data.c:66 -#, c-format -msgid "read data %d bytes" -msgstr "les data %d bytes" - -#: lib/write.c:48 -#, c-format -msgid "write %d bytes" -msgstr "skriv %d bytes" - -#: src/daemon/gnuserv.c:445 -msgid "Enable debugging" -msgstr "Slå på avlusing" - -#: src/daemon/gnuserv.c:445 -msgid "DEBUG" -msgstr "DEBUG" - -#: src/daemon/gnuserv.c:447 -msgid "Enable verbose output" -msgstr "Slå på utfyllende utskrift" - -#: src/daemon/gnuserv.c:447 -msgid "VERBOSE" -msgstr "VERBOSE" - -#: src/daemon/gnuserv.c:449 -msgid "Don't fork into background" -msgstr "Ikke forgren til bakgrunnen" - -#: src/daemon/gnuserv.c:449 -msgid "NO-DAEMON" -msgstr "NO-DAEMON" - -#: src/daemon/gnuserv.c:451 -msgid "Invoked from inetd" -msgstr "Kalt fra inetd" - -#: src/daemon/gnuserv.c:451 -msgid "INETD" -msgstr "INETD" - -#: src/daemon/gnuserv.c:485 -#, c-format -msgid "" -"Error on option %s: %s.\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" -"Feil ved flagg %s: %s.\n" -"Kjør '%s --help' for å se en full liste av tilgjengelige " -"kommandolinjeflagg.\n" diff --git a/po/stamp-cat-id b/po/stamp-cat-id deleted file mode 100644 index 9788f702..00000000 --- a/po/stamp-cat-id +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/src/.cvsignore b/src/.cvsignore deleted file mode 100644 index 282522db..00000000 --- a/src/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 46edd9c2..00000000 --- a/src/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -if INODEDB -inodedb_SUBDIRS = inodedb -else -inodedb_SUBDIRS = -endif - -SUBDIRS = daemon $(inodedb_SUBDIRS) - -DIST_SUBDIRS = daemon inodedb - diff --git a/src/daemon/.cvsignore b/src/daemon/.cvsignore deleted file mode 100644 index 3993abba..00000000 --- a/src/daemon/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile.in -Makefile -libgtop_daemon -server.conf -.libs -.deps diff --git a/src/daemon/ChangeLog b/src/daemon/ChangeLog deleted file mode 100644 index 9f68237a..00000000 --- a/src/daemon/ChangeLog +++ /dev/null @@ -1,78 +0,0 @@ -1999-02-19 Martin Baulig - - * Makefile.am (LIBGTOP_COMPILE_SYSTEM): Hardcoded system name. - (LIBGTOP_COMPILE_RELEASE): Hardcoded system release. - (LIBGTOP_COMPILE_MACHINE): Hardcoded machine type. - - * src/daemon/Makefile.am (libgtop_server_SOURCES): Don't use - `@INTLLIBS@' for the server. - - * server.c (main): Abort if not running on the system the server - was compiled on. - -1999-02-10 Martin Baulig - - * gnuserv.c (program_invocation_*_name): Declare this as `extern' - if necessary. - -1998-12-17 Martin Baulig - - * gnuserv.c: Don't include . - (program_invocation_name, program_invocation_short_name): Define - this here. - -1998-12-09 Martin Baulig - - Larger changes to the daemon: - - - Dropped all the unix domain socket stuff - we don't need it for - connections on the local host, here we behave just like any normal - application. - - Added poptimization: use the --help parameter to get usage info - - Made it a real daemon, fork into background and write to syslog. - - It's now possible to invoke the daemon from inetd, you'll get - GNU_SECURE authentication in this case. - - Don't make this executable suid/sgid - if invoked as root it - sets uid/gid to SERVER_UID/SERVER_GID as defined in server_config.h - - Added missing features, so you can now really use this thing. - -1998-11-11 Martin Baulig - - * gnuserv.c (main): Set `server->features' directly rather than - calling glibtop_set_parameter_l () since this function no longer - allows to modify the features. - - * gnuserv.c, main.c: Use LIBGTOP_ENABLE_DEBUG rather than DEBUG. - -1998-11-01 Marc Ewing - - * Makefile.am: Added $(GLIB_LIBS) to libs. Not sure - how it ever built without it. - -1998-10-20 Martin Baulig - - * Makefile.am: Added a notice that this file *requires* - libtool 1.2. It may work with 1.1 as well, but that's untested. - -1998-10-11 Martin Baulig - - * Makefile.am (install-exec-hook): Always run `libgtop_postinstall', - it's `:' if there's nothing to do since the empty string is no - valid shell syntax here. - -1998-10-01 Martin Baulig - - * Makefile.am (install-exec-hook): Use `libgtop_postinstall' - here to make the server suid root or sgid kmem if required. - -1998-08-25 Martin Baulig - - * daemon.h (handle_parent_connection): Added prototype. - * write.c, io.c: Added cast to `const void *' in calls to - `write' and `send' to avoid compiler warnings. - * gnuserv.c (handle_signal): Declared static. - (main): Casting return value of `getuid' to `int' in - debugging statement. - - * ChangeLog: New file. - diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am deleted file mode 100644 index 8fb7571a..00000000 --- a/src/daemon/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -## You need libtool 1.2 or newer for this Makefile.am to work. -## -## It _may_ work with an older version of libtool, but it also may fail. -## So if you get any undefined symbols here, please make sure you really -## have libtool 1.2 or better before reporting this as bug. -## -## You'll require libtool 1.2 for other parts of GNOME anyway. -## -## Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2.tar.gz -## (or a newer version if it is available) -## -## Martin -## - -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ -D_BSD \ - -DLIBGTOP_COMPILE_SYSTEM=\"`uname -s`\" \ - -DLIBGTOP_COMPILE_RELEASE=\"`uname -r`\" \ - -DLIBGTOP_COMPILE_MACHINE=\"`uname -m`\" - -if NEED_LIBGTOP -suid_sysdeps = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid.la -suid_common = $(top_builddir)/sysdeps/common/libgtop_suid_common.la -else -suid_sysdeps = -suid_common = -endif - -bin_PROGRAMS = libgtop_daemon @server_programs@ - -EXTRA_PROGRAMS = libgtop_server - -libgtop_daemon_SOURCES = gnuserv.c slave.c main.c io.c version.c \ - daemon.h server_config.h -libgtop_daemon_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @sysdeps_suid_lib@ \ - $(suid_sysdeps) $(suid_common)\ - $(GLIB_LIBS)\ - @LIBSUPPORT@ @INTLLIBS@ @libs_xauth@ - -libgtop_server_SOURCES = server.c slave.c io.c version.c daemon.h -libgtop_server_LDADD = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid.la \ - $(top_builddir)/sysdeps/common/libgtop_suid_common.la \ - @LIBSUPPORT@ - -EXTRA_DIST = server_config.h.in server_config.pl - -install-exec-hook: - -@libgtop_postinstall@ - diff --git a/src/daemon/daemon.h b/src/daemon/daemon.h deleted file mode 100644 index 9539db37..00000000 --- a/src/daemon/daemon.h +++ /dev/null @@ -1,81 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_DAEMON_H__ -#define __GLIBTOP_DAEMON_H__ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -BEGIN_LIBGTOP_DECLS - -/* Some don't have LOG_PERROR */ -#ifndef LOG_PERROR -#define LOG_PERROR 0 -#endif - -#if defined(HAVE_GETDTABLESIZE) -#define GET_MAX_FDS() getdtablesize() -#else -/* Fallthrough case - please add other #elif cases above - for different OS's as necessary */ -#define GET_MAX_FDS() 256 -#endif - -#define _offset_union(p) ((char *) &resp->u.p - (char *) resp) -#define _offset_data(p) _offset_union (data.p) - -#define MSG_BUFSZ sizeof (struct _glibtop_ipc_message) -#define MSG_MSGSZ (MSG_BUFSZ - sizeof (long)) - -void handle_parent_connection (int s); -void handle_slave_connection (int input, int output); -void handle_slave_command (glibtop_command *cmnd, glibtop_response *resp, - const void *parameter); - -void do_output (int s, glibtop_response *resp, off_t offset, - size_t data_size, const void *data); -int do_read (int s, void *ptr, size_t total_size); - -void syslog_message (int priority, char *format, ...); -void syslog_io_message (int priority, char *format, ...); - -extern int enable_debug; -extern int verbose_output; - -END_LIBGTOP_DECLS - -#endif diff --git a/src/daemon/gnuserv.c b/src/daemon/gnuserv.c deleted file mode 100644 index 7df0a7ef..00000000 --- a/src/daemon/gnuserv.c +++ /dev/null @@ -1,635 +0,0 @@ -/* -*-C-*- - * Server code for handling requests from clients and forwarding them - * on to the GNU Emacs process. - * - * This file is part of GNU Emacs. - * - * Copying is permitted under those conditions described by the GNU - * General Public License. - * - * Copyright (C) 1989 Free Software Foundation, Inc. - * - * Author: Andy Norman (ange@hplb.hpl.hp.com), based on 'etc/server.c' - * from the 18.52 GNU Emacs distribution. - * - * Please mail bugs and suggestions to the author at the above address. - */ - -/* HISTORY - * 11-Nov-1990 bristor@simba - * Added EOT stuff. - */ - -/* - * This file incorporates new features added by Bob Weiner , - * Darrell Kindred and Arup Mukherjee . - * Please see the note at the end of the README file for details. - * - * (If gnuserv came bundled with your emacs, the README file is probably - * ../etc/gnuserv.README relative to the directory containing this file) - */ - -#include -#include -#include -#include -#include - -#include - -#include "server_config.h" - -#include - -#include -#include - -#include "daemon.h" - -#ifdef AIX -#include -#endif - -#ifdef NEED_DECLARATION_PROGRAM_INVOCATION_NAME -extern char *program_invocation_name, *program_invocation_short_name; -#endif - -#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME -char *program_invocation_short_name; -#endif - -#ifndef HAVE_PROGRAM_INVOCATION_NAME -char *program_invocation_name; -#endif - -void handle_parent_connection (int s); -void handle_slave_connection (int input, int output); - -#if !defined(INTERNET_DOMAIN_SOCKETS) -#error "Internet Domain sockets are required" -#endif - -#ifdef AUTH_MAGIC_COOKIE -#include -#include - -static Xauth *server_xauth = NULL; - -#endif /* AUTH_MAGIC_COOKIE */ - -int enable_debug = 0; -int verbose_output = 0; -static int no_daemon = 0; -static int invoked_from_inetd = 0; -static int changed_uid = 0; - -void -syslog_message (int priority, char *format, ...) -{ - va_list ap; - char buffer [BUFSIZ]; - - va_start (ap, format); - vsnprintf (buffer, BUFSIZ-1, format, ap); - va_end (ap); - - syslog (priority, buffer); -} - -void -syslog_io_message (int priority, char *format, ...) -{ - va_list ap; - char buffer [BUFSIZ]; - char buffer2 [BUFSIZ]; - - va_start (ap, format); - vsnprintf (buffer, BUFSIZ-1, format, ap); - va_end (ap); - - snprintf (buffer2, BUFSIZ-1, "%s: %s", buffer, strerror (errno)); - syslog (priority, buffer2); -} - -/* - * timed_read - Read with timeout. - */ - -static int -timed_read (int fd, char *buf, int max, int timeout, int one_line) -{ - fd_set rmask; - struct timeval tv; /* = {timeout, 0}; */ - char c = 0; - int nbytes = 0; - int r; - - tv.tv_sec = timeout; - tv.tv_usec = 0; - - FD_ZERO (&rmask); - FD_SET (fd, &rmask); - - do { - r = select (fd + 1, &rmask, NULL, NULL, &tv); - - if (r > 0) { - if (read (fd, &c, 1) == 1) { - *buf++ = c; - ++nbytes; - } else { - syslog_io_message (LOG_WARNING, "read error on socket"); - return -1; - } - } else if (r == 0) { - syslog_io_message (LOG_WARNING, "read timed out"); - return -1; - } else { - syslog_io_message (LOG_WARNING, "error in select"); - return -1; - } - } while ((nbytes < max) && !(one_line && (c == '\n'))); - - --buf; - if (one_line && *buf == '\n') { - *buf = 0; - } - return nbytes; -} - - -/* - * permitted -- return whether a given host is allowed to connect to the server. - */ - -static int -permitted (u_long host_addr, int fd) -{ - int i; - - char auth_protocol[128]; - char buf[1024]; - int auth_data_len; - - /* Read auth protocol name */ - - if (timed_read (fd, auth_protocol, AUTH_NAMESZ, AUTH_TIMEOUT, 1) <= 0) - return FALSE; - - if (enable_debug) - syslog_message (LOG_DEBUG, - "Client sent authenticatin protocol '%s'.", - auth_protocol); - - if (strcmp (auth_protocol, DEFAUTH_NAME) && - strcmp (auth_protocol, MCOOKIE_NAME)) { - syslog_message (LOG_WARNING, - "Invalid authentication protocol " - "'%s' from client", - auth_protocol); - return FALSE; - } - - if (!strcmp (auth_protocol, MCOOKIE_NAME)) { - /* - * doing magic cookie auth - */ - - if (timed_read (fd, buf, 10, AUTH_TIMEOUT, 1) <= 0) - return FALSE; - - auth_data_len = atoi (buf); - - if (timed_read (fd, buf, auth_data_len, AUTH_TIMEOUT, 0) != auth_data_len) - return FALSE; - -#ifdef AUTH_MAGIC_COOKIE - if (!invoked_from_inetd && server_xauth && server_xauth->data && - !memcmp (buf, server_xauth->data, auth_data_len)) { - return TRUE; - } -#else - syslog_message (LOG_WARNING, - "Client tried Xauth, but server is " - "not compiled with Xauth"); -#endif - - /* - * auth failed, but allow this to fall through to the - * GNU_SECURE protocol.... - */ - - if (verbose_output) - if (changed_uid || invoked_from_inetd) - syslog_message (LOG_WARNING, - "Xauth authentication not allowed, " - "trying GNU_SECURE ..."); - else - syslog_message (LOG_WARNING, - "Xauth authentication failed, " - "trying GNU_SECURE auth..."); - } - - /* Other auth protocols go here, and should execute only if - * the * auth_protocol name matches. */ - - /* Now, try the old GNU_SECURE stuff... */ - - if (enable_debug) - syslog_message (LOG_DEBUG, "Doing GNU_SECURE auth ..."); - - /* Now check the chain for that hash key */ - for (i = 0; i < HOST_TABLE_ENTRIES; i++) { - if (enable_debug) - syslog_message (LOG_DEBUG, "Trying %lx - %lx", - host_addr, permitted_hosts [i]); - if (permitted_hosts [i] == NULL) - return (FALSE); - if (host_addr == permitted_hosts [i]) - return (TRUE); - } - - return (FALSE); -} - - -/* - * setup_table -- initialise the table of hosts allowed to contact the server, - * by reading from the file specified by the GNU_SECURE - * environment variable - * Put in the local machine, and, if a security file is specifed, - * add each host that is named in the file. - * Return the number of hosts added. - */ - -static int -setup_table (void) -{ - char hostname [HOSTNAMSZ], screen [BUFSIZ]; - long host_addr; - int i, hosts = 0; - - /* Make sure every entry is null */ - for (i = 0; i < HOST_TABLE_ENTRIES; i++) - permitted_hosts [i] = 0; - - gethostname (hostname, HOSTNAMSZ); - - if ((host_addr = glibtop_internet_addr (hostname)) == -1) { - syslog_io_message (LOG_ERR, "Can't resolve '%s'", hostname); - exit (1); - } - -#ifdef AUTH_MAGIC_COOKIE - - sprintf (screen, "%d", SERVER_PORT); - - server_xauth = XauGetAuthByAddr - (FamilyInternet, - sizeof (host_addr), (char *) &host_addr, - strlen (screen), screen, - strlen (MCOOKIE_X_NAME), MCOOKIE_X_NAME); - hosts++; - -#endif /* AUTH_MAGIC_COOKIE */ - - /* Resolv host names from permitted_host_names []. */ - - for (i = 0; i < HOST_TABLE_ENTRIES; i++) { - if (enable_debug) - syslog_message (LOG_DEBUG, "Resolving %s ...", - permitted_host_names [i]); - permitted_hosts [i] = - glibtop_internet_addr (permitted_host_names [i]); - if ((long) permitted_hosts [i] == -1) { - syslog_io_message (LOG_ERR, "Can't resolve '%s'", - permitted_host_names [i]); - exit (1); - } - } - - if (enable_debug) - for (i = 0; i < HOST_TABLE_ENTRIES; i++) - syslog_message (LOG_DEBUG, "Host %s - %lx", - permitted_host_names [i], - permitted_hosts [i]); - - hosts += HOST_TABLE_ENTRIES; - - return hosts; -} /* setup_table */ - -/* - * internet_init -- initialize server, returning an internet socket that can - * be listened on. - */ - -static int -internet_init (void) -{ - int ls; /* socket descriptor */ - struct sockaddr_in server; /* for local socket address */ - - if (setup_table () == 0) - return -1; - - /* clear out address structure */ - memset ((char *) &server, 0, sizeof (struct sockaddr_in)); - - /* Set up address structure for the listen socket. */ - server.sin_family = AF_INET; - server.sin_addr.s_addr = INADDR_ANY; - - /* We use a fixed port given in the config file. */ - server.sin_port = htons (SERVER_PORT); - - if (verbose_output) - syslog_message (LOG_INFO, "Using port %u.", SERVER_PORT); - - /* Create the listen socket. */ - if ((ls = socket (AF_INET, SOCK_STREAM, 0)) == -1) { - syslog_io_message (LOG_ERR, "unable to create socket"); - exit (1); - } - - /* Bind the listen address to the socket. */ - if (bind (ls, (struct sockaddr *) &server, - sizeof (struct sockaddr_in)) == -1) { - syslog_io_message (LOG_ERR, "bind"); - exit (1); - } - - /* Initiate the listen on the socket so remote users * can connect. */ - if (listen (ls, 20) == -1) { - syslog_io_message (LOG_ERR, "listen"); - exit (1); - } - - return (ls); -} /* internet_init */ - - -/* - * handle_internet_request -- accept a request from a client and send the - * information to stdout (the gnu process). - */ - -static void -handle_internet_request (int ls) -{ - int s; - size_t addrlen = sizeof (struct sockaddr_in); - struct sockaddr_in peer; /* for peer socket address */ - pid_t pid; - - memset ((char *) &peer, 0, sizeof (struct sockaddr_in)); - - if ((s = accept (ls, (struct sockaddr *) &peer, (void *) &addrlen)) == -1) { - syslog_io_message (LOG_ERR, "accept"); - exit (1); - } - - if (verbose_output) - syslog_message (LOG_INFO, "Connection was made from %s port %u.", - inet_ntoa (peer.sin_addr), ntohs (peer.sin_port)); - - /* Check that access is allowed - if not return crud to the client */ - if (!permitted (peer.sin_addr.s_addr, s)) { - close (s); - syslog_message (LOG_CRIT, "Refused connection from %s.", - inet_ntoa (peer.sin_addr)); - return; - } /* if */ - - if (verbose_output) - syslog_message (LOG_INFO, "Accepted connection from %s port %u.", - inet_ntoa (peer.sin_addr), ntohs (peer.sin_port)); - - pid = fork (); - - if (pid == -1) { - syslog_io_message (LOG_ERR, "fork failed"); - exit (1); - } - - if (pid) { - if (verbose_output) - syslog_message (LOG_INFO, "Child pid is %d.", pid); - return; - } - - handle_parent_connection (s); - - close (s); - - if (verbose_output) - syslog_message (LOG_INFO, "Closed connection to %s port %u.", - inet_ntoa (peer.sin_addr), ntohs (peer.sin_port)); - - _exit (0); -} /* handle_internet_request */ - -static void -handle_signal (int sig) -{ - if (sig == SIGCHLD) - return; - - syslog_message (LOG_ERR, "Catched signal %d.\n", sig); - exit (1); -} - -const struct poptOption popt_options [] = { - POPT_AUTOHELP - { "debug", 'd', POPT_ARG_NONE, &enable_debug, 0, - N_("Enable debugging"), N_("DEBUG") }, - { "verbose", 'v', POPT_ARG_NONE, &verbose_output, 0, - N_("Enable verbose output"), N_("VERBOSE") }, - { "no-daemon", 'f', POPT_ARG_NONE, &no_daemon, 0, - N_("Don't fork into background"), N_("NO-DAEMON") }, - { "inetd", 'i', POPT_ARG_NONE, &invoked_from_inetd, 0, - N_("Invoked from inetd"), N_("INETD") }, - { NULL, '\0', 0, NULL, 0 } -}; - -int -main (int argc, char *argv []) -{ - const unsigned method = GLIBTOP_METHOD_PIPE; - const unsigned long features = GLIBTOP_SYSDEPS_ALL; - glibtop *server = glibtop_global_server; - poptContext context; - int nextopt; - - int ils = -1; /* internet domain listen socket */ - - /* On non-glibc systems, this is not set up for us. */ - if (!program_invocation_name) { - char *arg; - - program_invocation_name = argv[0]; - arg = strrchr (argv[0], '/'); - program_invocation_short_name = - arg ? (arg + 1) : program_invocation_name; - } - - context = poptGetContext ("libgtop-daemon", argc, argv, - popt_options, 0); - - poptReadDefaultConfig (context, TRUE); - - while ((nextopt = poptGetNextOpt (context)) > 0) - /* do nothing */ ; - - if(nextopt != -1) { - printf (_("Error on option %s: %s.\n" - "Run '%s --help' to see a full list of " - "available command line options.\n"), - poptBadOption (context, 0), - poptStrerror (nextopt), - argv[0]); - exit(1); - } - - if (enable_debug) - verbose_output = 1; - - if (no_daemon) { - openlog ("libgtop-daemon", LOG_PERROR | LOG_PID, LOG_LOCAL0); - } else { - openlog ("libgtop-daemon", LOG_PID, LOG_LOCAL0); - } - - if (!no_daemon && !invoked_from_inetd) { - pid_t pid = fork (); - - if (pid == -1) { - syslog_io_message (LOG_ERR, "fork failed"); - exit (1); - } else if (pid) - exit (0); - - close (0); - - setsid (); - } - - glibtop_init_r (&glibtop_global_server, 0, GLIBTOP_INIT_NO_INIT); - - signal (SIGCHLD, handle_signal); - - /* If we are root, completely switch to SERVER_UID and - * SERVER_GID. Otherwise we completely drop any priviledges. - */ - - if (enable_debug) - syslog_message (LOG_DEBUG, "Parent ID: (%d, %d) - (%d, %d)", - getuid (), geteuid (), getgid (), getegid ()); - - if (geteuid () == 0) { - changed_uid = 1; - if (setregid (SERVER_GID, SERVER_GID)) { - syslog_io_message (LOG_ERR, "setregid (SERVER_GID)"); - exit (1); - } - if (setreuid (SERVER_UID, SERVER_UID)) { - syslog_io_message (LOG_ERR, "setreuid (SERVER_UID)"); - exit (1); - } - } else { - if (setreuid (geteuid (), geteuid ())) { - syslog_io_message (LOG_ERR, "setreuid (euid)"); - exit (1); - } - } - - if (enable_debug) - syslog_message (LOG_DEBUG, "Parent ID: (%d, %d) - (%d, %d)", - getuid (), geteuid (), getgid (), getegid ()); - - if (invoked_from_inetd) { - size_t addrlen = sizeof (struct sockaddr_in); - struct sockaddr_in peer; - - memset ((char *) &peer, 0, sizeof (struct sockaddr_in)); - - if (getpeername (0, (struct sockaddr *) &peer, (void *) &addrlen)) { - syslog_io_message (LOG_ERR, "getpeername"); - exit (1); - } - - if (verbose_output) - syslog_message (LOG_INFO, "Connection was made from %s port %u.", - inet_ntoa (peer.sin_addr), ntohs (peer.sin_port)); - - /* Check that access is allowed - if not return crud to the client */ - if (!permitted (peer.sin_addr.s_addr, 0)) { - close (0); - syslog_message (LOG_CRIT, "Refused connection from %s.", - inet_ntoa (peer.sin_addr)); - exit (1); - } - - handle_parent_connection (0); - exit (0); - } - - /* get a internet domain socket to listen on. */ - ils = internet_init (); - - if (ils <= 0) { - syslog_message (LOG_ERR, "Unable to get internet domain socket."); - exit (1); - } - - glibtop_set_parameter_l (server, GLIBTOP_PARAM_METHOD, - &method, sizeof (method)); - - server->features = features; - - glibtop_init_r (&server, 0, 0); - - while (1) { - fd_set rmask; - int status, ret; - - while ((ret = wait3 (&status, WNOHANG, NULL)) != 0) { - if ((ret == -1) && (errno == ECHILD)) - break; - - if ((ret == -1) && ((errno == EAGAIN))) - continue; - if (ret == 0) { - syslog_io_message (LOG_WARNING, "wait3"); - continue; - } - - if (verbose_output) - syslog_message (LOG_INFO, "Child %d exited.", ret); - } - - FD_ZERO (&rmask); - - /* Only the child accepts connections from standard - * input made by its parent. */ - - FD_SET (ils, &rmask); - - if (enable_debug) - syslog_message (LOG_DEBUG, - "Server ready and waiting for connections."); - - if (select (ils+1, &rmask, (fd_set *) NULL, (fd_set *) NULL, - (struct timeval *) NULL) < 0) { - if (errno == EINTR) - continue; - syslog_io_message (LOG_ERR, "select"); - exit (1); - } - - if (FD_ISSET (ils, &rmask)) - handle_internet_request (ils); - } - - return 0; -} diff --git a/src/daemon/io.c b/src/daemon/io.c deleted file mode 100644 index 1dc72aa3..00000000 --- a/src/daemon/io.c +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 "daemon.h" - -void -do_output (int s, glibtop_response *resp, off_t offset, - size_t data_size, const void *data) -{ -#ifdef REAL_DEBUG - fprintf (stderr, "Really writing %d bytes at offset %lu.\n", - sizeof (glibtop_response), offset); -#endif - - resp->offset = offset; - resp->data_size = data_size; - - if (s == 0) { - if (write (1, (const void *) resp, sizeof (glibtop_response)) < 0) - glibtop_warn_io ("write"); - } else { - if (send (s, (const void *) resp, sizeof (glibtop_response), 0) < 0) - glibtop_warn_io ("send"); - } - - if (resp->data_size) { -#ifdef REAL_DEBUG - fprintf (stderr, "Writing %d bytes of data.\n", resp->data_size); -#endif - - if (s == 0) { - if (write (1, data, resp->data_size) < 0) - glibtop_warn_io ("write"); - } else { - if (send (s, data, resp->data_size, 0) , 0) - glibtop_warn_io ("send"); - } - } -} - -int -do_read (int s, void *ptr, size_t total_size) -{ - int nread; - size_t already_read = 0, remaining = total_size; - - while (already_read < total_size) { - if (s) - nread = recv (s, ptr, remaining, 0); - else - nread = read (0, ptr, remaining); - - if ((already_read == 0) && (nread == 0)) { - glibtop_warn ("pid %d received eof.", getpid ()); - return 0; - } - - if (nread <= 0) { - glibtop_warn_io ("recv"); - return 0; - } - - already_read += nread; - remaining -= nread; - (char *) ptr += nread; - -#ifdef REAL_DEBUG - fprintf (stderr, "READ (%d): %d - %d - %d\n", - nread, already_read, remaining, total_size); -#endif - } - - return already_read; -} diff --git a/src/daemon/main.c b/src/daemon/main.c deleted file mode 100644 index 36154cfe..00000000 --- a/src/daemon/main.c +++ /dev/null @@ -1,237 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 "daemon.h" - -#ifdef LIBGTOP_ENABLE_DEBUG -#ifndef PARENT_DEBUG -#define PARENT_DEBUG 1 -#endif -#ifndef DEBUG -#define DEBUG 1 -#endif -#endif - -void -handle_parent_connection (int s) -{ - glibtop *server = glibtop_global_server; - glibtop_response _resp, *resp = &_resp; - glibtop_command _cmnd, *cmnd = &_cmnd; - glibtop_mountentry *mount_list; - char parameter [BUFSIZ]; - unsigned short device; - int64_t *param_ptr; - int all_fs; - pid_t pid; - void *ptr; - - glibtop_send_version (glibtop_global_server, s); - - if (verbose_output) - syslog_message (LOG_INFO, "Parent features = %lu", - glibtop_server_features); - - if (enable_debug) - syslog_message (LOG_DEBUG, "SIZEOF: %u - %u - %u - %u - %u - %u", - sizeof (glibtop_command), sizeof (glibtop_response), - sizeof (glibtop_mountentry), sizeof (glibtop_union), - sizeof (glibtop_sysdeps), - sizeof (glibtop_response_union)); - - while (do_read (s, cmnd, sizeof (glibtop_command))) { - if (enable_debug) - syslog_message (LOG_DEBUG, - "Parent (%d) received command %d from client.", - getpid (), (int) cmnd->command); - - if (cmnd->data_size >= BUFSIZ) { - syslog_message (LOG_WARNING, - "Client sent %d bytes, but buffer is %d", - cmnd->data_size, BUFSIZ); - return; - } - - memset (resp, 0, sizeof (glibtop_response)); - - memset (parameter, 0, sizeof (parameter)); - - if (cmnd->data_size) { - if (enable_debug) - syslog_message (LOG_DEBUG, "Client has %d bytes of data.", - (int) cmnd->data_size); - - do_read (s, parameter, cmnd->data_size); - - } else if (cmnd->size) { - memcpy (parameter, cmnd->parameter, cmnd->size); - } - - switch (cmnd->command) { - case GLIBTOP_CMND_QUIT: - do_output (s, resp, 0, 0, NULL); - return; - case GLIBTOP_CMND_SYSDEPS: - memcpy (&resp->u.sysdeps, &server->sysdeps, - sizeof (glibtop_sysdeps)); - resp->u.sysdeps.features = GLIBTOP_SYSDEPS_ALL; - do_output (s, resp, _offset_union (sysdeps), 0, NULL); - break; - case GLIBTOP_CMND_CPU: - glibtop_get_cpu_l (server, &resp->u.data.cpu); - do_output (s, resp, _offset_data (cpu), 0, NULL); - break; - case GLIBTOP_CMND_MEM: - glibtop_get_mem_l (server, &resp->u.data.mem); - do_output (s, resp, _offset_data (mem), 0, NULL); - break; - case GLIBTOP_CMND_SWAP: - glibtop_get_swap_l (server, &resp->u.data.swap); - do_output (s, resp, _offset_data (swap), 0, NULL); - break; - case GLIBTOP_CMND_UPTIME: - glibtop_get_uptime_l (server, &resp->u.data.uptime); - do_output (s, resp, _offset_data (uptime), 0, NULL); - break; - case GLIBTOP_CMND_LOADAVG: - glibtop_get_loadavg_l (server, &resp->u.data.loadavg); - do_output (s, resp, _offset_data (loadavg), 0, NULL); - break; - case GLIBTOP_CMND_SHM_LIMITS: - glibtop_get_shm_limits_l - (server, &resp->u.data.shm_limits); - do_output (s, resp, _offset_data (shm_limits), 0, NULL); - break; - case GLIBTOP_CMND_MSG_LIMITS: - glibtop_get_msg_limits_l - (server, &resp->u.data.msg_limits); - do_output (s, resp, _offset_data (msg_limits), 0, NULL); - break; - case GLIBTOP_CMND_SEM_LIMITS: - glibtop_get_sem_limits_l - (server, &resp->u.data.sem_limits); - do_output (s, resp, _offset_data (sem_limits), 0, NULL); - break; - case GLIBTOP_CMND_PROCLIST: - param_ptr = (int64_t *) parameter; - ptr = glibtop_get_proclist_l (server, - &resp->u.data.proclist, - param_ptr [0], - param_ptr [1]); - do_output (s, resp, _offset_data (proclist), - resp->u.data.proclist.total, ptr); - glibtop_free_r (server, ptr); - break; - case GLIBTOP_CMND_PROC_MAP: - memcpy (&pid, parameter, sizeof (pid_t)); - ptr = glibtop_get_proc_map_l (server, - &resp->u.data.proc_map, - pid); - do_output (s, resp, _offset_data (proc_map), - resp->u.data.proc_map.total, ptr); - glibtop_free_r (server, ptr); - break; - case GLIBTOP_CMND_PROC_ARGS: - memcpy (&pid, parameter, sizeof (pid_t)); - ptr = glibtop_get_proc_args_l (server, - &resp->u.data.proc_args, - pid, 0); - do_output (s, resp, _offset_data (proc_args), - ptr ? resp->u.data.proc_args.size+1 : 0, ptr); - glibtop_free_r (server, ptr); - break; - case GLIBTOP_CMND_PROC_STATE: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_state_l - (server, &resp->u.data.proc_state, pid); - do_output (s, resp, _offset_data (proc_state), 0, NULL); - break; - case GLIBTOP_CMND_PROC_UID: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_uid_l - (server, &resp->u.data.proc_uid, pid); - do_output (s, resp, _offset_data (proc_uid), 0, NULL); - break; - case GLIBTOP_CMND_PROC_MEM: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_mem_l - (server, &resp->u.data.proc_mem, pid); - do_output (s, resp, _offset_data (proc_mem), 0, NULL); - break; - case GLIBTOP_CMND_PROC_TIME: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_time_l - (server, &resp->u.data.proc_time, pid); - do_output (s, resp, _offset_data (proc_time), 0, NULL); - break; - case GLIBTOP_CMND_PROC_SIGNAL: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_signal_l - (server, &resp->u.data.proc_signal, pid); - do_output (s, resp, _offset_data (proc_signal), 0, NULL); - break; - case GLIBTOP_CMND_PROC_KERNEL: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_kernel_l - (server, &resp->u.data.proc_kernel, pid); - do_output (s, resp, _offset_data (proc_kernel), 0, NULL); - break; - case GLIBTOP_CMND_PROC_SEGMENT: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_segment_l - (server, &resp->u.data.proc_segment, pid); - do_output (s, resp, _offset_data (proc_segment), 0, NULL); - break; - case GLIBTOP_CMND_MOUNTLIST: - memcpy (&all_fs, parameter, sizeof (all_fs)); - mount_list = glibtop_get_mountlist_l - (server, &resp->u.data.mountlist, all_fs); - do_output (s, resp, _offset_data (mountlist), - resp->u.data.mountlist.total, mount_list); - glibtop_free_r (server, mount_list); - break; - case GLIBTOP_CMND_FSUSAGE: - glibtop_get_fsusage_l - (server, &resp->u.data.fsusage, parameter); - do_output (s, resp, _offset_data (fsusage), - 0, NULL); - break; - case GLIBTOP_CMND_PPP: - memcpy (&device, parameter, sizeof (device)); - glibtop_get_ppp_l - (server, &resp->u.data.ppp, device); - do_output (s, resp, _offset_data (ppp), 0, NULL); - break; - case GLIBTOP_CMND_NETLOAD: - glibtop_get_netload_l - (server, &resp->u.data.netload, parameter); - do_output (s, resp, _offset_data (netload), - 0, NULL); - break; - default: - syslog_message (LOG_ERR, "Parent received unknown command %u.", - cmnd->command); - break; - } - } -} diff --git a/src/daemon/server.c b/src/daemon/server.c deleted file mode 100644 index 8c62f9dc..00000000 --- a/src/daemon/server.c +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 "daemon.h" - -static glibtop _glibtop_global_server; -glibtop *glibtop_global_server = &_glibtop_global_server; - -#include -#include -#include - -#include - -const unsigned long glibtop_server_features = -GLIBTOP_SUID_CPU + -GLIBTOP_SUID_MEM + -GLIBTOP_SUID_SWAP + -GLIBTOP_SUID_UPTIME + -GLIBTOP_SUID_LOADAVG + -GLIBTOP_SUID_SHM_LIMITS + -GLIBTOP_SUID_MSG_LIMITS + -GLIBTOP_SUID_SEM_LIMITS + -GLIBTOP_SUID_PROCLIST + -GLIBTOP_SUID_PROC_STATE + -GLIBTOP_SUID_PROC_UID + -GLIBTOP_SUID_PROC_MEM + -GLIBTOP_SUID_PROC_TIME + -GLIBTOP_SUID_PROC_SIGNAL + -GLIBTOP_SUID_PROC_KERNEL + -GLIBTOP_SUID_PROC_SEGMENT + -GLIBTOP_SUID_PROC_ARGS + -GLIBTOP_SUID_PROC_MAP + -GLIBTOP_SUID_NETLOAD + -GLIBTOP_SUID_PPP; - -#include -#include - -int -main(int argc, char *argv[]) -{ - struct utsname uts; - int uid, euid, gid, egid; - - /* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */ - - uid = getuid (); euid = geteuid (); - gid = getgid (); egid = getegid (); - - if (uname (&uts)) _exit (1); - - if (strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) || - strcmp (uts.release, LIBGTOP_COMPILE_RELEASE) || - strcmp (uts.machine, LIBGTOP_COMPILE_MACHINE)) { - fprintf (stderr, "Can only run on %s %s %s\n", - LIBGTOP_COMPILE_SYSTEM, - LIBGTOP_COMPILE_RELEASE, - LIBGTOP_COMPILE_MACHINE); - _exit (1); - } - - glibtop_init_p (glibtop_global_server, 0, 0); - - if (setreuid (euid, uid)) _exit (1); - - if (setregid (egid, gid)) _exit (1); - - /* !!! END OF SUID ROOT PART !!! */ - - handle_slave_connection (0, 0); - - _exit (0); -} diff --git a/src/daemon/server_config.h b/src/daemon/server_config.h deleted file mode 100644 index 09ae9ae8..00000000 --- a/src/daemon/server_config.h +++ /dev/null @@ -1,11 +0,0 @@ -#define SERVER_PORT 42800 - -#define SERVER_UID 99 -#define SERVER_GID 99 - -#define HOST_TABLE_ENTRIES 1 - -const char *permitted_host_names [HOST_TABLE_ENTRIES] = -{ NULL }; - -unsigned long permitted_hosts [HOST_TABLE_ENTRIES]; diff --git a/src/daemon/server_config.h.in b/src/daemon/server_config.h.in deleted file mode 100644 index f7884c8d..00000000 --- a/src/daemon/server_config.h.in +++ /dev/null @@ -1,44 +0,0 @@ -/* -*-c-*- */ - -/* This is a sample config file. - * - * Copy this file to 'server_config.h' and edit it to fix your needs ! - * - * You can also use the 'server_config.pl' script to create 'server_config.h'. - * - */ - -#define SERVER_PORT 42800 /* Port the server should listen on. */ - -/* NOTE: On RedHat 5.1 nobody is UID 99 and GID 99. - * - * The 'server_config.pl' script will use the real UID and GID of 'nobody' - * on your system as default. - * - * NOTE: This only works if the server is started as root or SUID to root. - */ - -#define SERVER_UID 99 /* User ID the server should run as. */ -#define SERVER_GID 99 /* Group ID the server should run as. */ - -#define HOST_TABLE_ENTRIES 1 /* Number of entries in the host table. */ - -/* List of hosts that should be authorized to connect to the server. - * - * SECURITY WARNING: - * Enabling access for a particular hosts means the ALL USERS on this host - * will be allowed to connect to the server ! - * - * If you want security, let this table empty and use the 'xauth' method - * instead. - * - * Look at the manpage of gnuserv (1) as shipped with GNU Emacs for more - * details about security. The server uses the same security mechanisms - * like gnuserv from XEmacs 20.3. - */ - -const char *permitted_host_names [HOST_TABLE_ENTRIES] = -{ NULL }; - -unsigned long permitted_hosts [HOST_TABLE_ENTRIES]; - diff --git a/src/daemon/server_config.pl b/src/daemon/server_config.pl deleted file mode 100755 index 3e78ca8f..00000000 --- a/src/daemon/server_config.pl +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/perl -w - -require 5.004; -use strict; - -print "Enter port the server should listen on [42800]: "; - -my $port = ; chop $port; -$port = 42800 unless $port =~ /^\d+$/; - -print "\nUser name or UID to run as [nobody]: "; - -my $user = ; chop $user; $user = 'nobody' if $user eq ''; - -my ($login, $pass, $uid, $gid); - -unless ($user =~ /^\d+$/) { - ($login, $pass, $uid, $gid) = getpwnam ($user) or - die "User '$user' not in passwd file."; -} - -my $g_default = (defined $gid) ? $gid : 'nogroup'; - -print "Group name or GID to run as [$g_default]: "; - -my $group = ; chop $group; $group = $g_default if $group eq ''; - -unless ($group =~ /^\d+$/) { - $gid = getgrnam ($group) or - die "Group '$group' not in group file."; -} - -print "\nEnter list of hosts which should be authorized to"; -print "\nconnect to the server (terminate with a blank line):\n\n"; - -print "SECURITY WARNING:\n"; -print " Enabling access for a particular hosts means the ALL USERS on this host will\n"; -print " be allowed to connect to the server !\n\n"; - -print " If you want security, let this table empty and use the 'xauth' method instead.\n"; -print " Look at the manpage of gnuserv (1) as shipped with GNU Emacs for more details\n"; -print " about security. The server uses the same security mechanisms like gnuserv from\n"; -print " XEmacs 20.3\n\n"; - -my @hosts = (); -my @host_addrs = (); -my @host_names = (); - -while (1) { - print "Host: "; - - my $host = ; chop $host; - last if $host eq ''; - - my ($name,$aliases,$addrtype,$length,@addrs) = gethostbyname ($host) or - die "gethostbyname (): Can't resolve '$host'"; - - my ($a,$b,$c,$d) = unpack('C4',$addrs[0]); - - push @hosts, sprintf ("0x%02X%02X%02X%02X", $d, $c, $b, $a); - push @host_addrs, sprintf ("%d.%d.%d.%d", $a, $b, $c, $d); - push @host_names, $name; -}; - -print "\n"; -print "This is your config:\n"; -print "====================\n\n"; - -printf qq[%-30s: %d\n\n], 'Port', $port; -printf qq[%-30s: %d\n], 'UID', $uid; -printf qq[%-30s: %d\n\n], 'GID', $gid; - -foreach (0..$#hosts) { - printf qq[%-30s (%s - %s)\n], $host_names[$_], $hosts[$_], $host_addrs [$_]; -} - -print "\n"; - -print "Accept? (yes/no) "; - -my $accept = ; chop $accept; - -exit unless $accept eq 'yes'; - -print "\n"; - -open CONFIG, "> server_config.h" or - die "open (server_config.h): $!"; -select CONFIG; - -printf qq[\#define SERVER_PORT\t\t%d\n\n], $port; - -printf qq[\#define SERVER_UID\t\t%d\n], $uid; -printf qq[\#define SERVER_GID\t\t%d\n\n], $gid; - -printf qq[\#define HOST_TABLE_ENTRIES\t%d\n\n], $#hosts + 1; - -foreach (@host_names) { - $_ = qq["$_"]; -} - -printf qq[const char *permitted_host_names [HOST_TABLE_ENTRIES] = \n]; -printf qq[{ %s };\n\n], join (', ', @host_names); - -printf qq[unsigned long permitted_hosts [HOST_TABLE_ENTRIES];\n]; - -close CONFIG; - -select STDOUT; - -print "Your config has successfully been written to 'server_config.h'.\n"; diff --git a/src/daemon/slave.c b/src/daemon/slave.c deleted file mode 100644 index 91d97879..00000000 --- a/src/daemon/slave.c +++ /dev/null @@ -1,256 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 "daemon.h" - -void -handle_slave_connection (int input, int output) -{ - glibtop *server = glibtop_global_server; - int64_t *param_ptr; - const void *ptr; - - unsigned short max_len; - pid_t pid; - - glibtop_response _resp, *resp = &_resp; - glibtop_command _cmnd, *cmnd = &_cmnd; - char parameter [BUFSIZ]; - - glibtop_send_version (glibtop_global_server, output); - - while (do_read (input, cmnd, sizeof (glibtop_command))) { -#ifdef SLAVE_DEBUG - fprintf (stderr, "Slave %d received command " - "%d from client.\n", getpid (), cmnd->command); -#endif - - if (cmnd->data_size >= BUFSIZ) - glibtop_error ("Client sent %d bytes, " - "but buffer is %d", - cmnd->size, BUFSIZ); - - memset (resp, 0, sizeof (glibtop_response)); - - memset (parameter, 0, sizeof (parameter)); - - if (cmnd->data_size) { -#ifdef SLAVE_DEBUG - fprintf (stderr, "Client has %d bytes of data.\n", - cmnd->data_size); -#endif - - do_read (input, parameter, cmnd->data_size); - - } else if (cmnd->size) { - memcpy (parameter, cmnd->parameter, cmnd->size); - } - - switch (cmnd->command) { - case GLIBTOP_CMND_QUIT: - do_output (output, resp, 0, 0, NULL); - return; -#if GLIBTOP_SUID_PROCLIST - case GLIBTOP_CMND_PROCLIST: - param_ptr = (int64_t *) parameter; - ptr = glibtop_get_proclist_p - (server, &resp->u.data.proclist, - param_ptr [0], param_ptr [1]); - do_output (output, resp, _offset_data (proclist), - resp->u.data.proclist.total, ptr); - glibtop_free_r (server, ptr); - break; -#endif -#if GLIBTOP_SUID_PROC_ARGS - case GLIBTOP_CMND_PROC_ARGS: - memcpy (&pid, parameter, sizeof (pid_t)); - memcpy (&max_len, parameter + sizeof (pid_t), - sizeof (max_len)); - ptr = glibtop_get_proc_args_p (server, - &resp->u.data.proc_args, - pid, max_len); - do_output (output, resp, _offset_data (proc_args), - ptr ? resp->u.data.proc_args.size+1 : 0, - ptr); - glibtop_free_r (server, ptr); - break; -#endif -#if GLIBTOP_SUID_PROC_MAP - case GLIBTOP_CMND_PROC_MAP: - memcpy (&pid, parameter, sizeof (pid_t)); - ptr = glibtop_get_proc_map_p (server, - &resp->u.data.proc_map, - pid); - do_output (output, resp, _offset_data (proc_map), - resp->u.data.proc_map.total, ptr); - glibtop_free_r (server, ptr); - break; -#endif - default: - handle_slave_command (cmnd, resp, parameter); - do_output (output, resp, resp->offset, 0, NULL); - break; - } - } -} - -void -handle_slave_command (glibtop_command *cmnd, glibtop_response *resp, - const void *parameter) -{ - glibtop *server = glibtop_global_server; - unsigned device; - pid_t pid; - - switch (cmnd->command) { - case GLIBTOP_CMND_SYSDEPS: - memcpy (&resp->u.sysdeps, &server->sysdeps, - sizeof (glibtop_sysdeps)); - resp->u.sysdeps.features = glibtop_server_features; - resp->u.sysdeps.flags = glibtop_server_features | - (1 << GLIBTOP_SYSDEPS_FEATURES); - resp->offset = _offset_union (sysdeps); - break; -#if GLIBTOP_SUID_CPU - case GLIBTOP_CMND_CPU: - glibtop_get_cpu_p (server, &resp->u.data.cpu); - resp->offset = _offset_data (cpu); - break; -#endif -#if GLIBTOP_SUID_MEM - case GLIBTOP_CMND_MEM: - glibtop_get_mem_p (server, &resp->u.data.mem); - resp->offset = _offset_data (mem); - break; -#endif -#if GLIBTOP_SUID_SWAP - case GLIBTOP_CMND_SWAP: - glibtop_get_swap_p (server, &resp->u.data.swap); - resp->offset = _offset_data (swap); - break; -#endif -#if GLIBTOP_SUID_UPTIME - case GLIBTOP_CMND_UPTIME: - glibtop_get_uptime_p (server, &resp->u.data.uptime); - resp->offset = _offset_data (uptime); - break; -#endif -#if GLIBTOP_SUID_LOADAVG - case GLIBTOP_CMND_LOADAVG: - glibtop_get_loadavg_p (server, &resp->u.data.loadavg); - resp->offset = _offset_data (loadavg); - break; -#endif -#if GLIBTOP_SUID_SHM_LIMITS - case GLIBTOP_CMND_SHM_LIMITS: - glibtop_get_shm_limits_p (server, &resp->u.data.shm_limits); - resp->offset = _offset_data (shm_limits); - break; -#endif -#if GLIBTOP_SUID_MSG_LIMITS - case GLIBTOP_CMND_MSG_LIMITS: - glibtop_get_msg_limits_p (server, &resp->u.data.msg_limits); - resp->offset = _offset_data (msg_limits); - break; -#endif -#if GLIBTOP_SUID_SEM_LIMITS - case GLIBTOP_CMND_SEM_LIMITS: - glibtop_get_sem_limits_p (server, &resp->u.data.sem_limits); - resp->offset = _offset_data (sem_limits); - break; -#endif -#if GLIBTOP_SUID_PROC_STATE - case GLIBTOP_CMND_PROC_STATE: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_state_p - (server, &resp->u.data.proc_state, pid); - resp->offset = _offset_data (proc_state); - break; -#endif -#if GLIBTOP_SUID_PROC_UID - case GLIBTOP_CMND_PROC_UID: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_uid_p - (server, &resp->u.data.proc_uid, pid); - resp->offset = _offset_data (proc_uid); - break; -#endif -#if GLIBTOP_SUID_PROC_MEM - case GLIBTOP_CMND_PROC_MEM: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_mem_p - (server, &resp->u.data.proc_mem, pid); - resp->offset = _offset_data (proc_mem); - break; -#endif -#if GLIBTOP_SUID_PROC_TIME - case GLIBTOP_CMND_PROC_TIME: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_time_p - (server, &resp->u.data.proc_time, pid); - resp->offset = _offset_data (proc_time); - break; -#endif -#if GLIBTOP_SUID_PROC_SIGNAL - case GLIBTOP_CMND_PROC_SIGNAL: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_signal_p - (server, &resp->u.data.proc_signal, pid); - resp->offset = _offset_data (proc_signal); - break; -#endif -#if GLIBTOP_SUID_PROC_KERNEL - case GLIBTOP_CMND_PROC_KERNEL: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_kernel_p - (server, &resp->u.data.proc_kernel, pid); - resp->offset = _offset_data (proc_kernel); - break; -#endif -#if GLIBTOP_SUID_PROC_SEGMENT - case GLIBTOP_CMND_PROC_SEGMENT: - memcpy (&pid, parameter, sizeof (pid_t)); - glibtop_get_proc_segment_p - (server, &resp->u.data.proc_segment, pid); - resp->offset = _offset_data (proc_segment); - break; -#endif -#if GLIBTOP_SUID_NETLOAD - case GLIBTOP_CMND_NETLOAD: - glibtop_get_netload_p (server, &resp->u.data.netload, parameter); - resp->offset = _offset_data (netload); - break; -#endif -#if GLIBTOP_SUID_PPP - case GLIBTOP_CMND_PPP: - memcpy (&device, parameter, sizeof (unsigned short)); - glibtop_get_ppp_p (server, &resp->u.data.ppp, device); - resp->offset = _offset_data (ppp); - break; -#endif - default: - glibtop_error ("Child received unknown command %u", - cmnd->command); - break; - } -} diff --git a/src/daemon/version.c b/src/daemon/version.c deleted file mode 100644 index d80d6412..00000000 --- a/src/daemon/version.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -void -glibtop_send_version (glibtop *server, int fd) -{ - char buffer [BUFSIZ]; - size_t size; - - sprintf (buffer, LIBGTOP_VERSION_STRING, - LIBGTOP_VERSION, LIBGTOP_SERVER_VERSION, - sizeof (glibtop_command), - sizeof (glibtop_response), - sizeof (glibtop_union), - sizeof (glibtop_sysdeps)); - - size = strlen (buffer) + 1; - -#ifdef DEBUG - fprintf (stderr, "SERVER ID: |%s|\n", buffer); -#endif - - if (fd == 0) { - if (write (1, (const void *) &size, sizeof (size)) < 0) - glibtop_warn_io_r (server, "write"); - } else { - if (send (fd, (const void *) &size, sizeof (size), 0) < 0) - glibtop_warn_io_r (server, "send"); - } - - if (fd == 0) { - if (write (1, (const void *) buffer, size) < 0) - glibtop_warn_io_r (server, "write"); - } else { - if (send (fd, (const void *) buffer, size, 0) < 0) - glibtop_warn_io_r (server, "send"); - } -} diff --git a/src/inodedb/.cvsignore b/src/inodedb/.cvsignore deleted file mode 100644 index 80d8556f..00000000 --- a/src/inodedb/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile.in -Makefile -mkinodedb -file_by_inode -.deps diff --git a/src/inodedb/Makefile.am b/src/inodedb/Makefile.am deleted file mode 100644 index 41115ed1..00000000 --- a/src/inodedb/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -bin_PROGRAMS = mkinodedb file_by_inode - -INCLUDES = @INCLUDES@ - -mkinodedb_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - -file_by_inode_LDADD = $(top_builddir)/lib/libgtop.la \ - $(top_builddir)/sysdeps/common/libgtop_common.la \ - $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps.la \ - @LIBSUPPORT@ @INTLLIBS@ - -EXTRA_DIST = README.inodedb diff --git a/src/inodedb/README.inodedb b/src/inodedb/README.inodedb deleted file mode 100644 index 82d9ecc5..00000000 --- a/src/inodedb/README.inodedb +++ /dev/null @@ -1,73 +0,0 @@ -Not all UNIXes provide an easy way to get the filename if you have -the device it is mounted on and its inode. - -Well, under Linux we can simply read /proc//maps to get the filenames -but I don't see any way to get this under FreeBSD. - -In this case you can give configure the optional `--with-libgtop-inodedb' -parameter to build this stuff here. - -It uses the GNU database library `gdbm' to find the inode in a database -which is created when libgtop is installed. This should be reasonable -fast since the entire filesystem only needs to be traversed once when -libgtop is installed (and each time you install new software, of cause). - -We have two databases: - -* First the system administrator may place a system-wide database - in `$(prefix)/var/libgtop/inodedb.db' when installing libgtop. - -* Every user can have his/her own one in `~/var/libgtop/inodedb.db'. - This one has precedence over the system wide one. - -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. - -To use this interface in your program, you first have to call -`glibtop_inodedb_open ()': - -glibtop_inodedb * -glibtop_inodedb_open (unsigned databases, unsigned long cachesize) - -glibtop_inodedb * -glibtop_inodedb_open_s (glibtop *server, unsigned databases, - unsigned long cachesize) - -There are some constants defined in for the `databases' -parameter - you can use zero as default: - -#define GLIBTOP_INODEDB_SYSTEM 1 -#define GLIBTOP_INODEDB_USER 2 -#define GLIBTOP_INODEDB_CACHE 4 - -The `cachesize' gives the size of a not yet implemented in-memory cache for -looked up entries. - -This function will return a pointer of type `glibtop_inodedb *' which you need -to lookup an entry in the database. - -To look up an entry, use the `glibtop_inodedb_lookup ()' function: - -const char * -glibtop_inodedb_lookup (glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode) -const char * -glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode) - -It will either return a pointer to the filename - which you have to -`glibtop_free ()' once done with it - or NULL on error. - -You can use the `file_by_inode' program in this directory to test the -interface - just call it with two command line arguments: the device number -and the inode number. - -Martin diff --git a/src/inodedb/file_by_inode.c b/src/inodedb/file_by_inode.c deleted file mode 100644 index 8e4370fe..00000000 --- a/src/inodedb/file_by_inode.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include -#include - -#include - -int -main (int argc, const char *argv []) -{ - glibtop_inodedb *inodedb; - const char *filename; - unsigned device, inode; - - if (argc != 3) { - fprintf (stderr, "Usage: %s device inode\n", argv [0]); - exit (1); - } - - if (sscanf (argv [1], "%d", &device) != 1) { - fprintf (stderr, "Usage: %s device inode\n", argv [0]); - exit (1); - } - - if (sscanf (argv [2], "%d", &inode) != 1) { - fprintf (stderr, "Usage: %s device inode\n", argv [0]); - exit (1); - } - - inodedb = glibtop_inodedb_open (0, 0); - if (!inodedb) exit (1); - - filename = glibtop_inodedb_lookup (inodedb, device, inode); - if (!filename) exit (2); - - fprintf (stderr, "FILENAME: %d - %d - '%s'\n", - (int) device, (int) inode, filename); - - exit (0); -} diff --git a/src/inodedb/mkinodedb.c b/src/inodedb/mkinodedb.c deleted file mode 100644 index a338d322..00000000 --- a/src/inodedb/mkinodedb.c +++ /dev/null @@ -1,135 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include -#include - -#include - -int -main (int argc, char *argv []) -{ - GDBM_FILE dbf; - char dirname [BUFSIZ]; - FILE *f; - - if (argc != 3) { - fprintf (stderr, "Usage: %s database filename\n", argv [0]); - exit (1); - } - - f = fopen (argv [2], "rt"); - if (!f) - glibtop_error_io ("fopen (%s)", argv [2]); - - dbf = gdbm_open (argv [1], 512, GDBM_WRCREAT, 0600, 0); - if (!dbf) - glibtop_error_io ("gdbm_open (%s)", argv [1]); - - while (fgets (dirname, BUFSIZ-1, f)) { - struct dirent *entry; - struct stat statb; - DIR *directory; - size_t len; - - len = strlen (dirname); - if (!len) continue; - - if (dirname [len-1] == '\n') - dirname [len-1] = 0; - - if (stat (dirname, &statb)) - continue; - - if (S_ISREG (statb.st_mode)) { - glibtop_inodedb_key key; - datum d_key, d_content; - - d_key.dptr = (void *) &key; - d_key.dsize = sizeof (key); - - d_content.dptr = dirname; - d_content.dsize = strlen (dirname) + 1; - - key.device = (u_int64_t) statb.st_dev; - key.inode = (u_int64_t) statb.st_ino; - - if (gdbm_store (dbf, d_key, d_content, GDBM_REPLACE)) - glibtop_error_io ("gdbm_store (%s)", dirname); - - printf ("%-52s - %8lu - %8lu\n", - dirname, (unsigned long) statb.st_dev, - (unsigned long) statb.st_ino); - - continue; - } - - if (!S_ISDIR (statb.st_mode)) - continue; - - directory = opendir (dirname); - if (!directory) continue; - - while ((entry = readdir (directory))) { - glibtop_inodedb_key key; - char filename [BUFSIZ]; - datum d_key, d_content; - - sprintf (filename, "%s/%s", dirname, entry->d_name); - - if (stat (filename, &statb)) - continue; - - if (!S_ISREG (statb.st_mode)) - continue; - - d_key.dptr = (void *) &key; - d_key.dsize = sizeof (key); - - d_content.dptr = filename; - d_content.dsize = strlen (filename) + 1; - - key.device = (u_int64_t) statb.st_dev; - key.inode = (u_int64_t) statb.st_ino; - - if (gdbm_store (dbf, d_key, d_content, GDBM_REPLACE)) - glibtop_error_io ("gdbm_store (%s)", filename); - - printf ("%-52s - %8lu - %8lu\n", - filename, (unsigned long) statb.st_dev, - (unsigned long) statb.st_ino); - } - - closedir (directory); - } - - gdbm_close (dbf); - - fclose (f); - - exit (0); -} diff --git a/stamp-h.in b/stamp-h.in deleted file mode 100644 index 9788f702..00000000 --- a/stamp-h.in +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/sysdeps/.cvsignore b/sysdeps/.cvsignore deleted file mode 100644 index 282522db..00000000 --- a/sysdeps/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/sysdeps/Makefile.am b/sysdeps/Makefile.am deleted file mode 100644 index 4fd61a4b..00000000 --- a/sysdeps/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -if GUILE -guile_SUBDIRS = guile -else -guile_SUBDIRS = -endif - -SUBDIRS = @sysdeps_dir@ common names $(guile_SUBDIRS) - -DIST_SUBDIRS = common guile linux kernel names osf1 \ - stub stub_suid sun4 freebsd diff --git a/sysdeps/common/.cvsignore b/sysdeps/common/.cvsignore deleted file mode 100644 index aad6382d..00000000 --- a/sysdeps/common/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -libgtop_common.la -so_locations -*.lo -*.la diff --git a/sysdeps/common/Makefile.am b/sysdeps/common/Makefile.am deleted file mode 100644 index 8ba26000..00000000 --- a/sysdeps/common/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -if INODEDB -inodedb_SRCLIST = inodedb.c -inodedb_DEFS = -DSYSTEM_INODEDB=\"$(prefix)/var/libgtop/inodedb.db\" -else -inodedb_SRCLIST = -inodedb_DEFS = -endif - -CFLAGS = @CFLAGS@ $(inodedb_DEFS) - -lib_LTLIBRARIES = libgtop_common.la libgtop_suid_common.la - -libgtop_common_la_SOURCES = xmalloc.c error.c gnuslib.c \ - fsusage.c fsusage.h mountlist.c mountlist.h \ - $(inodedb_SRCLIST) - -libgtop_common_la_LDFLAGS = $(LT_VERSION_INFO) -libgtop_common_la_LIBADD = $(LIBGTOP_EXTRA_LIBS) - -libgtop_suid_common_la_SOURCES = xmalloc.c error.c sysdeps_suid.c - -libgtop_suid_common_la_LDFLAGS = $(LT_VERSION_INFO) - -EXTRA_DIST = inodedb.c diff --git a/sysdeps/common/error.c b/sysdeps/common/error.c deleted file mode 100644 index f334ec50..00000000 --- a/sysdeps/common/error.c +++ /dev/null @@ -1,88 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#define DEFAULT_NAME "LibGTop-Server" - -/* Prints error message and exits. */ - -static void -print_server_name (glibtop *server) -{ - fprintf (stderr, "%s: ", server ? - (server->name ? server->name : DEFAULT_NAME) - : DEFAULT_NAME); -} - -void -glibtop_error_vr (glibtop *server, char *format, va_list args) -{ - print_server_name (server); - vfprintf (stderr, format, args); - fprintf (stderr, "\n"); - -#ifdef LIBGTOP_ENABLE_DEBUG - abort (); -#else - exit (1); -#endif -} - -void -glibtop_error_io_vr (glibtop *server, char *format, int error, va_list args) -{ - print_server_name (server); - vfprintf (stderr, format, args); - fprintf (stderr, ": %s\n", strerror (error)); - -#ifdef LIBGTOP_ENABLE_DEBUG - abort (); -#else - exit (1); -#endif -} - -void -glibtop_warn_vr (glibtop *server, char *format, va_list args) -{ - print_server_name (server); - vfprintf (stderr, format, args); - fprintf (stderr, "\n"); - -#ifdef LIBGTOP_FATAL_WARNINGS - abort (); -#endif -} - -void -glibtop_warn_io_vr (glibtop *server, char *format, int error, va_list args) -{ - print_server_name (server); - vfprintf (stderr, format, args); - fprintf (stderr, ": %s\n", strerror (error)); - -#ifdef LIBGTOP_FATAL_WARNINGS - abort (); -#endif -} diff --git a/sysdeps/common/fsusage.c b/sysdeps/common/fsusage.c deleted file mode 100644 index c0665523..00000000 --- a/sysdeps/common/fsusage.c +++ /dev/null @@ -1,301 +0,0 @@ -/* fsusage.c -- return space usage of mounted filesystems - Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#if HAVE_CONFIG_H -# include -#endif - -#include -#include -#include "fsusage.h" - -int statfs (); - -#if HAVE_SYS_PARAM_H -# include -#endif - -#if HAVE_SYS_MOUNT_H -# include -#endif - -#if HAVE_SYS_VFS_H -# include -#endif - -#if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */ -# include -#endif - -#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY) -# include /* SVR2 */ -#endif - -#if HAVE_FCNTL_H -# include -#endif - -#if HAVE_SYS_STATFS_H -# include -#endif - -#if HAVE_DUSTAT_H /* AIX PS/2 */ -# include -#endif - -#if HAVE_SYS_STATVFS_H /* SVR4 */ -# include -int statvfs (); -#endif - -#include -#include -#include - -static int -get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp); - -int safe_read (); - -/* Return the number of TOSIZE-byte blocks used by - BLOCKS FROMSIZE-byte blocks, rounding away from zero. - TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */ - -static long -adjust_blocks (blocks, fromsize, tosize) - long blocks; - int fromsize, tosize; -{ - if (tosize <= 0) - abort (); - if (fromsize <= 0) - return -1; - - if (fromsize == tosize) /* e.g., from 512 to 512 */ - return blocks; - else if (fromsize > tosize) /* e.g., from 2048 to 512 */ - return blocks * (fromsize / tosize); - else /* e.g., from 256 to 512 */ - return (blocks + (blocks < 0 ? -1 : 1)) / (tosize / fromsize); -} - -/* Fill in the fields of FSP with information about space usage for - the filesystem on which PATH resides. - DISK is the device on which PATH is mounted, for space-getting - methods that need to know it. - Return 0 if successful, -1 if not. When returning -1, ensure that - ERRNO is either a system error value, or zero if DISK is NULL - on a system that requires a non-NULL value. */ -static int -get_fs_usage (path, disk, fsp) - const char *path; - const char *disk; - struct fs_usage *fsp; -{ -#ifdef STAT_STATFS3_OSF1 -# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_fsize, 512) - - struct statfs fsd; - - if (statfs (path, &fsd, sizeof (struct statfs)) != 0) - return -1; - -#endif /* STAT_STATFS3_OSF1 */ - -#ifdef STAT_STATFS2_FS_DATA /* Ultrix */ -# define CONVERT_BLOCKS(B) adjust_blocks ((B), 1024, 512) - - struct fs_data fsd; - - if (statfs (path, &fsd) != 1) - return -1; - fsp->fsu_blocks = CONVERT_BLOCKS (fsd.fd_req.btot); - fsp->fsu_bfree = CONVERT_BLOCKS (fsd.fd_req.bfree); - fsp->fsu_bavail = CONVERT_BLOCKS (fsd.fd_req.bfreen); - fsp->fsu_files = fsd.fd_req.gtot; - fsp->fsu_ffree = fsd.fd_req.gfree; - -#endif /* STAT_STATFS2_FS_DATA */ - -#ifdef STAT_READ_FILSYS /* SVR2 */ -# ifndef SUPERBOFF -# define SUPERBOFF (SUPERB * 512) -# endif -# define CONVERT_BLOCKS(B) \ - adjust_blocks ((B), (fsd.s_type == Fs2b ? 1024 : 512), 512) - - struct filsys fsd; - int fd; - - if (! disk) - { - errno = 0; - return -1; - } - - fd = open (disk, O_RDONLY); - if (fd < 0) - return -1; - lseek (fd, (long) SUPERBOFF, 0); - if (safe_read (fd, (char *) &fsd, sizeof fsd) != sizeof fsd) - { - close (fd); - return -1; - } - close (fd); - fsp->fsu_blocks = CONVERT_BLOCKS (fsd.s_fsize); - fsp->fsu_bfree = CONVERT_BLOCKS (fsd.s_tfree); - fsp->fsu_bavail = CONVERT_BLOCKS (fsd.s_tfree); - fsp->fsu_files = (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1); - fsp->fsu_ffree = fsd.s_tinode; - -#endif /* STAT_READ_FILSYS */ - -#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */ -# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_bsize, 512) - - struct statfs fsd; - - if (statfs (path, &fsd) < 0) - return -1; - -# ifdef STATFS_TRUNCATES_BLOCK_COUNTS - - /* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the - struct statfs are truncated to 2GB. These conditions detect that - truncation, presumably without botching the 4.1.1 case, in which - the values are not truncated. The correct counts are stored in - undocumented spare fields. */ - if (fsd.f_blocks == 0x1fffff && fsd.f_spare[0] > 0) - { - fsd.f_blocks = fsd.f_spare[0]; - fsd.f_bfree = fsd.f_spare[1]; - fsd.f_bavail = fsd.f_spare[2]; - } -# endif /* STATFS_TRUNCATES_BLOCK_COUNTS */ - -#endif /* STAT_STATFS2_BSIZE */ - -#ifdef STAT_STATFS2_FSIZE /* 4.4BSD */ -# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_fsize, 512) - - struct statfs fsd; - - if (statfs (path, &fsd) < 0) - return -1; - -#endif /* STAT_STATFS2_FSIZE */ - -#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */ -# if _AIX || defined(_CRAY) -# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_bsize, 512) -# ifdef _CRAY -# define f_bavail f_bfree -# endif -# else -# define CONVERT_BLOCKS(B) (B) -# ifndef _SEQUENT_ /* _SEQUENT_ is DYNIX/ptx */ -# ifndef DOLPHIN /* DOLPHIN 3.8.alfa/7.18 has f_bavail */ -# define f_bavail f_bfree -# endif -# endif -# endif - - struct statfs fsd; - - if (statfs (path, &fsd, sizeof fsd, 0) < 0) - return -1; - /* Empirically, the block counts on most SVR3 and SVR3-derived - systems seem to always be in terms of 512-byte blocks, - no matter what value f_bsize has. */ - -#endif /* STAT_STATFS4 */ - -#ifdef STAT_STATVFS /* SVR4 */ -# define CONVERT_BLOCKS(B) \ - adjust_blocks ((B), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512) - - struct statvfs fsd; - - if (statvfs (path, &fsd) < 0) - return -1; - /* f_frsize isn't guaranteed to be supported. */ - -#endif /* STAT_STATVFS */ - -#if !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS) - /* !Ultrix && !SVR2 */ - - fsp->fsu_blocks = CONVERT_BLOCKS (fsd.f_blocks); - fsp->fsu_bfree = CONVERT_BLOCKS (fsd.f_bfree); - fsp->fsu_bavail = CONVERT_BLOCKS (fsd.f_bavail); - fsp->fsu_files = fsd.f_files; - fsp->fsu_ffree = fsd.f_ffree; - -#endif /* not STAT_STATFS2_FS_DATA && not STAT_READ_FILSYS */ - - return 0; -} - -#if defined(_AIX) && defined(_I386) -/* AIX PS/2 does not supply statfs. */ - -int -statfs (path, fsb) - char *path; - struct statfs *fsb; -{ - struct stat stats; - struct dustat fsd; - - if (stat (path, &stats)) - return -1; - if (dustat (stats.st_dev, 0, &fsd, sizeof (fsd))) - return -1; - fsb->f_type = 0; - fsb->f_bsize = fsd.du_bsize; - fsb->f_blocks = fsd.du_fsize - fsd.du_isize; - fsb->f_bfree = fsd.du_tfree; - fsb->f_bavail = fsd.du_tfree; - fsb->f_files = (fsd.du_isize - 2) * fsd.du_inopb; - fsb->f_ffree = fsd.du_tinode; - fsb->f_fsid.val[0] = fsd.du_site; - fsb->f_fsid.val[1] = fsd.du_pckno; - return 0; -} - -#endif /* _AIX && _I386 */ - -void -glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf, - const char *disk) -{ - struct fs_usage fsp; - - glibtop_init_r (&server, 0, 0); - - memset (buf, 0, sizeof (glibtop_fsusage)); - - if (get_fs_usage (disk, disk, &fsp)) - return; - - buf->blocks = fsp.fsu_blocks; - buf->bfree = fsp.fsu_bfree; - buf->bavail = fsp.fsu_bavail; - buf->files = fsp.fsu_files; - buf->ffree = fsp.fsu_ffree; -} diff --git a/sysdeps/common/fsusage.h b/sysdeps/common/fsusage.h deleted file mode 100644 index 0fb23efa..00000000 --- a/sysdeps/common/fsusage.h +++ /dev/null @@ -1,27 +0,0 @@ -/* fsusage.h -- declarations for filesystem space usage info - Copyright (C) 1991, 1992 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* Space usage statistics for a filesystem. Blocks are 512-byte. */ -struct fs_usage -{ - long fsu_blocks; /* Total blocks. */ - long fsu_bfree; /* Free blocks available to superuser. */ - long fsu_bavail; /* Free blocks available to non-superuser. */ - long fsu_files; /* Total file nodes. */ - long fsu_ffree; /* Free file nodes. */ -}; - diff --git a/sysdeps/common/gnuslib.c b/sysdeps/common/gnuslib.c deleted file mode 100644 index 67abf508..00000000 --- a/sysdeps/common/gnuslib.c +++ /dev/null @@ -1,375 +0,0 @@ -/* -*-C-*- - * Common library code for the GNU Emacs server and client. - * - * This file is part of GNU Emacs. - * - * Copying is permitted under those conditions described by the GNU - * General Public License. - * - * Copyright (C) 1989 Free Software Foundation, Inc. - * - * Author: Andy Norman (ange@hplb.hpl.hp.com), based on - * 'etc/server.c' and 'etc/emacsclient.c' from the 18.52 GNU - * Emacs distribution. - * - * Please mail bugs and suggestions to the author at the above address. - */ - -/* HISTORY - * 11-Nov-1990 bristor@simba - * Added EOT stuff. - */ - -/* - * This file incorporates new features added by Bob Weiner , - * Darrell Kindred and Arup Mukherjee . - * Please see the note at the end of the README file for details. - * - * (If gnuserv came bundled with your emacs, the README file is probably - * ../etc/gnuserv.README relative to the directory containing this file) - */ - -#include -#include - -#include - -#ifdef UNIX_DOMAIN_SOCKETS -static int connect_to_unix_server (void); -#endif - -#ifdef INTERNET_DOMAIN_SOCKETS -static int connect_to_internet_server (const char *serverhost, u_short port); -#endif - -/* On some systems, e.g. DGUX, inet_addr returns a 'struct in_addr'. */ -#ifdef HAVE_BROKEN_INET_ADDR -#define IN_ADDR struct in_addr -#define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == 0xffffffff) -#else -#if (LONGBITS > 32) -#define IN_ADDR unsigned int -#else -#define IN_ADDR unsigned long -#endif -#define NUMERIC_ADDR_ERROR (numeric_addr == (IN_ADDR) 0xffffffff) -#endif - -#include - -int -glibtop_make_connection (hostarg, portarg, s) - const char *hostarg; - int portarg; - int *s; -{ -#ifdef INTERNET_DOMAIN_SOCKETS - char *ptr; - - if (hostarg == NULL) - hostarg = getenv ("LIBGTOP_HOST"); - if (portarg == 0 && (ptr = getenv ("LIBGTOP_PORT")) != NULL) - portarg = atoi (ptr); -#endif - - if (hostarg != NULL) { - /* hostname was given explicitly, via cmd line arg or - * LIBGTOP_HOST, * so obey it. */ -#ifdef UNIX_DOMAIN_SOCKETS - if (!strcmp (hostarg, "unix")) { - *s = connect_to_unix_server (); - return (int) CONN_UNIX; - } -#endif /* UNIX_DOMAIN_SOCKETS */ -#ifdef INTERNET_DOMAIN_SOCKETS - *s = connect_to_internet_server (hostarg, portarg); - return (int) CONN_INTERNET; -#endif - } else { - /* no hostname given. Use unix-domain/sysv-ipc, or * - * internet-domain connection to local host if they're not - * available. */ -#if defined(UNIX_DOMAIN_SOCKETS) - *s = connect_to_unix_server (); - return (int) CONN_UNIX; -#elif defined(INTERNET_DOMAIN_SOCKETS) - { - char localhost[HOSTNAMSZ]; - - gethostname (localhost, HOSTNAMSZ); /* use this - * host by - * default */ - *s = connect_to_internet_server (localhost, portarg); - return (int) CONN_INTERNET; - } -#endif /* IPC type */ - } -} - -#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS) -/* - * send_string -- send string to socket. - */ -#if 0 -static void -send_string (s, msg) - int s; - const char *msg; -{ -#if 0 - if (send (s, msg, strlen (msg), 0) < 0) { - perror (progname); - fprintf (stderr, "%s: unable to send\n", progname); - exit (1); - }; /* if */ -#else - int len, left = strlen (msg); - - while (left > 0) { - if ((len = write (s, msg, min2 (left, GSERV_BUFSZ))) < 0) { - /* XEmacs addition: robertl@arnet.com */ - if (errno == EPIPE) { - return; - } - perror (progname); - fprintf (stderr, "%s: unable to send\n", progname); - exit (1); - }; /* if */ - left -= len; - msg += len; - }; /* while */ -#endif -} /* send_string */ - -/* - * read_line -- read a \n terminated line from a socket - */ -static int -read_line (int s, char *dest) -{ - int length; - int offset = 0; - char buffer[GSERV_BUFSZ + 1]; - - while ((length = read (s, buffer + offset, 1) > 0) && buffer[offset] != '\n' - && buffer[offset] != EOT_CHR) { - offset += length; - if (offset >= GSERV_BUFSZ) - break; - } - buffer[offset] = '\0'; - strcpy (dest, buffer); - return 1; -} /* read_line */ -#endif -#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */ - - -#ifdef UNIX_DOMAIN_SOCKETS -/* - * connect_to_unix_server -- establish connection with server process via a unix- - * domain socket. Returns socket descriptor for server - * if successful. - */ -static int -connect_to_unix_server (void) -{ - int s; /* connected socket descriptor */ - struct sockaddr_un server; /* for unix connections */ - - if ((s = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) - glibtop_error_io ("unable to create socket"); - - server.sun_family = AF_UNIX; -#ifdef HIDE_UNIX_SOCKET - sprintf (server.sun_path, "/tmp/lgtddir%d/lgtd", (int) geteuid ()); -#else /* HIDE_UNIX_SOCKET */ - sprintf (server.sun_path, "/tmp/lgtd%d", (int) geteuid ()); -#endif /* HIDE_UNIX_SOCKET */ - if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) < 0) - glibtop_error_io ("unable to connect to local"); - - return (s); - -} /* connect_to_unix_server */ -#endif /* UNIX_DOMAIN_SOCKETS */ - - -#ifdef INTERNET_DOMAIN_SOCKETS -/* - * internet_addr -- return the internet addr of the hostname or - * internet address passed. Return -1 on error. - */ -long -glibtop_internet_addr (host) - const char *host; -{ - struct hostent *hp; /* pointer to host info for remote host */ - IN_ADDR numeric_addr; /* host address */ - - numeric_addr = inet_addr (host); - if (!NUMERIC_ADDR_ERROR) - return numeric_addr; - else if ((hp = gethostbyname (host)) != NULL) - return ((struct in_addr *) (hp->h_addr))->s_addr; - else { - glibtop_warn_io ("gethostbyname (%s)", host); - return -1; - } - -} /* glibtop_internet_addr */ - -#ifdef AUTH_MAGIC_COOKIE -#include -#include - -static Xauth *server_xauth = NULL; - -#endif - -/* - * connect_to_internet_server -- establish connection with server process via - * an internet domain socket. Returns socket - * descriptor for server if successful. - */ -static int -connect_to_internet_server (const char *serverhost, u_short port) -{ - int s; /* connected socket descriptor */ - struct servent *sp; /* pointer to service information */ - struct sockaddr_in peeraddr_in; /* for peer socket address */ - char buf[512]; /* temporary buffer */ - - /* clear out address structures */ - memset ((char *) &peeraddr_in, 0, sizeof (struct sockaddr_in)); - - /* Set up the peer address to which we will connect. */ - peeraddr_in.sin_family = AF_INET; - - /* look up the server host's internet address */ - peeraddr_in.sin_addr.s_addr = glibtop_internet_addr (serverhost); - if ((long) peeraddr_in.sin_addr.s_addr == -1) - glibtop_error ("unable to find %s in /etc/hosts or from YP", serverhost); - - if (port == 0) { - if ((sp = getservbyname ("gtopd", "tcp")) == NULL) - peeraddr_in.sin_port = htons (DEFAULT_PORT + getuid ()); - else - peeraddr_in.sin_port = sp->s_port; - } - /* if */ - else - peeraddr_in.sin_port = htons (port); - - /* Create the socket. */ - if ((s = socket (AF_INET, SOCK_STREAM, 0)) == -1) - glibtop_error_io ("unable to create socket"); - - /* Try to connect to the remote server at the address * which was - * just built into peeraddr. */ - if (connect (s, (struct sockaddr *) &peeraddr_in, - sizeof (struct sockaddr_in)) == -1) - glibtop_error_io ("unable to connect to remote"); - -#ifdef AUTH_MAGIC_COOKIE - - /* send credentials using MIT-MAGIC-COOKIE-1 protocol */ - - sprintf (buf, "%d", port); - - server_xauth = - XauGetAuthByAddr (FamilyInternet, - sizeof (peeraddr_in.sin_addr.s_addr), - (char *) &peeraddr_in.sin_addr.s_addr, - strlen (buf), buf, - strlen (MCOOKIE_X_NAME), MCOOKIE_X_NAME); - - if (server_xauth && server_xauth->data) { - sprintf (buf, "%s\n%d\n", MCOOKIE_NAME, server_xauth->data_length); - write (s, buf, strlen (buf)); - write (s, server_xauth->data, server_xauth->data_length); - - return (s); - } -#endif /* AUTH_MAGIC_COOKIE */ - - sprintf (buf, "%s\n", DEFAUTH_NAME); - write (s, buf, strlen (buf)); - - return (s); - -} /* connect_to_internet_server */ -#endif /* INTERNET_DOMAIN_SOCKETS */ - - -#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS) -/* - * disconnect_from_server -- inform the server that sending has finished, and wait for - * its reply. - */ -#if 0 -static void -disconnect_from_server (s, echo) - int s; - int echo; -{ -#if 0 - char buffer[REPLYSIZ + 1]; - -#else - char buffer[GSERV_BUFSZ + 1]; - -#endif - int add_newline = 1; - int length; - - send_string (s, EOT_STR); /* make sure server gets string */ - -#if !defined (linux) && !defined (_SCO_DS) - /* - * shutdown is completely hozed under linux. If s is a unix domain socket, - * you'll get EOPNOTSUPP back from it. If s is an internet socket, you get - * a broken pipe when you try to read a bit later. The latter - * problem is fixed for linux versions >= 1.1.46, but the problem - * with unix sockets persists. Sigh. - */ - - if (shutdown (s, 1) == -1) { - perror (progname); - fprintf (stderr, "%s: unable to shutdown socket\n", progname); - exit (1); - }; /* if */ -#endif - -#if 0 - while ((length = recv (s, buffer, REPLYSIZ, 0)) > 0) { - buffer[length] = '\0'; - if (echo) - fputs (buffer, stdout); - add_newline = (buffer[length - 1] != '\n'); - }; /* while */ -#else - while ((length = read (s, buffer, GSERV_BUFSZ)) > 0 || - (length == -1 && errno == EINTR)) { - if (length) { - buffer[length] = '\0'; - if (echo) { - fputs (buffer, stdout); - add_newline = (buffer[length - 1] != '\n'); - }; /* if */ - }; /* if */ - }; /* while */ -#endif - - if (echo && add_newline) - putchar ('\n'); - - if (length < 0) { - perror (progname); - fprintf (stderr, "%s: unable to read the reply from the server\n", progname); - exit (1); - }; /* if */ - -} /* disconnect_from_server */ -#endif -#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */ diff --git a/sysdeps/common/inodedb.c b/sysdeps/common/inodedb.c deleted file mode 100644 index d78d3905..00000000 --- a/sysdeps/common/inodedb.c +++ /dev/null @@ -1,117 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -#include -#include - -#ifndef SYSTEM_INODEDB -#define SYSTEM_INODEDB "/usr/var/libgtop/inodedb.db" -#endif - -glibtop_inodedb * -glibtop_inodedb_open_s (glibtop *server, unsigned databases, - unsigned long cachesize) -{ - glibtop_inodedb *inodedb; - char filename [BUFSIZ]; - struct passwd *pwd; - struct stat statb; - - if (!databases) - databases = GLIBTOP_INODEDB_ALL; - - inodedb = glibtop_calloc_r (server, 1, sizeof (glibtop_inodedb)); - - if (stat (SYSTEM_INODEDB, &statb)) - databases &= ~GLIBTOP_INODEDB_SYSTEM; - - if (databases & GLIBTOP_INODEDB_SYSTEM) { - inodedb->system_dbf = gdbm_open - (SYSTEM_INODEDB, 0, GDBM_READER, 0, 0); - if (!inodedb->system_dbf) - glibtop_error_io_r - (server, "gdbm_open (%s)", SYSTEM_INODEDB); - } - - pwd = getpwuid (getuid ()); - if (!pwd) glibtop_error_io_r (server, "getpwuid"); - - sprintf (filename, "%s/var/libgtop/inodedb.db", pwd->pw_dir); - - if (stat (filename, &statb)) - databases &= ~GLIBTOP_INODEDB_USER; - - if (databases & GLIBTOP_INODEDB_USER) { - inodedb->user_dbf = gdbm_open - (filename, 0, GDBM_READER, 0, 0); - if (!inodedb->user_dbf) - glibtop_error_io_r - (server, "gdbm_open (%s)", filename); - } - - return inodedb; -} - -const char * -glibtop_inodedb_lookup_s (glibtop *server, - glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode) -{ - glibtop_inodedb_key key; - datum d_key, d_content; - - d_key.dptr = (void *) &key; - d_key.dsize = sizeof (key); - - key.device = device; - key.inode = inode; - - if (inodedb->system_dbf) { - d_content = gdbm_fetch (inodedb->system_dbf, d_key); - if (d_content.dptr) return d_content.dptr; - } - - if (inodedb->user_dbf) { - d_content = gdbm_fetch (inodedb->user_dbf, d_key); - if (d_content.dptr) return d_content.dptr; - } - - return NULL; -} - -void -glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb) -{ - if (inodedb->system_dbf) - gdbm_close (inodedb->system_dbf); - - if (inodedb->user_dbf) - gdbm_close (inodedb->user_dbf); - - glibtop_free_r (server, inodedb); -} diff --git a/sysdeps/common/mountlist.c b/sysdeps/common/mountlist.c deleted file mode 100644 index d8db10db..00000000 --- a/sysdeps/common/mountlist.c +++ /dev/null @@ -1,644 +0,0 @@ -/* mountlist.c -- return a list of mounted filesystems - Copyright (C) 1991, 1992 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include "mountlist.h" - -#ifdef STDC_HEADERS -#include -#else -void free (); -#endif -#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) -#include -#else -#include -#endif - -#include -#include -#include - -static struct mount_entry *read_filesystem_list (int need_fs_type, int all_fs); - -#undef xmalloc -#undef xrealloc -#undef xstrdup - -#define xmalloc(p1) glibtop_malloc_r (NULL, p1) -#define xrealloc(p1,p2) glibtop_realloc_r (NULL, p1, p2) -#define xstrdup(p1) glibtop_strdup_r (NULL, p1) -#define xfree(p1) glibtop_free_r (NULL, p1) - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */ -# include -# include -#endif /* MOUNTED_GETFSSTAT */ - -#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ -#include -#if !defined(MOUNTED) -# if defined(MNT_MNTTAB) /* HP-UX. */ -# define MOUNTED MNT_MNTTAB -# endif -# if defined(MNTTABNAME) /* Dynix. */ -# define MOUNTED MNTTABNAME -# endif -#endif -#endif - -#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ -#include -#endif - -#ifdef MOUNTED_GETMNT /* Ultrix. */ -#include -#include -#endif - -#ifdef MOUNTED_FREAD /* SVR2. */ -#include -#endif - -#ifdef MOUNTED_FREAD_FSTYP /* SVR3. */ -#include -#include -#include -#endif - -#ifdef MOUNTED_LISTMNTENT -#include -#endif - -#ifdef MOUNTED_GETMNTENT2 /* SVR4. */ -#include -#endif - -#ifdef MOUNTED_VMOUNT /* AIX. */ -#include -#include -#endif - -#ifdef DOLPHIN -/* So special that it's not worth putting this in autoconf. */ -#undef MOUNTED_FREAD_FSTYP -#define MOUNTED_GETMNTTBL -#endif - -#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ -/* Return the value of the hexadecimal number represented by CP. - No prefix (like '0x') or suffix (like 'h') is expected to be - part of CP. */ - -static int -xatoi (cp) - char *cp; -{ - int val; - - val = 0; - while (*cp) - { - if (*cp >= 'a' && *cp <= 'f') - val = val * 16 + *cp - 'a' + 10; - else if (*cp >= 'A' && *cp <= 'F') - val = val * 16 + *cp - 'A' + 10; - else if (*cp >= '0' && *cp <= '9') - val = val * 16 + *cp - '0'; - else - break; - cp++; - } - return val; -} -#endif /* MOUNTED_GETMNTENT1. */ - -#if defined (MOUNTED_GETMNTINFO) && !defined (__NetBSD__) && !defined (__OpenBSD__) -static char * -fstype_to_string (t) - short t; -{ - switch (t) - { -#ifdef MOUNT_PC - case MOUNT_PC: - return "pc"; -#endif -#ifdef MOUNT_MFS - case MOUNT_MFS: - return "mfs"; -#endif -#ifdef MOUNT_LO - case MOUNT_LO: - return "lo"; -#endif -#ifdef MOUNT_TFS - case MOUNT_TFS: - return "tfs"; -#endif -#ifdef MOUNT_TMP - case MOUNT_TMP: - return "tmp"; -#endif -#ifdef MOUNT_UFS - case MOUNT_UFS: - return "ufs" ; -#endif -#ifdef MOUNT_NFS - case MOUNT_NFS: - return "nfs" ; -#endif -#ifdef MOUNT_MSDOS - case MOUNT_MSDOS: - return "msdos" ; -#endif -#ifdef MOUNT_LFS - case MOUNT_LFS: - return "lfs" ; -#endif -#ifdef MOUNT_LOFS - case MOUNT_LOFS: - return "lofs" ; -#endif -#ifdef MOUNT_FDESC - case MOUNT_FDESC: - return "fdesc" ; -#endif -#ifdef MOUNT_PORTAL - case MOUNT_PORTAL: - return "portal" ; -#endif -#ifdef MOUNT_NULL - case MOUNT_NULL: - return "null" ; -#endif -#ifdef MOUNT_UMAP - case MOUNT_UMAP: - return "umap" ; -#endif -#ifdef MOUNT_KERNFS - case MOUNT_KERNFS: - return "kernfs" ; -#endif -#ifdef MOUNT_PROCFS - case MOUNT_PROCFS: - return "procfs" ; -#endif -#ifdef MOUNT_AFS - case MOUNT_AFS: - return "afs" ; -#endif -#ifdef MOUNT_CD9660 - case MOUNT_CD9660: - return "cd9660" ; -#endif -#ifdef MOUNT_UNION - case MOUNT_UNION: - return "union" ; -#endif -#ifdef MOUNT_DEVFS - case MOUNT_DEVFS: - return "devfs" ; -#endif -#ifdef MOUNT_EXT2FS - case MOUNT_EXT2FS: - return "ext2fs" ; -#endif - default: - return "?"; - } -} -#endif /* MOUNTED_GETMNTINFO */ - -#ifdef MOUNTED_VMOUNT /* AIX. */ -static char * -fstype_to_string (t) - int t; -{ - struct vfs_ent *e; - - e = getvfsbytype (t); - if (!e || !e->vfsent_name) - return "none"; - else - return e->vfsent_name; -} -#endif /* MOUNTED_VMOUNT */ - -/* Return a list of the currently mounted filesystems, or NULL on error. - Add each entry to the tail of the list so that they stay in order. - If NEED_FS_TYPE is nonzero, ensure that the filesystem type fields in - the returned list are valid. Otherwise, they might not be. - If ALL_FS is zero, do not return entries for filesystems that - are automounter (dummy) entries. */ - -static struct mount_entry * -read_filesystem_list (need_fs_type, all_fs) - int need_fs_type, all_fs; -{ - struct mount_entry *mount_list; - struct mount_entry *me; - struct mount_entry *mtail; - - /* Start the list off with a dummy entry. */ - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); - me->me_next = NULL; - mount_list = mtail = me; - -#ifdef MOUNTED_LISTMNTENT - { - struct tabmntent *mntlist, *p; - struct mntent *mnt; - struct mount_entry *me; - - /* the third and fourth arguments could be used to filter mounts, - but Crays doesn't seem to have any mounts that we want to - remove. Specifically, automount create normal NFS mounts. - */ - - if(listmntent(&mntlist, KMTAB, NULL, NULL) < 0) - return NULL; - p = mntlist; - while(p){ - mnt = p->ment; - me = (struct mount_entry*) xmalloc(sizeof (struct mount_entry)); - me->me_devname = xstrdup(mnt->mnt_fsname); - me->me_mountdir = xstrdup(mnt->mnt_dir); - me->me_type = xstrdup(mnt->mnt_type); - me->me_dev = -1; - me->me_next = NULL; - mtail->me_next = me; - mtail = me; - p = p->next; - } - freemntlist(mntlist); - } -#endif - -#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ - { - struct mntent *mnt; - char *table = MOUNTED; - FILE *fp; - char *devopt; - - fp = setmntent (table, "r"); - if (fp == NULL) - return NULL; - - while ((mnt = getmntent (fp))) - { - if (!all_fs && (!strcmp (mnt->mnt_type, "ignore") - || !strcmp (mnt->mnt_type, "auto"))) - continue; - - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); - me->me_devname = xstrdup (mnt->mnt_fsname); - me->me_mountdir = xstrdup (mnt->mnt_dir); - me->me_type = xstrdup (mnt->mnt_type); - devopt = strstr (mnt->mnt_opts, "dev="); - if (devopt) - { - if (devopt[4] == '0' && (devopt[5] == 'x' || devopt[5] == 'X')) - me->me_dev = xatoi (devopt + 6); - else - me->me_dev = xatoi (devopt + 4); - } - else - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - me->me_next = NULL; - - /* Add to the linked list. */ - mtail->me_next = me; - mtail = me; - } - - if (endmntent (fp) == 0) - return NULL; - } -#endif /* MOUNTED_GETMNTENT1. */ - -#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ - { - struct statfs *fsp; - int entries; - - entries = getmntinfo (&fsp, MNT_NOWAIT); - if (entries < 0) - return NULL; - while (entries-- > 0) - { - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); - me->me_devname = xstrdup (fsp->f_mntfromname); - me->me_mountdir = xstrdup (fsp->f_mntonname); -#if defined(__NetBSD__) || defined(__OpenBSD__) - me->me_type = xstrdup (fsp->f_fstypename); -#else - me->me_type = xstrdup (fstype_to_string (fsp->f_type)); -#endif - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - me->me_next = NULL; - - /* Add to the linked list. */ - mtail->me_next = me; - mtail = me; - fsp++; - } - } -#endif /* MOUNTED_GETMNTINFO */ - -#ifdef MOUNTED_GETMNT /* Ultrix. */ - { - int offset = 0; - int val; - struct fs_data fsd; - - while ((val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY, - (char *) 0)) > 0) - { - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); - me->me_devname = xstrdup (fsd.fd_req.devname); - me->me_mountdir = xstrdup (fsd.fd_req.path); - me->me_type = xstrdup (gt_names[fsd.fd_req.fstype]); - me->me_dev = fsd.fd_req.dev; - me->me_next = NULL; - - /* Add to the linked list. */ - mtail->me_next = me; - mtail = me; - } - if (val < 0) - return NULL; - } -#endif /* MOUNTED_GETMNT. */ - -#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */ - { - int numsys, counter, bufsize; - struct statfs *stats; - - numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); - if (numsys < 0) - return (NULL); - - bufsize = (1 + numsys) * sizeof (struct statfs); - stats = (struct statfs *)xmalloc (bufsize); - numsys = getfsstat (stats, bufsize, MNT_WAIT); - - if (numsys < 0) - { - free (stats); - return (NULL); - } - - for (counter = 0; counter < numsys; counter++) - { - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); - me->me_devname = xstrdup (stats[counter].f_mntfromname); - me->me_mountdir = xstrdup (stats[counter].f_mntonname); - me->me_type = xstrdup (mnt_names[stats[counter].f_type]); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - me->me_next = NULL; - - /* Add to the linked list. */ - mtail->me_next = me; - mtail = me; - } - - free (stats); - } -#endif /* MOUNTED_GETFSSTAT */ - -#if defined (MOUNTED_FREAD) || defined (MOUNTED_FREAD_FSTYP) /* SVR[23]. */ - { - struct mnttab mnt; - char *table = "/etc/mnttab"; - FILE *fp; - - fp = fopen (table, "r"); - if (fp == NULL) - return NULL; - - while (fread (&mnt, sizeof mnt, 1, fp) > 0) - { - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); -#ifdef GETFSTYP /* SVR3. */ - me->me_devname = xstrdup (mnt.mt_dev); -#else - me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6); - strcpy (me->me_devname, "/dev/"); - strcpy (me->me_devname + 5, mnt.mt_dev); -#endif - me->me_mountdir = xstrdup (mnt.mt_filsys); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - me->me_type = xstrdup (""); -#ifdef GETFSTYP /* SVR3. */ - if (need_fs_type) - { - struct statfs fsd; - char typebuf[FSTYPSZ]; - - if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 - && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) - me->me_type = xstrdup (typebuf); - } -#endif - me->me_next = NULL; - - /* Add to the linked list. */ - mtail->me_next = me; - mtail = me; - } - - if (fclose (fp) == EOF) - return NULL; - } -#endif /* MOUNTED_FREAD || MOUNTED_FREAD_FSTYP. */ - -#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes it's own way */ - { - struct mntent **mnttbl=getmnttbl(),**ent; - for (ent=mnttbl;*ent;ent++) - { - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); - me->me_devname = xstrdup ( (*ent)->mt_resource); - me->me_mountdir = xstrdup( (*ent)->mt_directory); - me->me_type = xstrdup ((*ent)->mt_fstype); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - me->me_next = NULL; - - /* Add to the linked list. */ - mtail->me_next = me; - mtail = me; - } - endmnttbl(); - } -#endif - -#ifdef MOUNTED_GETMNTENT2 /* SVR4. */ - { - struct mnttab mnt; - char *table = MNTTAB; - FILE *fp; - int ret; - - fp = fopen (table, "r"); - if (fp == NULL) - return NULL; - - while ((ret = getmntent (fp, &mnt)) == 0) - { - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); - me->me_devname = xstrdup (mnt.mnt_special); - me->me_mountdir = xstrdup (mnt.mnt_mountp); - me->me_type = xstrdup (mnt.mnt_fstype); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - me->me_next = NULL; - - /* Add to the linked list. */ - mtail->me_next = me; - mtail = me; - } - - if (ret > 0) - return NULL; - if (fclose (fp) == EOF) - return NULL; - } -#endif /* MOUNTED_GETMNTENT2. */ - -#ifdef MOUNTED_VMOUNT /* AIX. */ - { - int bufsize; - char *entries, *thisent; - struct vmount *vmp; - - /* Ask how many bytes to allocate for the mounted filesystem info. */ - mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize); - entries = xmalloc (bufsize); - - /* Get the list of mounted filesystems. */ - mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries); - - for (thisent = entries; thisent < entries + bufsize; - thisent += vmp->vmt_length) - { - vmp = (struct vmount *) thisent; - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); - if (vmp->vmt_flags & MNT_REMOTE) - { - char *host, *path; - - /* Prepend the remote pathname. */ - host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off; - path = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off; - me->me_devname = xmalloc (strlen (host) + strlen (path) + 2); - strcpy (me->me_devname, host); - strcat (me->me_devname, ":"); - strcat (me->me_devname, path); - } - else - { - me->me_devname = xstrdup (thisent + - vmp->vmt_data[VMT_OBJECT].vmt_off); - } - me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off); - me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype)); - me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want. */ - me->me_next = NULL; - - /* Add to the linked list. */ - mtail->me_next = me; - mtail = me; - } - free (entries); - } -#endif /* MOUNTED_VMOUNT. */ - - /* Free the dummy head. */ - me = mount_list; - mount_list = mount_list->me_next; - free (me); - return mount_list; -} - -glibtop_mountentry * -glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs) -{ - struct mount_entry *me, *tmp, *next; - glibtop_mountentry *mount_list; - int count; - - glibtop_init_r (&server, 0, 0); - - memset (buf, 0, sizeof (glibtop_mountlist)); - - /* Read filesystem list. */ - - me = read_filesystem_list (1, all_fs); - - if (me == NULL) - return NULL; - - /* Count entries. */ - - for (count = 0, tmp = me; tmp; count++, tmp = tmp->me_next) - ; - - buf->size = sizeof (glibtop_mountentry); - buf->number = count; - - buf->total = buf->number * buf->size; - - mount_list = glibtop_malloc_r (server, buf->total); - - /* Write data into mount_list. */ - - for (count = 0, tmp = me; tmp; count++, tmp = tmp->me_next) { - strncpy (mount_list [count].devname, tmp->me_devname, - GLIBTOP_MOUNTENTRY_LEN); - strncpy (mount_list [count].mountdir, tmp->me_mountdir, - GLIBTOP_MOUNTENTRY_LEN); - strncpy (mount_list [count].type, tmp->me_type, - GLIBTOP_MOUNTENTRY_LEN); - mount_list [count].devname [GLIBTOP_MOUNTENTRY_LEN] = 0; - mount_list [count].mountdir [GLIBTOP_MOUNTENTRY_LEN] = 0; - mount_list [count].type [GLIBTOP_MOUNTENTRY_LEN] = 0; - mount_list [count].dev = tmp->me_dev; - } - - /* Free memory. */ - - for (count = 0, tmp = me; tmp; count++, tmp = next) { - next = tmp->me_next; - xfree (tmp->me_devname); - xfree (tmp->me_mountdir); - xfree (tmp->me_type); - xfree (tmp); - } - - return mount_list; -} diff --git a/sysdeps/common/mountlist.h b/sysdeps/common/mountlist.h deleted file mode 100644 index 8bc38f6a..00000000 --- a/sysdeps/common/mountlist.h +++ /dev/null @@ -1,27 +0,0 @@ -/* mountlist.h -- declarations for list of mounted filesystems - Copyright (C) 1991, 1992 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* A mount table entry. */ -struct mount_entry -{ - char *me_devname; /* Device node pathname, including "/dev/". */ - char *me_mountdir; /* Mount point directory pathname. */ - char *me_type; /* "nfs", "4.2", etc. */ - dev_t me_dev; /* Device number of me_mountdir. */ - struct mount_entry *me_next; -}; - diff --git a/sysdeps/common/sysdeps_suid.c b/sysdeps/common/sysdeps_suid.c deleted file mode 100644 index 97731d9f..00000000 --- a/sysdeps/common/sysdeps_suid.c +++ /dev/null @@ -1,92 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -glibtop_init_func_t _glibtop_init_hook_p [] = { -#if GLIBTOP_SUID_CPU - glibtop_init_cpu_p, -#endif -#if GLIBTOP_SUID_MEM - glibtop_init_mem_p, -#endif -#if GLIBTOP_SUID_SWAP - glibtop_init_swap_p, -#endif -#if GLIBTOP_SUID_UPTIME - glibtop_init_uptime_p, -#endif -#if GLIBTOP_SUID_LOADAVG - glibtop_init_loadavg_p, -#endif -#if GLIBTOP_SUID_SHM_LIMITS - glibtop_init_shm_limits_p, -#endif -#if GLIBTOP_SUID_MSG_LIMITS - glibtop_init_msg_limits_p, -#endif -#if GLIBTOP_SUID_SEM_LIMITS - glibtop_init_sem_limits_p, -#endif -#if GLIBTOP_SUID_PROCLIST - glibtop_init_proclist_p, -#endif -#if GLIBTOP_SUID_PROC_STATE - glibtop_init_proc_state_p, -#endif -#if GLIBTOP_SUID_PROC_UID - glibtop_init_proc_uid_p, -#endif -#if GLIBTOP_SUID_PROC_MEM - glibtop_init_proc_mem_p, -#endif -#if GLIBTOP_SUID_PROC_TIME - glibtop_init_proc_time_p, -#endif -#if GLIBTOP_SUID_PROC_SIGNAL - glibtop_init_proc_signal_p, -#endif -#if GLIBTOP_SUID_PROC_KERNEL - glibtop_init_proc_kernel_p, -#endif -#if GLIBTOP_SUID_PROC_SEGMENT - glibtop_init_proc_segment_p, -#endif -#if GLIBTOP_SUID_PROC_ARGS - glibtop_init_proc_args_p, -#endif -#if GLIBTOP_SUID_PROC_MAP - glibtop_init_proc_map_p, -#endif -#if GLIBTOP_SUID_NETLOAD - glibtop_init_netload_p, -#endif -#if GLIBTOP_SUID_PPP - glibtop_init_ppp_p, -#endif - NULL -}; - diff --git a/sysdeps/common/xmalloc.c b/sysdeps/common/xmalloc.c deleted file mode 100644 index d8d0080f..00000000 --- a/sysdeps/common/xmalloc.c +++ /dev/null @@ -1,72 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Wrappers to malloc, calloc, realloc ... */ - -void * -glibtop_malloc_r (glibtop *server, size_t size) -{ - void *buf = malloc (size); - - if (!buf) - glibtop_error_io_r (server, "malloc %d bytes", size); - - return buf; -} - -void * -glibtop_calloc_r (glibtop *server, size_t nmemb, size_t size) -{ - void *buf = calloc (nmemb, size); - - if (!buf) - glibtop_error_io_r (server, "calloc %d blocks (%d bytes each)", - nmemb, size); - - return buf; -} - -void * -glibtop_realloc_r (glibtop *server, void *ptr, size_t size) -{ - void *buf = realloc (ptr, size); - - if (!buf) - glibtop_error_io_r (server, "realloc %d bytes", size); - - return buf; -} - -char * -glibtop_strdup_r (glibtop *server, const char *string) -{ - return strcpy (glibtop_malloc_r (server, strlen (string) + 1), string); -} - -void -glibtop_free_r (glibtop *server, const void *ptr) -{ - if (ptr) free ((void *) ptr); -} diff --git a/sysdeps/freebsd/.cvsignore b/sysdeps/freebsd/.cvsignore deleted file mode 100644 index 259351e1..00000000 --- a/sysdeps/freebsd/.cvsignore +++ /dev/null @@ -1,25 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -close.lo -cpu.lo -init.lo -libgtop_sysdeps.la -loadavg.lo -mem.lo -msg_limits.lo -open.lo -prockernel.lo -proclist.lo -procmem.lo -procsegment.lo -procsignal.lo -procstate.lo -proctime.lo -procuid.lo -sem_limits.lo -shm_limits.lo -swap.lo -sysdeps.lo -uptime.lo diff --git a/sysdeps/freebsd/AUTHORS b/sysdeps/freebsd/AUTHORS deleted file mode 100644 index 45311cea..00000000 --- a/sysdeps/freebsd/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Josh Sled diff --git a/sysdeps/freebsd/ChangeLog b/sysdeps/freebsd/ChangeLog deleted file mode 100644 index 11fac2a7..00000000 --- a/sysdeps/freebsd/ChangeLog +++ /dev/null @@ -1,91 +0,0 @@ -1999-02-25 Martin Baulig - - * prockernel.c, proctime.c: Applied patch Stanislav Grozev for - OpenBSD: only include for FreeBSD. - -1999-02-24 Martin Baulig - - * swap.c: Applied another patch from Jeremy Lea to - make it work with FreeBSD-current. - -1999-02-21 Martin Baulig - - * procmap.c, procmem.c: Applied patch from Jeremy Lea. - - * prockernel.c, proctime.c: Applied patch from the FreeBSD 2.2.8 - ports collection. - - * procsignal.c: Applied patch from the NetBSD-current ports - collection. - -1998-12-06 Martin Baulig - - * Make it work with OpenBSD 2.4. - -1998-12-05 Martin Baulig - - * Make it work with NetBSD 1.3.2. - -1998-11-17 Martin Baulig - - * Make it work with FreeBSD 3.0. - -1998-11-11 Martin Baulig - - * *.c: It does not work to get information about the swapper task - on FreeBSD 2.2.6, so we simple return if pid == 0. - -1998-10-31 Martin Baulig - - * *.c: Use glibtop_warn_io_r () instead of glibtop_error_io_r (). - - * proctime.c, prockernel.c, procargs.c: Don't call kvm_uread () if - the /proc filesystem is not mounted. - -1998-10-26 Martin Baulig - - * netload.c: New file to get network load. - -1998-10-26 Martin Baulig - - * procargs.c: New file to get command line arguments. - -1998-10-25 Martin Baulig - - * ppp.c: New file to get PPP/ISDN statistics. Currently this only - get ISDN statistics if you have the I4B package. - - To get the number of bytes transferred in/out you need to read the - file `misc/i4b_acct.txt' in the LibGTop source directory to see - how to enable this. - -1998-10-03 Martin Baulig - - * procstate.c (glibtop_get_procstate_s): Use correct values for - the `state' field. - - * proclist.c (glibtop_get_proclist_p): Honor the GLIBTOP_EXCLUDE_IDLE - and GLIBTOP_EXCLUDE_SYSTEM flags of the `which' parameter. - -1998-08-24 Martin Baulig - - * *.c (glibtop_init_p): Using correct `(1 << GLIBTOP_SYSDPES_*)'. - * cpu.c, mem.c: Removed `const' from sysctl () constants to keep - compiler happy. - - * procmem.c: Added missing call to `glibtop_init_p'. - - * prockernel.c: Casting `nwchan' to `unsigned long' since this - normally has the same size than a pointer. Well, is there a - FreeBSD for 64bit architectures ? - -1998-08-08 Martin Baulig - - * swap.c: Added swap usage based upton the source code - of `pinfo'. - -1998-08-07 Martin Baulig - - * *: Imported FreeBSD port of libgtop from Josh Sled. - - * ChangeLog: New file. diff --git a/sysdeps/freebsd/Makefile.am b/sysdeps/freebsd/Makefile.am deleted file mode 100644 index c37d3b66..00000000 --- a/sysdeps/freebsd/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la - -libgtop_sysdeps_la_SOURCES = nosuid.c siglist.c - -libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) - -libgtop_sysdeps_suid_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 - -libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO) - -include_HEADERS = glibtop_server.h glibtop_machine.h \ - glibtop_suid.h - diff --git a/sysdeps/freebsd/NOTES b/sysdeps/freebsd/NOTES deleted file mode 100644 index 82bbbc4b..00000000 --- a/sysdeps/freebsd/NOTES +++ /dev/null @@ -1,10 +0,0 @@ -sysctl (3) -/usr/include/sys/vmmeter.h : VM stats -kvm (3) - -CPU stats: /usr/include/sys/dkstat.h -cp_time_offset = kvm_nlist(...)["_cp_time"].n_value; - -"systemwide main memory usage structure" -sysctl(...) - diff --git a/sysdeps/freebsd/close.c b/sysdeps/freebsd/close.c deleted file mode 100644 index b887a914..00000000 --- a/sysdeps/freebsd/close.c +++ /dev/null @@ -1,31 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include - -/* Closes pipe to gtop server. */ - -void -glibtop_close_p (glibtop *server) -{ } diff --git a/sysdeps/freebsd/cpu.c b/sysdeps/freebsd/cpu.c deleted file mode 100644 index 647271f2..00000000 --- a/sysdeps/freebsd/cpu.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_cpu = -(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) + -(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) + -(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY); - -/* nlist structure for kernel access */ -static struct nlist nlst [] = { - { "_cp_time" }, - { 0 } -}; - -/* MIB array for sysctl */ -static int mib_length=2; -static int mib [] = { CTL_KERN, KERN_CLOCKRATE }; - -/* Init function. */ - -void -glibtop_init_cpu_p (glibtop *server) -{ - if (kvm_nlist (server->machine.kd, nlst) != 0) { - glibtop_warn_io_r (server, "kvm_nlist (cpu)"); - return; - } - - /* Set this only if kvm_nlist () succeeded. */ - server->sysdeps.cpu = _glibtop_sysdeps_cpu; -} - -/* Provides information about cpu usage. */ - -void -glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf) -{ - long cpts [CPUSTATES]; - /* sysctl vars*/ - struct clockinfo ci; - size_t length; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_CPU), 0); - - memset (buf, 0, sizeof (glibtop_cpu)); - - /* If this fails, the nlist may not be valid. */ - if (server->sysdeps.cpu == 0) - return; - - if (kvm_read (server->machine.kd, nlst [0].n_value, - &cpts, sizeof (cpts)) != sizeof (cpts)) { - glibtop_warn_io_r (server, "kvm_read (cp_time)"); - return; - } - - /* Get the clockrate data */ - length = sizeof (struct clockinfo); - if (sysctl (mib, mib_length, &ci, &length, NULL, 0)) { - glibtop_warn_io_r (server, "sysctl"); - return; - } - - /* set user time */ - buf->user = cpts [CP_USER]; - /* set nice time */ - buf->nice = cpts [CP_NICE]; - /* set sys time */ - buf->sys = cpts [CP_SYS]; - /* set idle time */ - buf->idle = cpts [CP_IDLE]; - - /* set frequency */ - /* - FIXME -- is hz, tick, profhz or stathz wanted? - buf->frequency = sysctl("kern.clockrate", ...); - - struct clockinfo - */ - buf->frequency = ci.hz; - /* set total */ - buf->total = cpts [CP_USER] + cpts [CP_NICE] - + cpts [CP_SYS] + cpts [CP_IDLE]; - - /* Set the flags last. */ - buf->flags = _glibtop_sysdeps_cpu; -} diff --git a/sysdeps/freebsd/glibtop_machine.h b/sysdeps/freebsd/glibtop_machine.h deleted file mode 100644 index 5748020e..00000000 --- a/sysdeps/freebsd/glibtop_machine.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_MACHINE_H__ -#define __GLIBTOP_MACHINE_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef __FreeBSD__ -#include -#endif - -BEGIN_LIBGTOP_DECLS - -typedef struct _glibtop_machine glibtop_machine; - -struct _glibtop_machine -{ - uid_t uid, euid; - gid_t gid, egid; - - /* The kernel descriptor, used by kvm_* calls. We keep and re-use - * it rather than re-getting it for almost all function - * invocations. */ - kvm_t *kd; -}; - -END_LIBGTOP_DECLS - -#endif __GLIBTOP_MACHINE_H__ diff --git a/sysdeps/freebsd/glibtop_server.h b/sysdeps/freebsd/glibtop_server.h deleted file mode 100644 index ccf3d29d..00000000 --- a/sysdeps/freebsd/glibtop_server.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 (1 << GLIBTOP_SYSDEPS_CPU) -#define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM) -#define GLIBTOP_SUID_SWAP (1 << GLIBTOP_SYSDEPS_SWAP) -#define GLIBTOP_SUID_UPTIME (1 << GLIBTOP_SYSDEPS_UPTIME) -#define GLIBTOP_SUID_LOADAVG (1 << GLIBTOP_SYSDEPS_LOADAVG) -#define GLIBTOP_SUID_SHM_LIMITS (1 << GLIBTOP_SYSDEPS_SHM_LIMITS) -#define GLIBTOP_SUID_MSG_LIMITS (1 << GLIBTOP_SYSDEPS_MSG_LIMITS) -#define GLIBTOP_SUID_SEM_LIMITS (1 << GLIBTOP_SYSDEPS_SEM_LIMITS) -#define GLIBTOP_SUID_PROCLIST (1 << GLIBTOP_SYSDEPS_PROCLIST) -#define GLIBTOP_SUID_PROC_STATE (1 << GLIBTOP_SYSDEPS_PROC_STATE) -#define GLIBTOP_SUID_PROC_UID (1 << GLIBTOP_SYSDEPS_PROC_UID) -#define GLIBTOP_SUID_PROC_MEM (1 << GLIBTOP_SYSDEPS_PROC_MEM) -#define GLIBTOP_SUID_PROC_TIME (1 << GLIBTOP_SYSDEPS_PROC_TIME) -#define GLIBTOP_SUID_PROC_SIGNAL (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL) -#define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL) -#define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) -#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS) -#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP) -#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD) -#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP) - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/freebsd/glibtop_suid.h b/sysdeps/freebsd/glibtop_suid.h deleted file mode 100644 index d8e609d1..00000000 --- a/sysdeps/freebsd/glibtop_suid.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_SUID_H__ -#define __GLIBTOP_SUID_H__ - -BEGIN_LIBGTOP_DECLS - -#define KI_PROC(ki) (&(ki))->kp_proc) -#define KI_EPROC(ki) (&(ki))->kp_eproc) - -#define FORCEUREAD 1 -#define UREADOK(ki) (FORCEUREAD || (KI_PROC(ki)->p_flag & P_INMEM)) - -static inline void glibtop_suid_enter (glibtop *server) { - setregid (server->machine.gid, server->machine.egid); -}; - -static inline void glibtop_suid_leave (glibtop *server) { - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); -}; - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags); -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, - const unsigned flags); - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/freebsd/init.c b/sysdeps/freebsd/init.c deleted file mode 100644 index 11d89342..00000000 --- a/sysdeps/freebsd/init.c +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include - -static glibtop _glibtop_global_server; -glibtop *glibtop_global_server = NULL; - -glibtop * -glibtop_init_r (glibtop **server, - const unsigned long features, - const unsigned flags) -{ - if (*server != NULL) - return *server; - - if (glibtop_global_server == NULL) { - glibtop_global_server = &_glibtop_global_server; - glibtop_open (glibtop_global_server, "glibtop", - features, flags); - } - - return *server = glibtop_global_server; -} diff --git a/sysdeps/freebsd/loadavg.c b/sysdeps/freebsd/loadavg.c deleted file mode 100644 index 834153bd..00000000 --- a/sysdeps/freebsd/loadavg.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_loadavg = -(1 << GLIBTOP_LOADAVG_LOADAVG); - -/* Init function. */ - -void -glibtop_init_loadavg_p (glibtop *server) -{ - server->sysdeps.loadavg = _glibtop_sysdeps_loadavg; -} - -/* Provides load averange. */ - -void -glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf) -{ - double ldavg[3]; - int i; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_LOADAVG), 0); - - memset (buf, 0, sizeof (glibtop_loadavg)); - - getloadavg (ldavg, 3); - - /* fill in the struct */ - buf->flags = _glibtop_sysdeps_loadavg; - for (i = 0; i < 3; i++) { - buf->loadavg [i] = ldavg [i]; - } /* end for */ -} diff --git a/sysdeps/freebsd/mem.c b/sysdeps/freebsd/mem.c deleted file mode 100644 index d76ee838..00000000 --- a/sysdeps/freebsd/mem.c +++ /dev/null @@ -1,170 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_mem = -(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) + -(1 << GLIBTOP_MEM_FREE) + (1 << GLIBTOP_MEM_SHARED) + -(1 << GLIBTOP_MEM_BUFFER) + -#ifdef __FreeBSD__ -(1 << GLIBTOP_MEM_CACHED) + -#endif -(1 << GLIBTOP_MEM_USER) + (1 << GLIBTOP_MEM_LOCKED); - -#ifndef LOG1024 -#define LOG1024 10 -#endif - -/* these are for getting the memory statistics */ -static int pageshift; /* log base 2 of the pagesize */ - -/* define pagetok in terms of pageshift */ -#define pagetok(size) ((size) << pageshift) - -/* nlist structure for kernel access */ -static struct nlist nlst [] = { - { "_cnt" }, -#ifdef __FreeBSD__ - { "_bufspace" }, -#else - { "_bufpages" }, -#endif - { 0 } -}; - -/* MIB array for sysctl */ -/* static int mib_length=2; */ -static int mib [] = { CTL_VM, VM_METER }; - -/* Init function. */ - -void -glibtop_init_mem_p (glibtop *server) -{ - register int pagesize; - - if (kvm_nlist (server->machine.kd, nlst) != 0) { - glibtop_warn_io_r (server, "kvm_nlist (mem)"); - return; - } - - /* get the page size with "getpagesize" and calculate pageshift - * from it */ - pagesize = getpagesize (); - pageshift = 0; - while (pagesize > 1) { - pageshift++; - pagesize >>= 1; - } - - /* we only need the amount of log(2)1024 for our conversion */ - pageshift -= LOG1024; - - server->sysdeps.mem = _glibtop_sysdeps_mem; -} - -void -glibtop_get_mem_p (glibtop *server, glibtop_mem *buf) -{ - struct vmtotal vmt; - size_t length_vmt; - struct vmmeter vmm; - u_int v_used_count; - u_int v_total_count; - int bufspace; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MEM), 0); - - memset (buf, 0, sizeof (glibtop_mem)); - - if (server->sysdeps.mem == 0) - return; - - /* [FIXME: On FreeBSD 2.2.6, sysctl () returns an incorrect - * value for `vmt.vm'. We use some code from Unix top - * here.] */ - - /* Get the data from sysctl */ - length_vmt = sizeof (vmt); - if (sysctl (mib, 2, &vmt, &length_vmt, NULL, 0)) { - glibtop_warn_io_r (server, "sysctl"); - return; - } - - /* Get the data from kvm_* */ - if (kvm_read (server->machine.kd, nlst[0].n_value, - &vmm, sizeof (vmm)) != sizeof (vmm)) { - glibtop_warn_io_r (server, "kvm_read (cnt)"); - return; - } - - if (kvm_read (server->machine.kd, nlst[1].n_value, - &bufspace, sizeof (bufspace)) != sizeof (bufspace)) { - glibtop_warn_io_r (server, "kvm_read (bufspace)"); - return; - } - - /* convert memory stats to Kbytes */ - -#ifdef __FreeBSD__ - v_total_count = vmm.v_page_count; -#else - v_total_count = vmm.v_kernel_pages + - vmm.v_free_count + vmm.v_wire_count + - vmm.v_active_count + vmm.v_inactive_count; -#endif - - v_used_count = vmm.v_active_count + vmm.v_inactive_count; - - buf->total = (u_int64_t) pagetok (v_total_count) << LOG1024; - buf->used = (u_int64_t) pagetok (v_used_count) << LOG1024; - buf->free = (u_int64_t) pagetok (vmm.v_free_count) << LOG1024; - -#ifdef __FreeBSD__ - buf->cached = (u_int64_t) pagetok (vmm.v_cache_count) << LOG1024; -#endif - - buf->locked = (u_int64_t) pagetok (vmm.v_wire_count) << LOG1024; - buf->shared = (u_int64_t) pagetok (vmt.t_rmshr) << LOG1024; - -#if __FreeBSD__ - buf->buffer = (u_int64_t) bufspace; -#else - buf->buffer = (u_int64_t) pagetok (bufspace) << LOG1024; -#endif - - /* user */ - buf->user = buf->total - buf->free - buf->shared - buf->buffer; - - /* Set the values to return */ - buf->flags = _glibtop_sysdeps_mem; -} diff --git a/sysdeps/freebsd/msg_limits.c b/sysdeps/freebsd/msg_limits.c deleted file mode 100644 index 4ab2eb5f..00000000 --- a/sysdeps/freebsd/msg_limits.c +++ /dev/null @@ -1,95 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , August 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -/* #define KERNEL to get declaration of `struct msginfo'. */ - -#ifdef __FreeBSD__ -#define KERNEL 1 -#else -#define _KERNEL 1 -#endif - -#include -#include - -static const unsigned long _glibtop_sysdeps_msg_limits = -(1 << GLIBTOP_IPC_MSGMAX) + (1 << GLIBTOP_IPC_MSGMNI) + -(1 << GLIBTOP_IPC_MSGMNB) + (1 << GLIBTOP_IPC_MSGTQL) + -(1 << GLIBTOP_IPC_MSGSSZ); - -/* The values in this structure never change at runtime, so we only - * read it once during initialization. We have to use the name `_msginfo' - * since `msginfo' is already declared external in . */ -static struct msginfo _msginfo; - -/* nlist structure for kernel access */ -static struct nlist nlst [] = { - { "_msginfo" }, - { 0 } -}; - -/* Init function. */ - -void -glibtop_init_msg_limits_p (glibtop *server) -{ - if (kvm_nlist (server->machine.kd, nlst) != 0) { - glibtop_warn_io_r (server, "kvm_nlist (msg_limits)"); - return; - } - - if (kvm_read (server->machine.kd, nlst [0].n_value, - &_msginfo, sizeof (_msginfo)) != sizeof (_msginfo)) { - glibtop_warn_io_r (server, "kvm_read (msginfo)"); - return; - } - - server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits; -} - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf) -{ - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MSG_LIMITS), 0); - - memset (buf, 0, sizeof (glibtop_msg_limits)); - - if (server->sysdeps.msg_limits == 0) - return; - - buf->msgmax = _msginfo.msgmax; - buf->msgmni = _msginfo.msgmni; - buf->msgmnb = _msginfo.msgmnb; - buf->msgtql = _msginfo.msgtql; - buf->msgssz = _msginfo.msgtql; - - buf->flags = _glibtop_sysdeps_msg_limits; -} diff --git a/sysdeps/freebsd/netload.c b/sysdeps/freebsd/netload.c deleted file mode 100644 index 882b9152..00000000 --- a/sysdeps/freebsd/netload.c +++ /dev/null @@ -1,214 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -#include -#include -#include - -#ifdef HAVE_NET_IF_VAR_H -#include -#endif - -#include -#include - -static const unsigned long _glibtop_sysdeps_netload = -(1 << GLIBTOP_NETLOAD_IF_FLAGS) + -(1 << GLIBTOP_NETLOAD_MTU) + -(1 << GLIBTOP_NETLOAD_SUBNET) + -(1 << GLIBTOP_NETLOAD_ADDRESS) + -(1 << GLIBTOP_NETLOAD_PACKETS_IN) + -(1 << GLIBTOP_NETLOAD_PACKETS_OUT) + -(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) + -(1 << GLIBTOP_NETLOAD_BYTES_IN) + -(1 << GLIBTOP_NETLOAD_BYTES_OUT) + -(1 << GLIBTOP_NETLOAD_BYTES_TOTAL) + -(1 << GLIBTOP_NETLOAD_ERRORS_IN) + -(1 << GLIBTOP_NETLOAD_ERRORS_OUT) + -(1 << GLIBTOP_NETLOAD_ERRORS_TOTAL) + -(1 << GLIBTOP_NETLOAD_COLLISIONS); - -/* nlist structure for kernel access */ -static struct nlist nlst [] = { - { "_ifnet" }, - { 0 } -}; - -/* Init function. */ - -void -glibtop_init_netload_p (glibtop *server) -{ - server->sysdeps.netload = _glibtop_sysdeps_netload; - - if (kvm_nlist (server->machine.kd, nlst) != 0) - glibtop_error_io_r (server, "kvm_nlist"); -} - -/* Provides Network statistics. */ - -void -glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, - const char *interface) -{ - struct ifnet ifnet; - u_long ifnetaddr, ifnetfound, ifaddraddr; - struct sockaddr *sa; - char tname [16]; - - union { - struct ifaddr ifa; - struct in_ifaddr in; - } ifaddr; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_NETLOAD), 0); - - memset (buf, 0, sizeof (glibtop_netload)); - - if (kvm_read (server->machine.kd, nlst [0].n_value, - &ifnetaddr, sizeof (ifnetaddr)) != sizeof (ifnetaddr)) - glibtop_error_io_r (server, "kvm_read (ifnet)"); - - ifaddraddr = 0; - while (ifnetaddr || ifaddraddr) { - struct sockaddr_in *sin; - register char *cp; - - if (ifaddraddr == 0) { - ifnetfound = ifnetaddr; - - if (kvm_read (server->machine.kd, ifnetaddr, &ifnet, - sizeof (ifnet)) != sizeof (ifnet)) - glibtop_error_io_r (server, "kvm_read (ifnetaddr)"); - -#ifdef __FreeBSD__ - if (kvm_read (server->machine.kd, (u_long) ifnet.if_name, - tname, 16) != 16) - glibtop_error_io_r (server, "kvm_read (if_name)"); -#else - strncpy (tname, ifnet.if_xname, 16); - tname [15] = 0; -#endif - -#if (defined __FreeBSD__) && (__FreeBSD_version >= 300000) - ifaddraddr = (u_long) ifnet.if_addrhead.tqh_first; -#elif (defined __FreeBSD__) - ifaddraddr = (u_long) ifnet.if_addrlist; -#else - ifaddraddr = (u_long) ifnet.if_addrlist.tqh_first; -#endif - } - - if (ifaddraddr) { - if ((kvm_read (server->machine.kd, ifaddraddr, &ifaddr, - sizeof (ifaddr)) != sizeof (ifaddr))) - glibtop_error_io_r (server, "kvm_read (ifaddraddr)"); - -#define CP(x) ((char *)(x)) - cp = (CP(ifaddr.ifa.ifa_addr) - CP(ifaddraddr)) + - CP(&ifaddr); sa = (struct sockaddr *)cp; - - if (!strcmp (interface, tname) && (sa->sa_family == AF_INET)) { - sin = (struct sockaddr_in *)sa; - - if (ifnet.if_flags & IFF_UP) - buf->if_flags |= GLIBTOP_IF_FLAGS_UP; - if (ifnet.if_flags & IFF_BROADCAST) - buf->if_flags |= GLIBTOP_IF_FLAGS_BROADCAST; - if (ifnet.if_flags & IFF_DEBUG) - buf->if_flags |= GLIBTOP_IF_FLAGS_DEBUG; - if (ifnet.if_flags & IFF_LOOPBACK) - buf->if_flags |= GLIBTOP_IF_FLAGS_LOOPBACK; - if (ifnet.if_flags & IFF_POINTOPOINT) - buf->if_flags |= GLIBTOP_IF_FLAGS_POINTOPOINT; - if (ifnet.if_flags & IFF_RUNNING) - buf->if_flags |= GLIBTOP_IF_FLAGS_RUNNING; - if (ifnet.if_flags & IFF_NOARP) - buf->if_flags |= GLIBTOP_IF_FLAGS_NOARP; - if (ifnet.if_flags & IFF_PROMISC) - buf->if_flags |= GLIBTOP_IF_FLAGS_PROMISC; - if (ifnet.if_flags & IFF_ALLMULTI) - buf->if_flags |= GLIBTOP_IF_FLAGS_ALLMULTI; - if (ifnet.if_flags & IFF_OACTIVE) - buf->if_flags |= GLIBTOP_IF_FLAGS_OACTIVE; - if (ifnet.if_flags & IFF_SIMPLEX) - buf->if_flags |= GLIBTOP_IF_FLAGS_SIMPLEX; - if (ifnet.if_flags & IFF_LINK0) - buf->if_flags |= GLIBTOP_IF_FLAGS_LINK0; - if (ifnet.if_flags & IFF_LINK1) - buf->if_flags |= GLIBTOP_IF_FLAGS_LINK1; - if (ifnet.if_flags & IFF_LINK2) - buf->if_flags |= GLIBTOP_IF_FLAGS_LINK2; -#ifdef __FreeBSD__ - if (ifnet.if_flags & IFF_ALTPHYS) - buf->if_flags |= GLIBTOP_IF_FLAGS_ALTPHYS; -#endif - if (ifnet.if_flags & IFF_MULTICAST) - buf->if_flags |= GLIBTOP_IF_FLAGS_MULTICAST; - - buf->subnet = htonl (ifaddr.in.ia_subnet); - buf->address = sin->sin_addr.s_addr; - - buf->mtu = ifnet.if_mtu; - - buf->packets_in = ifnet.if_ipackets; - buf->packets_out = ifnet.if_opackets; - buf->packets_total = buf->packets_in + buf->packets_out; - - buf->bytes_in = ifnet.if_ibytes; - buf->bytes_out = ifnet.if_obytes; - buf->bytes_total = buf->bytes_in + buf->bytes_out; - - buf->errors_in = ifnet.if_ierrors; - buf->errors_out = ifnet.if_oerrors; - buf->errors_total = buf->errors_in + buf->errors_out; - - buf->collisions = ifnet.if_collisions; - buf->flags = _glibtop_sysdeps_netload; - return; - } - -#if (defined __FreeBSD__) && (__FreeBSD_version >= 300000) - ifaddraddr = (u_long)ifaddr.ifa.ifa_link.tqe_next; -#elif (defined __FreeBSD__) - ifaddraddr = (u_long)ifaddr.ifa.ifa_next; -#else - ifaddraddr = (u_long)ifaddr.ifa.ifa_list.tqe_next; -#endif - } - -#if (defined __FreeBSD__) && (__FreeBSD_version >= 300000) - ifnetaddr = (u_long) ifnet.if_link.tqe_next; -#elif (defined __FreeBSD__) - ifnetaddr = (u_long) ifnet.if_next; -#else - ifnetaddr = (u_long) ifnet.if_list.tqe_next; -#endif - } -} diff --git a/sysdeps/freebsd/nosuid.c b/sysdeps/freebsd/nosuid.c deleted file mode 100644 index 15edf79a..00000000 --- a/sysdeps/freebsd/nosuid.c +++ /dev/null @@ -1,37 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -void -glibtop_open_s (glibtop *server, - const char *program_name, - const unsigned long features, - const unsigned flags) -{ } - -void -glibtop_close_s (glibtop *server) -{ } diff --git a/sysdeps/freebsd/open.c b/sysdeps/freebsd/open.c deleted file mode 100644 index ea95d16f..00000000 --- a/sysdeps/freebsd/open.c +++ /dev/null @@ -1,95 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags) -{ - glibtop_init_func_t *init_fkt; - - if (server == NULL) - glibtop_error_r (NULL, "glibtop_init_p (server == NULL)"); - - /* Do the initialization, but only if not already initialized. */ - - if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) { - glibtop_open_p (server, "glibtop", features, flags); - - for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++) - (*init_fkt) (server); - - server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS; - } -} - -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, - const unsigned flags) -{ -#ifdef DEBUG - fprintf (stderr, "DEBUG (%d): glibtop_open_p ()\n", getpid ()); -#endif - - /* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */ - - server->machine.uid = getuid (); - server->machine.euid = geteuid (); - server->machine.gid = getgid (); - server->machine.egid = getegid (); - -#ifdef __FreeBSD__ - server->os_version_code = __FreeBSD_version; -#endif - - /* Setup machine-specific data */ - server->machine.kd = kvm_open (NULL, NULL, NULL, O_RDONLY, "kvm_open"); - - if (server->machine.kd == NULL) - glibtop_error_io_r (server, "kvm_open"); - - /* Drop priviledges. */ - - if (setreuid (server->machine.euid, server->machine.uid)) - _exit (1); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SUID ROOT PART !!! */ - - /* Our effective uid is now those of the user invoking the server, - * so we do no longer have any priviledges. */ - - /* NOTE: On FreeBSD, we do not need to be suid root, we just need to - * be sgid kmem. - * - * The server will only use setegid() to get back it's priviledges, - * so it will fail if it is suid root and not sgid kmem. */ -} diff --git a/sysdeps/freebsd/ppp.c b/sysdeps/freebsd/ppp.c deleted file mode 100644 index 895a6bbc..00000000 --- a/sysdeps/freebsd/ppp.c +++ /dev/null @@ -1,138 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -#ifdef HAVE_I4B - -#include -#include - -#ifdef HAVE_NET_IF_VAR_H -#include -#endif - -#include -#include - -#ifdef __FreeBSD__ -#include -#else -#include -#endif - -/* Read `misc/i4b_acct.txt' for details ... */ -#ifdef HAVE_I4B_ACCT -#include -#endif - -static const unsigned long _glibtop_sysdeps_ppp = -(1 << GLIBTOP_PPP_STATE); - -#ifdef HAVE_I4B_ACCT -static const unsigned long _glibtop_sysdeps_ppp_acct = -(1 << GLIBTOP_PPP_BYTES_IN) + (1 << GLIBTOP_PPP_BYTES_OUT); -#endif - -#endif /* HAVE_I4B */ - -/* nlist structure for kernel access */ -static struct nlist nlst [] = { -#ifdef HAVE_I4B - { "_i4bisppp_softc" }, -#endif - { 0 } -}; - -/* Init function. */ - -void -glibtop_init_ppp_p (glibtop *server) -{ -#ifdef HAVE_I4B -#ifdef HAVE_I4B_ACCT - server->sysdeps.ppp = _glibtop_sysdeps_ppp | - _glibtop_sysdeps_ppp_acct; -#else - server->sysdeps.ppp = _glibtop_sysdeps_ppp; -#endif -#endif /* HAVE_I4B */ - - if (kvm_nlist (server->machine.kd, nlst) != 0) - glibtop_error_io_r (server, "kvm_nlist"); -} - -/* Provides information about ppp usage. */ - -void -glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device) -{ -#ifdef HAVE_I4B -#ifdef HAVE_I4B_ACCT - struct i4bisppp_softc data; -#else - struct sppp data; -#endif - int phase; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PPP), 0); - - memset (buf, 0, sizeof (glibtop_ppp)); - - if (kvm_read (server->machine.kd, nlst [0].n_value, - &data, sizeof (data)) != sizeof (data)) - glibtop_error_io_r (server, "kvm_read (i4bisppp_softc)"); - -#ifdef HAVE_I4B_ACCT - phase = data.sc_if_un.scu_sp.pp_phase; -#else - phase = data.pp_phase; -#endif - - switch (phase) { - case PHASE_DEAD: - case PHASE_TERMINATE: - buf->state = GLIBTOP_PPP_STATE_HANGUP; - break; - case PHASE_ESTABLISH: - case PHASE_NETWORK: - buf->state = GLIBTOP_PPP_STATE_ONLINE; - break; - default: - buf->state = GLIBTOP_PPP_STATE_UNKNOWN; - break; - } - - buf->flags = _glibtop_sysdeps_ppp; - -#ifdef HAVE_I4B_ACCT - buf->bytes_in = data.sc_inb; - buf->bytes_out = data.sc_outb; - buf->flags |= _glibtop_sysdeps_ppp_acct; -#endif -#endif /* HAVE_I4B */ -} diff --git a/sysdeps/freebsd/procargs.c b/sysdeps/freebsd/procargs.c deleted file mode 100644 index c6d0c1b5..00000000 --- a/sysdeps/freebsd/procargs.c +++ /dev/null @@ -1,107 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include -#include - -#include - -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_args = -(1 << GLIBTOP_PROC_ARGS_SIZE); - -/* Init function. */ - -void -glibtop_init_proc_args_p (glibtop *server) -{ - server->sysdeps.proc_args = _glibtop_sysdeps_proc_args; -} - -/* Provides detailed information about a process. */ - -char * -glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf, - pid_t pid, unsigned max_len) -{ - struct kinfo_proc *pinfo; - char *retval, **args, **ptr; - unsigned size = 0, pos = 0; - int count; - - char filename [BUFSIZ]; - struct stat statb; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_ARGS), 0); - - memset (buf, 0, sizeof (glibtop_proc_args)); - - /* swapper, init, pagedaemon, vmdaemon, update - this doen't work. */ - if (pid < 5) return NULL; - - sprintf (filename, "/proc/%d/mem", pid); - if (stat (filename, &statb)) return NULL; - - glibtop_suid_enter (server); - - /* Get the process data */ - pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); - if ((pinfo == NULL) || (count < 1)) { - glibtop_suid_leave (server); - glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid); - return NULL; - } - - args = kvm_getargv (server->machine.kd, pinfo, max_len); - if (args == NULL) { - glibtop_suid_leave (server); - glibtop_warn_io_r (server, "kvm_getargv (%d)", pid); - return NULL; - } - - glibtop_suid_leave (server); - - for (ptr = args; *ptr; ptr++) - size += strlen (*ptr)+1; - - size += 2; - retval = glibtop_malloc_r (server, size); - memset (retval, 0, size); - - for (ptr = args; *ptr; ptr++) { - int len = strlen (*ptr)+1; - memcpy (retval+pos, *ptr, len); - pos += len; - } - - buf->size = pos ? pos-1 : 0; - - buf->flags = _glibtop_sysdeps_proc_args; - - return retval; -} diff --git a/sysdeps/freebsd/procdata.c b/sysdeps/freebsd/procdata.c deleted file mode 100644 index 4b76e252..00000000 --- a/sysdeps/freebsd/procdata.c +++ /dev/null @@ -1,180 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include - -#include - -#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) - -#define BIT_SHIFT(x) (1 << (x % 32)) - -static const unsigned long _glibtop_sysdeps_procdata_0 = -BIT_SHIFT(GLIBTOP_PROCDATA_CMD) + -BIT_SHIFT(GLIBTOP_PROCDATA_STATE) + -BIT_SHIFT(GLIBTOP_PROCDATA_UID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PPID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PGRP) + -BIT_SHIFT(GLIBTOP_PROCDATA_SESSION) + -BIT_SHIFT(GLIBTOP_PROCDATA_TTY) + -BIT_SHIFT(GLIBTOP_PROCDATA_TPGID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PRIORITY) + -BIT_SHIFT(GLIBTOP_PROCDATA_NICE) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGNAL) + -BIT_SHIFT(GLIBTOP_PROCDATA_BLOCKED) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGIGNORE) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGCATCH) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_TIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_UTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_STIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_CUTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_CSTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIZE) + -BIT_SHIFT(GLIBTOP_PROCDATA_RESIDENT) + -BIT_SHIFT(GLIBTOP_PROCDATA_SHARE) + -BIT_SHIFT(GLIBTOP_PROCDATA_TRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_LRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_DRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_DT) + -BIT_SHIFT(GLIBTOP_PROCDATA_VSIZE) + -BIT_SHIFT(GLIBTOP_PROCDATA_RSS) + -BIT_SHIFT(GLIBTOP_PROCDATA_RSS_RLIM) + -BIT_SHIFT(GLIBTOP_PROCDATA_TIMEOUT) + -BIT_SHIFT(GLIBTOP_PROCDATA_IT_REAL_VALUE); - -static const unsigned long _glibtop_sysdeps_procdata_1 = -BIT_SHIFT(GLIBTOP_PROCDATA_K_FLAGS) + -BIT_SHIFT(GLIBTOP_PROCDATA_MIN_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_MAJ_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_CMIN_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_CMAJ_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_CODE) + -BIT_SHIFT(GLIBTOP_PROCDATA_END_CODE) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_STACK) + -BIT_SHIFT(GLIBTOP_PROCDATA_KSTK_ESP) + -BIT_SHIFT(GLIBTOP_PROCDATA_KSTK_EIP) + -BIT_SHIFT(GLIBTOP_PROCDATA_WCHAN); - -/* Provides detailed information about a process. */ - -void -glibtop_get_procdata_s (glibtop *server, glibtop_procdata *buf, pid_t pid) -{ - char input [BUFSIZ], *tmp; - struct stat statb; - int nread; - FILE *f; - - glibtop_init_r (&server, 0, 0); - - memset (buf, 0, sizeof (glibtop_procdata)); - - if (pid == 0) { - /* Client is only interested in the flags. */ - buf->flags [0] = _glibtop_sysdeps_procdata_0; - buf->flags [1] = _glibtop_sysdeps_procdata_1; - return; - } - - - sprintf (input, "/proc/%d/stat", pid); - - if (stat (input, &statb)) return; - - buf->uid = statb.st_uid; - - f = fopen (input, "r"); - if (!f) return; - - nread = fread (input, 1, BUFSIZ, f); - - if (nread < 0) { - fclose (f); - return; - } - - input [nread] = 0; - - /* This is from guile-utils/gtop/proc/readproc.c */ - - /* split into "PID (cmd" and "" */ - tmp = strrchr (input, ')'); - *tmp = '\0'; /* replace trailing ')' with NUL */ - /* parse these two strings separately, skipping the leading "(". */ - memset (buf->cmd, 0, sizeof (buf->cmd)); - sscanf (input, "%d (%39c", &buf->pid, buf->cmd); - sscanf(tmp + 2, /* skip space after ')' too */ - "%c %d %d %d %d %d %lu %lu %lu %lu %lu " - "%ld %ld %ld %ld %d %d %lu %lu %ld %lu " - "%lu %lu %lu %lu %lu %lu %lu %d %d %d %d %lu", - &buf->state, &buf->ppid, &buf->pgrp, &buf->session, - &buf->tty, &buf->tpgid, &buf->k_flags, &buf->min_flt, - &buf->cmin_flt, &buf->maj_flt, &buf->cmaj_flt, - &buf->utime, &buf->stime, &buf->cutime, &buf->cstime, - &buf->priority, &buf->nice, &buf->timeout, - &buf->it_real_value, &buf->start_time, &buf->vsize, - &buf->rss, &buf->rss_rlim, &buf->start_code, - &buf->end_code, &buf->start_stack, &buf->kstk_esp, - &buf->kstk_eip, &buf->signal, &buf->blocked, - &buf->sigignore, &buf->sigcatch, &buf->wchan); - - if (buf->tty == 0) - /* the old notty val, update elsewhere bef. moving to 0 */ - buf->tty = -1; - - if (server->os_version_code < LINUX_VERSION(1,3,39)) { - /* map old meanings to new */ - buf->priority = 2*15 - buf->priority; - buf->nice = 15 - buf->nice; - } - if (server->os_version_code < LINUX_VERSION(1,1,30) && buf->tty != -1) - /* when tty wasn't full devno */ - buf->tty = 4*0x100 + buf->tty; - - fclose (f); - - sprintf (input, "/proc/%d/statm", pid); - - f = fopen (input, "r"); - if (!f) return; - - nread = fread (input, 1, BUFSIZ, f); - - if (nread < 0) { - fclose (f); - return; - } - - input [nread] = 0; - - sscanf (input, "%ld %ld %ld %ld %ld %ld %ld", - &buf->size, &buf->resident, &buf->share, - &buf->trs, &buf->lrs, &buf->drs, &buf->dt); - - fclose (f); - - buf->flags [0] = _glibtop_sysdeps_procdata_0; - buf->flags [1] = _glibtop_sysdeps_procdata_1; -} diff --git a/sysdeps/freebsd/prockernel.c b/sysdeps/freebsd/prockernel.c deleted file mode 100644 index e8654783..00000000 --- a/sysdeps/freebsd/prockernel.c +++ /dev/null @@ -1,174 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -#include -#include -#include -#include -#ifndef __OpenBSD__ -#include -#endif -#include -#ifdef __FreeBSD__ -#include -#endif - -#include -#include - -#ifdef __FreeBSD__ -#include -#endif - -static const unsigned long _glibtop_sysdeps_proc_kernel_pstats = -(1 << GLIBTOP_PROC_KERNEL_MIN_FLT) + -(1 << GLIBTOP_PROC_KERNEL_MAJ_FLT) + -(1 << GLIBTOP_PROC_KERNEL_CMIN_FLT) + -(1 << GLIBTOP_PROC_KERNEL_CMAJ_FLT); - -static const unsigned long _glibtop_sysdeps_proc_kernel_pcb = -(1 << GLIBTOP_PROC_KERNEL_KSTK_EIP) + -(1 << GLIBTOP_PROC_KERNEL_KSTK_ESP); - -static const unsigned long _glibtop_sysdeps_proc_kernel_wchan = -(1 << GLIBTOP_PROC_KERNEL_NWCHAN) + -(1 << GLIBTOP_PROC_KERNEL_WCHAN); - -/* Init function. */ - -void -glibtop_init_proc_kernel_p (glibtop *server) -{ - server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel_pstats | - _glibtop_sysdeps_proc_kernel_pcb | - _glibtop_sysdeps_proc_kernel_wchan; -} - -void -glibtop_get_proc_kernel_p (glibtop *server, - glibtop_proc_kernel *buf, - pid_t pid) -{ - struct kinfo_proc *pinfo; - struct user *u_addr = (struct user *)USRSTACK; - struct pstats pstats; - struct pcb pcb; - int count; - - char filename [BUFSIZ]; - struct stat statb; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_KERNEL), 0); - - memset (buf, 0, sizeof (glibtop_proc_kernel)); - - if (server->sysdeps.proc_time == 0) - return; - - /* It does not work for the swapper task. */ - if (pid == 0) return; - - /* Get the process information */ - pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); - if ((pinfo == NULL) || (count != 1)) - glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); - - buf->nwchan = (unsigned long) pinfo [0].kp_proc.p_wchan &~ KERNBASE; - buf->flags |= (1 << GLIBTOP_PROC_KERNEL_NWCHAN); - - if (pinfo [0].kp_proc.p_wchan && pinfo [0].kp_proc.p_wmesg) { - strncpy (buf->wchan, pinfo [0].kp_eproc.e_wmesg, - sizeof (buf->wchan) - 1); - buf->wchan [sizeof (buf->wchan) - 1] = 0; - buf->flags |= (1 << GLIBTOP_PROC_KERNEL_WCHAN); - } else { - buf->wchan [0] = 0; - } - - /* Taken from `saveuser ()' in `/usr/src/bin/ps/ps.c'. */ - - /* [FIXME]: /usr/include/sys/user.h tells me that the user area - * may or may not be at the same kernel address in all - * processes, but I don't see any way to get that address. - * Since `ps' simply uses its own address, I think it's - * safe to do this here, too. */ - - /* NOTE: You need to mount the /proc filesystem to make - * `kvm_uread' work. */ - - sprintf (filename, "/proc/%d/mem", pid); - if (stat (filename, &statb)) return; - - glibtop_suid_enter (server); - - if ((pinfo [0].kp_proc.p_flag & P_INMEM) && - kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, - (unsigned long) &u_addr->u_stats, - (char *) &pstats, sizeof (pstats)) == sizeof (pstats)) - { - /* - * The u-area might be swapped out, and we can't get - * at it because we have a crashdump and no swap. - * If it's here fill in these fields, otherwise, just - * leave them 0. - */ - - buf->min_flt = (u_int64_t) pstats.p_ru.ru_minflt; - buf->maj_flt = (u_int64_t) pstats.p_ru.ru_majflt; - buf->cmin_flt = (u_int64_t) pstats.p_cru.ru_minflt; - buf->cmaj_flt = (u_int64_t) pstats.p_cru.ru_majflt; - - buf->flags |= _glibtop_sysdeps_proc_kernel_pstats; - } - - if ((pinfo [0].kp_proc.p_flag & P_INMEM) && - kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, - (unsigned long) &u_addr->u_pcb, - (char *) &pcb, sizeof (pcb)) == sizeof (pcb)) - { -#ifdef __FreeBSD__ -#if (__FreeBSD_version >= 300003) - buf->kstk_esp = (u_int64_t) pcb.pcb_esp; - buf->kstk_eip = (u_int64_t) pcb.pcb_eip; -#else - buf->kstk_esp = (u_int64_t) pcb.pcb_ksp; - buf->kstk_eip = (u_int64_t) pcb.pcb_pc; -#endif -#else - buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0; - buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip; - - buf->flags |= _glibtop_sysdeps_proc_kernel_pcb; -#endif - } - - /* Taken from `wchan ()' in `/usr/src/bin/ps/print.c'. */ - - glibtop_suid_leave (server); -} diff --git a/sysdeps/freebsd/proclist.c b/sysdeps/freebsd/proclist.c deleted file mode 100644 index 11ffa7b1..00000000 --- a/sysdeps/freebsd/proclist.c +++ /dev/null @@ -1,103 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proclist = -(1 << GLIBTOP_PROCLIST_TOTAL) + (1 << GLIBTOP_PROCLIST_NUMBER) + -(1 << GLIBTOP_PROCLIST_SIZE); - -/* Fetch list of currently running processes. - * The interface of this function is a little bit different from the others: - * buf->flags is only set if the call succeeded, in this case pids_chain, - * a list of the pids of all currently running processes is returned, - * buf->number is the number of elements of this list and buf->size is - * the size of one single element (sizeof (unsigned)). The total size is - * stored in buf->total. - * - * The calling function has to free the memory to which a pointer is returned. - * - * IMPORTANT NOTE: - * On error, this function MUST return NULL and set buf->flags to zero ! - * On success, it returnes a pointer to a list of buf->number elements - * each buf->size big. The total size is stored in buf->total. - * The calling function has to free the memory to which a pointer is returned. - * - * On error, NULL is returned and buf->flags is zero. */ - -/* Init function. */ - -void -glibtop_init_proclist_p (glibtop *server) -{ - server->sysdeps.proclist = _glibtop_sysdeps_proclist; -} - -unsigned * -glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf, - int64_t real_which, int64_t arg) -{ - struct kinfo_proc *pinfo; - unsigned *pids = NULL; - int which, count; - int i,j; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROCLIST), 0); - - memset (buf, 0, sizeof (glibtop_proclist)); - - which = (int)(real_which & GLIBTOP_KERN_PROC_MASK); - - /* Get the process data */ - pinfo = kvm_getprocs (server->machine.kd, which, arg, &count); - if ((pinfo == NULL) || (count < 1)) { - glibtop_warn_io_r (server, "kvm_getprocs (proclist)"); - return NULL; - } - count--; - - /* Allocate count objects in the pids_chain array - * Same as malloc is pids is NULL, which it is. */ - pids = glibtop_realloc_r (server, pids, count * sizeof (unsigned)); - /* Copy the pids over to this chain */ - for (i=j=0; i < count; i++) { - if ((real_which & GLIBTOP_EXCLUDE_IDLE) && - (pinfo[i].kp_proc.p_stat != SRUN)) - continue; - else if ((real_which & GLIBTOP_EXCLUDE_SYSTEM) && - (pinfo[i].kp_eproc.e_pcred.p_ruid == 0)) - continue; - pids [j++] = (unsigned) pinfo[i].kp_proc.p_pid; - } /* end for */ - /* Set the fields in buf */ - buf->number = j; - buf->size = sizeof (unsigned); - buf->total = j * sizeof (unsigned); - buf->flags = _glibtop_sysdeps_proclist; - return pids; -} diff --git a/sysdeps/freebsd/procmap.c b/sysdeps/freebsd/procmap.c deleted file mode 100644 index 41bba26e..00000000 --- a/sysdeps/freebsd/procmap.c +++ /dev/null @@ -1,215 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#ifndef __OpenBSD__ -#include -#endif -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_map = -(1 << GLIBTOP_PROC_MAP_TOTAL) + (1 << GLIBTOP_PROC_MAP_NUMBER) + -(1 << GLIBTOP_PROC_MAP_SIZE); - -static const unsigned long _glibtop_sysdeps_map_entry = -(1 << GLIBTOP_MAP_ENTRY_START) + (1 << GLIBTOP_MAP_ENTRY_END) + -(1 << GLIBTOP_MAP_ENTRY_OFFSET) + (1 << GLIBTOP_MAP_ENTRY_PERM) + -(1 << GLIBTOP_MAP_ENTRY_INODE) + (1 << GLIBTOP_MAP_ENTRY_DEVICE); - -/* Init function. */ - -void -glibtop_init_proc_map_p (glibtop *server) -{ - server->sysdeps.proc_map = _glibtop_sysdeps_proc_map; -} - -/* Provides detailed information about a process. */ - -glibtop_map_entry * -glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, - pid_t pid) -{ - struct kinfo_proc *pinfo; - struct vm_map_entry entry, *first; - struct vmspace vmspace; - struct vm_object object; - glibtop_map_entry *maps; - struct vnode vnode; - struct inode inode; - struct mount mount; - int count, i = 0; - int update = 0; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MAP), 0); - - memset (buf, 0, sizeof (glibtop_proc_map)); - - /* It does not work for the swapper task. */ - if (pid == 0) return NULL; - - glibtop_suid_enter (server); - - /* Get the process data */ - pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); - if ((pinfo == NULL) || (count < 1)) - glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); - - /* Now we get the memory maps. */ - - if (kvm_read (server->machine.kd, - (unsigned long) pinfo [0].kp_proc.p_vmspace, - (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) - glibtop_error_io_r (server, "kvm_read (vmspace)"); - - first = vmspace.vm_map.header.next; - - if (kvm_read (server->machine.kd, - (unsigned long) vmspace.vm_map.header.next, - (char *) &entry, sizeof (entry)) != sizeof (entry)) - glibtop_error_io_r (server, "kvm_read (entry)"); - - /* Allocate space. */ - - buf->number = vmspace.vm_map.nentries; - buf->size = sizeof (glibtop_map_entry); - - buf->total = buf->number * buf->size; - - maps = glibtop_malloc_r (server, buf->total); - - memset (maps, 0, buf->total); - - buf->flags = _glibtop_sysdeps_proc_map; - - /* Walk through the `vm_map_entry' list ... */ - - /* I tested this a few times with `mmap'; as soon as you write - * to the mmap'ed area, the object type changes from OBJT_VNODE - * to OBJT_DEFAULT so if seems this really works. */ - - do { - if (update) { - if (kvm_read (server->machine.kd, - (unsigned long) entry.next, - &entry, sizeof (entry)) != sizeof (entry)) - glibtop_error_io_r (server, "kvm_read (entry)"); - } else { - update = 1; - } - -#ifdef __FreeBSD__ -#if __FreeBSD__ >= 4 - if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP)) - continue; -#else - if (entry.eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP)) - continue; -#endif -#else - if (entry.is_a_map || entry.is_sub_map) - continue; -#endif - - maps [i].flags = _glibtop_sysdeps_map_entry; - - maps [i].start = entry.start; - maps [i].end = entry.end; - maps [i].offset = entry.offset; - - maps [i].perm = 0; - - if (entry.protection & VM_PROT_READ) - maps [i].perm |= GLIBTOP_MAP_PERM_READ; - if (entry.protection & VM_PROT_WRITE) - maps [i].perm |= GLIBTOP_MAP_PERM_WRITE; - if (entry.protection & VM_PROT_EXECUTE) - maps [i].perm |= GLIBTOP_MAP_PERM_EXECUTE; - - i++; - - if (!entry.object.vm_object) - continue; - - /* We're only interested in `vm_object's */ - - if (kvm_read (server->machine.kd, - (unsigned long) entry.object.vm_object, - &object, sizeof (object)) != sizeof (object)) - glibtop_error_io_r (server, "kvm_read (object)"); - -#ifdef __FreeBSD__ - /* If the object is of type vnode, add its size */ - - if (object.type != OBJT_VNODE) - continue; - - if (!object.handle) - continue; - - if (kvm_read (server->machine.kd, - (unsigned long) object.handle, - &vnode, sizeof (vnode)) != sizeof (vnode)) - glibtop_error_io_r (server, "kvm_read (vnode)"); - - if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || - !vnode.v_data) continue; - - if (kvm_read (server->machine.kd, - (unsigned long) vnode.v_data, - &inode, sizeof (inode)) != sizeof (inode)) - glibtop_error_io_r (server, "kvm_read (inode)"); - - if (kvm_read (server->machine.kd, - (unsigned long) vnode.v_mount, - &mount, sizeof (mount)) != sizeof (mount)) - glibtop_error_io_r (server, "kvm_read (mount)"); - - maps [i-1].inode = inode.i_number; - maps [i-1].device = inode.i_dev; -#endif - } while (entry.next != first); - - return maps; -} diff --git a/sysdeps/freebsd/procmem.c b/sysdeps/freebsd/procmem.c deleted file mode 100644 index 67944fc4..00000000 --- a/sysdeps/freebsd/procmem.c +++ /dev/null @@ -1,206 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#ifndef __OpenBSD__ -#include -#endif -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_mem = -(1 << GLIBTOP_PROC_MEM_SIZE) + -(1 << GLIBTOP_PROC_MEM_VSIZE) + -(1 << GLIBTOP_PROC_MEM_SHARE) + -(1 << GLIBTOP_PROC_MEM_RESIDENT) + -(1 << GLIBTOP_PROC_MEM_RSS) + -(1 << GLIBTOP_PROC_MEM_RSS_RLIM); - -#ifndef LOG1024 -#define LOG1024 10 -#endif - -/* these are for getting the memory statistics */ -static int pageshift; /* log base 2 of the pagesize */ - -/* define pagetok in terms of pageshift */ -#define pagetok(size) ((size) << pageshift) - -/* Init function. */ - -void -glibtop_init_proc_mem_p (glibtop *server) -{ - register int pagesize; - - /* get the page size with "getpagesize" and calculate pageshift - * from it */ - pagesize = getpagesize (); - pageshift = 0; - while (pagesize > 1) { - pageshift++; - pagesize >>= 1; - } - - /* we only need the amount of log(2)1024 for our conversion */ - pageshift -= LOG1024; - - server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, - pid_t pid) -{ - struct kinfo_proc *pinfo; - struct vm_map_entry entry, *first; - struct vmspace *vms, vmspace; - struct vm_object object; - struct plimit plimit; - int count; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MEM), 0); - - memset (buf, 0, sizeof (glibtop_proc_mem)); - - if (server->sysdeps.proc_mem == 0) - return; - - /* It does not work for the swapper task. */ - if (pid == 0) return; - - /* Get the process data */ - pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); - if ((pinfo == NULL) || (count < 1)) { - glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid); - return; - } - - if (kvm_read (server->machine.kd, - (unsigned long) pinfo [0].kp_proc.p_limit, - (char *) &plimit, sizeof (plimit)) != sizeof (plimit)) { - glibtop_warn_io_r (server, "kvm_read (plimit)"); - return; - } - - buf->rss_rlim = (u_int64_t) - (plimit.pl_rlimit [RLIMIT_RSS].rlim_cur); - - vms = &pinfo [0].kp_eproc.e_vm; - - buf->vsize = buf->size = (u_int64_t) pagetok - (vms->vm_tsize + vms->vm_dsize + vms->vm_ssize) << LOG1024; - - buf->resident = buf->rss = (u_int64_t) pagetok - (vms->vm_rssize) << LOG1024; - - /* Now we get the shared memory. */ - - if (kvm_read (server->machine.kd, - (unsigned long) pinfo [0].kp_proc.p_vmspace, - (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) { - glibtop_warn_io_r (server, "kvm_read (vmspace)"); - return; - } - - first = vmspace.vm_map.header.next; - - if (kvm_read (server->machine.kd, - (unsigned long) vmspace.vm_map.header.next, - (char *) &entry, sizeof (entry)) != sizeof (entry)) { - glibtop_warn_io_r (server, "kvm_read (entry)"); - return; - } - - /* Walk through the `vm_map_entry' list ... */ - - /* I tested this a few times with `mmap'; as soon as you write - * to the mmap'ed area, the object type changes from OBJT_VNODE - * to OBJT_DEFAULT so if seems this really works. */ - - while (entry.next != first) { - if (kvm_read (server->machine.kd, - (unsigned long) entry.next, - &entry, sizeof (entry)) != sizeof (entry)) { - glibtop_warn_io_r (server, "kvm_read (entry)"); - return; - } - -#ifdef __FreeBSD__ -#if __FreeBSD__ >= 4 - if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP)) - continue; -#else - if (entry.eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP)) - continue; -#endif -#else - if (entry.is_a_map || entry.is_sub_map) - continue; -#endif - - if (!entry.object.vm_object) - continue; - - /* We're only interested in `vm_object's */ - - if (kvm_read (server->machine.kd, - (unsigned long) entry.object.vm_object, - &object, sizeof (object)) != sizeof (object)) { - glibtop_warn_io_r (server, "kvm_read (object)"); - return; - } - - /* If the object is of type vnode, add its size */ - -#ifdef __FreeBSD__ - if (object.type != OBJT_VNODE) - continue; - - buf->share += object.un_pager.vnp.vnp_size; -#else - buf->share += object.size; -#endif - } - - buf->flags = _glibtop_sysdeps_proc_mem; -} diff --git a/sysdeps/freebsd/procsegment.c b/sysdeps/freebsd/procsegment.c deleted file mode 100644 index 1580f574..00000000 --- a/sysdeps/freebsd/procsegment.c +++ /dev/null @@ -1,82 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_segment = 0; - -/* Init function. */ - -void -glibtop_init_proc_segment_p (glibtop *server) -{ - server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_segment_p (glibtop *server, - glibtop_proc_segment *buf, - pid_t pid) -{ - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0); - - memset (buf, 0, sizeof (glibtop_proc_segment)); - -#if 0 - /* Get the process info from the kernel */ - kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, count); - if (*count != 1) { - return; /* the zeroed-out buffer indicating no data */ - } - - /* trs: text resident set size - pinfo[0]->kp_eproc.e_xrssize; - */ - /* buf->trs = pinfo[0]->kp_eproc.e_xrssize; */ - /* lrs: shared-lib resident set size - ? */ - /* drs: data resident set size - pinfo[0]->kp_eproc.e_vm.vm_map.vm_dsize; - */ - /* dt: dirty pages - */ - /* start_code: address of beginning of code segment - - */ - /* end_code: address of end of code segment - */ - /* start_stack: address of the bottom of stack segment - */ -#endif -} - diff --git a/sysdeps/freebsd/procsignal.c b/sysdeps/freebsd/procsignal.c deleted file mode 100644 index 80cb1d45..00000000 --- a/sysdeps/freebsd/procsignal.c +++ /dev/null @@ -1,103 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_signal = -(1 << GLIBTOP_PROC_SIGNAL_SIGNAL) + -(1 << GLIBTOP_PROC_SIGNAL_BLOCKED) + -(1 << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + -(1 << GLIBTOP_PROC_SIGNAL_SIGCATCH); - -/* Init function. */ - -void -glibtop_init_proc_signal_p (glibtop *server) -{ - server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal; -} - -void -glibtop_get_proc_signal_p (glibtop *server, - glibtop_proc_signal *buf, - pid_t pid) -{ - struct kinfo_proc *pinfo; - int count = 0; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0); - - memset (buf, 0, sizeof (glibtop_proc_signal)); - - /* It does not work for the swapper task. */ - if (pid == 0) return; - - /* Get the process information */ - pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); - if ((pinfo == NULL) || (count != 1)) { - glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid); - return; - } - - /* signal: mask of pending signals. - * pinfo [0].kp_proc.p_siglist - */ -#if defined(__NetBSD__) && (NSIG > 32) - buf->signal [0] = pinfo [0].kp_proc.p_siglist.__bits[0]; -#else - buf->signal [0] = pinfo [0].kp_proc.p_siglist; -#endif - - /* blocked: mask of blocked signals. - * pinfo [0].kp_proc.p_sigmask - */ -#if defined(__NetBSD__) && (NSIG > 32) - buf->blocked [0] = pinfo [0].kp_proc.p_sigmask.__bits[0]; -#else - buf->blocked [0] = pinfo [0].kp_proc.p_sigmask; -#endif - - /* sigignore: mask of ignored signals. - * pinfo [0].kp_proc.p_sigignore - */ -#if defined(__NetBSD__) && (NSIG > 32) - buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore.__bits[0]; -#else - buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore; -#endif - - /* sigcatch: mask of caught signals. - * pinfo [0].kp_proc.p_sigcatch - */ -#if defined(__NetBSD__) && (NSIG > 32) - buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch.__bits[0]; -#else - buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch; -#endif - - buf->flags = _glibtop_sysdeps_proc_signal; -} diff --git a/sysdeps/freebsd/procstate.c b/sysdeps/freebsd/procstate.c deleted file mode 100644 index e60d05b9..00000000 --- a/sysdeps/freebsd/procstate.c +++ /dev/null @@ -1,99 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998 Joshua Sled - This file is part of LibGTop 1.0. - - Contributed by Joshua Sled , July 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -#ifndef __OpenBSD__ -#include -#endif - -static const unsigned long _glibtop_sysdeps_proc_state = -(1 << GLIBTOP_PROC_STATE_CMD) + (1 << GLIBTOP_PROC_STATE_STATE) + -(1 << GLIBTOP_PROC_STATE_UID) + (1 << GLIBTOP_PROC_STATE_GID); - -/* Init function. */ - -void -glibtop_init_proc_state_p (glibtop *server) -{ - server->sysdeps.proc_state = _glibtop_sysdeps_proc_state; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_state_p (glibtop *server, - glibtop_proc_state *buf, - pid_t pid) -{ - struct kinfo_proc *pinfo; - int count = 0; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_STATE), 0); - - memset (buf, 0, sizeof (glibtop_proc_state)); - - /* It does not work for the swapper task. */ - if (pid == 0) return; - - /* Get the process information */ - pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); - if ((pinfo == NULL) || (count != 1)) { - glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid); - return; - } - - strncpy (buf->cmd, pinfo [0].kp_proc.p_comm, sizeof (buf->cmd)-1); - buf->cmd [sizeof (buf->cmd)-1] = 0; - - buf->uid = pinfo [0].kp_eproc.e_pcred.p_svuid; - buf->gid = pinfo [0].kp_eproc.e_pcred.p_svgid; - - switch (pinfo [0].kp_proc.p_stat) { - case SIDL: - buf->state = 'I'; - break; - case SRUN: - buf->state = 'R'; - break; - case SSLEEP: - buf->state = 'S'; - break; - case SSTOP: - buf->state = 'T'; - break; - case SZOMB: - buf->state = 'Z'; - break; - default: - buf->state = '?'; - break; - } - - /* Set the flags for the data we're about to return*/ - buf->flags = _glibtop_sysdeps_proc_state; -} diff --git a/sysdeps/freebsd/proctime.c b/sysdeps/freebsd/proctime.c deleted file mode 100644 index bf6c38a0..00000000 --- a/sysdeps/freebsd/proctime.c +++ /dev/null @@ -1,194 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -#ifdef __FreeBSD__ -#include -#endif - -static const unsigned long _glibtop_sysdeps_proc_time = -(1 << GLIBTOP_PROC_TIME_RTIME) + (1 << GLIBTOP_PROC_TIME_FREQUENCY); - -static const unsigned long _glibtop_sysdeps_proc_time_user = -(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_STIME) + -(1 << GLIBTOP_PROC_TIME_CUTIME) + (1 << GLIBTOP_PROC_TIME_CSTIME); - -#define tv2sec(tv) (((u_int64_t) tv.tv_sec * 1000000) + (u_int64_t) tv.tv_usec) - -/* Init function. */ - -void -glibtop_init_proc_time_p (glibtop *server) -{ - server->sysdeps.proc_time = _glibtop_sysdeps_proc_time | - _glibtop_sysdeps_proc_time_user; -} - -/* Taken from /usr/src/sys/kern/kern_resource.c */ - -/* - * Transform the running time and tick information in proc p into user, - * system, and interrupt time usage. - */ - -static void -calcru(p, up, sp, ip) - struct proc *p; - struct timeval *up; - struct timeval *sp; - struct timeval *ip; -{ - quad_t totusec; - u_quad_t u, st, ut, it, tot; -#if (__FreeBSD_version < 300003) - long sec, usec; -#endif - struct timeval tv; - - st = p->p_sticks; - ut = p->p_uticks; - it = p->p_iticks; - - tot = st + ut + it; - if (tot == 0) { - st = 1; - tot = 1; - } - -#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003) - - /* This was changed from a `struct timeval' into a `u_int64_t' - * on FreeBSD 3.0 and renamed p_rtime -> p_runtime. - */ - - totusec = (u_quad_t) p->p_runtime; -#else - sec = p->p_rtime.tv_sec; - usec = p->p_rtime.tv_usec; - - totusec = (quad_t)sec * 1000000 + usec; -#endif - - if (totusec < 0) { - /* XXX no %qd in kernel. Truncate. */ - fprintf (stderr, "calcru: negative time: %ld usec\n", - (long)totusec); - totusec = 0; - } - - - u = totusec; - st = (u * st) / tot; - sp->tv_sec = st / 1000000; - sp->tv_usec = st % 1000000; - ut = (u * ut) / tot; - up->tv_sec = ut / 1000000; - up->tv_usec = ut % 1000000; - if (ip != NULL) { - it = (u * it) / tot; - ip->tv_sec = it / 1000000; - ip->tv_usec = it % 1000000; - } -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, - pid_t pid) -{ - struct kinfo_proc *pinfo; - struct user *u_addr = (struct user *)USRSTACK; - struct pstats pstats; - int count; - - char filename [BUFSIZ]; - struct stat statb; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_TIME), 0); - - memset (buf, 0, sizeof (glibtop_proc_time)); - - if (server->sysdeps.proc_time == 0) - return; - - /* It does not work for the swapper task. */ - if (pid == 0) return; - - sprintf (filename, "/proc/%d/mem", pid); - if (stat (filename, &statb)) return; - - /* Get the process information */ - pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); - if ((pinfo == NULL) || (count != 1)) - glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); - - glibtop_suid_enter (server); - - if ((pinfo [0].kp_proc.p_flag & P_INMEM) && - kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, - (unsigned long) &u_addr->u_stats, - (char *) &pstats, sizeof (pstats)) == sizeof (pstats)) - { - /* This is taken form the kernel source code of - * FreeBSD 2.2.6. */ - - /* Well, we just do the same getrusage () does ... */ - - register struct rusage *rup; - - glibtop_suid_leave (server); - - rup = &pstats.p_ru; - calcru(&(pinfo [0]).kp_proc, - &rup->ru_utime, &rup->ru_stime, NULL); - - buf->utime = tv2sec (pstats.p_ru.ru_utime); - buf->stime = tv2sec (pstats.p_ru.ru_stime); - - buf->cutime = tv2sec (pstats.p_cru.ru_utime); - buf->cstime = tv2sec (pstats.p_cru.ru_stime); - - buf->start_time = tv2sec (pstats.p_start); - - buf->flags = _glibtop_sysdeps_proc_time_user; - } - - glibtop_suid_leave (server); - -#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003) - buf->rtime = pinfo [0].kp_proc.p_runtime; -#else - buf->rtime = tv2sec (pinfo [0].kp_proc.p_rtime); -#endif - - buf->frequency = 1000000; - - buf->flags |= _glibtop_sysdeps_proc_time; -} - diff --git a/sysdeps/freebsd/procuid.c b/sysdeps/freebsd/procuid.c deleted file mode 100644 index 93e485ec..00000000 --- a/sysdeps/freebsd/procuid.c +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_uid = -(1 << GLIBTOP_PROC_UID_UID) + (1 << GLIBTOP_PROC_UID_EUID) + -(1 << GLIBTOP_PROC_UID_EGID) + (1 << GLIBTOP_PROC_UID_PID) + -(1 << GLIBTOP_PROC_UID_PPID) + (1 << GLIBTOP_PROC_UID_PGRP) + -(1 << GLIBTOP_PROC_UID_TPGID) + (1 << GLIBTOP_PROC_UID_PRIORITY) + -(1 << GLIBTOP_PROC_UID_NICE); - -/* Init function. */ - -void -glibtop_init_proc_uid_p (glibtop *server) -{ - server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, - pid_t pid) -{ - struct kinfo_proc *pinfo; - int count = 0; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_UID), 0); - - memset (buf, 0, sizeof (glibtop_proc_uid)); - - /* It does not work for the swapper task. */ - if (pid == 0) return; - - /* Get the process information */ - pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); - if ((pinfo == NULL) || (count != 1)) { - glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid); - return; - } - - buf->uid = pinfo [0].kp_eproc.e_pcred.p_ruid; - buf->euid = pinfo [0].kp_eproc.e_pcred.p_svuid; - buf->gid = pinfo [0].kp_eproc.e_pcred.p_rgid; - buf->egid = pinfo [0].kp_eproc.e_pcred.p_svgid; - - buf->ppid = pinfo [0].kp_eproc.e_ppid; - buf->pgrp = pinfo [0].kp_eproc.e_pgid; - buf->tpgid = pinfo [0].kp_eproc.e_tpgid; - - buf->nice = pinfo [0].kp_proc.p_nice; - buf->priority = pinfo [0].kp_proc.p_priority; - - /* Set the flags for the data we're about to return*/ - buf->flags = _glibtop_sysdeps_proc_uid; - -} diff --git a/sysdeps/freebsd/sem_limits.c b/sysdeps/freebsd/sem_limits.c deleted file mode 100644 index 61eeda64..00000000 --- a/sysdeps/freebsd/sem_limits.c +++ /dev/null @@ -1,100 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , August 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -/* #define KERNEL to get declaration of `struct seminfo'. */ - -#ifdef __FreeBSD__ -#define KERNEL 1 -#else -#define _KERNEL 1 -#endif - -#include -#include - -static unsigned long _glibtop_sysdeps_sem_limits = -(1 << GLIBTOP_IPC_SEMMAP) + (1 << GLIBTOP_IPC_SEMMNI) + -(1 << GLIBTOP_IPC_SEMMNS) + (1 << GLIBTOP_IPC_SEMMNU) + -(1 << GLIBTOP_IPC_SEMMSL) + (1 << GLIBTOP_IPC_SEMOPM) + -(1 << GLIBTOP_IPC_SEMUME) + (1 << GLIBTOP_IPC_SEMUSZ) + -(1 << GLIBTOP_IPC_SEMVMX) + (1 << GLIBTOP_IPC_SEMAEM); - -/* The values in this structure never change at runtime, so we only - * read it once during initialization. We have to use the name `_seminfo' - * since `seminfo' is already declared external in . */ -static struct seminfo _seminfo; - -/* nlist structure for kernel access */ -static struct nlist nlst [] = { - { "_seminfo" }, - { 0 } -}; - -/* Init function. */ - -void -glibtop_init_sem_limits_p (glibtop *server) -{ - if (kvm_nlist (server->machine.kd, nlst) != 0) { - glibtop_warn_io_r (server, "kvm_nlist (sem_limits)"); - return; - } - - if (kvm_read (server->machine.kd, nlst [0].n_value, - &_seminfo, sizeof (_seminfo)) != sizeof (_seminfo)) { - glibtop_warn_io_r (server, "kvm_read (seminfo)"); - return; - } - - server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits; -} - -/* Provides information about sysv sem limits. */ - -void -glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf) -{ - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SEM_LIMITS), 0); - - memset (buf, 0, sizeof (glibtop_sem_limits)); - - if (server->sysdeps.sem_limits == 0) - return; - - buf->semmap = _seminfo.semmap; - buf->semmni = _seminfo.semmni; - buf->semmns = _seminfo.semmns; - buf->semmnu = _seminfo.semmnu; - buf->semmsl = _seminfo.semmsl; - buf->semopm = _seminfo.semopm; - buf->semvmx = _seminfo.semvmx; - buf->semaem = _seminfo.semaem; - - buf->flags = _glibtop_sysdeps_sem_limits; -} diff --git a/sysdeps/freebsd/shm_limits.c b/sysdeps/freebsd/shm_limits.c deleted file mode 100644 index bab0d85f..00000000 --- a/sysdeps/freebsd/shm_limits.c +++ /dev/null @@ -1,95 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , August 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include - -#include - -/* #define KERNEL to get declaration of `struct shminfo'. */ - -#ifdef __FreeBSD__ -#define KERNEL 1 -#else -#define _KERNEL 1 -#endif - -#include -#include - -static unsigned long _glibtop_sysdeps_shm_limits = -(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) + -(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) + -(1 << GLIBTOP_IPC_SHMALL); - -/* The values in this structure never change at runtime, so we only - * read it once during initialization. We have to use the name `_shminfo' - * since `shminfo' is already declared external in . */ -static struct shminfo _shminfo; - -/* nlist structure for kernel access */ -static struct nlist nlst [] = { - { "_shminfo" }, - { 0 } -}; - -/* Init function. */ - -void -glibtop_init_shm_limits_p (glibtop *server) -{ - if (kvm_nlist (server->machine.kd, nlst) != 0) { - glibtop_warn_io_r (server, "kvm_nlist (shm_limits)"); - return; - } - - if (kvm_read (server->machine.kd, nlst [0].n_value, - &_shminfo, sizeof (_shminfo)) != sizeof (_shminfo)) { - glibtop_warn_io_r (server, "kvm_read (shminfo)"); - return; - } - - server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits; -} - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf) -{ - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SHM_LIMITS), 0); - - memset (buf, 0, sizeof (glibtop_shm_limits)); - - if (server->sysdeps.shm_limits == 0) - return; - - buf->shmmax = _shminfo.shmmax; - buf->shmmin = _shminfo.shmmin; - buf->shmmni = _shminfo.shmmni; - buf->shmseg = _shminfo.shmseg; - buf->shmall = _shminfo.shmall; - - buf->flags = _glibtop_sysdeps_shm_limits; -} diff --git a/sysdeps/freebsd/siglist.c b/sysdeps/freebsd/siglist.c deleted file mode 100644 index 94abfdc6..00000000 --- a/sysdeps/freebsd/siglist.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const glibtop_signame glibtop_sys_siglist [] = -{ { 0, NULL, NULL } }; diff --git a/sysdeps/freebsd/swap.c b/sysdeps/freebsd/swap.c deleted file mode 100644 index 1b0f2ad2..00000000 --- a/sysdeps/freebsd/swap.c +++ /dev/null @@ -1,361 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -#include - -static const unsigned long _glibtop_sysdeps_swap = -(1 << GLIBTOP_SWAP_TOTAL) + (1 << GLIBTOP_SWAP_USED) + -(1 << GLIBTOP_SWAP_FREE) + (1 << GLIBTOP_SWAP_PAGEIN) + -(1 << GLIBTOP_SWAP_PAGEOUT); - -#ifdef __FreeBSD__ - -#include -#include -#include - -#if __FreeBSD__ < 4 - -/* nlist structure for kernel access */ -static struct nlist nlst [] = { -#define VM_SWAPLIST 0 - { "_swaplist" },/* list of free swap areas */ -#define VM_SWDEVT 1 - { "_swdevt" }, /* list of swap devices and sizes */ -#define VM_NSWAP 2 - { "_nswap" }, /* size of largest swap device */ -#define VM_NSWDEV 3 - { "_nswdev" }, /* number of swap devices */ -#define VM_DMMAX 4 - { "_dmmax" }, /* maximum size of a swap block */ - { 0 } -}; - -#endif - -#elif (defined __NetBSD__) - -#include - -#endif - -/* nlist structure for kernel access */ -static struct nlist nlst2 [] = { - { "_cnt" }, - { 0 } -}; - -/* Init function. */ - -void -glibtop_init_swap_p (glibtop *server) -{ -#ifdef __FreeBSD__ -#if __FreeBSD__ < 4 - if (kvm_nlist (server->machine.kd, nlst) != 0) { - glibtop_warn_io_r (server, "kvm_nlist (swap)"); - return; - } -#else - struct kvm_swap dummy; - - if (kvm_getswapinfo (server->machine.kd, &dummy, 1, 0) != 0) { - glibtop_warn_io_r (server, "kvm_nlist (swap)"); - return; - } -#endif -#endif - - if (kvm_nlist (server->machine.kd, nlst2) != 0) { - glibtop_warn_io_r (server, "kvm_nlist (swap)"); - return; - } - - server->sysdeps.swap = _glibtop_sysdeps_swap; -} - -/* Provides information about swap usage. */ - -/* - * This function is based on a program called swapinfo written - * by Kevin Lahey . - */ - -void -glibtop_get_swap_p (glibtop *server, glibtop_swap *buf) -{ -#ifdef __FreeBSD__ -#if __FreeBSD__ < 4 - char *header; - int hlen, nswdev, dmmax; - int div, nfree, npfree; - struct swdevt *sw; - long blocksize, *perdev; - struct rlist head; - struct rlisthdr swaplist; - struct rlist *swapptr; - size_t sw_size; - u_long ptr; -#else - int nswdev; - struct kvm_swap kvmsw[16]; -#endif -#elif (defined __NetBSD__) - struct swapent *swaplist; -#endif - - int nswap, i; - int avail = 0, inuse = 0; - - /* To get `pagein' and `pageout'. */ - struct vmmeter vmm; - static int swappgsin = -1; - static int swappgsout = -1; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SWAP), 0); - - memset (buf, 0, sizeof (glibtop_swap)); - - if (server->sysdeps.swap == 0) - return; - - /* This is used to get the `pagein' and `pageout' members. */ - - if (kvm_read (server->machine.kd, nlst2[0].n_value, - &vmm, sizeof (vmm)) != sizeof (vmm)) { - glibtop_warn_io_r (server, "kvm_read (cnt)"); - return; - } - - if (swappgsin < 0) { - buf->pagein = 0; - buf->pageout = 0; - } else { -#ifdef __FreeBSD__ - buf->pagein = vmm.v_swappgsin - swappgsin; - buf->pageout = vmm.v_swappgsout - swappgsout; -#else - buf->pagein = vmm.v_swpin - swappgsin; - buf->pageout = vmm.v_swpout - swappgsout; -#endif - } - -#ifdef __FreeBSD__ - swappgsin = vmm.v_swappgsin; - swappgsout = vmm.v_swappgsout; -#else - swappgsin = vmm.v_swpin; - swappgsout = vmm.v_swpout; -#endif - -#ifdef __FreeBSD__ - -#if __FreeBSD__ < 4 - - /* Size of largest swap device. */ - - if (kvm_read (server->machine.kd, nlst[VM_NSWAP].n_value, - &nswap, sizeof (nswap)) != sizeof (nswap)) { - glibtop_warn_io_r (server, "kvm_read (nswap)"); - return; - } - - /* Number of swap devices. */ - - if (kvm_read (server->machine.kd, nlst[VM_NSWDEV].n_value, - &nswdev, sizeof (nswdev)) != sizeof (nswdev)) { - glibtop_warn_io_r (server, "kvm_read (nswdev)"); - return; - } - - /* Maximum size of a swap block. */ - - if (kvm_read (server->machine.kd, nlst[VM_DMMAX].n_value, - &dmmax, sizeof (dmmax)) != sizeof (dmmax)) { - glibtop_warn_io_r (server, "kvm_read (dmmax)"); - return; - } - - /* List of free swap areas. */ - - if (kvm_read (server->machine.kd, nlst[VM_SWAPLIST].n_value, - &swaplist, sizeof (swaplist)) != sizeof (swaplist)) { - glibtop_warn_io_r (server, "kvm_read (swaplist)"); - return; - } - - /* Kernel offset of list of swap devices and sizes. */ - - if (kvm_read (server->machine.kd, nlst[VM_SWDEVT].n_value, - &ptr, sizeof (ptr)) != sizeof (ptr)) { - glibtop_warn_io_r (server, "kvm_read (swaplist)"); - return; - } - - /* List of swap devices and sizes. */ - - sw_size = nswdev * sizeof (*sw); - sw = glibtop_malloc_r (server, sw_size); - - if (kvm_read (server->machine.kd, ptr, sw, sw_size) != (ssize_t)sw_size) { - glibtop_warn_io_r (server, "kvm_read (*swdevt)"); - return; - } - - perdev = glibtop_malloc (nswdev * sizeof (*perdev)); - - /* Count up swap space. */ - - nfree = 0; - memset (perdev, 0, nswdev * sizeof(*perdev)); - - swapptr = swaplist.rlh_list; - - while (swapptr) { - int top, bottom, next_block; - - if (kvm_read (server->machine.kd, (int) swapptr, &head, - sizeof (struct rlist)) != sizeof (struct rlist)) { - glibtop_warn_io_r (server, "kvm_read (swapptr)"); - return; - } - - top = head.rl_end; - bottom = head.rl_start; - - nfree += top - bottom + 1; - - /* - * Swap space is split up among the configured disks. - * - * For interleaved swap devices, the first dmmax blocks - * of swap space some from the first disk, the next dmmax - * blocks from the next, and so on up to nswap blocks. - * - * The list of free space joins adjacent free blocks, - * ignoring device boundries. If we want to keep track - * of this information per device, we'll just have to - * extract it ourselves. - */ - while (top / dmmax != bottom / dmmax) { - next_block = ((bottom + dmmax) / dmmax); - perdev[(bottom / dmmax) % nswdev] += - next_block * dmmax - bottom; - bottom = next_block * dmmax; - } - perdev[(bottom / dmmax) % nswdev] += - top - bottom + 1; - - swapptr = head.rl_next; - } - - header = getbsize (&hlen, &blocksize); - - div = blocksize / 512; - avail = npfree = 0; - for (i = 0; i < nswdev; i++) { - int xsize, xfree; - - /* - * Don't report statistics for partitions which have not - * yet been activated via swapon(8). - */ - if (!(sw[i].sw_flags & SW_FREED)) - continue; - - /* The first dmmax is never allocated to avoid trashing of - * disklabels - */ - xsize = sw[i].sw_nblks - dmmax; - xfree = perdev[i]; - inuse = xsize - xfree; - npfree++; - avail += xsize; - } - - /* - * If only one partition has been set up via swapon(8), we don't - * need to bother with totals. - */ - inuse = avail - nfree; - - glibtop_free_r (server, sw); - glibtop_free_r (server, perdev); - - buf->flags = _glibtop_sysdeps_swap; - - buf->used = inuse; - buf->free = avail; - - buf->total = inuse + avail; - -#else - - nswdev = kvm_getswapinfo(server->machine.kd, kvmsw, 16, 0); - - buf->flags = _glibtop_sysdeps_swap; - - buf->used = kvmsw[nswdev].ksw_used; - buf->total = kvmsw[nswdev].ksw_total; - - buf->free = buf->total - buf->used; - -#endif - -#elif (defined __NetBSD__) - - nswap = swapctl (SWAP_NSWAP, NULL, 0); - if (nswap < 0) { - glibtop_warn_io_r (server, "swapctl (SWAP_NSWAP)"); - return; - } - - swaplist = glibtop_calloc_r (server, nswap, sizeof (struct swapent)); - - if (swapctl (SWAP_STATS, swaplist, nswap) != nswap) { - glibtop_warn_io_r (server, "swapctl (SWAP_STATS)"); - glibtop_free_r (server, swaplist); - return; - } - - for (i = 0; i < nswap; i++) { - avail += swaplist[i].se_nblks; - inuse += swaplist[i].se_inuse; - } - - glibtop_free_r (server, swaplist); - - buf->flags = _glibtop_sysdeps_swap; - - buf->used = inuse; - buf->free = avail; - - buf->total = inuse + avail; -#endif -} diff --git a/sysdeps/freebsd/uptime.c b/sysdeps/freebsd/uptime.c deleted file mode 100644 index 5d0ae450..00000000 --- a/sysdeps/freebsd/uptime.c +++ /dev/null @@ -1,73 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -#include - -static const unsigned long _glibtop_sysdeps_uptime = -(1 << GLIBTOP_UPTIME_UPTIME) + (1 << GLIBTOP_UPTIME_IDLETIME); - -static const unsigned long _required_cpu_flags = -(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_IDLE) + -(1 << GLIBTOP_CPU_FREQUENCY); - -/* Init function. */ - -void -glibtop_init_uptime_p (glibtop *server) -{ - server->sysdeps.uptime = _glibtop_sysdeps_uptime; -} - -/* Provides uptime and idle time. */ - -void -glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf) -{ - glibtop_cpu cpu; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_UPTIME), 0); - - memset (buf, 0, sizeof (glibtop_uptime)); - - /* We simply calculate it from the CPU usage. */ - - glibtop_get_cpu_p (server, &cpu); - - /* Make sure all required fields are present. */ - - if ((cpu.flags & _required_cpu_flags) != _required_cpu_flags) - return; - - /* Calculate values. */ - - buf->uptime = (double) cpu.total / (double) cpu.frequency; - buf->idletime = (double) cpu.idle / (double) cpu.frequency; - - buf->flags = _glibtop_sysdeps_uptime; -} diff --git a/sysdeps/guile/.cvsignore b/sysdeps/guile/.cvsignore deleted file mode 100644 index db2bb60f..00000000 --- a/sysdeps/guile/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -guile.c -so_locations -libgtop_guile.la -*.lo -*.x diff --git a/sysdeps/guile/ChangeLog b/sysdeps/guile/ChangeLog deleted file mode 100644 index 7e59c460..00000000 --- a/sysdeps/guile/ChangeLog +++ /dev/null @@ -1,50 +0,0 @@ -1999-02-04 Martin Baulig - - * names/guile-names.awk: Use `_' instead of `gettext'. - -1999-01-22 Martin Baulig - - * names/guile-names.awk: Use a `(TYPE . DIMENSION)' pair for - array types in `glibtop-types-*'. - -1998-12-09 Martin Baulig - - * guile.awk: For arrays, make a gh_list out of it and add this list - to the returned list instead of adding all array fields there. - -1998-12-08 Martin Baulig - - * guile.awk (glibtop-get-sysdeps): New guile function. - - * guile.awk (glibtop_get_proc_map): Make a gh_list for each map - entry and append all of them to the returned list. - (glibtop_get_mountlist): Likewise. - -1998-10-20 Martin Baulig - - * guile.awk: If the features.def contains something like - `fieldname[number]' we interpret this as an array and add all - members of this array. - -1998-10-12 Martin Baulig - - * Makefile.am: Let the `Makefile' depend upon $(BUILT_SOURCES). - This is required to get dependencies correctly. - * names/Makefile.am: Likewise. - -1998-10-11 Martin Baulig - - * names/Makefile.am (BUILT_SOURCES, CLEANFILES): Added - `guile-names.x' here and a rule to make it from `guile-names.c' - using guile-snarf. - - * names/guile-names.awk: Use the SCM_GLOBAL_VCELL macros and - guile-snarf here; declared all `glibtop_guile_*' functions static. - - * guile.awk: Declared all `glibtop_guile_get_*' functions static. - - * Makefile.am (BUILT_SOURCES, CLEANFILES): Added `guile.x'. - Added rule to make `guile.x' from `guile.c' using guile-snarf. - - * guile.awk: Use the SCM_PROC macros and guile-snarf here. - diff --git a/sysdeps/guile/Makefile.am b/sysdeps/guile/Makefile.am deleted file mode 100644 index 53c06703..00000000 --- a/sysdeps/guile/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -SUBDIRS = names - -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -BUILT_SOURCES = guile.c guile.x - -lib_LTLIBRARIES = libgtop_guile.la - -libgtop_guile_la_SOURCES = $(BUILT_SOURCES) - -libgtop_guile_la_LDFLAGS = $(LT_VERSION_INFO) - -Makefile: $(BUILT_SOURCES) - -guile.c: guile.pl $(top_builddir)/config.h $(top_srcdir)/features.def - $(PERL) $(srcdir)/guile.pl < $(top_srcdir)/features.def > gnc-t - mv gnc-t guile.c - -guile.x: guile.c - guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ - -EXTRA_DIST = guile.pl - -CLEANFILES = guile.c guile.x - diff --git a/sysdeps/guile/guile.pl b/sysdeps/guile/guile.pl deleted file mode 100644 index 7a272ebc..00000000 --- a/sysdeps/guile/guile.pl +++ /dev/null @@ -1,274 +0,0 @@ -#!/usr/bin/perl - -$[ = 1; # set array base to 1 -$, = ' '; # set output field separator -$\ = "\n"; # set output record separator - -sub toupper { - local($_) = @_; - tr/a-z/A-Z/; - return $_; -} - -sub tolower { - local($_) = @_; - tr/A-Z/a-z/; - return $_; -} - -print '/* guile.c */'; -print "/* This is a generated file. Please modify `guile.pl' */"; -print ''; - -print '#include '; -print '#include '; -print '#include '; -print '#include '; -print ''; -print '#include '; - -print ''; - -$convert{'long'} = 'gh_long2scm '; -$convert{'ulong'} = 'gh_ulong2scm '; -$convert{'double'} = 'gh_double2scm'; -$convert{'str'} = 'gh_str02scm '; -$convert{'char'} = 'gh_char2scm '; - -$backconv{'int'} = 'gh_scm2long'; -$backconv{'pid_t'} = 'gh_scm2ulong'; -$backconv{'long'} = 'gh_scm2long'; -$backconv{'ulong'} = 'gh_scm2ulong'; -$backconv{'unsigned'} = 'gh_scm2ulong'; - -$feature_count = 0; - -while (<>) { - chop; # strip record separator - - if (/^[^#]/) { - &make_output($_); - } -} - -$sep = ''; -$sysdeps = 'void|sysdeps|ulong('; -for ($nr = 0; $nr < $feature_count; $nr++) { - $sysdeps = $sysdeps . '' . $sep . '' . $feature_field{$nr}; - $sep = ','; -} -$sysdeps = $sysdeps . ')'; -&make_output($sysdeps); -print 'void'; -print 'glibtop_boot_guile (void)'; -print '{'; -print "#include \"guile.x\""; -print '}'; - -sub make_output { - local($line) = @_; - @line_fields = split(/\|/, $line, 9999); - $retval = $line_fields[1]; - $element_def = $line_fields[3]; - $feature = $line_fields[2]; - $param_def = $line_fields[4]; - - $feature =~ s/^@//; - $features{$feature} = $feature; - - $feature_field{$feature_count} = $feature; - $feature_count = $feature_count + 1; - - $total_nr_params = 0; - - if ($param_def eq 'string') { - $call_param = ', gh_scm2newstr( ' . $line_fields[5] . ', NULL)'; - $param_decl = 'SCM ' . $line_fields[5]; - $total_nr_params = 1; - } - else { - $call_param = ''; - $param_decl = ''; - $nr_params = (@params = split(/:/, $param_def, 9999)); - for ($param = 1; $param <= $nr_params; $param++) { - $list = $params[$param]; - $type = $params[$param]; - $type =~ s/\(.*//; - $list =~ s/^.*\(//; - $list =~ s/\)$//; - $count = (@fields = split(/,/, $list, 9999)); - $total_nr_params = $total_nr_params + $count; - for ($field = 1; $field <= $count; $field++) { - if ($param_decl ne '') { - $param_decl = $param_decl . ', '; - } - $param_decl = $param_decl . 'SCM ' . $fields[$field]; - $call_param = $call_param . ', ' . $backconv{$type} . ' (' . - - $fields[$field] . ')'; - } - } - if ($param_decl eq '') { - $param_decl = 'void'; - } - } - - $nr_params_field{$feature} = $total_nr_params; - - $feature_name = $feature; - $feature_name =~ s/_/-/; - $output = 'SCM_PROC (s_' . $feature . ", \"glibtop-get-" . $feature_name . - - "\","; - $output = $output . ' ' . $nr_params_field{$feature} . ', 0, 0, '; - $output = $output . 'glibtop_guile_get_' . $feature . ");\n\n"; - - $output = $output . "static SCM\nglibtop_guile_get_" . $feature . ' (' . - - $param_decl . ")\n{\n"; - - $output = $output . "\tglibtop_" . $feature . ' ' . $feature . ";\n"; - if ($retval ne 'void') { - $output = $output . "\t" . $retval . " retval;\n"; - } - if ($feature =~ /^(proc(list|_map|_args))|mountlist$/) { - $output = $output . "\tunsigned i;\n"; - } - if ($feature =~ /^proc_args$/) { - $output = $output . "\tSCM list, scm_args, args_list;\n"; - $output = $output . "\tchar *start;\n\n"; - } - else { - $output = $output . "\tSCM list;\n\n"; - } - if ($retval ne 'void') { - $prefix = 'retval = '; - } - else { - $prefix = ''; - } - $output = $output . "\t" . $prefix . 'glibtop_get_' . $feature . ' (&' . - - $feature . '' . $call_param . ");\n\n"; - - $output = $output . "\tlist = gh_list (gh_ulong2scm (" . $feature . - - ".flags),\n\t\t\t"; - - $nr_elements = (@elements = split(/:/, $element_def, 9999)); - for ($element = 1; $element <= $nr_elements; $element++) { - $list = $elements[$element]; - $type = $elements[$element]; - $type =~ s/\(.*//; - $list =~ s/^.*\(//; - $list =~ s/\)$//; - $count = (@fields = split(/,/, $list, 9999)); - for ($field = 1; $field <= $count; $field++) { - if ($fields[$field] =~ /^(\w+)\[([0-9]+)\]$/) { - @field_parts = split(/\[/, $fields[$field], 9999); - $fields[$field] = $field_parts[1]; - $field_parts[2] =~ s/\]//; - $number = $field_parts[2]; - $output = $output . "gh_list\n\t\t\t("; - for ($nr = 0; $nr < $number; $nr++) { - $output = $output . '' . $convert{$type} . ' (' . $feature - - . '.' . $fields[$field] . ' [' . $nr . "]),\n\t\t\t "; - } - $output = $output . "SCM_UNDEFINED),\n\t\t\t"; - } - else { - $output = $output . '' . $convert{$type} . ' (' . $feature . - - '.' . $fields[$field] . "),\n\t\t\t"; - } - } - } - $output = $output . "SCM_UNDEFINED);\n"; - - print $output; - - if ($feature =~ /^proclist$/) { - print "\tif (retval == NULL)"; - print "\t\treturn list;"; - print ''; - print "\tfor (i = 0; i < proclist.number; i++)"; - print "\t\tlist = scm_append"; - print "\t\t\t(gh_list (list,"; - print - - "\t\t\t\t gh_list (gh_ulong2scm ((unsigned long) retval [i])),"; - print "\t\t\t\t SCM_UNDEFINED));"; - print ''; - print "\tglibtop_free (retval);\n"; - } - - if ($feature =~ /^proc_map$/) { - print "\tif (retval == NULL)"; - print "\t\treturn list;"; - print ''; - print "\tfor (i = 0; i < proc_map.number; i++) {"; - print "\t\tglibtop_map_entry *entry = &(retval [i]);"; - print "\t\tSCM scm_entry = gh_list"; - print "\t\t\t(gh_ulong2scm ((unsigned long) entry->flags),"; - print "\t\t\t gh_ulong2scm ((unsigned long) entry->start),"; - print "\t\t\t gh_ulong2scm ((unsigned long) entry->end),"; - print "\t\t\t gh_ulong2scm ((unsigned long) entry->offset),"; - print "\t\t\t gh_ulong2scm ((unsigned long) entry->perm),"; - print "\t\t\t gh_ulong2scm ((unsigned long) entry->inode),"; - print "\t\t\t gh_ulong2scm ((unsigned long) entry->device),"; - print "\t\t\t gh_str02scm (entry->filename), SCM_UNDEFINED);"; - print "\t\tSCM entry_list = gh_list (scm_entry, SCM_UNDEFINED);\n"; - - print - - "\t\tlist = scm_append (gh_list (list, entry_list, SCM_UNDEFINED));"; - print "\t};\n"; - print "\tglibtop_free (retval);\n"; - } - - if ($feature =~ /^proc_args$/) { - print "\tif (retval == NULL)"; - print "\t\treturn list;"; - print ''; - print "\tstart = retval;"; - print "\tscm_args = gh_list (SCM_UNDEFINED);\n"; - print "\tfor (i = 0; i <= proc_args.size; i++) {"; - print "\t\tSCM arg_list;\n"; - print "\t\tif (retval [i]) continue;\n"; - print "\t\targ_list = gh_list (gh_str02scm (start), SCM_UNDEFINED);"; - print "\t\tscm_args = scm_append"; - print "\t\t\t(gh_list (scm_args, arg_list, SCM_UNDEFINED));\n;"; - print "\t\tstart = &(retval [i+1]);"; - print "\t};\n"; - print "\targs_list = gh_list (scm_args, SCM_UNDEFINED);"; - print - - "\tlist = scm_append (gh_list (list, args_list, SCM_UNDEFINED));\n"; - print "\tglibtop_free (retval);\n"; - } - - if ($feature =~ /^mountlist$/) { - print "\tif (retval == NULL)"; - print "\t\treturn list;"; - print ''; - print "\tfor (i = 0; i < mountlist.number; i++) {"; - print "\t\tglibtop_mountentry *entry = &(retval [i]);"; - print "\t\tSCM scm_entry = gh_list"; - print "\t\t\t(gh_ulong2scm ((unsigned long) entry->dev),"; - print "\t\t\t gh_str02scm (entry->devname),"; - print "\t\t\t gh_str02scm (entry->mountdir),"; - print "\t\t\t gh_str02scm (entry->type), SCM_UNDEFINED);"; - print "\t\tSCM entry_list = gh_list (scm_entry, SCM_UNDEFINED);\n"; - - print - - "\t\tlist = scm_append (gh_list (list, entry_list, SCM_UNDEFINED));"; - print "\t};\n"; - print "\tglibtop_free (retval);\n"; - } - - print "\treturn list;"; - print '}'; - print ''; -} diff --git a/sysdeps/guile/names/.cvsignore b/sysdeps/guile/names/.cvsignore deleted file mode 100644 index f2bf91eb..00000000 --- a/sysdeps/guile/names/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -.deps -so_locations -.libs -Makefile -guile-names.c -Makefile.in -libgtop_guile.la -libgtop_guile_names.la -*.lo -*.x diff --git a/sysdeps/guile/names/Makefile.am b/sysdeps/guile/names/Makefile.am deleted file mode 100644 index 1e64cbb1..00000000 --- a/sysdeps/guile/names/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop_guile_names.la - -BUILT_SOURCES = guile-names.c guile-names.x - -libgtop_guile_names_la_SOURCES = $(BUILT_SOURCES) - -libgtop_guile_names_la_LDFLAGS = $(LT_VERSION_INFO) - -Makefile: $(BUILT_SOURCES) - -guile-names.c: guile-names.pl $(top_builddir)/config.h $(top_srcdir)/features.def - $(PERL) $(srcdir)/guile-names.pl < $(top_srcdir)/features.def > gnc-t - mv gnc-t guile-names.c - -guile-names.x: guile-names.c - guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ - -EXTRA_DIST = guile-names.pl - -CLEANFILES = guile-names.c guile-names.x - diff --git a/sysdeps/guile/names/guile-names.pl b/sysdeps/guile/names/guile-names.pl deleted file mode 100644 index 07fcdffc..00000000 --- a/sysdeps/guile/names/guile-names.pl +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/perl - -$[ = 1; # set array base to 1 -$, = ' '; # set output field separator -$\ = "\n"; # set output record separator - -sub toupper { - local($_) = @_; - tr/a-z/A-Z/; - return $_; -} - -sub tolower { - local($_) = @_; - tr/A-Z/a-z/; - return $_; -} - -print '/* guile_names.c */'; -print "/* This is a generated file. Please modify `guile-names.pl' */"; -print ''; - -print '#include '; -print '#include '; -print '#include '; -print ''; -print '#include '; - -print ''; - -while (<>) { - chop; # strip record separator - - if (/^[^#]/) { - $line = $_; - @line_fields = split(/\|/, $line, 9999); - $feature = $line_fields[2]; - $element_def = $line_fields[3]; - $feature =~ s/^@//; - - $features{$feature} = $feature; - $element_defs{$feature} = $element_def; - } -} - -$features{'sysdeps'} = 'sysdeps'; - -foreach $feature (keys %features) { - &output($feature); -} - -foreach $feature (keys %features) { - $feature_name = $feature; - $feature_name =~ s/_/-/; - print 'SCM_GLOBAL_VCELL (s_names_' . $feature . ", \"glibtop-names-" . - - $feature_name . "\");"; - print 'SCM_GLOBAL_VCELL (s_labels_' . $feature . ", \"glibtop-labels-" . - - $feature_name . "\");"; - print 'SCM_GLOBAL_VCELL (s_types_' . $feature . ", \"glibtop-types-" . - - $feature_name . "\");"; - print 'SCM_GLOBAL_VCELL (s_descriptions_' . $feature . - - ", \"glibtop-descriptions-" . $feature_name . "\");"; -} -print ''; - -print 'void'; -print 'glibtop_boot_guile_names (void)'; -print '{'; -print "#include \"guile-names.x\""; -foreach $feature (keys %features) { - print 'SCM_SETCDR (s_names_' . $feature . ', glibtop_guile_names_' . - - $feature . ' ());'; - print 'SCM_SETCDR (s_labels_' . $feature . ', glibtop_guile_labels_' . - - $feature . ' ());'; - print 'SCM_SETCDR (s_types_' . $feature . ', glibtop_guile_types_' . - - $feature . ' ());'; - print 'SCM_SETCDR (s_descriptions_' . $feature . - - ', glibtop_guile_descriptions_' . $feature . ' ());'; -} -print '}'; - -sub output { - local($feature) = @_; - print 'static SCM'; - print 'glibtop_guile_names_' . $feature . ' (void)'; - print '{'; - print "\tint i;"; - print "\tSCM list;"; - print ''; - print "\tlist = gh_list (SCM_UNDEFINED);"; - print ''; - print "\tfor (i = 0; i < GLIBTOP_MAX_" . &toupper($feature) . '; i++)'; - print "\t\tlist = scm_append"; - print "\t\t\t(gh_list (list,"; - print "\t\t\t\t gh_list (gh_str02scm ((char *) glibtop_names_" . $feature - - . ' [i])),'; - print "\t\t\t\t SCM_UNDEFINED));"; - print ''; - print "\treturn list;"; - print '}'; - - print ''; - - print 'static SCM'; - print 'glibtop_guile_types_' . $feature . ' (void)'; - print '{'; - print "\tint i;"; - print "\tSCM list;"; - print ''; - - $out = "\tlist = gh_list ("; - - $nr_elements = (@elements = split(/:/, $element_defs{$feature}, 9999)); - for ($element = 1; $element <= $nr_elements; $element++) { - $list = $elements[$element]; - $type = $elements[$element]; - $type =~ s/\(.*//; - $list =~ s/^.*\(//; - $list =~ s/\)$//; - $count = (@fields = split(/,/, $list, 9999)); - for ($field = 1; $field <= $count; $field++) { - if ($fields[$field] =~ /^(\w+)\[([0-9]+)\]$/) { - @field_parts = split(/\[/, $fields[$field], 9999); - $fields[$field] = $field_parts[1]; - $field_parts[2] =~ s/\]//; - $number = $field_parts[2]; - $out = $out . "gh_cons\n\t\t\t"; - $out = $out . '(gh_ulong2scm (glibtop_types_' . $feature . - - ' [' . ($field - 1) . "]),\n\t\t\t"; - $out = $out . ' gh_ulong2scm (' . $number . ")),\n\t\t\t"; - } - else { - $out = $out . 'gh_ulong2scm (glibtop_types_' . $feature . ' [' - - . ($field - 1) . "]),\n\t\t\t"; - } - } - } - - print $out . 'SCM_UNDEFINED);'; - print ''; - print "\treturn list;"; - print '}'; - - print ''; - - print 'static SCM'; - print 'glibtop_guile_labels_' . $feature . ' (void)'; - print '{'; - print "\tint i;"; - print "\tSCM list;"; - print ''; - print "\tlist = gh_list (SCM_UNDEFINED);"; - print ''; - print "\tfor (i = 0; i < GLIBTOP_MAX_" . &toupper($feature) . '; i++)'; - print "\t\tlist = scm_append"; - print "\t\t\t(gh_list (list,"; - print "\t\t\t\t gh_list (gh_str02scm (_(glibtop_labels_" . $feature . - - ' [i]))),'; - print "\t\t\t\t SCM_UNDEFINED));"; - print ''; - print "\treturn list;"; - print '}'; - - print ''; - - print 'static SCM'; - print 'glibtop_guile_descriptions_' . $feature . ' (void)'; - print '{'; - print "\tint i;"; - print "\tSCM list;"; - print ''; - print "\tlist = gh_list (SCM_UNDEFINED);"; - print ''; - print "\tfor (i = 0; i < GLIBTOP_MAX_" . &toupper($feature) . '; i++)'; - print "\t\tlist = scm_append"; - print "\t\t\t(gh_list (list,"; - print "\t\t\t\t gh_list (gh_str02scm (_(glibtop_descriptions_" . $feature - - . ' [i]))),'; - print "\t\t\t\t SCM_UNDEFINED));"; - print ''; - print "\treturn list;"; - print '}'; - - print ''; -} diff --git a/sysdeps/kernel/.cvsignore b/sysdeps/kernel/.cvsignore deleted file mode 100644 index b851d091..00000000 --- a/sysdeps/kernel/.cvsignore +++ /dev/null @@ -1,28 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -close.lo -cpu.lo -init.lo -ipc_limits.lo -libgtop_sysdeps.la -loadavg.lo -mem.lo -msg_limits.lo -open.lo -procdata.lo -prockernel.lo -proclist.lo -procmem.lo -procsegment.lo -procsignal.lo -procstate.lo -proctime.lo -procuid.lo -sem_limits.lo -shm_limits.lo -swap.lo -sysdeps.lo -sysinfo.lo -uptime.lo diff --git a/sysdeps/kernel/ChangeLog b/sysdeps/kernel/ChangeLog deleted file mode 100644 index bfca82c0..00000000 --- a/sysdeps/kernel/ChangeLog +++ /dev/null @@ -1,23 +0,0 @@ -1998-10-26 Martin Baulig - - * netload.c: New file. Currently empty. - -1998-10-26 Martin Baulig - - * procargs.c: New file. Currently empty. - -1998-10-25 Martin Baulig - - * ppp.c: New file. Currently empty. - -1998-06-14 Martin Baulig - - * kernel.s: New file - declaration of the table () function - via _syscall3 (); due to a bug in egcs, we cannot put this - into a C file. - -1998-06-13 Martin Baulig - - The code in this directory fetches all information - directly from the kernel. It uses the new table () - system call from the `kernel' directory. diff --git a/sysdeps/kernel/Makefile.am b/sysdeps/kernel/Makefile.am deleted file mode 100644 index 0bf368c5..00000000 --- a/sysdeps/kernel/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop_sysdeps.la - -libgtop_sysdeps_la_SOURCES = open.c close.c kernel.s 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 siglist.c procargs.c procmap.c \ - netload.c ppp.c - -libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) - -include_HEADERS = glibtop_server.h - -noinst_HEADERS = kernel.h - -kernel.o kernel.lo: $(srcdir)/kernel.s - rm -f kernel.o kernel.lo - $(AS) -o kernel.o $(srcdir)/kernel.s - cp kernel.o kernel.lo - diff --git a/sysdeps/kernel/close.c b/sysdeps/kernel/close.c deleted file mode 100644 index 4262d2f0..00000000 --- a/sysdeps/kernel/close.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Closes pipe to gtop server. */ - -void -glibtop_close_s (glibtop *server) -{ } diff --git a/sysdeps/kernel/cpu.c b/sysdeps/kernel/cpu.c deleted file mode 100644 index 1a7127ba..00000000 --- a/sysdeps/kernel/cpu.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_cpu = -(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) + -(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) + -(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); - - memset (buf, 0, sizeof (glibtop_cpu)); - - if (table (TABLE_CPU, &tbl, NULL)) - glibtop_error_io_r (server, "table(TABLE_CPU)"); - - buf->flags = _glibtop_sysdeps_cpu; - - buf->total = tbl.cpu.total; - buf->user = tbl.cpu.user; - buf->nice = tbl.cpu.nice; - buf->sys = tbl.cpu.sys; - buf->idle = tbl.cpu.idle; - buf->frequency = tbl.cpu.frequency; -} diff --git a/sysdeps/kernel/glibtop_server.h b/sysdeps/kernel/glibtop_server.h deleted file mode 100644 index b3822d47..00000000 --- a/sysdeps/kernel/glibtop_server.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 diff --git a/sysdeps/kernel/kernel.h b/sysdeps/kernel/kernel.h deleted file mode 100644 index bfa8ac9f..00000000 --- a/sysdeps/kernel/kernel.h +++ /dev/null @@ -1,40 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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_KERNEL_KERNEL_H__ -#define __GLIBTOP_KERNEL_KERNEL_H__ - -#include -#include - -#include - -#include - -BEGIN_LIBGTOP_DECLS - -extern int table (int, union table *, const void *); - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/kernel/kernel.s b/sysdeps/kernel/kernel.s deleted file mode 100644 index d6b368c1..00000000 --- a/sysdeps/kernel/kernel.s +++ /dev/null @@ -1,42 +0,0 @@ - .file "test.c" - .version "01.01" -/ GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release). -/ options passed: -O2 -Wall -W -/ options enabled: -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks -/ -fexpensive-optimizations -fthread-jumps -fstrength-reduce -fpeephole -/ -fforce-mem -ffunction-cse -finline -fkeep-static-consts -fcaller-saves -/ -fpcc-struct-return -frerun-cse-after-loop -frerun-loop-opt -/ -fschedule-insns2 -fcommon -fverbose-asm -fgnu-linker -fregmove -/ -falias-check -fargument-alias -m80387 -mhard-float -mno-soft-float -/ -mieee-fp -mfp-ret-in-387 -mschedule-prologue -mcpu=pentiumpro -/ -march=pentium - -gcc2_compiled.: -.text - .align 4 -.globl table - .type table,@function -table: - pushl %ebp - movl %esp,%ebp - movl $190,%eax - pushl %ebx - movl 8(%ebp),%ebx - movl 12(%ebp),%ecx - movl 16(%ebp),%edx -#APP - int $0x80 -#NO_APP - testl %eax,%eax - jge .L3 - negl %eax - movl %eax,errno - movl $-1,%eax -.L3: - movl -4(%ebp),%ebx - movl %ebp,%esp - popl %ebp - ret -.Lfe1: - .size table,.Lfe1-table - .ident "GCC: (GNU) egcs-2.90.29 980515 (egcs-1.0.3 release)" diff --git a/sysdeps/kernel/loadavg.c b/sysdeps/kernel/loadavg.c deleted file mode 100644 index a31712d9..00000000 --- a/sysdeps/kernel/loadavg.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_loadavg = -(1 << GLIBTOP_LOADAVG_LOADAVG) + (1 << GLIBTOP_LOADAVG_NR_RUNNING) + -(1 << GLIBTOP_LOADAVG_NR_TASKS) + (1 << GLIBTOP_LOADAVG_LAST_PID); - -/* Init function. */ - -void -glibtop_init_loadavg_s (glibtop *server) -{ - server->sysdeps.loadavg = _glibtop_sysdeps_loadavg; -} - -/* Provides load load averange. */ - -void -glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_LOADAVG, 0); - - memset (buf, 0, sizeof (glibtop_loadavg)); - - if (table (TABLE_LOADAVG, &tbl, NULL)) - glibtop_error_io_r (server, "table(TABLE_LOADAVG)"); - - buf->flags = _glibtop_sysdeps_loadavg; - - buf->loadavg [0] = tbl.loadavg.loadavg [0]; - buf->loadavg [1] = tbl.loadavg.loadavg [1]; - buf->loadavg [2] = tbl.loadavg.loadavg [2]; - - buf->nr_running = tbl.loadavg.nr_running; - buf->nr_tasks = tbl.loadavg.nr_tasks; - buf->last_pid = tbl.loadavg.last_pid; -} diff --git a/sysdeps/kernel/mem.c b/sysdeps/kernel/mem.c deleted file mode 100644 index 6e7e74d6..00000000 --- a/sysdeps/kernel/mem.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_mem = -(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) + -(1 << GLIBTOP_MEM_FREE) + (1 << GLIBTOP_MEM_SHARED) + -(1 << GLIBTOP_MEM_BUFFER) + (1 << GLIBTOP_MEM_CACHED) + -(1 << GLIBTOP_MEM_USER); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MEM, 0); - - memset (buf, 0, sizeof (glibtop_mem)); - - if (table (TABLE_MEM, &tbl, NULL)) - glibtop_error_io_r (server, "table(TABLE_MEM)"); - - buf->flags = _glibtop_sysdeps_mem; - - buf->total = tbl.mem.total; - buf->used = tbl.mem.used; - buf->free = tbl.mem.free; - buf->shared = tbl.mem.shared; - buf->buffer = tbl.mem.buffer; - buf->cached = tbl.mem.cached; - - buf->user = buf->total - buf->free - buf->shared - buf->buffer; -} diff --git a/sysdeps/kernel/msg_limits.c b/sysdeps/kernel/msg_limits.c deleted file mode 100644 index 2ebd1b05..00000000 --- a/sysdeps/kernel/msg_limits.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include - -static const unsigned long _glibtop_sysdeps_msg_limits = -(1 << GLIBTOP_IPC_MSGPOOL) + (1 << GLIBTOP_IPC_MSGMAP) + -(1 << GLIBTOP_IPC_MSGMAX) + (1 << GLIBTOP_IPC_MSGMNB) + -(1 << GLIBTOP_IPC_MSGMNI) + (1 << GLIBTOP_IPC_MSGSSZ) + -(1 << GLIBTOP_IPC_MSGTQL); - -/* 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) -{ - struct msginfo msginfo; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_msg_limits)); - - buf->flags = _glibtop_sysdeps_msg_limits; - - msgctl (0, IPC_INFO, (struct msqid_ds *) &msginfo); - - buf->msgpool = msginfo.msgpool; - buf->msgmap = msginfo.msgmap; - buf->msgmax = msginfo.msgmax; - buf->msgmnb = msginfo.msgmnb; - buf->msgmni = msginfo.msgmni; - buf->msgssz = msginfo.msgssz; - buf->msgtql = msginfo.msgtql; -} diff --git a/sysdeps/kernel/netload.c b/sysdeps/kernel/netload.c deleted file mode 100644 index beebedba..00000000 --- a/sysdeps/kernel/netload.c +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -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)); -} diff --git a/sysdeps/kernel/open.c b/sysdeps/kernel/open.c deleted file mode 100644 index bd4bf34b..00000000 --- a/sysdeps/kernel/open.c +++ /dev/null @@ -1,63 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* ===================================================== - * Linux kernel version information for procps utilities - * Copyright (c) 1996 Charles Blake - */ -#include - -#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) - -static int linux_version_code = 0; - -static void set_linux_version(void) { - static struct utsname uts; - int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ - - if (linux_version_code) return; - if (uname(&uts) == -1) /* failure most likely implies impending death */ - exit(1); - if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3) - fprintf(stderr, /* *very* unlikely to happen by accident */ - "Non-standard uts for running kernel:\n" - "release %s=%d.%d.%d gives version code %d\n", - uts.release, x, y, z, LINUX_VERSION(x,y,z)); - linux_version_code = LINUX_VERSION(x, y, z); -} - -/* ======================================================= */ - -/* 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; - - set_linux_version (); - server->os_version_code = (unsigned long) linux_version_code; -} diff --git a/sysdeps/kernel/ppp.c b/sysdeps/kernel/ppp.c deleted file mode 100644 index 6d0905d5..00000000 --- a/sysdeps/kernel/ppp.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -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)); -} diff --git a/sysdeps/kernel/procargs.c b/sysdeps/kernel/procargs.c deleted file mode 100644 index 7bf1b682..00000000 --- a/sysdeps/kernel/procargs.c +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -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. */ - -const 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; -} diff --git a/sysdeps/kernel/procdata.c b/sysdeps/kernel/procdata.c deleted file mode 100644 index 64fa1583..00000000 --- a/sysdeps/kernel/procdata.c +++ /dev/null @@ -1,180 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) - -#define BIT_SHIFT(x) (1 << (x % 32)) - -static const unsigned long _glibtop_sysdeps_procdata_0 = -BIT_SHIFT(GLIBTOP_PROCDATA_CMD) + -BIT_SHIFT(GLIBTOP_PROCDATA_STATE) + -BIT_SHIFT(GLIBTOP_PROCDATA_UID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PPID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PGRP) + -BIT_SHIFT(GLIBTOP_PROCDATA_SESSION) + -BIT_SHIFT(GLIBTOP_PROCDATA_TTY) + -BIT_SHIFT(GLIBTOP_PROCDATA_TPGID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PRIORITY) + -BIT_SHIFT(GLIBTOP_PROCDATA_NICE) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGNAL) + -BIT_SHIFT(GLIBTOP_PROCDATA_BLOCKED) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGIGNORE) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGCATCH) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_TIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_UTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_STIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_CUTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_CSTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIZE) + -BIT_SHIFT(GLIBTOP_PROCDATA_RESIDENT) + -BIT_SHIFT(GLIBTOP_PROCDATA_SHARE) + -BIT_SHIFT(GLIBTOP_PROCDATA_TRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_LRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_DRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_DT) + -BIT_SHIFT(GLIBTOP_PROCDATA_VSIZE) + -BIT_SHIFT(GLIBTOP_PROCDATA_RSS) + -BIT_SHIFT(GLIBTOP_PROCDATA_RSS_RLIM) + -BIT_SHIFT(GLIBTOP_PROCDATA_TIMEOUT) + -BIT_SHIFT(GLIBTOP_PROCDATA_IT_REAL_VALUE); - -static const unsigned long _glibtop_sysdeps_procdata_1 = -BIT_SHIFT(GLIBTOP_PROCDATA_K_FLAGS) + -BIT_SHIFT(GLIBTOP_PROCDATA_MIN_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_MAJ_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_CMIN_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_CMAJ_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_CODE) + -BIT_SHIFT(GLIBTOP_PROCDATA_END_CODE) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_STACK) + -BIT_SHIFT(GLIBTOP_PROCDATA_KSTK_ESP) + -BIT_SHIFT(GLIBTOP_PROCDATA_KSTK_EIP) + -BIT_SHIFT(GLIBTOP_PROCDATA_WCHAN); - -/* Provides detailed information about a process. */ - -void -glibtop_get_procdata_s (glibtop *server, glibtop_procdata *buf, pid_t pid) -{ - char input [BUFSIZ], *tmp; - struct stat statb; - int nread; - FILE *f; - - glibtop_init_s (&server, 0, 0); - - memset (buf, 0, sizeof (glibtop_procdata)); - - if (pid == 0) { - /* Client is only interested in the flags. */ - buf->flags [0] = _glibtop_sysdeps_procdata_0; - buf->flags [1] = _glibtop_sysdeps_procdata_1; - return; - } - - - sprintf (input, "/proc/%d/stat", pid); - - if (stat (input, &statb)) return; - - buf->uid = statb.st_uid; - - f = fopen (input, "r"); - if (!f) return; - - nread = fread (input, 1, BUFSIZ, f); - - if (nread < 0) { - fclose (f); - return; - } - - input [nread] = 0; - - /* This is from guile-utils/gtop/proc/readproc.c */ - - /* split into "PID (cmd" and "" */ - tmp = strrchr (input, ')'); - *tmp = '\0'; /* replace trailing ')' with NUL */ - /* parse these two strings separately, skipping the leading "(". */ - memset (buf->cmd, 0, sizeof (buf->cmd)); - sscanf (input, "%d (%39c", &buf->pid, buf->cmd); - sscanf(tmp + 2, /* skip space after ')' too */ - "%c %d %d %d %d %d %lu %lu %lu %lu %lu " - "%ld %ld %ld %ld %d %d %lu %lu %ld %lu " - "%lu %lu %lu %lu %lu %lu %lu %d %d %d %d %lu", - &buf->state, &buf->ppid, &buf->pgrp, &buf->session, - &buf->tty, &buf->tpgid, &buf->k_flags, &buf->min_flt, - &buf->cmin_flt, &buf->maj_flt, &buf->cmaj_flt, - &buf->utime, &buf->stime, &buf->cutime, &buf->cstime, - &buf->priority, &buf->nice, &buf->timeout, - &buf->it_real_value, &buf->start_time, &buf->vsize, - &buf->rss, &buf->rss_rlim, &buf->start_code, - &buf->end_code, &buf->start_stack, &buf->kstk_esp, - &buf->kstk_eip, &buf->signal, &buf->blocked, - &buf->sigignore, &buf->sigcatch, &buf->wchan); - - if (buf->tty == 0) - /* the old notty val, update elsewhere bef. moving to 0 */ - buf->tty = -1; - - if (server->os_version_code < LINUX_VERSION(1,3,39)) { - /* map old meanings to new */ - buf->priority = 2*15 - buf->priority; - buf->nice = 15 - buf->nice; - } - if (server->os_version_code < LINUX_VERSION(1,1,30) && buf->tty != -1) - /* when tty wasn't full devno */ - buf->tty = 4*0x100 + buf->tty; - - fclose (f); - - sprintf (input, "/proc/%d/statm", pid); - - f = fopen (input, "r"); - if (!f) return; - - nread = fread (input, 1, BUFSIZ, f); - - if (nread < 0) { - fclose (f); - return; - } - - input [nread] = 0; - - sscanf (input, "%ld %ld %ld %ld %ld %ld %ld", - &buf->size, &buf->resident, &buf->share, - &buf->trs, &buf->lrs, &buf->drs, &buf->dt); - - fclose (f); - - buf->flags [0] = _glibtop_sysdeps_procdata_0; - buf->flags [1] = _glibtop_sysdeps_procdata_1; -} diff --git a/sysdeps/kernel/prockernel.c b/sysdeps/kernel/prockernel.c deleted file mode 100644 index 4380d681..00000000 --- a/sysdeps/kernel/prockernel.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_proc_kernel = -(1 << GLIBTOP_PROC_KERNEL_K_FLAGS) + (1 << GLIBTOP_PROC_KERNEL_MIN_FLT) + -(1 << GLIBTOP_PROC_KERNEL_MAJ_FLT) + (1 << GLIBTOP_PROC_KERNEL_CMIN_FLT) + -(1 << GLIBTOP_PROC_KERNEL_CMAJ_FLT) + (1 << GLIBTOP_PROC_KERNEL_KSTK_ESP) + -(1 << GLIBTOP_PROC_KERNEL_KSTK_EIP) + (1 << GLIBTOP_PROC_KERNEL_NWCHAN); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0); - - memset (buf, 0, sizeof (glibtop_proc_kernel)); - - if (table (TABLE_PROC_KERNEL, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_KERNEL)"); - - buf->flags = _glibtop_sysdeps_proc_kernel; - - buf->min_flt = tbl.proc_kernel.min_flt; - buf->cmin_flt = tbl.proc_kernel.cmin_flt; - buf->maj_flt = tbl.proc_kernel.maj_flt; - buf->cmaj_flt = tbl.proc_kernel.cmaj_flt; - buf->kstk_esp = tbl.proc_kernel.kesp; - buf->kstk_eip = tbl.proc_kernel.keip; - buf->nwchan = tbl.proc_kernel.wchan; -} diff --git a/sysdeps/kernel/proclist.c b/sysdeps/kernel/proclist.c deleted file mode 100644 index 9b527aaf..00000000 --- a/sysdeps/kernel/proclist.c +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -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. - * - * The interface of this function is a little bit different from the others: - * buf->flags is only set if the call succeeded, in this case pids_chain, - * a list of the pids of all currently running processes is returned, - * buf->number is the number of elements of this list and buf->size is - * the size of one single element (sizeof (unsigned)). The total size is - * stored in buf->total. - * - * The calling function has to free the memory to which a pointer is returned. - * - * On error, NULL is returned and buf->flags is zero. */ - -unsigned * -glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, - int64_t which, int64_t arg) -{ - union table tbl; - unsigned *pids_chain; - struct proclist_args args; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROCLIST, 0); - - memset (buf, 0, sizeof (glibtop_proclist)); - - args.which = which; - args.arg = arg; - - if (table (TABLE_PROCLIST, &tbl, &args)) - glibtop_error_io_r (server, "table(TABLE_PROCLIST)"); - - buf->size = sizeof (unsigned); - buf->number = tbl.proclist.nr_tasks; - - buf->total = buf->number * sizeof (unsigned); - - pids_chain = glibtop_malloc_r (server, buf->total); - - memcpy (pids_chain, tbl.proclist.pids, buf->total); - - return pids_chain; -} diff --git a/sysdeps/kernel/procmap.c b/sysdeps/kernel/procmap.c deleted file mode 100644 index 48a99400..00000000 --- a/sysdeps/kernel/procmap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -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; -} diff --git a/sysdeps/kernel/procmem.c b/sysdeps/kernel/procmem.c deleted file mode 100644 index de65f654..00000000 --- a/sysdeps/kernel/procmem.c +++ /dev/null @@ -1,70 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_proc_mem = -(1 << GLIBTOP_PROC_MEM_SIZE) + (1 << GLIBTOP_PROC_MEM_VSIZE) + -(1 << GLIBTOP_PROC_MEM_RESIDENT) + (1 << GLIBTOP_PROC_MEM_SHARE) + -(1 << GLIBTOP_PROC_MEM_RSS) + (1 << GLIBTOP_PROC_MEM_RSS_RLIM); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MEM, 0); - - memset (buf, 0, sizeof (glibtop_proc_mem)); - - if (table (TABLE_PROC_MEM, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_MEM)"); - - buf->rss = tbl.proc_mem.rss; - buf->rss_rlim = tbl.proc_mem.rlim; - - if (table (TABLE_PROC_SEGMENT, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_SEGMENT)"); - - buf->flags = _glibtop_sysdeps_proc_mem; - - buf->vsize = tbl.proc_segment.vsize; - buf->size = tbl.proc_segment.size; - buf->resident = tbl.proc_segment.resident; - buf->share = tbl.proc_segment.shared; -} diff --git a/sysdeps/kernel/procsegment.c b/sysdeps/kernel/procsegment.c deleted file mode 100644 index 2e6d3930..00000000 --- a/sysdeps/kernel/procsegment.c +++ /dev/null @@ -1,77 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_proc_segment = -(1 << GLIBTOP_PROC_SEGMENT_TEXT_RSS) + -(1 << GLIBTOP_PROC_SEGMENT_SHLIB_RSS) + -(1 << GLIBTOP_PROC_SEGMENT_DATA_RSS) + -(1 << GLIBTOP_PROC_SEGMENT_STACK_RSS) + -(1 << GLIBTOP_PROC_SEGMENT_DIRTY_SIZE) + -(1 << GLIBTOP_PROC_SEGMENT_START_CODE) + -(1 << GLIBTOP_PROC_SEGMENT_END_CODE) + -(1 << GLIBTOP_PROC_SEGMENT_START_STACK); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0); - - memset (buf, 0, sizeof (glibtop_proc_segment)); - - if (table (TABLE_PROC_MEM, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_MEM)"); - - buf->start_code = tbl.proc_mem.start_code; - buf->end_code = tbl.proc_mem.end_code; - buf->start_stack = tbl.proc_mem.start_stack; - - if (table (TABLE_PROC_SEGMENT, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_SEGMENT)"); - - buf->flags = _glibtop_sysdeps_proc_segment; - - buf->text_rss = tbl.proc_segment.trs; - buf->shlib_rss = tbl.proc_segment.lrs; - buf->data_rss = tbl.proc_segment.drs; - buf->stack_rss = tbl.proc_segment.srs; - buf->dirty_size = tbl.proc_segment.dt; -} diff --git a/sysdeps/kernel/procsignal.c b/sysdeps/kernel/procsignal.c deleted file mode 100644 index 3e3829c2..00000000 --- a/sysdeps/kernel/procsignal.c +++ /dev/null @@ -1,63 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_proc_signal = -(1 << GLIBTOP_PROC_SIGNAL_SIGNAL) + (1 << GLIBTOP_PROC_SIGNAL_BLOCKED) + -(1 << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + (1 << GLIBTOP_PROC_SIGNAL_SIGCATCH); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0); - - memset (buf, 0, sizeof (glibtop_proc_signal)); - - if (table (TABLE_PROC_SIGNAL, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_SIGNAL)"); - - buf->flags = _glibtop_sysdeps_proc_signal; - - buf->signal [0] = tbl.proc_signal.signal; - buf->blocked [0] = tbl.proc_signal.blocked; - buf->sigignore [0] = tbl.proc_signal.ignored; - buf->sigcatch [0] = tbl.proc_signal.caught; -} diff --git a/sysdeps/kernel/procstate.c b/sysdeps/kernel/procstate.c deleted file mode 100644 index 59217a5e..00000000 --- a/sysdeps/kernel/procstate.c +++ /dev/null @@ -1,75 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_proc_state = -(1 << GLIBTOP_PROC_STATE_CMD) + (1 << GLIBTOP_PROC_STATE_STATE) + -(1 << GLIBTOP_PROC_STATE_UID) + (1 << GLIBTOP_PROC_STATE_GID); - -/* Init function. */ - -void -glibtop_init_proc_state_s (glibtop *server) -{ - server->sysdeps.proc_state = _glibtop_sysdeps_proc_state; -} - -/* Provides detailed information about a process. */ - -#define NR_STATES 7 - -void -glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, - pid_t pid) -{ - union table tbl; - static const char states [NR_STATES] = - { 'R', 'S', 'D', 'Z', 'T', 'W', '.' }; - unsigned state; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_STATE, 0); - - memset (buf, 0, sizeof (glibtop_proc_state)); - - if (table (TABLE_PROC_STATE, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_STATE)"); - - buf->flags = _glibtop_sysdeps_proc_state; - - memcpy (buf->cmd, tbl.proc_state.comm, sizeof (tbl.proc_state.comm)); - - buf->uid = tbl.proc_state.uid; - buf->gid = tbl.proc_state.state; - - state = (unsigned) tbl.proc_state.state; - - if (state >= NR_STATES) - state = NR_STATES; - - buf->state = states [state]; -} diff --git a/sysdeps/kernel/proctime.c b/sysdeps/kernel/proctime.c deleted file mode 100644 index 5e5f455a..00000000 --- a/sysdeps/kernel/proctime.c +++ /dev/null @@ -1,73 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_proc_time = -(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_CUTIME) + -(1 << GLIBTOP_PROC_TIME_STIME) + (1 << GLIBTOP_PROC_TIME_CSTIME) + -(1 << GLIBTOP_PROC_TIME_RTIME) + (1 << GLIBTOP_PROC_TIME_FREQUENCY) + -(1 << GLIBTOP_PROC_TIME_TIMEOUT) + (1 << GLIBTOP_PROC_TIME_IT_REAL_VALUE) + -(1 << GLIBTOP_PROC_TIME_START_TIME); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_TIME, 0); - - memset (buf, 0, sizeof (glibtop_proc_time)); - - if (table (TABLE_PROC_TIME, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_TIME)"); - - buf->utime = tbl.proc_time.utime; - buf->stime = tbl.proc_time.stime; - - buf->rtime = buf->utime + buf->stime; - - buf->cutime = tbl.proc_time.cutime; - buf->cstime = tbl.proc_time.cstime; - - buf->frequency = 100; - - buf->timeout = tbl.proc_time.timeout; - buf->it_real_value = tbl.proc_time.it_real_value; - buf->start_time = tbl.proc_time.start_time; -} diff --git a/sysdeps/kernel/procuid.c b/sysdeps/kernel/procuid.c deleted file mode 100644 index 25012916..00000000 --- a/sysdeps/kernel/procuid.c +++ /dev/null @@ -1,105 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static const unsigned long _glibtop_sysdeps_proc_uid = -(1 << GLIBTOP_PROC_UID_UID) + (1 << GLIBTOP_PROC_UID_EUID) + -(1 << GLIBTOP_PROC_UID_GID) + (1 << GLIBTOP_PROC_UID_EGID) + -(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) + (1 << GLIBTOP_PROC_UID_TPGID) + -(1 << GLIBTOP_PROC_UID_PRIORITY) + (1 << GLIBTOP_PROC_UID_NICE); - -/* Init function. */ - -void -glibtop_init_proc_uid_s (glibtop *server) -{ - server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid; -} - -#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, - pid_t pid) -{ - union table tbl; - long def_priority, priority, nice; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_UID, 0); - - memset (buf, 0, sizeof (glibtop_proc_uid)); - - if (table (TABLE_PROC_UID, &tbl, &pid)) - glibtop_error_io_r (server, "table(TABLE_PROC_UID)"); - - buf->flags = _glibtop_sysdeps_proc_uid; - - buf->uid = tbl.proc_uid.uid; - buf->euid = tbl.proc_uid.euid; - buf->gid = tbl.proc_uid.gid; - buf->egid = tbl.proc_uid.egid; - - buf->pid = tbl.proc_uid.pid; - buf->ppid = tbl.proc_uid.ppid; - buf->pgrp = tbl.proc_uid.pgrp; - buf->session = tbl.proc_uid.session; - buf->tty = tbl.proc_uid.tty; - buf->tpgid = tbl.proc_uid.tpgid; - - /* scale priority and nice values from timeslices to -20..20 */ - /* to make it look like a "normal" unix priority/nice value */ - - def_priority = tbl.proc_uid.def_priority; - - priority = tbl.proc_uid.counter; - priority = 20 - (priority * 10 + def_priority / 2) / def_priority; - nice = tbl.proc_uid.priority; - nice = 20 - (nice * 20 + def_priority / 2) / def_priority; - - buf->priority = (int) priority; - buf->nice = (int) nice; - - if (buf->tty == 0) - /* the old notty val, update elsewhere bef. moving to 0 */ - buf->tty = -1; - - if (server->os_version_code < LINUX_VERSION(1,3,39)) { - /* map old meanings to new */ - buf->priority = 2*15 - buf->priority; - buf->nice = 15 - buf->nice; - } - if (server->os_version_code < LINUX_VERSION(1,1,30) && buf->tty != -1) - /* when tty wasn't full devno */ - buf->tty = 4*0x100 + buf->tty; - - buf->flags = _glibtop_sysdeps_proc_uid; -} diff --git a/sysdeps/kernel/sem_limits.c b/sysdeps/kernel/sem_limits.c deleted file mode 100644 index bdb566d4..00000000 --- a/sysdeps/kernel/sem_limits.c +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include - -#ifdef _SEM_SEMUN_UNDEFINED - -/* glibc 2.1 will no longer defines semun, instead it defines - * _SEM_SEMUN_UNDEFINED so users can define semun on their own. - * Thanks to Albert K T Hui . */ - -union semun -{ - int val; - struct semid_ds *buf; - unsigned short int *array; - struct seminfo *__buf; -}; -#endif - -static unsigned long _glibtop_sysdeps_sem_limits = -(1 << GLIBTOP_IPC_SEMMAP) + (1 << GLIBTOP_IPC_SEMMNI) + -(1 << GLIBTOP_IPC_SEMMNS) + (1 << GLIBTOP_IPC_SEMMNU) + -(1 << GLIBTOP_IPC_SEMMSL) + (1 << GLIBTOP_IPC_SEMOPM) + -(1 << GLIBTOP_IPC_SEMUME) + (1 << GLIBTOP_IPC_SEMUSZ) + -(1 << GLIBTOP_IPC_SEMVMX) + (1 << GLIBTOP_IPC_SEMAEM); - -/* Init function. */ - -void -glibtop_init_sem_limits_s (glibtop *server) -{ - server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits; -} - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf) -{ - struct seminfo seminfo; - union semun arg; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_sem_limits)); - - buf->flags = _glibtop_sysdeps_sem_limits; - - arg.array = (ushort *) &seminfo; - semctl (0, 0, IPC_INFO, arg); - - buf->semmap = seminfo.semmap; - buf->semmni = seminfo.semmni; - buf->semmns = seminfo.semmns; - buf->semmnu = seminfo.semmnu; - buf->semmsl = seminfo.semmsl; - buf->semopm = seminfo.semopm; - buf->semume = seminfo.semume; - buf->semusz = seminfo.semusz; - buf->semvmx = seminfo.semvmx; - buf->semaem = seminfo.semaem; -} diff --git a/sysdeps/kernel/shm_limits.c b/sysdeps/kernel/shm_limits.c deleted file mode 100644 index da6ec92d..00000000 --- a/sysdeps/kernel/shm_limits.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include - -static unsigned long _glibtop_sysdeps_shm_limits = -(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) + -(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) + -(1 << GLIBTOP_IPC_SHMALL); - -/* 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) -{ - struct shminfo shminfo; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_shm_limits)); - - buf->flags = _glibtop_sysdeps_shm_limits; - - shmctl (0, IPC_INFO, (struct shmid_ds *) &shminfo); - - buf->shmmax = shminfo.shmmax; - buf->shmmin = shminfo.shmmin; - buf->shmmni = shminfo.shmmni; - buf->shmseg = shminfo.shmseg; - buf->shmall = shminfo.shmall; -} diff --git a/sysdeps/kernel/siglist.c b/sysdeps/kernel/siglist.c deleted file mode 100644 index d00223c0..00000000 --- a/sysdeps/kernel/siglist.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const glibtop_signame glibtop_sys_siglist [] = -{ { 1, "SIGHUP", NULL }, /* Hangup (POSIX). */ - { 2, "SIGINT", NULL }, /* Interrupt (ANSI). */ - { 3, "SIGQUIT", NULL }, /* Quit (POSIX). */ - { 4, "SIGILL", NULL }, /* Illegal instruction (ANSI). */ - { 5, "SIGTRAP", NULL }, /* Trace trap (POSIX). */ - { 6, "SIGABRT", NULL }, /* Abort (ANSI). */ - { 7, "SIGBUS", NULL }, /* BUS error (4.2 BSD). */ - { 8, "SIGFPE", NULL }, /* Floating-point exception (ANSI). */ - { 9, "SIGKILL", NULL }, /* Kill, unblockable (POSIX). */ - { 10, "SIGUSR1", NULL }, /* User-defined signal 1 (POSIX). */ - { 11, "SIGSEGV", NULL }, /* Segmentation violation (ANSI). */ - { 12, "SIGUSR2", NULL }, /* User-defined signal 2 (POSIX). */ - { 13, "SIGPIPE", NULL }, /* Broken pipe (POSIX). */ - { 14, "SIGALRM", NULL }, /* Alarm clock (POSIX). */ - { 15, "SIGTERM", NULL }, /* Termination (ANSI). */ - { 16, "SIGSTKFLT", NULL }, /* ??? */ - { 17, "SIGCHLD", NULL }, /* Child status has changed (POSIX). */ - { 18, "SIGCONT", NULL }, /* Continue (POSIX). */ - { 19, "SIGSTOP", NULL }, /* Stop, unblockable (POSIX). */ - { 20, "SIGTSTP", NULL }, /* Keyboard stop (POSIX). */ - { 21, "SIGTTIN", NULL }, /* Background read from tty (POSIX). */ - { 22, "SIGTTOU", NULL }, /* Background write to tty (POSIX). */ - { 23, "SIGURG", NULL }, /* Urgent condition on socket (4.2 BSD). */ - { 24, "SIGXCPU", NULL }, /* CPU limit exceeded (4.2 BSD). */ - { 25, "SIGXFSZ", NULL }, /* File size limit exceeded (4.2 BSD). */ - { 26, "SIGVTALRM", NULL }, /* Virtual alarm clock (4.2 BSD). */ - { 27, "SIGPROF", NULL }, /* Profiling alarm clock (4.2 BSD). */ - { 28, "SIGWINCH", NULL }, /* Window size change (4.3 BSD, Sun). */ - { 29, "SIGIO", NULL }, /* I/O now possible (4.2 BSD). */ - { 30, "SIGPWR", NULL }, /* Power failure restart (System V). */ - { 31, "SIGUNUSED", NULL }, - { 0, NULL, NULL }, -}; diff --git a/sysdeps/kernel/swap.c b/sysdeps/kernel/swap.c deleted file mode 100644 index 81f13aa0..00000000 --- a/sysdeps/kernel/swap.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static unsigned long _glibtop_sysdeps_swap = -(1 << GLIBTOP_SWAP_TOTAL) + (1 << GLIBTOP_SWAP_USED) + -(1 << GLIBTOP_SWAP_FREE) + (1 << GLIBTOP_SWAP_PAGEIN) + -(1 << GLIBTOP_SWAP_PAGEOUT); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SWAP, 0); - - memset (buf, 0, sizeof (glibtop_swap)); - - if (table (TABLE_SWAP, &tbl, NULL)) - glibtop_error_io_r (server, "table(TABLE_SWAP)"); - - buf->flags = _glibtop_sysdeps_swap; - - buf->total = tbl.swap.total; - buf->used = tbl.swap.used; - buf->free = tbl.swap.free; - - buf->pagein = tbl.swap.pagein; - buf->pageout = tbl.swap.pageout; -} diff --git a/sysdeps/kernel/uptime.c b/sysdeps/kernel/uptime.c deleted file mode 100644 index 844dfb5e..00000000 --- a/sysdeps/kernel/uptime.c +++ /dev/null @@ -1,64 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include "kernel.h" - -static unsigned long _glibtop_sysdeps_uptime = -(1 << GLIBTOP_UPTIME_UPTIME) + (1 << GLIBTOP_UPTIME_IDLETIME); - -/* 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) -{ - union table tbl; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_UPTIME, 0); - - memset (buf, 0, sizeof (glibtop_uptime)); - - if (table (TABLE_UPTIME, &tbl, NULL)) - glibtop_error_io_r (server, "table(TABLE_UPTIME)"); - - buf->flags = _glibtop_sysdeps_uptime; - -#if 0 - fprintf (stderr, "Table (%u) = %lu, %lu\n", - TABLE_UPTIME, tbl.uptime.uptime, tbl.uptime.idle); -#endif - - buf->uptime = (double) tbl.uptime.uptime / HZ; - buf->idletime = (double) tbl.uptime.idle / HZ; -} diff --git a/sysdeps/linux/.cvsignore b/sysdeps/linux/.cvsignore deleted file mode 100644 index 635816db..00000000 --- a/sysdeps/linux/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -libgtop_sysdeps.la -*.lo diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog deleted file mode 100644 index 587d387d..00000000 --- a/sysdeps/linux/ChangeLog +++ /dev/null @@ -1,107 +0,0 @@ -1999-02-20 Martin Baulig - - * netload.c: Don't include for libc5 systems - since it is no longer required and makes trouble on Slakware. - -1999-01-06 Martin Baulig - - * netload.c (glibtop_get_netload_s): Use `server->os_version_code' - instead of GLIBTOP_LINUX_VERSION_CODE. - -1999-01-06 Martin Baulig - - Unconditionally enable SMP support for linux. - - * open.c (_glibtop_open_s): Always determine the number of CPUs - we have here, not only when SMP support was enabled. - - * cpu.c, proctime.c: Use `server->ncpu' to determine whether to - enable SMP support. - -1998-12-28 Martin Baulig - - * netload.c: When using glibc, don't include - any longer but all headers that were included there; we only - needed this file to get those headers. - -1998-12-09 Martin Baulig - - * procargs.c (glibtop_get_proc_args_s): Added implementation - for this function. - -1998-12-03 Martin Baulig - - * netload.c: No longer include , but use - GLIBTOP_LINUX_VERSION_CODE which is set by configure instead. - Define _GLIBTOP_IP_FW_ACCTIN and _GLIBTOP_IP_FW_ACCTOUT here - and use them instead of IP_FW_F_ACCTIN and IP_FW_F_ACCTOUT. - -1998-11-30 Martin Baulig - - * netload.c: Use correct header files both for libc5 and glibc. - With Linux >= 2.1.114 we no longer use IP accounting since it - already has byte counts in /proc/net/dev. - -1998-11-22 Martin Baulig - - * netload.c (glibtop_get_netload_s): Added implementation - for this function. - - The code here is smart enough to use /proc/net/ip_acct if - IP accounting is enabled in the kernel and activated on the - requested device and /proc/net/dev if not. - - To get separate statistics for received and transmitted - packets you need to use two accounting rules: - - ipfwadm -A in -a -P all -W eth0 - ipfwadm -A out -a -P all -W eth0 - - But before you activate IP accounting, please have a look - at /proc/net/dev - if if already contains byte counters, - then don't use IP accounting. - -1998-10-28 Martin Baulig - - * ppp.c: Added code for ISDN here. - -1998-10-26 Martin Baulig - - * netload.c: New file. Currently empty. - -1998-10-26 Martin Baulig - - * procargs.c: New file. Currently empty. - -1998-10-25 Martin Baulig - - * ppp.c: New file. Currently empty. - -1998-10-11 Martin Baulig - - * procdata.c: Removed this obsolete file. - -1998-10-02 Martin Baulig - - * proclist.c (glibtop_init_proclist_s): You can now also use the - `GLIBTOP_EXCLUDE_*' flags for the `which' parameter. - -1998-10-01 Martin Baulig - - * proclist.c (glibtop_init_proclist_s): Honor the `which' parameter - to select which processes to fetch. - -1998-09-12 Martin Baulig - - * sysinfo.c: New file. - -1998-09-09 Martin Baulig - - * proctime.c (glibtop_get_proc_time_s): Added SMP support. - - * open.c (glibtop_init_s): Initialize `ncpu' on SMP systems. - - * cpu.c (glibtop_get_cpu_s): Added SMP support. - - * ChangeLog: New file. - diff --git a/sysdeps/linux/Makefile.am b/sysdeps/linux/Makefile.am deleted file mode 100644 index 9f53f63a..00000000 --- a/sysdeps/linux/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop_sysdeps.la - -libgtop_sysdeps_la_SOURCES = open.c close.c cpu.c mem.c swap.c \ - uptime.c loadavg.c shm_limits.c msg_limits.c \ - sem_limits.c proclist.c procstate.c procuid.c \ - proctime.c procmem.c procsignal.c prockernel.c \ - procsegment.c procargs.c procmap.c siglist.c \ - sysinfo.c netload.c ppp.c -libgtop_sysdeps_la_LIBADD = @GLIB_LIBS@ - -libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) - -include_HEADERS = glibtop_server.h glibtop_machine.h diff --git a/sysdeps/linux/close.c b/sysdeps/linux/close.c deleted file mode 100644 index 4262d2f0..00000000 --- a/sysdeps/linux/close.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Closes pipe to gtop server. */ - -void -glibtop_close_s (glibtop *server) -{ } diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c deleted file mode 100644 index 63ae5085..00000000 --- a/sysdeps/linux/cpu.c +++ /dev/null @@ -1,102 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_cpu = -(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) + -(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) + -(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY); - -static const unsigned long _glibtop_sysdeps_cpu_smp = -(1 << GLIBTOP_XCPU_TOTAL) + (1 << GLIBTOP_XCPU_USER) + -(1 << GLIBTOP_XCPU_NICE) + (1 << GLIBTOP_XCPU_SYS) + -(1 << GLIBTOP_XCPU_IDLE); - -/* Init function. */ - -void -glibtop_init_cpu_s (glibtop *server) -{ - server->sysdeps.cpu = _glibtop_sysdeps_cpu; - - if (server->ncpu) - server->sysdeps.cpu |= _glibtop_sysdeps_cpu_smp; -} - -/* Provides information about cpu usage. */ - -#define FILENAME "/proc/stat" - -void -glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf) -{ - char buffer [BUFSIZ], *p; - int fd, len, i; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); - - memset (buf, 0, sizeof (glibtop_cpu)); - - fd = open (FILENAME, O_RDONLY); - if (fd < 0) - glibtop_error_io_r (server, "open (%s)", FILENAME); - - len = read (fd, buffer, BUFSIZ-1); - if (len < 0) - glibtop_error_io_r (server, "read (%s)", FILENAME); - - close (fd); - - buffer [len] = '\0'; - - p = skip_token (buffer); /* "cpu" */ - - buf->user = strtoul (p, &p, 0); - buf->nice = strtoul (p, &p, 0); - buf->sys = strtoul (p, &p, 0); - buf->idle = strtoul (p, &p, 0); - - buf->total = buf->user + buf->nice + buf->sys + buf->idle; - - buf->frequency = 100; - buf->flags = _glibtop_sysdeps_cpu; - - for (i = 0; i < server->ncpu; i++) { - if (strncmp (p+1, "cpu", 3) || !isdigit (p [4])) - break; - - p += 6; - buf->xcpu_user [i] = strtoul (p, &p, 0); - buf->xcpu_nice [i] = strtoul (p, &p, 0); - buf->xcpu_sys [i] = strtoul (p, &p, 0); - buf->xcpu_idle [i] = strtoul (p, &p, 0); - - buf->xcpu_total [i] = buf->xcpu_user [i] + buf->xcpu_nice [i] + - buf->xcpu_sys [i] + buf->xcpu_idle [i]; - } - - buf->flags |= _glibtop_sysdeps_cpu_smp; -} diff --git a/sysdeps/linux/glibtop_machine.h b/sysdeps/linux/glibtop_machine.h deleted file mode 100644 index 9386b1b4..00000000 --- a/sysdeps/linux/glibtop_machine.h +++ /dev/null @@ -1,58 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_MACHINE_H__ -#define __GLIBTOP_MACHINE_H__ - -#include -#include -#include - -BEGIN_LIBGTOP_DECLS - -#if _IN_LIBGTOP - -static inline char * -skip_token(const char *p) -{ - while (isspace(*p)) p++; - while (*p && !isspace(*p)) p++; - return (char *)p; -} - -#endif - -typedef struct _glibtop_machine glibtop_machine; - -struct _glibtop_machine -{ - pid_t last_pid; - int no_update; - int fd_stat, fd_meminfo, fd_loadavg; - char proc_stat [BUFSIZ], proc_statm [BUFSIZ]; - char proc_status [BUFSIZ]; -}; - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h deleted file mode 100644 index 50b18f31..00000000 --- a/sysdeps/linux/glibtop_server.h +++ /dev/null @@ -1,134 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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__ - -#include -#include - -BEGIN_LIBGTOP_DECLS - -#ifdef _IN_LIBGTOP - -static inline char * -skip_token (const char *p) -{ - while (isspace(*p)) p++; - while (*p && !isspace(*p)) p++; - return (char *)p; -} - -static inline char * -skip_multiple_token (const char *p, int count) -{ - int i; - - for (i = 0; i < count; i++) - p = skip_token (p); - - return (char *)p; -} - -static inline char * -skip_line (const char *p) -{ - while (*p != '\n') p++; - return (char *) ++p; -} - -static inline int -proc_file_to_buffer (char *buffer, const char *fmt, pid_t pid) -{ - char filename [BUFSIZ]; - int fd, len; - - sprintf (filename, fmt, pid); - - fd = open (filename, O_RDONLY); - if (fd < 0) return -1; - - len = read (fd, buffer, BUFSIZ-1); - if (len < 0) return -1; - - close (fd); - - buffer [len] = '\0'; - - return 0; -} - -static inline int -proc_stat_to_buffer (char *buffer, pid_t pid) -{ - return proc_file_to_buffer (buffer, "/proc/%d/stat", pid); -} - -static inline int -proc_status_to_buffer (char *buffer, pid_t pid) -{ - return proc_file_to_buffer (buffer, "/proc/%d/status", pid); -} - -static inline int -proc_statm_to_buffer (char *buffer, pid_t pid) -{ - return proc_file_to_buffer (buffer, "/proc/%d/statm", pid); -} - -static inline char * -proc_stat_after_cmd (char *p) -{ - p = strrchr (p, ')'); - if (!p) return p; - - *p++ = '\0'; - return p; -} - -#endif - -#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 diff --git a/sysdeps/linux/libsysdeps.la b/sysdeps/linux/libsysdeps.la deleted file mode 100644 index 3f600ebb..00000000 --- a/sysdeps/linux/libsysdeps.la +++ /dev/null @@ -1,19 +0,0 @@ -# libsysdeps.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.0h - -# The name that we can dlopen(3). -dlname='' - -# Names of this library. -library_names='libsysdeps.so.0.0.0 libsysdeps.so.0 libsysdeps.so' - -# The name of the static archive. -old_library='libsysdeps.a' - -# Version information for libsysdeps. -current=0 -age=0 -revision=0 - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff --git a/sysdeps/linux/loadavg.c b/sysdeps/linux/loadavg.c deleted file mode 100644 index 30ab8c75..00000000 --- a/sysdeps/linux/loadavg.c +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_loadavg = -(1 << GLIBTOP_LOADAVG_LOADAVG); - -static const unsigned long _glibtop_sysdeps_loadavg_tasks = -(1 << GLIBTOP_LOADAVG_NR_RUNNING) + -(1 << GLIBTOP_LOADAVG_NR_TASKS) + -(1 << GLIBTOP_LOADAVG_LAST_PID); - -/* Init function. */ - -void -glibtop_init_loadavg_s (glibtop *server) -{ - server->sysdeps.loadavg = _glibtop_sysdeps_loadavg; -} - -/* Provides load load averange. */ - -#define FILENAME "/proc/loadavg" - -void -glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf) -{ - char buffer [BUFSIZ], *p, *old; - int fd, len; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_LOADAVG, 0); - - memset (buf, 0, sizeof (glibtop_loadavg)); - - fd = open (FILENAME, O_RDONLY); - if (fd < 0) - glibtop_error_io_r (server, "open (%s)", FILENAME); - - len = read (fd, buffer, BUFSIZ-1); - if (len < 0) - glibtop_error_io_r (server, "read (%s)", FILENAME); - - close (fd); - - buffer [len] = '\0'; - - buf->loadavg [0] = (float) strtod (buffer, &p); - buf->loadavg [1] = (float) strtod (p, &p); - buf->loadavg [2] = (float) strtod (p, &p); - - buf->flags = _glibtop_sysdeps_loadavg; - - while (isspace(*p)) p++; - - /* Older Linux versions don't have the nr_running/nr_tasks fields. */ - - old = p; - while (*p) { - if (*p == '/') - break; - if (!isdigit (*p)) - return; - p++; - } - - buf->nr_running = strtoul (old, &p, 0); p++; - buf->nr_tasks = strtoul (p, &p, 0); - buf->last_pid = strtoul (p, &p, 0); - - buf->flags |= _glibtop_sysdeps_loadavg_tasks; -} diff --git a/sysdeps/linux/mem.c b/sysdeps/linux/mem.c deleted file mode 100644 index 7ed10f4a..00000000 --- a/sysdeps/linux/mem.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_mem = -(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) + -(1 << GLIBTOP_MEM_FREE) + (1 << GLIBTOP_MEM_SHARED) + -(1 << GLIBTOP_MEM_BUFFER) + (1 << GLIBTOP_MEM_CACHED) + -(1 << GLIBTOP_MEM_USER); - -/* Init function. */ - -void -glibtop_init_mem_s (glibtop *server) -{ - server->sysdeps.mem = _glibtop_sysdeps_mem; -} - -/* Provides information about memory usage. */ - -#define FILENAME "/proc/meminfo" - -void -glibtop_get_mem_s (glibtop *server, glibtop_mem *buf) -{ - char buffer [BUFSIZ], *p; - int fd, len; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MEM, 0); - - memset (buf, 0, sizeof (glibtop_mem)); - - fd = open (FILENAME, O_RDONLY); - if (fd < 0) - glibtop_error_io_r (server, "open (%s)", FILENAME); - - len = read (fd, buffer, BUFSIZ-1); - if (len < 0) - glibtop_error_io_r (server, "read (%s)", FILENAME); - - close (fd); - - buffer [len] = '\0'; - - p = skip_line (buffer); - p = skip_token (p); /* "Mem:" */ - - buf->total = strtoul (p, &p, 0); - buf->used = strtoul (p, &p, 0); - buf->free = strtoul (p, &p, 0); - buf->shared = strtoul (p, &p, 0); - buf->buffer = strtoul (p, &p, 0); - buf->cached = strtoul (p, &p, 0); - - buf->user = buf->total - buf->free - buf->shared - buf->buffer; - - buf->flags = _glibtop_sysdeps_mem; -} diff --git a/sysdeps/linux/msg_limits.c b/sysdeps/linux/msg_limits.c deleted file mode 100644 index 2ebd1b05..00000000 --- a/sysdeps/linux/msg_limits.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include - -static const unsigned long _glibtop_sysdeps_msg_limits = -(1 << GLIBTOP_IPC_MSGPOOL) + (1 << GLIBTOP_IPC_MSGMAP) + -(1 << GLIBTOP_IPC_MSGMAX) + (1 << GLIBTOP_IPC_MSGMNB) + -(1 << GLIBTOP_IPC_MSGMNI) + (1 << GLIBTOP_IPC_MSGSSZ) + -(1 << GLIBTOP_IPC_MSGTQL); - -/* 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) -{ - struct msginfo msginfo; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_msg_limits)); - - buf->flags = _glibtop_sysdeps_msg_limits; - - msgctl (0, IPC_INFO, (struct msqid_ds *) &msginfo); - - buf->msgpool = msginfo.msgpool; - buf->msgmap = msginfo.msgmap; - buf->msgmax = msginfo.msgmax; - buf->msgmnb = msginfo.msgmnb; - buf->msgmni = msginfo.msgmni; - buf->msgssz = msginfo.msgssz; - buf->msgtql = msginfo.msgtql; -} diff --git a/sysdeps/linux/netload.c b/sysdeps/linux/netload.c deleted file mode 100644 index b5b2fbdd..00000000 --- a/sysdeps/linux/netload.c +++ /dev/null @@ -1,353 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include -#include -#include - -#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 -/* GNU LibC */ -#include -#include -#include -#include -#include -#include -#include -#else /* Libc 5 */ -#include -#include -#include -#include -#include -#include -#endif - -#define _GLIBTOP_IP_FW_ACCTIN 0x1000 /* Account incoming packets only. */ -#define _GLIBTOP_IP_FW_ACCTOUT 0x2000 /* Account outgoing packets only. */ - -static const unsigned long _glibtop_sysdeps_netload = -(1 << GLIBTOP_NETLOAD_ERRORS_IN) + -(1 << GLIBTOP_NETLOAD_ERRORS_OUT) + -(1 << GLIBTOP_NETLOAD_COLLISIONS); - -static const unsigned long _glibtop_sysdeps_netload_data = -(1 << GLIBTOP_NETLOAD_ADDRESS) + -(1 << GLIBTOP_NETLOAD_SUBNET) + -(1 << GLIBTOP_NETLOAD_MTU); - -static const unsigned long _glibtop_sysdeps_netload_bytes = -(1 << GLIBTOP_NETLOAD_BYTES_IN) + -(1 << GLIBTOP_NETLOAD_BYTES_OUT) + -(1 << GLIBTOP_NETLOAD_BYTES_TOTAL); - -static const unsigned long _glibtop_sysdeps_netload_packets = -(1 << GLIBTOP_NETLOAD_PACKETS_IN) + -(1 << GLIBTOP_NETLOAD_PACKETS_OUT) + -(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL); - -static const unsigned long _glibtop_sysdeps_netload_total = -(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) + -(1 << GLIBTOP_NETLOAD_BYTES_TOTAL); - -static const unsigned long _glibtop_sysdeps_netload_in = -(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) + -(1 << GLIBTOP_NETLOAD_BYTES_TOTAL) + -(1 << GLIBTOP_NETLOAD_PACKETS_IN) + -(1 << GLIBTOP_NETLOAD_BYTES_IN); - -static const unsigned long _glibtop_sysdeps_netload_out = -(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) + -(1 << GLIBTOP_NETLOAD_BYTES_TOTAL) + -(1 << GLIBTOP_NETLOAD_PACKETS_OUT) + -(1 << GLIBTOP_NETLOAD_BYTES_OUT); - -/* Init function. */ - -void -glibtop_init_netload_s (glibtop *server) -{ - server->sysdeps.netload = _glibtop_sysdeps_netload | - _glibtop_sysdeps_netload_data | - _glibtop_sysdeps_netload_bytes | - _glibtop_sysdeps_netload_packets; -} - -/* Provides network statistics. */ - -void -glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, - const char *interface) -{ - char buffer [BUFSIZ], *p; - int have_bytes, fields, skfd; - FILE *f; - - memset (buf, 0, sizeof (glibtop_netload)); - - skfd = socket (AF_INET, SOCK_DGRAM, 0); - if (skfd) { - struct ifreq ifr; - struct sockaddr_in addr; - char *address; - unsigned flags; - - strcpy (ifr.ifr_name, interface); - if (!ioctl (skfd, SIOCGIFFLAGS, &ifr)) { - buf->flags |= (1 << GLIBTOP_NETLOAD_IF_FLAGS); - flags = ifr.ifr_flags; - } else - flags = 0; - - if (flags & IFF_UP) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_UP); - - if (flags & IFF_BROADCAST) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_BROADCAST); - - if (flags & IFF_DEBUG) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_DEBUG); - - if (flags & IFF_LOOPBACK) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_LOOPBACK); - - if (flags & IFF_POINTOPOINT) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_POINTOPOINT); - - if (flags & IFF_RUNNING) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_RUNNING); - - if (flags & IFF_NOARP) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_NOARP); - - if (flags & IFF_PROMISC) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_PROMISC); - - if (flags & IFF_ALLMULTI) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_ALLMULTI); - - if (flags & IFF_MULTICAST) - buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_MULTICAST); - - strcpy (ifr.ifr_name, interface); - if (!ioctl (skfd, SIOCGIFADDR, &ifr)) { - struct sockaddr_in addr = - *(struct sockaddr_in *) &ifr.ifr_addr; - buf->address = addr.sin_addr.s_addr; - buf->flags |= (1 << GLIBTOP_NETLOAD_ADDRESS); - } - - strcpy (ifr.ifr_name, interface); - if (!ioctl (skfd, SIOCGIFNETMASK, &ifr)) { - struct sockaddr_in addr = - *(struct sockaddr_in *) &ifr.ifr_addr; - buf->subnet = addr.sin_addr.s_addr; - buf->flags |= (1 << GLIBTOP_NETLOAD_SUBNET); - } - - strcpy (ifr.ifr_name, interface); - if (!ioctl (skfd, SIOCGIFMTU, &ifr)) { - buf->mtu = ifr.ifr_mtu; - buf->flags |= (1 << GLIBTOP_NETLOAD_MTU); - } - - close (skfd); - } - - /* Linux 2.1.114 - don't know where exactly this was added, but - * recent kernels have byte count in /proc/net/dev so we don't - * need IP accounting. - */ - - if (server->os_version_code < 131442) { - - /* If IP accounting is enabled in the kernel and it is - * enabled for the requested interface, we use it to - * get the data. In this case, we don't use /proc/net/dev - * to get errors and collisions. - */ - - f = fopen ("/proc/net/ip_acct", "r"); - if (f) { - int success = 0; - - /* Skip over the header line. */ - fgets (buffer, BUFSIZ-1, f); - - while (fgets (buffer, BUFSIZ-1, f)) { - unsigned long flags, packets, bytes; - char *p, *dev; - - /* Skip over the network thing. */ - dev = skip_token (buffer) + 1; - p = skip_token (dev); - *p++ = 0; - - if (strcmp (dev, interface)) - continue; - - success = 1; - - p = skip_token (p); - - flags = strtoul (p, &p, 16); - - p = skip_multiple_token (p, 2); - - packets = strtoul (p, &p, 0); - bytes = strtoul (p, &p, 0); - - if (flags & _GLIBTOP_IP_FW_ACCTIN) { - /* Incoming packets only. */ - - buf->packets_total += packets; - buf->packets_in += packets; - - buf->bytes_total += bytes; - buf->bytes_in += bytes; - - buf->flags |= _glibtop_sysdeps_netload_in; - - } else if (flags & _GLIBTOP_IP_FW_ACCTOUT) { - /* Outgoing packets only. */ - - buf->packets_total += packets; - buf->packets_out += packets; - - buf->bytes_total += bytes; - buf->bytes_out += bytes; - - buf->flags |= _glibtop_sysdeps_netload_out; - - } else { - /* Only have total values. */ - - buf->packets_total += packets; - buf->bytes_total += bytes; - - buf->flags |= _glibtop_sysdeps_netload_total; - } - } - - fclose (f); - - if (success) return; - } - } - - /* Ok, either IP accounting is not enabled in the kernel or - * it was not enabled for the requested interface. */ - - f = fopen ("/proc/net/dev", "r"); - if (!f) return; - - /* Skip over the header line. */ - fgets (buffer, BUFSIZ-1, f); - fgets (buffer, BUFSIZ-1, f); - - /* Starting with 2.1.xx (don't know exactly which version) - * /proc/net/dev contains both byte and package counters. */ - - p = strchr (buffer, '|'); - if (!p) { - fclose (f); - return; - } - - /* Do we already have byte counters ? */ - have_bytes = strncmp (++p, "bytes", 5) == 0; - - /* Count remaining 'Receive' fields so we know where - * the first 'Transmit' field starts. */ - - fields = 0; - while (*p != '|') { - if (!isspace (*p++)) continue; - while (isspace (*p++)) ; - fields++; - } - - /* Should never happen. */ - if (fields < 2) return; - fields--; - - while (fgets (buffer, BUFSIZ-1, f)) { - char *p, *dev; - - dev = buffer; - while (isspace (*dev)) dev++; - - p = strchr (dev, ':'); - if (!p) continue; - *p++ = 0; - - /* If it's not a digit, then it's most likely an error - * message like 'No statistics available'. */ - while (isspace (*p)) p++; - if (!isdigit (*p)) continue; - - if (strcmp (dev, interface)) - continue; - - /* Only read byte counts if we really have them. */ - - if (have_bytes) { - buf->bytes_in = strtoul (p, &p, 0); - fields--; - } - - buf->packets_in = strtoul (p, &p, 0); - buf->errors_in = strtoul (p, &p, 0); - - p = skip_multiple_token (p, fields); - - if (have_bytes) - buf->bytes_out = strtoul (p, &p, 0); - - buf->packets_out = strtoul (p, &p, 0); - buf->errors_out = strtoul (p, &p, 0); - - p = skip_multiple_token (p, 2); - - buf->collisions = strtoul (p, &p, 0); - - /* Compute total valules. */ - - buf->bytes_total = buf->bytes_in + buf->bytes_out; - buf->packets_total = buf->packets_in + buf->packets_out; - - /* And now the flags. */ - - buf->flags |= _glibtop_sysdeps_netload; - buf->flags |= _glibtop_sysdeps_netload_packets; - - if (have_bytes) - buf->flags |= _glibtop_sysdeps_netload_bytes; - } - - fclose (f); -} diff --git a/sysdeps/linux/open.c b/sysdeps/linux/open.c deleted file mode 100644 index f54a7e8d..00000000 --- a/sysdeps/linux/open.c +++ /dev/null @@ -1,101 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -/* ===================================================== - * Linux kernel version information for procps utilities - * Copyright (c) 1996 Charles Blake - */ -#include - -#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) - -static int linux_version_code = 0; - -static void set_linux_version(void) { - static struct utsname uts; - int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ - - if (linux_version_code) return; - if (uname(&uts) == -1) /* failure most likely implies impending death */ - exit(1); - if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3) - fprintf(stderr, /* *very* unlikely to happen by accident */ - "Non-standard uts for running kernel:\n" - "release %s=%d.%d.%d gives version code %d\n", - uts.release, x, y, z, LINUX_VERSION(x,y,z)); - linux_version_code = LINUX_VERSION(x, y, z); -} - -/* ======================================================= */ - -/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */ - -#define FILENAME "/proc/stat" - -void -glibtop_open_s (glibtop *server, const char *program_name, - const unsigned long features, - const unsigned flags) -{ - char buffer [BUFSIZ], *p; - int fd, len, i; - - server->name = program_name; - - set_linux_version (); - server->os_version_code = (unsigned long) linux_version_code; - - server->ncpu = 0; - - fd = open (FILENAME, O_RDONLY); - if (fd < 0) - glibtop_error_io_r (server, "open (%s)", FILENAME); - - len = read (fd, buffer, BUFSIZ-1); - if (len < 0) - glibtop_error_io_r (server, "read (%s)", FILENAME); - - close (fd); - - buffer [len] = '\0'; - - p = skip_multiple_token (buffer, 5) + 1; - - for (i = 0; i < GLIBTOP_NCPU; i++) { - - if (strncmp (p, "cpu", 3) || !isdigit (p [3])) - break; - - server->ncpu++; - - p = skip_multiple_token (p, 5) + 1; - } - -#if DEBUG - printf ("\nThis machine has %d CPUs.\n\n", server->ncpu); -#endif -} diff --git a/sysdeps/linux/ppp.c b/sysdeps/linux/ppp.c deleted file mode 100644 index 145d163f..00000000 --- a/sysdeps/linux/ppp.c +++ /dev/null @@ -1,199 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -#include -#include -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_ppp = -(1 << GLIBTOP_PPP_STATE) + (1 << GLIBTOP_PPP_BYTES_IN) + -(1 << GLIBTOP_PPP_BYTES_OUT); - -/* Init function. */ - -void -glibtop_init_ppp_s (glibtop *server) -{ - server->sysdeps.ppp = _glibtop_sysdeps_ppp; -} - -static int -get_ISDN_stats (glibtop *server, int *in, int *out) -{ - unsigned long *isdn_stats, *ptr; - int fd, i; - - *in = *out = 0; - - isdn_stats = glibtop_calloc_r (server, ISDN_MAX_CHANNELS * 2, - sizeof (unsigned long)); - - fd = open ("/dev/isdninfo", O_RDONLY); - if (fd < 0) { - glibtop_free_r (server, isdn_stats); - return FALSE; - } - - if ((ioctl (fd, IIOCGETCPS, isdn_stats) < 0) && (errno != 0)) { - glibtop_free_r (server, isdn_stats); - close (fd); - - return FALSE; - } - - for (i = 0, ptr = isdn_stats; i < ISDN_MAX_CHANNELS; i++) { - *in += *ptr++; *out += *ptr++; - } - - glibtop_free_r (server, isdn_stats); - close (fd); - - return TRUE; -} - -static int is_ISDN_on (glibtop *server, int *online) -{ - FILE *f = 0; - char buffer [BUFSIZ], *p; - int i; - - /* Perhaps I should try to explain this code a little bit. - * - * ------------------------------------------------------------ - * This is from the manpage of isdninfo(4): - * - * DESCRIPTION - * /dev/isdninfo is a character device with major number 45 - * and minor number 255. It delivers status information from - * the Linux ISDN subsystem to user level. - * - * DATA FORMAT - * When reading from this device, the current status of the - * Linux ISDN subsystem is delivered in 6 lines of text. Each - * line starts with a tag string followed by a colon and - * whitespace. After that the status values are appended sep- - * arated by whitespace. - * - * flags is the tag of line 5. In this line for every driver - * slot, it's B-Channel status is shown. If no driver - * is registered in a slot, a ? is shown. For every - * established B-Channel of the driver, a bit is set - * in the shown value. The driver's first channel is - * mapped to bit 0, the second channel to bit 1 and so - * on. - * ------------------------------------------------------------ - * - * So we open /dev/isdninfo, discard the first four lines of text - * and then check whether we have something that is not `0' or `?' - * in one of the flags fields. - * - * Sounds complicated, but I don't see any other way to check whether - * we are connected. Also, this is the method some other ISDN tools - * for Linux use. - * - * Martin - */ - - f = fopen ("/dev/isdninfo", "r"); - - if (!f) return FALSE; - - for (i = 0; i < 5; i++) { - if (fgets (buffer, BUFSIZ, f) == NULL) { - fclose (f); - return FALSE; - } - } - - if (strncmp (buffer, "flags:", 6)) { - fclose (f); - return FALSE; - } - - p = buffer+6; - - while (*p) { - char *end = p; - - if (isspace (*p)) { - p++; - continue; - } - - for (end = p; *end && !isspace (*end); end++) - ; - - if (*end == 0) - break; - else - *end = 0; - - if (!strcmp (p, "?") || !strcmp (p, "0")) { - p = end+1; - continue; - } - - fclose (f); - - *online = TRUE; - return TRUE; - } - - fclose (f); - - *online = FALSE; - return TRUE; -} - -/* Provides PPP/ISDN information. */ - -void -glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device) -{ - int in, out, online; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PPP, 0); - - memset (buf, 0, sizeof (glibtop_ppp)); - - if (is_ISDN_on (server, &online)) { - buf->state = online ? GLIBTOP_PPP_STATE_ONLINE : - GLIBTOP_PPP_STATE_HANGUP; - buf->flags |= (1 << GLIBTOP_PPP_STATE); - } - - if (get_ISDN_stats (server, &in, &out)) { - buf->bytes_in = in; - buf->bytes_out = out; - buf->flags |= (1 << GLIBTOP_PPP_BYTES_IN) | - (1 << GLIBTOP_PPP_BYTES_OUT); - } -} diff --git a/sysdeps/linux/procargs.c b/sysdeps/linux/procargs.c deleted file mode 100644 index b8b18892..00000000 --- a/sysdeps/linux/procargs.c +++ /dev/null @@ -1,93 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_args = -(1 << GLIBTOP_PROC_ARGS_SIZE); - -/* 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) -{ - char fn [BUFSIZ], buffer [BUFSIZ]; - int cmdline, len, total = 0; - char *retval = NULL; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_ARGS, 0); - - memset (buf, 0, sizeof (glibtop_proc_args)); - - sprintf (fn, "/proc/%d/cmdline", pid); - - cmdline = open (fn, O_RDONLY); - if (cmdline < 0) return NULL; - - if (max_len) { - retval = glibtop_malloc_r (server, max_len+1); - - len = read (cmdline, retval, max_len); - if (len < 0) { - glibtop_free_r (server, retval); - return NULL; - } - - return retval; - } - - while (1) { - len = read (cmdline, buffer, BUFSIZ-1); - if (len < 0) { - glibtop_free_r (server, retval); - return NULL; - } - - if (len == 0) - break; - - retval = glibtop_realloc_r (server, retval, total+len+1); - memcpy (retval+total, buffer, len); - *(retval+total+len) = 0; - total += len; - } - - close (cmdline); - - buf->size = total; - buf->flags = _glibtop_sysdeps_proc_args; - - return retval; -} diff --git a/sysdeps/linux/prockernel.c b/sysdeps/linux/prockernel.c deleted file mode 100644 index 4e4a9d7b..00000000 --- a/sysdeps/linux/prockernel.c +++ /dev/null @@ -1,77 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_kernel = -(1 << GLIBTOP_PROC_KERNEL_K_FLAGS) + (1 << GLIBTOP_PROC_KERNEL_MIN_FLT) + -(1 << GLIBTOP_PROC_KERNEL_MAJ_FLT) + (1 << GLIBTOP_PROC_KERNEL_CMIN_FLT) + -(1 << GLIBTOP_PROC_KERNEL_CMAJ_FLT) + (1 << GLIBTOP_PROC_KERNEL_KSTK_ESP) + -(1 << GLIBTOP_PROC_KERNEL_KSTK_EIP) + (1 << GLIBTOP_PROC_KERNEL_WCHAN); - -/* 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) -{ - char buffer [BUFSIZ], *p; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0); - - memset (buf, 0, sizeof (glibtop_proc_kernel)); - - if (proc_stat_to_buffer (buffer, pid)) - return; - - p = proc_stat_after_cmd (buffer); - if (!p) return; - - p = skip_multiple_token (p, 6); - - buf->k_flags = strtoul (p, &p, 0); - buf->min_flt = strtoul (p, &p, 0); - buf->cmin_flt = strtoul (p, &p, 0); - buf->maj_flt = strtoul (p, &p, 0); - buf->cmaj_flt = strtoul (p, &p, 0); - - p = skip_multiple_token (p, 15); - - buf->kstk_esp = strtoul (p, &p, 0); - buf->kstk_eip = strtoul (p, &p, 0); - - p = skip_multiple_token (p, 4); - - buf->nwchan = strtoul (p, &p, 0); - - buf->flags = _glibtop_sysdeps_proc_kernel; -} diff --git a/sysdeps/linux/proclist.c b/sysdeps/linux/proclist.c deleted file mode 100644 index 4e049d00..00000000 --- a/sysdeps/linux/proclist.c +++ /dev/null @@ -1,233 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include -#include - -#include -#include -#include -#include - -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. - * - * The interface of this function is a little bit different from the others: - * buf->flags is only set if the call succeeded, in this case pids_chain, - * a list of the pids of all currently running processes is returned, - * buf->number is the number of elements of this list and buf->size is - * the size of one single element (sizeof (unsigned)). The total size is - * stored in buf->total. - * - * The calling function has to free the memory to which a pointer is returned. - * - * On error, NULL is returned and buf->flags is zero. */ - -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; - - glibtop_proc_uid procuid; - glibtop_proc_state procstate; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROCLIST, 0); - - 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; - - switch (which & GLIBTOP_KERN_PROC_MASK) { - case GLIBTOP_KERN_PROC_ALL: - break; - case GLIBTOP_KERN_PROC_PID: - if ((unsigned) arg != pid) - continue; - break; - case GLIBTOP_KERN_PROC_UID: - if ((uid_t) arg != statb.st_uid) - continue; - break; - case GLIBTOP_KERN_PROC_PGRP: - /* Do you really, really need this ? */ - glibtop_get_proc_uid_s (server, &procuid, pid); - if (procuid.flags & (1 << GLIBTOP_PROC_UID_PGRP)) - if ((int) arg != procuid.pgrp) - continue; - break; - case GLIBTOP_KERN_PROC_SESSION: - /* Do you really, really need this ? */ - glibtop_get_proc_uid_s (server, &procuid, pid); - if (procuid.flags & (1 << GLIBTOP_PROC_UID_SESSION)) - if ((int) arg != procuid.session) - continue; - break; - case GLIBTOP_KERN_PROC_TTY: - /* Do you really, really need this ? */ - glibtop_get_proc_uid_s (server, &procuid, pid); - if (procuid.flags & (1 << GLIBTOP_PROC_UID_TTY)) - if ((int) arg != procuid.tty) - continue; - break; - case GLIBTOP_KERN_PROC_RUID: - /* Do you really, really need this ? */ - glibtop_get_proc_uid_s (server, &procuid, pid); - if (procuid.flags & (1 << GLIBTOP_PROC_UID_EUID)) - if ((int) arg != procuid.euid) - continue; - break; - } - - if (which & GLIBTOP_EXCLUDE_NOTTY) { - glibtop_get_proc_uid_s (server, &procuid, pid); - if (procuid.flags & (1 << GLIBTOP_PROC_UID_TTY)) - if (procuid.tty == -1) continue; - } - - if (which & GLIBTOP_EXCLUDE_IDLE) { - glibtop_get_proc_state_s (server, &procstate, pid); - if (procstate.flags & (1 << GLIBTOP_PROC_STATE_STATE)) - if (procstate.state != 'R') continue; - } - - if (which & GLIBTOP_EXCLUDE_SYSTEM) { - glibtop_get_proc_uid_s (server, &procuid, pid); - if (procuid.flags & (1 << GLIBTOP_PROC_UID_UID)) - if (procuid.uid == 0) 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; -} diff --git a/sysdeps/linux/procmap.c b/sysdeps/linux/procmap.c deleted file mode 100644 index 7109f574..00000000 --- a/sysdeps/linux/procmap.c +++ /dev/null @@ -1,134 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_map = -(1 << GLIBTOP_PROC_MAP_NUMBER) + (1 << GLIBTOP_PROC_MAP_TOTAL) + -(1 << GLIBTOP_PROC_MAP_SIZE); - -static const unsigned long _glibtop_sysdeps_map_entry = -(1 << GLIBTOP_MAP_ENTRY_START) + (1 << GLIBTOP_MAP_ENTRY_END) + -(1 << GLIBTOP_MAP_ENTRY_OFFSET) + (1 << GLIBTOP_MAP_ENTRY_PERM) + -(1 << GLIBTOP_MAP_ENTRY_INODE) + (1 << GLIBTOP_MAP_ENTRY_DEVICE) + -(1 << GLIBTOP_MAP_ENTRY_FILENAME); - -/* 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) -{ - char fn [BUFSIZ]; - glibtop_map_entry *entry_list = NULL; - int rv, n = 0; - FILE *maps; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0); - - memset (buf, 0, sizeof (glibtop_proc_map)); - - sprintf (fn, "/proc/%d/maps", pid); - - maps = fopen (fn, "r"); - if (!maps) return NULL; - - do { - short dev_major, dev_minor; - unsigned long start, end, offset, inode, perm; - char flags [5]; - size_t size; - - rv = fscanf (maps, - "%08lx-%08lx %4c\n %08lx %02hx:%02hx %ld", - &start, &end, flags, &offset, - &dev_major, &dev_minor, &inode); - - flags [4] = 0; - - /* Compute access permissions. */ - - perm = 0; - - if (flags [0] == 'r') - perm |= GLIBTOP_MAP_PERM_READ; - if (flags [1] == 'w') - perm |= GLIBTOP_MAP_PERM_WRITE; - if (flags [2] == 'x') - perm |= GLIBTOP_MAP_PERM_EXECUTE; - if (flags [3] == 's') - perm |= GLIBTOP_MAP_PERM_SHARED; - if (flags [3] == 'p') - perm |= GLIBTOP_MAP_PERM_PRIVATE; - - /* Read filename. */ - - fn [0] = fgetc (maps); - - if (fn [0] != '\n' && fn [0] != EOF) { - - fscanf (maps, "%*[ ]%[^\n]\n", fn); - - } else fn [0] = 0; - - size = (n+1) * sizeof (glibtop_map_entry); - - entry_list = glibtop_realloc_r (server, entry_list, size); - - memset (&(entry_list [n]), 0, sizeof (glibtop_map_entry)); - - entry_list [n].flags = _glibtop_sysdeps_map_entry; - - entry_list [n].start = (u_int64_t) start; - entry_list [n].end = (u_int64_t) end; - entry_list [n].offset = (u_int64_t) offset; - entry_list [n].perm = (u_int64_t) perm; - entry_list [n].device = (u_int64_t) (dev_major << 8) + - (u_int64_t) dev_minor; - entry_list [n].inode = (u_int64_t) inode; - - strncpy (entry_list [n].filename, fn, GLIBTOP_MAP_FILENAME_LEN); - entry_list [n].filename [GLIBTOP_MAP_FILENAME_LEN] = 0; - - n++; - - } while (rv != EOF && rv && fn [0] != EOF); - - fclose (maps); - - buf->number = n; - buf->size = sizeof (glibtop_map_entry); - buf->total = n * sizeof (glibtop_map_entry); - - return entry_list; -} diff --git a/sysdeps/linux/procmem.c b/sysdeps/linux/procmem.c deleted file mode 100644 index baf34323..00000000 --- a/sysdeps/linux/procmem.c +++ /dev/null @@ -1,104 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_mem = -(1 << GLIBTOP_PROC_MEM_VSIZE) + (1 << GLIBTOP_PROC_MEM_RSS) + -(1 << GLIBTOP_PROC_MEM_RSS_RLIM); - -static const unsigned long _glibtop_sysdeps_proc_mem_statm = -(1 << GLIBTOP_PROC_MEM_SIZE) + (1 << GLIBTOP_PROC_MEM_RESIDENT) + -(1 << GLIBTOP_PROC_MEM_SHARE); - -#ifndef LOG1024 -#define LOG1024 10 -#endif - -/* these are for getting the memory statistics */ -static int pageshift; /* log base 2 of the pagesize */ - -/* define pagetok in terms of pageshift */ -#define pagetok(size) ((size) << pageshift) - -/* Init function. */ - -void -glibtop_init_proc_mem_s (glibtop *server) -{ - register int pagesize; - - server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem | - _glibtop_sysdeps_proc_mem_statm; - - /* get the page size with "getpagesize" and calculate pageshift - * from it */ - pagesize = getpagesize (); - pageshift = 0; - while (pagesize > 1) { - pageshift++; - pagesize >>= 1; - } -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid) -{ - char buffer [BUFSIZ], *p; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MEM, 0); - - memset (buf, 0, sizeof (glibtop_proc_mem)); - - if (proc_stat_to_buffer (buffer, pid)) - return; - - p = proc_stat_after_cmd (buffer); - if (!p) return; - - p = skip_multiple_token (p, 20); - - buf->vsize = strtoul (p, &p, 0); - buf->rss = strtoul (p, &p, 0); - buf->rss_rlim = strtoul (p, &p, 0); - - buf->flags = _glibtop_sysdeps_proc_mem; - - if (proc_statm_to_buffer (buffer, pid)) - return; - - buf->size = strtoul (buffer, &p, 0); - buf->resident = strtoul (p, &p, 0); - buf->share = strtoul (p, &p, 0); - - buf->size <<= pageshift; - buf->resident <<= pageshift; - buf->share <<= pageshift; - buf->rss <<= pageshift; - - buf->flags |= _glibtop_sysdeps_proc_mem_statm; -} diff --git a/sysdeps/linux/procsegment.c b/sysdeps/linux/procsegment.c deleted file mode 100644 index 0a698ad0..00000000 --- a/sysdeps/linux/procsegment.c +++ /dev/null @@ -1,115 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_segment = -(1 << GLIBTOP_PROC_SEGMENT_START_CODE) + -(1 << GLIBTOP_PROC_SEGMENT_END_CODE) + -(1 << GLIBTOP_PROC_SEGMENT_START_STACK); - -static const unsigned long _glibtop_sysdeps_proc_segment_statm = -(1 << GLIBTOP_PROC_SEGMENT_TEXT_RSS) + -/* Disabled due to bug in the Linux Kernel. */ -/* (1 << GLIBTOP_PROC_SEGMENT_SHLIB_RSS) + */ -(1 << GLIBTOP_PROC_SEGMENT_DATA_RSS) + -(1 << GLIBTOP_PROC_SEGMENT_DIRTY_SIZE); - -#ifndef LOG1024 -#define LOG1024 10 -#endif - -/* these are for getting the memory statistics */ -static int pageshift; /* log base 2 of the pagesize */ - -/* define pagetok in terms of pageshift */ -#define pagetok(size) ((size) << pageshift) - -/* Init function. */ - -void -glibtop_init_proc_segment_s (glibtop *server) -{ - register int pagesize; - - server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment | - _glibtop_sysdeps_proc_segment_statm; - - /* get the page size with "getpagesize" and calculate pageshift - * from it */ - pagesize = getpagesize (); - pageshift = 0; - while (pagesize > 1) { - pageshift++; - pagesize >>= 1; - } -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf, - pid_t pid) -{ - char buffer [BUFSIZ], *p; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0); - - memset (buf, 0, sizeof (glibtop_proc_segment)); - - if (proc_stat_to_buffer (buffer, pid)) - return; - - p = proc_stat_after_cmd (buffer); - if (!p) return; - - p = skip_multiple_token (p, 23); - - buf->start_code = strtoul (p, &p, 0); - buf->end_code = strtoul (p, &p, 0); - buf->start_stack = strtoul (p, &p, 0); - - buf->flags = _glibtop_sysdeps_proc_segment; - - if (proc_statm_to_buffer (buffer, pid)) - return; - - p = skip_multiple_token (buffer, 3); - - /* This doesn't work very well due to a bug in the Linux kernel. - * I'll submit a patch to the kernel mailing list soon. */ - - buf->text_rss = strtoul (p, &p, 0); - buf->shlib_rss = strtoul (p, &p, 0); - buf->data_rss = strtoul (p, &p, 0); - buf->dirty_size = strtoul (p, &p, 0); - - buf->text_rss <<= pageshift; - buf->shlib_rss <<= pageshift; - buf->data_rss <<= pageshift; - buf->dirty_size <<= pageshift; - - buf->flags |= _glibtop_sysdeps_proc_segment_statm; -} diff --git a/sysdeps/linux/procsignal.c b/sysdeps/linux/procsignal.c deleted file mode 100644 index 96b24417..00000000 --- a/sysdeps/linux/procsignal.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_signal = -(1 << GLIBTOP_PROC_SIGNAL_SIGNAL) + (1 << GLIBTOP_PROC_SIGNAL_BLOCKED) + -(1 << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + (1 << GLIBTOP_PROC_SIGNAL_SIGCATCH); - -/* 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) -{ - char buffer [BUFSIZ], *p; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0); - - memset (buf, 0, sizeof (glibtop_proc_signal)); - - if (proc_stat_to_buffer (buffer, pid)) - return; - - p = proc_stat_after_cmd (buffer); - if (!p) return; - - p = skip_multiple_token (p, 28); - - buf->signal [0] = strtoul (p, &p, 0); - buf->blocked [0] = strtoul (p, &p, 0); - buf->sigignore [0] = strtoul (p, &p, 0); - buf->sigcatch [0] = strtoul (p, &p, 0); - - buf->flags = _glibtop_sysdeps_proc_signal; -} diff --git a/sysdeps/linux/procstate.c b/sysdeps/linux/procstate.c deleted file mode 100644 index 32924748..00000000 --- a/sysdeps/linux/procstate.c +++ /dev/null @@ -1,91 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_state = -(1 << GLIBTOP_PROC_STATE_CMD) + (1 << GLIBTOP_PROC_STATE_STATE); - -static const unsigned long _glibtop_sysdeps_proc_state_uid = -(1 << GLIBTOP_PROC_STATE_UID) + (1 << GLIBTOP_PROC_STATE_GID); - -/* Init function. */ - -void -glibtop_init_proc_state_s (glibtop *server) -{ - server->sysdeps.proc_state = _glibtop_sysdeps_proc_state | - _glibtop_sysdeps_proc_state_uid; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid) -{ - char buffer [BUFSIZ], *p; - struct stat statb; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_STATE, 0); - - memset (buf, 0, sizeof (glibtop_proc_state)); - - /* IMPORTANT NOTICE: For security reasons it is extremely important - * that the 'uid' and 'gid' fields have correct - * values; NEVER set their flags values if this - * is not the case !!! */ - - sprintf (buffer, "/proc/%d/stat", pid); - - if (stat (buffer, &statb)) - return; - - /* For security reasons we use stat () since it is - * more failsafe than parsing the file. */ - - buf->uid = statb.st_uid; - buf->gid = statb.st_gid; - - buf->flags = _glibtop_sysdeps_proc_state_uid; - - /* Now we read the remaining fields. */ - - if (proc_stat_to_buffer (buffer, pid)) - return; - - p = strrchr (buffer, ')'); *p = '\0'; - buf->state = p [2]; - - p = skip_token (buffer); p++; /* pid */ - if (*p++ != '(') - glibtop_error_r (server, "Bad data in /proc/%d/stat", pid); - - strncpy (buf->cmd, p, sizeof (buf->cmd)-1); - buf->cmd [sizeof (buf->cmd)-1] = 0; - - buf->flags |= _glibtop_sysdeps_proc_state; -} diff --git a/sysdeps/linux/proctime.c b/sysdeps/linux/proctime.c deleted file mode 100644 index 1ccbbca1..00000000 --- a/sysdeps/linux/proctime.c +++ /dev/null @@ -1,106 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_time = -(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_CUTIME) + -(1 << GLIBTOP_PROC_TIME_STIME) + (1 << GLIBTOP_PROC_TIME_CSTIME) + -(1 << GLIBTOP_PROC_TIME_RTIME) + (1 << GLIBTOP_PROC_TIME_FREQUENCY) + -(1 << GLIBTOP_PROC_TIME_TIMEOUT) + (1 << GLIBTOP_PROC_TIME_IT_REAL_VALUE) + -(1 << GLIBTOP_PROC_TIME_START_TIME); - -static const unsigned long _glibtop_sysdeps_proc_time_smp = -(1 << GLIBTOP_PROC_TIME_XCPU_UTIME) + (1 << GLIBTOP_PROC_TIME_XCPU_STIME); - -/* Init function. */ - -void -glibtop_init_proc_time_s (glibtop *server) -{ - server->sysdeps.proc_time = _glibtop_sysdeps_proc_time; - - if (server->ncpu) - server->sysdeps.proc_time |= _glibtop_sysdeps_proc_time_smp; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid) -{ - char buffer [BUFSIZ], *p; - int i; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_TIME, 0); - - memset (buf, 0, sizeof (glibtop_proc_time)); - - if (proc_stat_to_buffer (buffer, pid)) - return; - - p = proc_stat_after_cmd (buffer); - if (!p) return; - - p = skip_multiple_token (p, 11); - - buf->utime = strtoul (p, &p, 0); - buf->stime = strtoul (p, &p, 0); - buf->cutime = strtoul (p, &p, 0); - buf->cstime = strtoul (p, &p, 0); - - buf->rtime = buf->utime + buf->stime; - - p = skip_multiple_token (p, 2); - - buf->timeout = strtoul (p, &p, 0); - buf->it_real_value = strtoul (p, &p, 0); - buf->start_time = strtoul (p, &p, 0); - - buf->frequency = 100; - - buf->flags = _glibtop_sysdeps_proc_time; - - if (!server->ncpu) - return; - - if (proc_file_to_buffer (buffer, "/proc/%d/cpu", pid)) - return; - - p = skip_token (buffer); - buf->utime = strtoul (p, &p, 0); - buf->stime = strtoul (p, &p, 0); - - for (i = 0; i < GLIBTOP_NCPU; i++) { - if (strncmp (p+1, "cpu", 3) || !isdigit (p [4])) - break; - - p += 6; - buf->xcpu_utime [i] = strtoul (p, &p, 0); - buf->xcpu_stime [i] = strtoul (p, &p, 0); - } - - buf->flags |= _glibtop_sysdeps_proc_time_smp; -} diff --git a/sysdeps/linux/procuid.c b/sysdeps/linux/procuid.c deleted file mode 100644 index a9cb7179..00000000 --- a/sysdeps/linux/procuid.c +++ /dev/null @@ -1,126 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_uid = -(1 << GLIBTOP_PROC_UID_UID) + (1 << GLIBTOP_PROC_UID_EUID) + -(1 << GLIBTOP_PROC_UID_GID) + (1 << GLIBTOP_PROC_UID_EGID); - -static const unsigned long _glibtop_sysdeps_proc_uid_stat = -(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) + (1 << GLIBTOP_PROC_UID_TPGID) + -(1 << GLIBTOP_PROC_UID_PRIORITY) + (1 << GLIBTOP_PROC_UID_NICE); - -#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) - -/* Init function. */ - -void -glibtop_init_proc_uid_s (glibtop *server) -{ - server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid | - _glibtop_sysdeps_proc_uid_stat; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid) -{ - char buffer [BUFSIZ], *p; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_UID, 0); - - memset (buf, 0, sizeof (glibtop_proc_uid)); - - if (proc_status_to_buffer (buffer, pid)) - return; - - /* Search substring 'Pid:' */ - - p = strstr (buffer, "\nPid:"); - if (!p) return; - - p = skip_token (p); /* "Pid:" */ - buf->pid = strtoul (p, &p, 0); - - p = skip_token (p); /* "PPid:" */ - buf->ppid = strtoul (p, &p, 0); - - /* Maybe future Linux versions place something between - * "PPid" and "Uid", so we catch this here. */ - p = strstr (p, "\nUid:"); - if (!p) return; - - p = skip_token (p); /* "Uid:" */ - buf->uid = strtoul (p, &p, 0); - buf->euid = strtoul (p, &p, 0); - - /* We don't know how many entries on the "Uid:" line - * future Linux version will have, so we catch this here. */ - p = strstr (p, "\nGid:"); - if (!p) return; - - p = skip_token (p); /* "Gid:" */ - buf->gid = strtoul (p, &p, 0); - buf->egid = strtoul (p, &p, 0); - - buf->flags = _glibtop_sysdeps_proc_uid; - - if (proc_stat_to_buffer (buffer, pid)) - return; - - p = proc_stat_after_cmd (buffer); - if (!p) return; - - p = skip_multiple_token (p, 2); - - buf->pgrp = strtoul (p, &p, 0); - buf->session = strtoul (p, &p, 0); - buf->tty = strtoul (p, &p, 0); - buf->tpgid = strtoul (p, &p, 0); - - p = skip_multiple_token (p, 9); - - buf->priority = strtoul (p, &p, 0); - buf->nice = strtoul (p, &p, 0); - - if (buf->tty == 0) - /* the old notty val, update elsewhere bef. moving to 0 */ - buf->tty = -1; - - if (server->os_version_code < LINUX_VERSION(1,3,39)) { - /* map old meanings to new */ - buf->priority = 2*15 - buf->priority; - buf->nice = 15 - buf->nice; - } - if (server->os_version_code < LINUX_VERSION(1,1,30) && buf->tty != -1) - /* when tty wasn't full devno */ - buf->tty = 4*0x100 + buf->tty; - - buf->flags |= _glibtop_sysdeps_proc_uid_stat; -} diff --git a/sysdeps/linux/sem_limits.c b/sysdeps/linux/sem_limits.c deleted file mode 100644 index bdb566d4..00000000 --- a/sysdeps/linux/sem_limits.c +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include - -#ifdef _SEM_SEMUN_UNDEFINED - -/* glibc 2.1 will no longer defines semun, instead it defines - * _SEM_SEMUN_UNDEFINED so users can define semun on their own. - * Thanks to Albert K T Hui . */ - -union semun -{ - int val; - struct semid_ds *buf; - unsigned short int *array; - struct seminfo *__buf; -}; -#endif - -static unsigned long _glibtop_sysdeps_sem_limits = -(1 << GLIBTOP_IPC_SEMMAP) + (1 << GLIBTOP_IPC_SEMMNI) + -(1 << GLIBTOP_IPC_SEMMNS) + (1 << GLIBTOP_IPC_SEMMNU) + -(1 << GLIBTOP_IPC_SEMMSL) + (1 << GLIBTOP_IPC_SEMOPM) + -(1 << GLIBTOP_IPC_SEMUME) + (1 << GLIBTOP_IPC_SEMUSZ) + -(1 << GLIBTOP_IPC_SEMVMX) + (1 << GLIBTOP_IPC_SEMAEM); - -/* Init function. */ - -void -glibtop_init_sem_limits_s (glibtop *server) -{ - server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits; -} - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf) -{ - struct seminfo seminfo; - union semun arg; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_sem_limits)); - - buf->flags = _glibtop_sysdeps_sem_limits; - - arg.array = (ushort *) &seminfo; - semctl (0, 0, IPC_INFO, arg); - - buf->semmap = seminfo.semmap; - buf->semmni = seminfo.semmni; - buf->semmns = seminfo.semmns; - buf->semmnu = seminfo.semmnu; - buf->semmsl = seminfo.semmsl; - buf->semopm = seminfo.semopm; - buf->semume = seminfo.semume; - buf->semusz = seminfo.semusz; - buf->semvmx = seminfo.semvmx; - buf->semaem = seminfo.semaem; -} diff --git a/sysdeps/linux/shm_limits.c b/sysdeps/linux/shm_limits.c deleted file mode 100644 index da6ec92d..00000000 --- a/sysdeps/linux/shm_limits.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -#include -#include - -static unsigned long _glibtop_sysdeps_shm_limits = -(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) + -(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) + -(1 << GLIBTOP_IPC_SHMALL); - -/* 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) -{ - struct shminfo shminfo; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_shm_limits)); - - buf->flags = _glibtop_sysdeps_shm_limits; - - shmctl (0, IPC_INFO, (struct shmid_ds *) &shminfo); - - buf->shmmax = shminfo.shmmax; - buf->shmmin = shminfo.shmmin; - buf->shmmni = shminfo.shmmni; - buf->shmseg = shminfo.shmseg; - buf->shmall = shminfo.shmall; -} diff --git a/sysdeps/linux/siglist.c b/sysdeps/linux/siglist.c deleted file mode 100644 index d00223c0..00000000 --- a/sysdeps/linux/siglist.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const glibtop_signame glibtop_sys_siglist [] = -{ { 1, "SIGHUP", NULL }, /* Hangup (POSIX). */ - { 2, "SIGINT", NULL }, /* Interrupt (ANSI). */ - { 3, "SIGQUIT", NULL }, /* Quit (POSIX). */ - { 4, "SIGILL", NULL }, /* Illegal instruction (ANSI). */ - { 5, "SIGTRAP", NULL }, /* Trace trap (POSIX). */ - { 6, "SIGABRT", NULL }, /* Abort (ANSI). */ - { 7, "SIGBUS", NULL }, /* BUS error (4.2 BSD). */ - { 8, "SIGFPE", NULL }, /* Floating-point exception (ANSI). */ - { 9, "SIGKILL", NULL }, /* Kill, unblockable (POSIX). */ - { 10, "SIGUSR1", NULL }, /* User-defined signal 1 (POSIX). */ - { 11, "SIGSEGV", NULL }, /* Segmentation violation (ANSI). */ - { 12, "SIGUSR2", NULL }, /* User-defined signal 2 (POSIX). */ - { 13, "SIGPIPE", NULL }, /* Broken pipe (POSIX). */ - { 14, "SIGALRM", NULL }, /* Alarm clock (POSIX). */ - { 15, "SIGTERM", NULL }, /* Termination (ANSI). */ - { 16, "SIGSTKFLT", NULL }, /* ??? */ - { 17, "SIGCHLD", NULL }, /* Child status has changed (POSIX). */ - { 18, "SIGCONT", NULL }, /* Continue (POSIX). */ - { 19, "SIGSTOP", NULL }, /* Stop, unblockable (POSIX). */ - { 20, "SIGTSTP", NULL }, /* Keyboard stop (POSIX). */ - { 21, "SIGTTIN", NULL }, /* Background read from tty (POSIX). */ - { 22, "SIGTTOU", NULL }, /* Background write to tty (POSIX). */ - { 23, "SIGURG", NULL }, /* Urgent condition on socket (4.2 BSD). */ - { 24, "SIGXCPU", NULL }, /* CPU limit exceeded (4.2 BSD). */ - { 25, "SIGXFSZ", NULL }, /* File size limit exceeded (4.2 BSD). */ - { 26, "SIGVTALRM", NULL }, /* Virtual alarm clock (4.2 BSD). */ - { 27, "SIGPROF", NULL }, /* Profiling alarm clock (4.2 BSD). */ - { 28, "SIGWINCH", NULL }, /* Window size change (4.3 BSD, Sun). */ - { 29, "SIGIO", NULL }, /* I/O now possible (4.2 BSD). */ - { 30, "SIGPWR", NULL }, /* Power failure restart (System V). */ - { 31, "SIGUNUSED", NULL }, - { 0, NULL, NULL }, -}; diff --git a/sysdeps/linux/swap.c b/sysdeps/linux/swap.c deleted file mode 100644 index 47637832..00000000 --- a/sysdeps/linux/swap.c +++ /dev/null @@ -1,104 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static unsigned long _glibtop_sysdeps_swap = -(1 << GLIBTOP_SWAP_TOTAL) + (1 << GLIBTOP_SWAP_USED) + -(1 << GLIBTOP_SWAP_FREE); - -static unsigned long _glibtop_sysdeps_swap_paging = -(1 << GLIBTOP_SWAP_PAGEIN) + (1 << GLIBTOP_SWAP_PAGEOUT); - -/* Init function. */ - -void -glibtop_init_swap_s (glibtop *server) -{ - server->sysdeps.swap = _glibtop_sysdeps_swap | - _glibtop_sysdeps_swap_paging; -} - -/* Provides information about swap usage. */ - -#define MEMINFO "/proc/meminfo" -#define PROC_STAT "/proc/stat" - -void -glibtop_get_swap_s (glibtop *server, glibtop_swap *buf) -{ - char buffer [BUFSIZ], *p; - int fd, len; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SWAP, 0); - - memset (buf, 0, sizeof (glibtop_swap)); - - fd = open (MEMINFO, O_RDONLY); - if (fd < 0) - glibtop_error_io_r (server, "open (%s)", MEMINFO); - - len = read (fd, buffer, BUFSIZ-1); - if (len < 0) - glibtop_error_io_r (server, "read (%s)", MEMINFO); - - close (fd); - - buffer [len] = '\0'; - - p = skip_line (buffer); - p = skip_line (p); - p = skip_token (p); /* "Swap:" */ - - buf->total = strtoul (p, &p, 0); - buf->used = strtoul (p, &p, 0); - buf->free = strtoul (p, &p, 0); - - buf->flags = _glibtop_sysdeps_swap; - - fd = open (PROC_STAT, O_RDONLY); - if (fd < 0) - glibtop_error_io_r (server, "open (%s)", PROC_STAT); - - len = read (fd, buffer, BUFSIZ-1); - if (len < 0) - glibtop_error_io_r (server, "read (%s)", PROC_STAT); - - close (fd); - - buffer [len] = '\0'; - - p = strstr (buffer, "\nswap"); - if (p == NULL) return; - - p = skip_token (p); - - buf->pagein = strtoul (p, &p, 0); - buf->pageout = strtoul (p, &p, 0); - - buf->flags |= _glibtop_sysdeps_swap_paging; -} diff --git a/sysdeps/linux/sysinfo.c b/sysdeps/linux/sysinfo.c deleted file mode 100644 index 7112bd3e..00000000 --- a/sysdeps/linux/sysinfo.c +++ /dev/null @@ -1,92 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_sysinfo = -(1 << GLIBTOP_SYSINFO_CPUINFO); - -static glibtop_sysinfo sysinfo; - -static void -init_sysinfo (glibtop *server) -{ - char buffer [BUFSIZ]; - static int init = 0; - glibtop_entry *cpuinfo = NULL; - FILE *f; - - if (init) return; - - init = TRUE; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); - - memset (&sysinfo, 0, sizeof (glibtop_sysinfo)); - - g_return_if_fail (f = fopen ("/proc/cpuinfo", "r")); - - while (fgets (buffer, BUFSIZ, f)) { - char *p, *start, *key, *value; - - if (cpuinfo == NULL) { - cpuinfo = &sysinfo.cpuinfo [sysinfo.ncpu++]; - - cpuinfo->labels = g_ptr_array_new (); - - cpuinfo->values = g_hash_table_new (NULL, NULL); - - if (sysinfo.ncpu > GLIBTOP_NCPU) - sysinfo.ncpu = GLIBTOP_NCPU; - } - - p = strchr (buffer, ':'); - if (!p) continue; - - *p = '\0'; start = p; p++; - while (isspace (*p)) p++; - - while ((start > buffer) && isspace (*start)) - *start-- = '\0'; - - key = g_strdup (buffer); - value = g_strdup (p); - - g_ptr_array_add (cpuinfo->labels, key); - - g_hash_table_insert (cpuinfo->values, key, value); - } - - fclose (f); - - sysinfo.flags = _glibtop_sysdeps_sysinfo; -} - -glibtop_sysinfo * -glibtop_get_sysinfo_s (glibtop *server) -{ - init_sysinfo (server); - return &sysinfo; -} diff --git a/sysdeps/linux/uptime.c b/sysdeps/linux/uptime.c deleted file mode 100644 index eab840ae..00000000 --- a/sysdeps/linux/uptime.c +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static unsigned long _glibtop_sysdeps_uptime = -(1 << GLIBTOP_UPTIME_UPTIME) + (1 << GLIBTOP_UPTIME_IDLETIME); - -/* Init function. */ - -void -glibtop_init_uptime_s (glibtop *server) -{ - server->sysdeps.uptime = _glibtop_sysdeps_uptime; -} - -/* Provides uptime and idle time. */ - -#define FILENAME "/proc/uptime" - -void -glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf) -{ - char buffer [BUFSIZ], *p; - int fd, len; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_UPTIME, 0); - - memset (buf, 0, sizeof (glibtop_uptime)); - - fd = open (FILENAME, O_RDONLY); - if (fd < 0) - glibtop_error_io_r (server, "open (%s)", FILENAME); - - len = read (fd, buffer, BUFSIZ-1); - if (len < 0) - glibtop_error_io_r (server, "read (%s)", FILENAME); - - close (fd); - - buffer [len] = '\0'; - - buf->uptime = (float) strtod (buffer, &p); - buf->idletime = (float) strtod (p, &p); - - buf->flags = _glibtop_sysdeps_uptime; -} diff --git a/sysdeps/names/.cvsignore b/sysdeps/names/.cvsignore deleted file mode 100644 index 09e653d5..00000000 --- a/sysdeps/names/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -libgtop_names.la -so_locations -*.lo diff --git a/sysdeps/names/Makefile.am b/sysdeps/names/Makefile.am deleted file mode 100644 index b8b04ed6..00000000 --- a/sysdeps/names/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop_names.la - -libgtop_names_la_SOURCES = cpu.c mem.c swap.c uptime.c loadavg.c \ - shm_limits.c msg_limits.c sem_limits.c \ - proclist.c sysdeps.c procstate.c procuid.c \ - proctime.c procmem.c procsignal.c \ - prockernel.c procsegment.c fsusage.c \ - mountlist.c procargs.c procmap.c netload.c \ - ppp.c - -libgtop_names_la_LDFLAGS = $(LT_VERSION_INFO) - diff --git a/sysdeps/names/cpu.c b/sysdeps/names/cpu.c deleted file mode 100644 index dcb274f9..00000000 --- a/sysdeps/names/cpu.c +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_cpu [GLIBTOP_MAX_CPU] = -{ - "total", "user", "nice", "sys", "idle", "frequency", - "xcpu_total", "xcpu_user", "xcpu_nice", "xcpu_sys", - "xcpu_idle" -}; - -const unsigned glibtop_types_cpu [GLIBTOP_MAX_CPU] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_cpu [GLIBTOP_MAX_CPU] = -{ - N_("Total CPU Time"), - N_("CPU Time in User Mode"), - N_("CPU Time in User Mode (nice)"), - N_("CPU Time in System Mode"), - N_("CPU Time in the Idle Task"), - N_("Tick Frequency"), - N_("SMP Total CPU Time"), - N_("SMP CPU Time in User Mode"), - N_("SMP CPU Time in User Mode (nice)"), - N_("SMP CPU Time in System Mode"), - N_("SMP CPU Time in the Idle Task") -}; - -const char *glibtop_descriptions_cpu [GLIBTOP_MAX_CPU] = -{ - N_("Number of clock ticks since system boot"), - N_("Number of clock ticks the system spent in user mode"), - N_("Number of clock ticks the system spent in user mode (nice)"), - N_("Number of clock ticks the system spent in system mode"), - N_("Number of clock ticks the system spent in the idle task"), - N_("Tick frequency (default is 100)"), - N_("Number of clock ticks since system boot"), - N_("Number of clock ticks the system spent in user mode"), - N_("Number of clock ticks the system spent in user mode (nice)"), - N_("Number of clock ticks the system spent in system mode"), - N_("Number of clock ticks the system spent in the idle task"), -}; diff --git a/sysdeps/names/fsusage.c b/sysdeps/names/fsusage.c deleted file mode 100644 index 48bd491a..00000000 --- a/sysdeps/names/fsusage.c +++ /dev/null @@ -1,53 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_fsusage [GLIBTOP_MAX_FSUSAGE] = -{ - "blocks", "bfree", "bavail", "files", "ffree" -}; - -const unsigned glibtop_types_fsusage [GLIBTOP_MAX_FSUSAGE] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_fsusage [GLIBTOP_MAX_FSUSAGE] = -{ - N_("Total blocks"), - N_("Free blocks"), - N_("Available blocks"), - N_("Total file nodes"), - N_("Free file nodes") -}; - -const char *glibtop_descriptions_fsusage [GLIBTOP_MAX_FSUSAGE] = -{ - N_("Total blocks"), - N_("Free blocks available to the superuser"), - N_("Free blocks available to non-superusers"), - N_("Total file nodes"), - N_("Free file nodes") -}; diff --git a/sysdeps/names/loadavg.c b/sysdeps/names/loadavg.c deleted file mode 100644 index ec6cbdc2..00000000 --- a/sysdeps/names/loadavg.c +++ /dev/null @@ -1,51 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_loadavg [GLIBTOP_MAX_LOADAVG] = -{ - "loadavg", "nr_running", "nr_tasks", "last_pid" -}; - -const unsigned glibtop_types_loadavg [GLIBTOP_MAX_LOADAVG] = -{ - GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_loadavg [GLIBTOP_MAX_LOADAVG] = -{ - N_("Load Average"), - N_("Running Tasks"), - N_("Number of Tasks"), - N_("Last PID") -}; - -const char *glibtop_descriptions_loadavg [GLIBTOP_MAX_LOADAVG] = -{ - N_("Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"), - N_("Number of tasks currently running"), - N_("Total number of tasks"), - N_("Last PID") -}; diff --git a/sysdeps/names/mem.c b/sysdeps/names/mem.c deleted file mode 100644 index 44dbcd64..00000000 --- a/sysdeps/names/mem.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_mem [GLIBTOP_MAX_MEM] = -{ - "total", "used", "free", "shared", "buffer", - "cached", "user", "locked" -}; - -const unsigned glibtop_types_mem [GLIBTOP_MAX_MEM] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_mem [GLIBTOP_MAX_MEM] = -{ - N_("Total Memory"), - N_("Used Memory"), - N_("Free Memory"), - N_("Shared Memory"), - N_("Buffers"), - N_("Cached"), - N_("User"), - N_("Locked"), -}; - -const char *glibtop_descriptions_mem [GLIBTOP_MAX_MEM] = -{ - N_("Total physical memory in kB"), - N_("Used memory size in kB"), - N_("Free memory size in kB"), - N_("Shared memory size in kB"), - N_("Size of buffers kB"), - N_("Size of cached memory in kB"), - N_("Memory used from user processes in kB"), - N_("Memory in locked pages in kB") -}; diff --git a/sysdeps/names/mountlist.c b/sysdeps/names/mountlist.c deleted file mode 100644 index 5f555ee8..00000000 --- a/sysdeps/names/mountlist.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_mountlist [GLIBTOP_MAX_MOUNTLIST] = -{ - "number", "total", "size" -}; - -const unsigned glibtop_types_mountlist [GLIBTOP_MAX_MOUNTLIST] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_mountlist [GLIBTOP_MAX_MOUNTLIST] = -{ - N_("Number of list elements"), - N_("Total size of list"), - N_("Size of a single list element") -}; - -const char *glibtop_descriptions_mountlist [GLIBTOP_MAX_MOUNTLIST] = -{ - N_("Number of list elements"), - N_("Total size of list"), - N_("Size of a single list element") -}; diff --git a/sysdeps/names/msg_limits.c b/sysdeps/names/msg_limits.c deleted file mode 100644 index 585a68d6..00000000 --- a/sysdeps/names/msg_limits.c +++ /dev/null @@ -1,58 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_msg_limits [GLIBTOP_MAX_MSG_LIMITS] = -{ - "msgpool", "msgmap", "msgmax", "msgmnb", "msgmni", "msgssz", "msgtql" -}; - -const unsigned glibtop_types_msg_limits [GLIBTOP_MAX_MSG_LIMITS] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_msg_limits [GLIBTOP_MAX_MSG_LIMITS] = -{ - N_("Size in kilobytes of message pool"), - N_("Number of entries in message map"), - N_("Max size of message"), - N_("Default max size of queue"), - N_("Max queues system wide"), - N_("Message segment size"), - N_("Number of system message headers") -}; - -const char *glibtop_descriptions_msg_limits [GLIBTOP_MAX_MSG_LIMITS] = -{ - N_("Size in kilobytes of message pool"), - N_("Number of entries in message map"), - N_("Max size of message"), - N_("Default max size of queue"), - N_("Max queues system wide"), - N_("Message segment size"), - N_("Number of system message headers") -}; diff --git a/sysdeps/names/netload.c b/sysdeps/names/netload.c deleted file mode 100644 index 5e23fac1..00000000 --- a/sysdeps/names/netload.c +++ /dev/null @@ -1,77 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_netload [GLIBTOP_MAX_NETLOAD] = -{ - "if_flags", "mtu", "subnet", "address", "packets_in", - "packets_out", "packets_total", "bytes_in", "bytes_out", - "bytes_total", "errors_in", "errors_out", "errors_total", - "collisions" -}; - -const unsigned glibtop_types_netload [GLIBTOP_MAX_NETLOAD] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_netload [GLIBTOP_MAX_NETLOAD] = -{ - N_("Interface Flags"), - N_("MTU"), - N_("Subnet"), - N_("Address"), - N_("Packets In"), - N_("Packets Out"), - N_("Packets Total"), - N_("Bytes In"), - N_("Bytes Out"), - N_("Bytes Total"), - N_("Errors In"), - N_("Errors Out"), - N_("Errors Total"), - N_("Collisions") -}; - -const char *glibtop_descriptions_netload [GLIBTOP_MAX_NETLOAD] = -{ - N_("Interface Flags"), - N_("Maximum Transfer Unit"), - N_("Subnet"), - N_("Address"), - N_("Packets In"), - N_("Packets Out"), - N_("Packets Total"), - N_("Bytes In"), - N_("Bytes Out"), - N_("Bytes Total"), - N_("Errors In"), - N_("Errors Out"), - N_("Errors Total"), - N_("Collisions") -}; diff --git a/sysdeps/names/ppp.c b/sysdeps/names/ppp.c deleted file mode 100644 index 849c5878..00000000 --- a/sysdeps/names/ppp.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_ppp [GLIBTOP_MAX_PPP] = -{ - "state", "bytes_in", "bytes_out" -}; - -const unsigned glibtop_types_ppp [GLIBTOP_MAX_PPP] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_ppp [GLIBTOP_MAX_PPP] = -{ - N_("PPP State"), - N_("Input bytes"), - N_("Output bytes") -}; - -const char *glibtop_descriptions_ppp [GLIBTOP_MAX_PPP] = -{ - N_("PPP State"), - N_("Number of input bytes"), - N_("Number of output bytes") -}; diff --git a/sysdeps/names/procargs.c b/sysdeps/names/procargs.c deleted file mode 100644 index 85610c8f..00000000 --- a/sysdeps/names/procargs.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_proc_args [GLIBTOP_MAX_PROC_ARGS] = -{ - "size" -}; - -const unsigned glibtop_types_proc_args [GLIBTOP_MAX_PROC_ARGS] = -{ - GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_proc_args [GLIBTOP_MAX_PROC_ARGS] = -{ - N_("Size") -}; - -const char *glibtop_descriptions_proc_args [GLIBTOP_MAX_PROC_ARGS] = -{ - N_("Length in bytes of the returned string.") -}; diff --git a/sysdeps/names/prockernel.c b/sysdeps/names/prockernel.c deleted file mode 100644 index 2a78efcc..00000000 --- a/sysdeps/names/prockernel.c +++ /dev/null @@ -1,82 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const char *glibtop_names_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] = -{ - "k_flags", "min_flt", "maj_flt", "cmin_flt", "cmaj_flt", - "kstk_esp", "kstk_eip", "nwchan", "wchan" -}; - -const unsigned glibtop_types_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_STRING -}; - -const char *glibtop_labels_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] = -{ - N_("K_Flags"), N_("Min_Flt"), N_("Maj_Flt"), N_("CMin_Flt"), - N_("CMaj_Flt"), N_("KStk_ESP"), N_("KStk_EIP"), N_("NWChan"), - N_("WChan") -}; - -const char *glibtop_descriptions_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] = -{ - /* K_Flags */ - N_("Kernel flags of the process.\n\n" - "On Linux, currently every flag has the math bit set, because " - "crt0.s checks for math emulation, so this is not included in " - "the output.\n\n" - "This is probably a bug, as not every process is a compiled C " - "program.\n\n" - "The math bit should be a decimal 4, and the traced bit is " - "decimal 10."), - /* Min_Flt */ - N_("The number of minor faults the process has made, those which " - "have not required loading a memory page from disk."), - /* Maj_Flt */ - N_("The number of major faults the process has made, those which " - "have required loading a memory page from disk."), - /* CMin_Flt */ - N_("The number of minor faults that the process and its children " - "have made."), - /* CMaj_Flt */ - N_("The number of major faults that the process and its children " - "have made."), - /* KStk_ESP */ - N_("The current value of esp (32-bit stack pointer), as found in " - "the kernel stack page for the process."), - /* KStk_EIP */ - N_("The current EIP (32-bit instruction pointer)."), - /* NWChan */ - N_("This is the \"channel\" in which the process is waiting. This " - "is the address of a system call, and can be looked up in a " - "namelist if you need a textual name. (If you have an up-to-date " - "/etc/psdatabase, then try ps -l to see the WCHAN field in action)"), - /* WChan */ - N_("This is the textual name of the `nwchan' field.") -}; diff --git a/sysdeps/names/proclist.c b/sysdeps/names/proclist.c deleted file mode 100644 index 274b5251..00000000 --- a/sysdeps/names/proclist.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_proclist [GLIBTOP_MAX_PROCLIST] = -{ - "number", "total", "size" -}; - -const unsigned glibtop_types_proclist [GLIBTOP_MAX_PROCLIST] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_proclist [GLIBTOP_MAX_PROCLIST] = -{ - N_("Number of list elements"), - N_("Total size of list"), - N_("Size of a single list element") -}; - -const char *glibtop_descriptions_proclist [GLIBTOP_MAX_PROCLIST] = -{ - N_("Number of list elements"), - N_("Total size of list"), - N_("Size of a single list element") -}; diff --git a/sysdeps/names/procmap.c b/sysdeps/names/procmap.c deleted file mode 100644 index 8e8e7ed3..00000000 --- a/sysdeps/names/procmap.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_proc_map [GLIBTOP_MAX_PROC_MAP] = -{ - "number", "total", "size" -}; - -const unsigned glibtop_types_proc_map [GLIBTOP_MAX_PROC_MAP] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_proc_map [GLIBTOP_MAX_PROC_MAP] = -{ - N_("Number of list elements"), - N_("Total size of list"), - N_("Size of a single list element") -}; - -const char *glibtop_descriptions_proc_map [GLIBTOP_MAX_PROC_MAP] = -{ - N_("Number of list elements"), - N_("Total size of list"), - N_("Size of a single list element") -}; diff --git a/sysdeps/names/procmem.c b/sysdeps/names/procmem.c deleted file mode 100644 index f4c220bd..00000000 --- a/sysdeps/names/procmem.c +++ /dev/null @@ -1,64 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#define GLIBTOP_PROC_MEM_SIZE 0 -#define GLIBTOP_PROC_MEM_VSIZE 1 -#define GLIBTOP_PROC_MEM_RESIDENT 2 -#define GLIBTOP_PROC_MEM_SHARE 3 -#define GLIBTOP_PROC_MEM_RSS 4 -#define GLIBTOP_PROC_MEM_RSS_RLIM 5 - -const char *glibtop_names_proc_mem [GLIBTOP_MAX_PROC_MEM] = -{ - "size", "vsize", "resident", "share", "rss", "rss_rlim" -}; - -const unsigned glibtop_types_proc_mem [GLIBTOP_MAX_PROC_MEM] = -{ - GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, - GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG -}; - -const char *glibtop_labels_proc_mem [GLIBTOP_MAX_PROC_MEM] = -{ - N_("Size"), N_("Virtual"), N_("Resident"), N_("Share"), - N_("Resident Set Size"), N_("Resident Set Size Limit") -}; - -const char *glibtop_descriptions_proc_mem [GLIBTOP_MAX_PROC_MEM] = -{ - N_("Total # of pages of memory"), - N_("Number of pages of virtual memory"), - N_("Number of residnet set (non-swapped) pages"), - N_("Number of pages of shared (mmap'd) memory"), - N_("Number of pages the process has in real memory, minus 3 " - "for administrative purposes. This is just the pages which " - "count towards text, data, or stack space. This does not " - "include pages which have not been demand-loaded in, or which " - "are swapped out."), - N_("Current limit in bytes on the rss of the process " - "(usually 2,147,483,647).") -}; diff --git a/sysdeps/names/procsegment.c b/sysdeps/names/procsegment.c deleted file mode 100644 index bcb5c329..00000000 --- a/sysdeps/names/procsegment.c +++ /dev/null @@ -1,56 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const char *glibtop_names_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] = -{ - "text_rss", "shlib_rss", "data_rss", "stack_rss", - "dirty_size", "start_code", "end_code", "start_stack" -}; - -const unsigned glibtop_types_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] = -{ - N_("Text_RSS"), N_("ShLib_RSS"), N_("Data_RSS"), N_("Stack_RSS"), - N_("Dirty Size"), N_("Start_Code"), N_("End_Code"), N_("Start_Stack") -}; - -const char *glibtop_descriptions_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] = -{ - N_("Text resident set size"), - N_("Shared-Lib resident set size"), - N_("Data resident set size"), - N_("Stack resident set size"), - N_("Total size of dirty pages"), - N_("Address of beginning of code segment"), - N_("Address of end of code segment"), - N_("Address of the bottom of stack segment") -}; diff --git a/sysdeps/names/procsignal.c b/sysdeps/names/procsignal.c deleted file mode 100644 index d6806db1..00000000 --- a/sysdeps/names/procsignal.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const char *glibtop_names_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] = -{ - "signal", "blocked", "sigignore", "sigcatch" -}; - -const unsigned glibtop_types_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] = -{ - GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, - GLIBTOP_TYPE_INT -}; - -const char *glibtop_labels_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] = -{ - N_("Signal"), N_("Blocked"), N_("SigIgnore"), N_("SigCatch") -}; - -const char *glibtop_descriptions_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] = -{ - N_("Mask of pending signals"), - N_("Mask of blocked signals"), - N_("Mask of ignored signals"), - N_("Mask of caught signals") -}; diff --git a/sysdeps/names/procstate.c b/sysdeps/names/procstate.c deleted file mode 100644 index 057a00f2..00000000 --- a/sysdeps/names/procstate.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const char *glibtop_names_proc_state [GLIBTOP_MAX_PROC_STATE] = -{ - "cmd", "state", "uid", "gid" -}; - -const unsigned glibtop_types_proc_state [GLIBTOP_MAX_PROC_STATE] = -{ - GLIBTOP_TYPE_STRING, GLIBTOP_TYPE_CHAR, - GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT -}; - -const char *glibtop_labels_proc_state [GLIBTOP_MAX_PROC_STATE] = -{ - N_("Cmd"), N_("State"), N_("UID"), N_("GID") -}; - -const char *glibtop_descriptions_proc_state [GLIBTOP_MAX_PROC_STATE] = -{ - N_("Basename of executable file in call to exec()"), - N_("Single-Char code for process state (S=sleeping)"), - N_("UID of process"), - N_("GID of process") -}; diff --git a/sysdeps/names/proctime.c b/sysdeps/names/proctime.c deleted file mode 100644 index 33456e50..00000000 --- a/sysdeps/names/proctime.c +++ /dev/null @@ -1,65 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const char *glibtop_names_proc_time [GLIBTOP_MAX_PROC_TIME] = -{ - "start_time", "rtime", "utime", "stime", "cutime", "cstime", - "timeout", "it_real_value", "timeout", "xcpu_utime", - "xcpu_stime" -}; - -const unsigned glibtop_types_proc_time [GLIBTOP_MAX_PROC_TIME] = -{ - GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, - GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, - GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG, - GLIBTOP_TYPE_LONG, GLIBTOP_TYPE_LONG -}; - -const char *glibtop_labels_proc_time [GLIBTOP_MAX_PROC_TIME] = -{ - N_("Start_Time"), N_("RTime"), N_("UTime"), N_("STime"), - N_("CUTime"), N_("CSTime"), N_("TimeOut"), N_("It_Real_Value"), - N_("Frequency"), N_("XCPU_UTime"), N_("XCPU_STime") -}; - -const char *glibtop_descriptions_proc_time [GLIBTOP_MAX_PROC_TIME] = -{ - N_("Start time of process in seconds since the epoch"), - N_("Real time accumulated by process (should be utime + stime)"), - N_("user-mode CPU time accumulated by process"), - N_("kernel-mode CPU time accumulated by process"), - N_("cumulative utime of process and reaped children"), - N_("cumulative stime of process and reaped children"), - N_("The time (in jiffies) of the process's next timeout"), - N_("The time (in jiffies) before the next SIGALRM is sent " - "to the process due to an interval timer."), - N_("Tick frequency"), - N_("SMP user-mode CPU time accumulated by process"), - N_("SMP kernel-mode CPU time accumulated by process") -}; - - diff --git a/sysdeps/names/procuid.c b/sysdeps/names/procuid.c deleted file mode 100644 index 1caa8c64..00000000 --- a/sysdeps/names/procuid.c +++ /dev/null @@ -1,75 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#define GLIBTOP_PROC_UID_UID 0 -#define GLIBTOP_PROC_UID_EUID 1 -#define GLIBTOP_PROC_UID_GID 2 -#define GLIBTOP_PROC_UID_EGID 3 -#define GLIBTOP_PROC_UID_PID 4 -#define GLIBTOP_PROC_UID_PPID 5 -#define GLIBTOP_PROC_UID_PGRP 6 -#define GLIBTOP_PROC_UID_SESSION 7 -#define GLIBTOP_PROC_UID_TTY 8 -#define GLIBTOP_PROC_UID_TPGID 9 -#define GLIBTOP_PROC_UID_PRIORITY 10 -#define GLIBTOP_PROC_UID_NICE 11 - -const char *glibtop_names_proc_uid [GLIBTOP_MAX_PROC_UID] = -{ - "uid", "euid", "gid", "egid", "pid", "ppid", "pgrp", - "session", "tty", "tpgid", "priority", "nice" -}; - -const unsigned glibtop_types_proc_uid [GLIBTOP_MAX_PROC_UID] = -{ - GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, - GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, - GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, - GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT, GLIBTOP_TYPE_INT -}; - -const char *glibtop_labels_proc_uid [GLIBTOP_MAX_PROC_UID] = -{ - N_("Uid"), N_("EUid"), N_("Gid"), N_("EGid"), N_("Pid"), - N_("PPid"), N_("PGrp"), N_("Session"), N_("Tty"), - N_("TPGid"), N_("Priority"), N_("Nice") -}; - -const char *glibtop_descriptions_proc_uid [GLIBTOP_MAX_PROC_UID] = -{ - N_("User ID"), - N_("Effective User ID"), - N_("Group ID"), - N_("Effective Group ID"), - N_("Process ID"), - N_("PID of parent process"), - N_("Process group ID"), - N_("Session ID"), - N_("Full device number of controlling terminal"), - N_("Terminal process group ID"), - N_("Kernel scheduling priority"), - N_("Standard unix nice level of process") -}; diff --git a/sysdeps/names/sem_limits.c b/sysdeps/names/sem_limits.c deleted file mode 100644 index 1c337cd6..00000000 --- a/sysdeps/names/sem_limits.c +++ /dev/null @@ -1,66 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_sem_limits [GLIBTOP_MAX_SEM_LIMITS] = -{ - "semmap", "semmni", "semmns", "semmnu", "semmsl", - "semopm", "semume", "semusz", "semvmx", "semaem" -}; - -const unsigned glibtop_types_sem_limits [GLIBTOP_MAX_SEM_LIMITS] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_sem_limits [GLIBTOP_MAX_SEM_LIMITS] = -{ - N_("Number of entries in semaphore map"), - N_("Max number of arrays"), - N_("Max semaphores system wide"), - N_("Number of undo structures system wide"), - N_("Max semaphores per array"), - N_("Max ops per semop call"), - N_("Max number of undo entries per process"), - N_("sizeof struct sem_undo"), - N_("Semaphore max value"), - N_("Adjust on exit max value") -}; - -const char *glibtop_descriptions_sem_limits [GLIBTOP_MAX_SEM_LIMITS] = -{ - N_("Number of entries in semaphore map"), - N_("Max number of arrays"), - N_("Max semaphores system wide"), - N_("Number of undo structures system wide"), - N_("Max semaphores per array"), - N_("Max ops per semop call"), - N_("Max number of undo entries per process"), - N_("sizeof struct sem_undo"), - N_("Semaphore max value"), - N_("Adjust on exit max value") -}; diff --git a/sysdeps/names/shm_limits.c b/sysdeps/names/shm_limits.c deleted file mode 100644 index d0b42d71..00000000 --- a/sysdeps/names/shm_limits.c +++ /dev/null @@ -1,53 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_shm_limits [GLIBTOP_MAX_SHM_LIMITS] = -{ - "shmmax", "shmmin", "shmmni", "shmseg", "shmall" -}; - -const unsigned glibtop_types_shm_limits [GLIBTOP_MAX_SHM_LIMITS] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_shm_limits [GLIBTOP_MAX_SHM_LIMITS] = -{ - N_("Max segment size"), - N_("Min segment size"), - N_("Max number of segments"), - N_("Max shared segments per process"), - N_("Max total shared memory") -}; - -const char *glibtop_descriptions_shm_limits [GLIBTOP_MAX_SHM_LIMITS] = -{ - N_("Max segment size"), - N_("Min segment size"), - N_("Max number of segments"), - N_("Max shared segments per process"), - N_("Max total shared memory") -}; diff --git a/sysdeps/names/swap.c b/sysdeps/names/swap.c deleted file mode 100644 index 29319ce1..00000000 --- a/sysdeps/names/swap.c +++ /dev/null @@ -1,55 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_swap [GLIBTOP_MAX_SWAP] = -{ - "total", "used", "free", "pagein", "pageout" -}; - -const unsigned glibtop_types_swap [GLIBTOP_MAX_SWAP] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_swap [GLIBTOP_MAX_SWAP] = -{ - N_("Total Swap Space"), - N_("Used Swap Space"), - N_("Free Swap Space"), - N_("Page In"), - N_("Page Out"), -}; - -const char *glibtop_descriptions_swap [GLIBTOP_MAX_SWAP] = -{ - N_("Total Swap Space"), - N_("Used Swap Space"), - N_("Free Swap Space"), - N_("Total number of swap pages that have been brought in " - "since system boot"), - N_("Total number of swap pages that have been brought out " - "since system boot"), -}; diff --git a/sysdeps/names/sysdeps.c b/sysdeps/names/sysdeps.c deleted file mode 100644 index 36e8b749..00000000 --- a/sysdeps/names/sysdeps.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -const char *glibtop_names_sysdeps [GLIBTOP_MAX_SYSDEPS] = -{ - "features", "cpu", "mem", "swap", "uptime", "loadavg", - "shm_limits", "msg_limits", "sem_limits", "proclist", - "proc_state", "proc_uid", "proc_mem", "proc_time", - "proc_signal", "proc_kernel", "proc_segment", "proc_args", - "proc_map", "mountlist", "fsusage", "netload", "ppp" -}; - -const unsigned glibtop_types_sysdeps [GLIBTOP_MAX_SYSDEPS] = -{ - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, - GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG -}; - -const char *glibtop_labels_sysdeps [GLIBTOP_MAX_SYSDEPS] = -{ - N_("Server Features"), - N_("CPU Usage"), - N_("Memory Usage"), - N_("Swap Usage"), - N_("System Uptime"), - N_("Load Averange"), - N_("Shared Memory Limits"), - N_("Message Queue Limits"), - N_("Semaphore Set Limits"), - N_("List of running Processes"), - N_("Process Status information"), - N_("Process UID and TTY information"), - N_("Process Memory information"), - N_("Process Time information"), - N_("Process Signal information"), - N_("Process Kernel Data information"), - N_("Process Segment information"), - N_("Process Arguments"), - N_("Process Memory Map"), - N_("Mount List"), - N_("File System Usage"), - N_("Network Load"), - N_("PPP Statistics") -}; - -const char *glibtop_descriptions_sysdeps [GLIBTOP_MAX_SYSDEPS] = -{ - N_("Server Features"), - N_("CPU Usage"), - N_("Memory Usage"), - N_("Swap Usage"), - N_("System Uptime"), - N_("Load Averange"), - N_("Shared Memory Limits"), - N_("Message Queue Limits"), - N_("Semaphore Set Limits"), - N_("List of running Processes"), - N_("Process Status information"), - N_("Process UID and TTY information"), - N_("Process Memory information"), - N_("Process Time information"), - N_("Process Signal information"), - N_("Process Kernel Data information"), - N_("Process Segment information"), - N_("Command line arguments of the process"), - N_("Process Memory Map"), - N_("List of currently mounted filesystems"), - N_("File System Usage"), - N_("Network Load"), - N_("PPP Statistics") -}; diff --git a/sysdeps/names/uptime.c b/sysdeps/names/uptime.c deleted file mode 100644 index e4e728f7..00000000 --- a/sysdeps/names/uptime.c +++ /dev/null @@ -1,46 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -const char *glibtop_names_uptime [GLIBTOP_MAX_UPTIME] = -{ - "uptime", "idletime" -}; - -const unsigned glibtop_types_uptime [GLIBTOP_MAX_UPTIME] = -{ - GLIBTOP_TYPE_DOUBLE, GLIBTOP_TYPE_DOUBLE -}; - -const char *glibtop_labels_uptime [GLIBTOP_MAX_UPTIME] = -{ - N_("Uptime"), - N_("Idletime") -}; - -const char *glibtop_descriptions_uptime [GLIBTOP_MAX_UPTIME] = -{ - N_("Time in seconds since system boot"), - N_("Time in seconds the system spent in the idle task since system boot") -}; diff --git a/sysdeps/osf1/.cvsignore b/sysdeps/osf1/.cvsignore deleted file mode 100644 index ee69efbb..00000000 --- a/sysdeps/osf1/.cvsignore +++ /dev/null @@ -1,21 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -close.lo -cpu.lo -libgtop_sysdeps.la -libsysdeps.la -loadavg.lo -mem.lo -msg_limits.lo -open.lo -proclist.lo -sem_limits.lo -shm_limits.lo -swap.lo -sysdeps.lo -uptime.lo -so_locations -*.lo -*.la diff --git a/sysdeps/osf1/ChangeLog b/sysdeps/osf1/ChangeLog deleted file mode 100644 index 8a2b0dd8..00000000 --- a/sysdeps/osf1/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -1999-02-19 Martin Baulig - - * procmap.c, procargs.c, netload.c: Copied from stub_suid. - - * proclist.c, procsegment.c: Make them compile again. - -1998-10-25 Martin Baulig - - * ChangeLog: New file. - * ppp.c: New file. - diff --git a/sysdeps/osf1/Makefile.am b/sysdeps/osf1/Makefile.am deleted file mode 100644 index 47bfd92a..00000000 --- a/sysdeps/osf1/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.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 ppp.c -libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) -libgtop_sysdeps_la_LIBADD = -lmach - -libgtop_sysdeps_suid_la_SOURCES = open_suid.c close_suid.c proclist.c \ - procstate.c procuid.c proctime.c procmem.c \ - procsignal.c prockernel.c procsegment.c \ - procmap.c procargs.c netload.c -libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO) -libgtop_sysdeps_suid_la_LIBADD = -lmach - -include_HEADERS = glibtop_server.h glibtop_machine.h - -noinst_HEADERS = glibtop_suid.h diff --git a/sysdeps/osf1/close.c b/sysdeps/osf1/close.c deleted file mode 100644 index 4262d2f0..00000000 --- a/sysdeps/osf1/close.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Closes pipe to gtop server. */ - -void -glibtop_close_s (glibtop *server) -{ } diff --git a/sysdeps/osf1/close_suid.c b/sysdeps/osf1/close_suid.c deleted file mode 100644 index a8733f0f..00000000 --- a/sysdeps/osf1/close_suid.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Closes pipe to gtop server. */ - -void -glibtop_close_p (glibtop *server) -{ } diff --git a/sysdeps/osf1/cpu.c b/sysdeps/osf1/cpu.c deleted file mode 100644 index bb1dacf1..00000000 --- a/sysdeps/osf1/cpu.c +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_cpu = -(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) + -(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) + -(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY); - -/* 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) -{ - struct tbl_sysinfo sysinfo; - int ret; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); - - memset (buf, 0, sizeof (glibtop_cpu)); - - ret = table (TBL_SYSINFO, 0, (char *) &sysinfo, 1, - sizeof (struct tbl_sysinfo)); - - if (ret != 1) return; - - buf->flags = _glibtop_sysdeps_cpu; - - buf->user = sysinfo.si_user; - buf->nice = sysinfo.si_nice; - buf->sys = sysinfo.si_sys; - buf->idle = sysinfo.si_idle; - - buf->total = sysinfo.si_user + sysinfo.si_nice + - sysinfo.si_sys + sysinfo.si_idle; - - buf->frequency = sysinfo.si_hz; -} diff --git a/sysdeps/osf1/glibtop_machine.h b/sysdeps/osf1/glibtop_machine.h deleted file mode 100644 index a4424818..00000000 --- a/sysdeps/osf1/glibtop_machine.h +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_MACHINE_H__ -#define __GLIBTOP_MACHINE_H__ - -#include - -/* The following are defined in . */ - -#undef sys -#undef user -#undef idle - -BEGIN_LIBGTOP_DECLS - -int table (int id, int index, char *addr, int nel, u_int lel); - -typedef struct _glibtop_machine glibtop_machine; - -struct _glibtop_machine -{ - uid_t uid, euid; /* Real and effective user id */ - gid_t gid, egid; /* Real and effective group id */ - unsigned proctable_entries; /* Max entries in the proctable */ -}; - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/osf1/glibtop_server.h b/sysdeps/osf1/glibtop_server.h deleted file mode 100644 index 47d69199..00000000 --- a/sysdeps/osf1/glibtop_server.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 (1 << GLIBTOP_SYSDEPS_PROCLIST) -#define GLIBTOP_SUID_PROC_STATE (1 << GLIBTOP_SYSDEPS_PROC_STATE) -#define GLIBTOP_SUID_PROC_UID (1 << GLIBTOP_SYSDEPS_PROC_UID) -#define GLIBTOP_SUID_PROC_MEM (1 << GLIBTOP_SYSDEPS_PROC_MEM) -#define GLIBTOP_SUID_PROC_TIME (1 << GLIBTOP_SYSDEPS_PROC_TIME) -#define GLIBTOP_SUID_PROC_SIGNAL (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL) -#define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL) -#define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) -#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP) -#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS) -#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD) -#define GLIBTOP_SUID_PPP 0 - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/osf1/glibtop_suid.h b/sysdeps/osf1/glibtop_suid.h deleted file mode 100644 index a83fd3cc..00000000 --- a/sysdeps/osf1/glibtop_suid.h +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_SUID_H__ -#define __GLIBTOP_SUID_H__ - -#include - -BEGIN_LIBGTOP_DECLS - -static inline void glibtop_suid_enter (glibtop *server) { - setreuid (server->machine.uid, server->machine.euid); -}; - -static inline void glibtop_suid_leave (glibtop *server) { - if (setreuid (server->machine.euid, server->machine.uid)) - _exit (1); -}; - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags); -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, - const unsigned flags); - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/osf1/loadavg.c b/sysdeps/osf1/loadavg.c deleted file mode 100644 index 5dd7f56f..00000000 --- a/sysdeps/osf1/loadavg.c +++ /dev/null @@ -1,73 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -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) -{ - struct tbl_loadavg loadavg; - int ret; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_LOADAVG, 0); - - memset (buf, 0, sizeof (glibtop_loadavg)); - - ret = table (TBL_LOADAVG, 0, (char *) &loadavg, 1, - sizeof (struct tbl_loadavg)); - - if (ret != 1) return; - - buf->flags = _glibtop_sysdeps_loadavg; - - if (loadavg.tl_lscale == 0) { - buf->loadavg [0] = loadavg.tl_avenrun.d [0]; - buf->loadavg [1] = loadavg.tl_avenrun.d [1]; - buf->loadavg [2] = loadavg.tl_avenrun.d [2]; - } else { - buf->loadavg [0] = - (double) loadavg.tl_avenrun.l [0] / - (double) loadavg.tl_mach_factor [0]; - buf->loadavg [1] = - (double) loadavg.tl_avenrun.l [1] - / (double) loadavg.tl_mach_factor [1]; - buf->loadavg [2] = - (double) loadavg.tl_avenrun.l [2] / - (double) loadavg.tl_mach_factor [2]; - } -} diff --git a/sysdeps/osf1/mem.c b/sysdeps/osf1/mem.c deleted file mode 100644 index 156f0b60..00000000 --- a/sysdeps/osf1/mem.c +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_mem = -(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) + -(1 << GLIBTOP_MEM_FREE); - -/* 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) -{ - vm_statistics_data_t vmstats; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MEM, 0); - - memset (buf, 0, sizeof (glibtop_mem)); - - buf->flags = _glibtop_sysdeps_mem; - - (void) vm_statistics(task_self(), &vmstats); - - buf->free = vmstats.free_count * vmstats.pagesize; - buf->used = vmstats.active_count * vmstats.pagesize; - - /* [FIXME]: Is this correct? */ - - buf->total = (vmstats.active_count + vmstats.inactive_count + - vmstats.free_count + vmstats.wire_count) * - vmstats.pagesize; -} diff --git a/sysdeps/osf1/msg_limits.c b/sysdeps/osf1/msg_limits.c deleted file mode 100644 index da2ab511..00000000 --- a/sysdeps/osf1/msg_limits.c +++ /dev/null @@ -1,87 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_msg_limits = -(1 << GLIBTOP_IPC_MSGMAP) + (1 << GLIBTOP_IPC_MSGMAX) + -(1 << GLIBTOP_IPC_MSGMNB) + (1 << GLIBTOP_IPC_MSGMNI) + -(1 << GLIBTOP_IPC_MSGTQL); - -/* 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) -{ - int ret, value; - - glibtop_init_s (&server, 0, 0); - - memset (buf, 0, sizeof (glibtop_msg_limits)); - - ret = table (TBL_MSGINFO, MSGINFO_MAX, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_MSGMAX); - - buf->msgmax = value; - - ret = table (TBL_MSGINFO, MSGINFO_MNB, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_MSGMNB); - - buf->msgmnb = value; - - ret = table (TBL_MSGINFO, MSGINFO_MNI, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_MSGMNI); - - buf->msgmni = value; - - ret = table (TBL_MSGINFO, MSGINFO_TQL, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_MSGTQL); - - buf->msgtql = value; -} diff --git a/sysdeps/osf1/netload.c b/sysdeps/osf1/netload.c deleted file mode 100644 index bb1226ed..00000000 --- a/sysdeps/osf1/netload.c +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_netload = 0; - -/* Init function. */ - -void -glibtop_init_netload_p (glibtop *server) -{ - server->sysdeps.netload = _glibtop_sysdeps_netload; -} - -/* Provides Network statistics. */ - -void -glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, - const char *interface) -{ - memset (buf, 0, sizeof (glibtop_netload)); -} diff --git a/sysdeps/osf1/open.c b/sysdeps/osf1/open.c deleted file mode 100644 index 645e22d8..00000000 --- a/sysdeps/osf1/open.c +++ /dev/null @@ -1,35 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include -#include - -/* 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) -{ } diff --git a/sysdeps/osf1/open_suid.c b/sysdeps/osf1/open_suid.c deleted file mode 100644 index d593556a..00000000 --- a/sysdeps/osf1/open_suid.c +++ /dev/null @@ -1,91 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -#include -#include - -/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags) -{ - glibtop_init_func_t *init_fkt; - - if (server == NULL) - glibtop_error_r (NULL, "glibtop_init_p (server == NULL)"); - - /* Do the initialization, but only if not already initialized. */ - - if ((server->flags & _GLIBTOP_INIT_STATE_INIT) == 0) { - glibtop_open_p (server, "glibtop", features, flags); - - for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++) - (*init_fkt) (server); - - server->flags |= _GLIBTOP_INIT_STATE_INIT; - } -} - -/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) -{ - /* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */ - - server->name = program_name; - - server->machine.uid = getuid (); - server->machine.euid = geteuid (); - server->machine.gid = getgid (); - server->machine.egid = getegid (); - - server->machine.proctable_entries = table - (TBL_PROCINFO, 0, NULL, INT_MAX, 0); - - /* Drop priviledges; we only become root when necessary. - - setreuid (ruid, euid) - set real and effective user id; - setregid (rgid, egid) - set real and effective group id; - - */ - - if (setreuid (server->machine.euid, server->machine.uid)) - _exit (1); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SUID ROOT PART !!! */ - - /* Our effective uid is now those of the user invoking the server, - so we do no longer have any priviledges. - */ -} diff --git a/sysdeps/osf1/ppp.c b/sysdeps/osf1/ppp.c deleted file mode 100644 index 6d0905d5..00000000 --- a/sysdeps/osf1/ppp.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -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)); -} diff --git a/sysdeps/osf1/procargs.c b/sysdeps/osf1/procargs.c deleted file mode 100644 index 67c183e8..00000000 --- a/sysdeps/osf1/procargs.c +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_args = 0; - -/* Init function. */ - -void -glibtop_init_proc_args_p (glibtop *server) -{ - server->sysdeps.proc_args = _glibtop_sysdeps_proc_args; -} - -/* Provides detailed information about a process. */ - -char * -glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf, - pid_t pid, unsigned max_len) -{ - memset (buf, 0, sizeof (glibtop_proc_args)); - return NULL; -} diff --git a/sysdeps/osf1/procdata.c b/sysdeps/osf1/procdata.c deleted file mode 100644 index 24fc2ae5..00000000 --- a/sysdeps/osf1/procdata.c +++ /dev/null @@ -1,150 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include -#include -#include - -#include -#include -#include - -/* Provides detailed information about a process. */ - -#define BIT_SHIFT(x) (1 << (x % 32)) - -static const unsigned long _glibtop_sysdeps_procdata_0 = -BIT_SHIFT(GLIBTOP_PROCDATA_CMD) + -BIT_SHIFT(GLIBTOP_PROCDATA_STATE) + -BIT_SHIFT(GLIBTOP_PROCDATA_UID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PPID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PGRP) + -BIT_SHIFT(GLIBTOP_PROCDATA_TTY) + -BIT_SHIFT(GLIBTOP_PROCDATA_K_FLAGS) + -BIT_SHIFT(GLIBTOP_PROCDATA_SESSION) + -BIT_SHIFT(GLIBTOP_PROCDATA_TPGID) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGIGNORE) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGCATCH) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGNAL) + -BIT_SHIFT(GLIBTOP_PROCDATA_NICE); - -static const unsigned long _glibtop_sysdeps_procdata_1 = 0; - -void -glibtop_get_procdata_r (glibtop *server, glibtop_procdata *buf, pid_t pid) -{ - struct tbl_procinfo procinfo; - task_basic_info_data_t taskinfo; - struct user u; - task_t thistask; - int ret, info_count; - - memset (buf, 0, sizeof (glibtop_procdata)); - - glibtop_init (); - - memset (buf, 0, sizeof (glibtop_procdata)); - - ret = table (TBL_PROCINFO, pid, (char *) &procinfo, 1, - sizeof (struct tbl_procinfo)); - - if (ret != 1) return; - - strcpy (buf->cmd, procinfo.pi_comm); - - buf->uid = procinfo.pi_uid; - buf->pid = procinfo.pi_pid; - buf->ppid = procinfo.pi_ppid; - buf->pgrp = procinfo.pi_pgrp; - buf->tty = procinfo.pi_ttyd; - buf->k_flags = procinfo.pi_flag; - buf->session = procinfo.pi_session; - buf->tpgid = procinfo.pi_tpgrp; - buf->sigignore = procinfo.pi_sigignore; - buf->sigcatch = procinfo.pi_sigcatch; - buf->signal = procinfo.pi_sig; - - buf->flags [0] += _glibtop_sysdeps_procdata_0; - - if (procinfo.pi_status != PI_ACTIVE) return; - - /* From that point on, we are only interested in active processes. */ - - buf->nice = getpriority (PRIO_PROCESS, pid); - - /* Get task structure. */ - - ret = task_by_unix_pid (task_self(), procinfo.pi_pid, &thistask); - - if (ret != KERN_SUCCESS) return; - - /* Get taskinfo about this task. */ - - info_count = TASK_BASIC_INFO_COUNT; - - ret = task_info (thistask, TASK_BASIC_INFO, (task_info_t) &taskinfo, &info_count); - - if (ret != KERN_SUCCESS) return; - - buf->priority = taskinfo.base_priority; - buf->resident = taskinfo.resident_size; - buf->rss = taskinfo.resident_size; - buf->vsize = taskinfo.virtual_size; - - buf->flags [0] += BIT_SHIFT(GLIBTOP_PROCDATA_PRIORITY) + - BIT_SHIFT(GLIBTOP_PROCDATA_RESIDENT) + - BIT_SHIFT(GLIBTOP_PROCDATA_RSS) + - BIT_SHIFT(GLIBTOP_PROCDATA_VSIZE); - - ret = table (TBL_UAREA, pid, (char *) &u, 1, - sizeof (struct user)); - - if (ret != 1) return; - - buf->start_code = (unsigned long) u.u_text_start; - buf->end_code = (unsigned long) u.u_data_start; - buf->start_stack = (unsigned long) u.u_stack_start; - - buf->trs = u.u_tsize; - buf->drs = u.u_dsize; - - buf->start_time = u.u_start.tv_sec; - - buf->utime = u.u_ru.ru_utime.tv_sec; - buf->stime = u.u_ru.ru_stime.tv_sec; - buf->cutime = u.u_cru.ru_utime.tv_sec; - buf->cstime = u.u_cru.ru_stime.tv_sec; - - buf->flags [0] += BIT_SHIFT(GLIBTOP_PROCDATA_START_TIME) + - BIT_SHIFT(GLIBTOP_PROCDATA_UTIME) + BIT_SHIFT(GLIBTOP_PROCDATA_STIME) + - BIT_SHIFT(GLIBTOP_PROCDATA_CUTIME) + BIT_SHIFT(GLIBTOP_PROCDATA_CSTIME) + - BIT_SHIFT(GLIBTOP_PROCDATA_TRS) + BIT_SHIFT(GLIBTOP_PROCDATA_DRS); - - buf->flags [1] += BIT_SHIFT(GLIBTOP_PROCDATA_START_CODE) + - BIT_SHIFT(GLIBTOP_PROCDATA_END_CODE) + - BIT_SHIFT(GLIBTOP_PROCDATA_START_STACK); -} diff --git a/sysdeps/osf1/prockernel.c b/sysdeps/osf1/prockernel.c deleted file mode 100644 index e7d961a1..00000000 --- a/sysdeps/osf1/prockernel.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_kernel = 0; - -/* Init function. */ - -void -glibtop_init_proc_kernel_p (glibtop *server) -{ - server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf, - pid_t pid) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0); - - memset (buf, 0, sizeof (glibtop_proc_kernel)); -} diff --git a/sysdeps/osf1/proclist.c b/sysdeps/osf1/proclist.c deleted file mode 100644 index 98c217db..00000000 --- a/sysdeps/osf1/proclist.c +++ /dev/null @@ -1,172 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -#include - -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_p (glibtop *server) -{ - server->sysdeps.proclist = _glibtop_sysdeps_proclist; -} - -/* How many elements are there per proctable entry? */ - -#define ELEMENTS_PER_ENTRY 8 - -/* We have a buffer for BLOCK_COUNT pids; when it's full, it is copied - * to a newly realloc()ed area. */ - -#define BLOCK_COUNT 256 -#define BLOCK_SIZE (BLOCK_COUNT * sizeof (unsigned)) - -/* Fetch list of currently running processes. - * - * The interface of this function is a little bit different from the others: - * buf->flags is only set if the call succeeded, in this case pids_chain, - * a list of the pids of all currently running processes is returned, - * buf->number is the number of elements of this list and buf->size is - * the size of one single element (sizeof (unsigned)). The total size is - * stored in buf->total. - * - * The calling function has to free the memory to which a pointer is returned. - * - * On error, NULL is returned and buf->flags is zero. */ - -/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - -unsigned * -glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf, - int64_t which, int64_t arg) -{ - unsigned count = 0, total = 0; - unsigned pids [BLOCK_COUNT], *pids_chain = NULL; - unsigned pids_size = 0, pids_offset = 0, new_size; - struct tbl_procinfo procinfo [8]; - int entry, max_elements, k; - - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROCLIST, 0); - - memset (buf, 0, sizeof (glibtop_proclist)); - - for (entry = 0; entry < server->machine.proctable_entries; - entry += ELEMENTS_PER_ENTRY) - { - /* !!! THE FOLLOWING CODE RUNS SUID ROOT - - * CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - max_elements = table - (TBL_PROCINFO, entry, (char *) &procinfo, - ELEMENTS_PER_ENTRY, sizeof (struct tbl_procinfo)); - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - - for (k = 0; k < max_elements; k++) - { - /* Does this entry contain a real process? */ - - if (procinfo [k].pi_status == 0) - 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++] = procinfo [k].pi_pid; - - total++; - } - } - - /* count is only zero if an error occured - * (eg. the server is not suid root). */ - - 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 `pids_chain'. */ - - buf->flags = _glibtop_sysdeps_proclist; - - buf->size = sizeof (unsigned); - buf->number = total; - - buf->total = total * sizeof (unsigned); - - return pids_chain; -} diff --git a/sysdeps/osf1/procmap.c b/sysdeps/osf1/procmap.c deleted file mode 100644 index 0b9bd6e0..00000000 --- a/sysdeps/osf1/procmap.c +++ /dev/null @@ -1,46 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_map = 0; - -/* Init function. */ - -void -glibtop_init_proc_map_p (glibtop *server) -{ - server->sysdeps.proc_map = _glibtop_sysdeps_proc_map; -} - -/* Provides detailed information about a process. */ - -glibtop_map_entry * -glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, pid_t pid) -{ - memset (buf, 0, sizeof (glibtop_proc_map)); - return NULL; -} diff --git a/sysdeps/osf1/procmem.c b/sysdeps/osf1/procmem.c deleted file mode 100644 index d36d1032..00000000 --- a/sysdeps/osf1/procmem.c +++ /dev/null @@ -1,103 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_mem = -(1 << GLIBTOP_PROC_MEM_VSIZE) + (1 << GLIBTOP_PROC_MEM_RESIDENT) + -(1 << GLIBTOP_PROC_MEM_RSS); - -/* Init function. */ - -void -glibtop_init_proc_mem_p (glibtop *server) -{ - server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, - pid_t pid) -{ - task_basic_info_data_t taskinfo; - int ret, info_count; - task_t thistask; - struct user u; - - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_MEM, 0); - - memset (buf, 0, sizeof (glibtop_proc_mem)); - - /* Get task structure. */ - - ret = task_by_unix_pid (task_self(), pid, &thistask); - - if (ret != KERN_SUCCESS) return; - - /* Get taskinfo about this task. */ - - info_count = TASK_BASIC_INFO_COUNT; - - ret = task_info (thistask, TASK_BASIC_INFO, - (task_info_t) &taskinfo, &info_count); - - if (ret != KERN_SUCCESS) return; - - buf->resident = taskinfo.resident_size; - buf->rss = taskinfo.resident_size; - buf->vsize = taskinfo.virtual_size; - - /* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - ret = table (TBL_UAREA, pid, (char *) &u, 1, - sizeof (struct user)); - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - - if (ret != 1) return; - - buf->rss_rlim = u.u_rlimit [RLIMIT_RSS].rlim_cur; - - buf->share = u.u_ru.ru_ixrss; - - buf->flags |= (1 << GLIBTOP_PROC_MEM_RSS_RLIM) | - (1 << GLIBTOP_PROC_MEM_SHARE); -} diff --git a/sysdeps/osf1/procsegment.c b/sysdeps/osf1/procsegment.c deleted file mode 100644 index 0aeeaa97..00000000 --- a/sysdeps/osf1/procsegment.c +++ /dev/null @@ -1,80 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_segment = -(1 << GLIBTOP_PROC_SEGMENT_TEXT_RSS) + -(1 << GLIBTOP_PROC_SEGMENT_DATA_RSS) + -(1 << GLIBTOP_PROC_SEGMENT_START_CODE) + -(1 << GLIBTOP_PROC_SEGMENT_END_CODE) + -(1 << GLIBTOP_PROC_SEGMENT_START_STACK); - -/* Init function. */ - -void -glibtop_init_proc_segment_p (glibtop *server) -{ - server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, - pid_t pid) -{ - int ret; - struct user u; - - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0); - - memset (buf, 0, sizeof (glibtop_proc_segment)); - - /* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - ret = table (TBL_UAREA, pid, (char *) &u, 1, - sizeof (struct user)); - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - - if (ret != 1) return; - - buf->start_code = (unsigned long) u.u_text_start; - buf->end_code = (unsigned long) u.u_data_start; - buf->start_stack = (unsigned long) u.u_stack_start; - - buf->text_rss = u.u_tsize; - buf->data_rss = u.u_dsize; - - buf->flags = _glibtop_sysdeps_proc_segment; -} diff --git a/sysdeps/osf1/procsignal.c b/sysdeps/osf1/procsignal.c deleted file mode 100644 index 3c6cc8a6..00000000 --- a/sysdeps/osf1/procsignal.c +++ /dev/null @@ -1,74 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_signal = -(1 << GLIBTOP_PROC_SIGNAL_SIGNAL) + (1 << GLIBTOP_PROC_SIGNAL_BLOCKED) + -(1 << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + (1 << GLIBTOP_PROC_SIGNAL_SIGCATCH); - -/* Init function. */ - -void -glibtop_init_proc_signal_p (glibtop *server) -{ - server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf, - pid_t pid) -{ - struct tbl_procinfo procinfo; - int ret; - - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0); - - memset (buf, 0, sizeof (glibtop_proc_signal)); - - /* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - ret = table (TBL_PROCINFO, pid, (char *) &procinfo, 1, - sizeof (struct tbl_procinfo)); - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - - if (ret != 1) return; - - buf->signal [0] = procinfo.pi_sig; - buf->blocked [0] = procinfo.pi_sigmask; - buf->sigignore [0] = procinfo.pi_sigignore; - buf->sigcatch [0] = procinfo.pi_sigcatch; - - buf->flags = _glibtop_sysdeps_proc_signal; -} diff --git a/sysdeps/osf1/procstate.c b/sysdeps/osf1/procstate.c deleted file mode 100644 index 72e0f8ed..00000000 --- a/sysdeps/osf1/procstate.c +++ /dev/null @@ -1,78 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_state = -(1 << GLIBTOP_PROC_STATE_CMD) + (1 << GLIBTOP_PROC_STATE_STATE) + -(1 << GLIBTOP_PROC_STATE_UID); - -/* Init function. */ - -void -glibtop_init_proc_state_p (glibtop *server) -{ - server->sysdeps.proc_state = _glibtop_sysdeps_proc_state; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf, - pid_t pid) -{ - struct tbl_procinfo procinfo; - int ret; - - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_STATE, 0); - - memset (buf, 0, sizeof (glibtop_proc_state)); - - /* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - ret = table (TBL_PROCINFO, pid, (char *) &procinfo, 1, - sizeof (struct tbl_procinfo)); - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - - if (ret != 1) return; - - strncpy (buf->cmd, procinfo.pi_comm, sizeof (buf->cmd)-1); - - buf->cmd [sizeof (buf->cmd)-1] = 0; - - buf->state = procinfo.pi_status; - - buf->uid = procinfo.pi_uid; - buf->gid = procinfo.pi_svgid; - - buf->flags = _glibtop_sysdeps_proc_state; -} diff --git a/sysdeps/osf1/proctime.c b/sysdeps/osf1/proctime.c deleted file mode 100644 index 86f46def..00000000 --- a/sysdeps/osf1/proctime.c +++ /dev/null @@ -1,79 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_time = -(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_CUTIME) + -(1 << GLIBTOP_PROC_TIME_STIME) + (1 << GLIBTOP_PROC_TIME_CSTIME) + -(1 << GLIBTOP_PROC_TIME_START_TIME); - -/* Init function. */ - -void -glibtop_init_proc_time_p (glibtop *server) -{ - server->sysdeps.proc_time = _glibtop_sysdeps_proc_time; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, - pid_t pid) -{ - struct user u; - int ret; - - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_TIME, 0); - - memset (buf, 0, sizeof (glibtop_proc_time)); - - /* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - ret = table (TBL_UAREA, pid, (char *) &u, 1, - sizeof (struct user)); - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - - if (ret != 1) return; - - buf->start_time = u.u_start.tv_sec; - - buf->utime = u.u_ru.ru_utime.tv_sec; - buf->stime = u.u_ru.ru_stime.tv_sec; - buf->cutime = u.u_cru.ru_utime.tv_sec; - buf->cstime = u.u_cru.ru_stime.tv_sec; - - buf->flags = _glibtop_sysdeps_proc_time; -} diff --git a/sysdeps/osf1/procuid.c b/sysdeps/osf1/procuid.c deleted file mode 100644 index 4a494b61..00000000 --- a/sysdeps/osf1/procuid.c +++ /dev/null @@ -1,132 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -#include -#include - -#include -#include -#include - -/* Provides detailed information about a process. */ - -static const unsigned long _glibtop_sysdeps_proc_uid = -(1 << GLIBTOP_PROC_UID_UID) + (1 << GLIBTOP_PROC_UID_EUID) + -(1 << GLIBTOP_PROC_UID_GID) + (1 << GLIBTOP_PROC_UID_EGID) + -(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) + (1 << GLIBTOP_PROC_UID_TPGID); - -/* Init function. */ - -void -glibtop_init_proc_uid_p (glibtop *server) -{ - server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid; -} - -void -glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, - pid_t pid) -{ - struct tbl_procinfo procinfo; - task_basic_info_data_t taskinfo; - int ret, info_count; - task_t thistask; - - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_UID, 0); - - memset (buf, 0, sizeof (glibtop_proc_uid)); - - /* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - ret = table (TBL_PROCINFO, pid, (char *) &procinfo, 1, - sizeof (struct tbl_procinfo)); - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - - if (ret != 1) return; - - buf->uid = procinfo.pi_ruid; - buf->euid = procinfo.pi_svuid; - buf->gid = procinfo.pi_rgid; - buf->egid = procinfo.pi_svgid; - - buf->pid = procinfo.pi_pid; - buf->ppid = procinfo.pi_ppid; - buf->pgrp = procinfo.pi_pgrp; - buf->tty = procinfo.pi_ttyd; - buf->session = procinfo.pi_session; - buf->tpgid = procinfo.pi_tpgrp; - - buf->flags = _glibtop_sysdeps_proc_uid; - - /* !!! THE FOLLOWING CODE RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - /* Get task structure. */ - - ret = task_by_unix_pid (task_self(), procinfo.pi_pid, &thistask); - - if (ret == KERN_SUCCESS) { - - /* Get taskinfo about this task. */ - - info_count = TASK_BASIC_INFO_COUNT; - - ret = task_info (thistask, TASK_BASIC_INFO, - (task_info_t) &taskinfo, &info_count); - - /* `ret' is evaluated outside the `if' clause. */ - } - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - - if (ret != KERN_SUCCESS) return; - - buf->priority = taskinfo.base_priority; - - buf->flags += (1 << GLIBTOP_PROC_UID_PRIORITY); - - errno = 0; - - ret = getpriority (PRIO_PROCESS, pid); - - if ((ret == -1) && (errno != 0)) return; - - buf->nice = ret; - - buf->flags += (1 << GLIBTOP_PROC_UID_NICE); -} diff --git a/sysdeps/osf1/sem_limits.c b/sysdeps/osf1/sem_limits.c deleted file mode 100644 index 69bb170f..00000000 --- a/sysdeps/osf1/sem_limits.c +++ /dev/null @@ -1,110 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static unsigned long _glibtop_sysdeps_sem_limits = -(1 << GLIBTOP_IPC_SEMMNI) + (1 << GLIBTOP_IPC_SEMMSL) + -(1 << GLIBTOP_IPC_SEMOPM) + (1 << GLIBTOP_IPC_SEMVMX) + -(1 << GLIBTOP_IPC_SEMAEM); - -/* 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) -{ - int ret, value; - - glibtop_init_s (&server, 0, 0); - - memset (buf, 0, sizeof (glibtop_sem_limits)); - - ret = table (TBL_SEMINFO, SEMINFO_MNI, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SEMMNI); - - buf->semmni = value; - - - ret = table (TBL_SEMINFO, SEMINFO_MSL, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SEMMSL); - - buf->semmsl = value; - - - ret = table (TBL_SEMINFO, SEMINFO_OPM, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SEMOPM); - - buf->semopm = value; - - - ret = table (TBL_SEMINFO, SEMINFO_UME, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SEMUME); - - buf->semume = value; - - - ret = table (TBL_SEMINFO, SEMINFO_VMX, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SEMVMX); - - buf->semvmx = value; - - - ret = table (TBL_SEMINFO, SEMINFO_AEM, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SEMAEM); - - buf->semaem = value; -} diff --git a/sysdeps/osf1/shm_limits.c b/sysdeps/osf1/shm_limits.c deleted file mode 100644 index a183c9ea..00000000 --- a/sysdeps/osf1/shm_limits.c +++ /dev/null @@ -1,89 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static unsigned long _glibtop_sysdeps_shm_limits = -(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) + -(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG); - -/* 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) -{ - int ret, value; - - glibtop_init_s (&server, 0, 0); - - memset (buf, 0, sizeof (glibtop_shm_limits)); - - ret = table (TBL_SHMINFO, SHMINFO_MAX, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SHMMAX); - - buf->shmmax = value; - - - ret = table (TBL_SHMINFO, SHMINFO_MIN, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SHMMIN); - - buf->shmmin = value; - - - ret = table (TBL_SHMINFO, SHMINFO_MNI, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SHMMNI); - - buf->shmmni = value; - - - ret = table (TBL_SHMINFO, SHMINFO_SEG, (char *) &value, 1, - sizeof (value)); - - if (ret != 1) return; - - buf->flags += (1 << GLIBTOP_IPC_SHMSEG); - - buf->shmseg = value; -} diff --git a/sysdeps/osf1/siglist.c b/sysdeps/osf1/siglist.c deleted file mode 100644 index c5bd59c0..00000000 --- a/sysdeps/osf1/siglist.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const glibtop_signame glibtop_sys_siglist [] = -{ { 1, "SIGHUP", N_("Hangup") }, - { 2, "SIGINT", N_("Interrupt") }, - { 3, "SIGQUIT", N_("Quit") }, - { 4, "SIGILL", N_("Illegal instruction") }, - { 5, "SIGTRAP", N_("Trace trap") }, - { 6, "SIGABRT", N_("Abort") }, - { 7, "SIGEMT", N_("EMT error") }, - { 8, "SIGFPE", N_("Floating-point exception") }, - { 9, "SIGKILL", N_("Kill") }, - { 10, "SIGBUS", N_("Bus error") }, - { 11, "SIGSEGV", N_("Segmentation violation") }, - { 12, "SIGSYS", N_("Bad argument to system call") }, - { 13, "SIGPIPE", N_("Broken pipe") }, - { 14, "SIGALRM", N_("Alarm clock") }, - { 15, "SIGTERM", N_("Termination") }, - { 16, "SIGURG", N_("Urgent condition on socket") }, - { 17, "SIGSTOP", N_("Stop") }, - { 18, "SIGTSTP", N_("Keyboard stop") }, - { 19, "SIGCONT", N_("Continue") }, - { 20, "SIGCHLD", N_("Child status has changed") }, - { 21, "SIGTTIN", N_("Background read from tty") }, - { 22, "SIGTTOU", N_("Background write to tty") }, - { 23, "SIGIO", N_("I/O now possible") }, - { 24, "SIGXCPU", N_("CPU limit exceeded") }, - { 25, "SIGXFSZ", N_("File size limit exceeded") }, - { 26, "SIGVTALRM", N_("Virtual alarm clock") }, - { 27, "SIGPROF", N_("Profiling alarm clock") }, - { 28, "SIGWINCH", N_("Window size change") }, - { 29, "SIGINFO", N_("Information request") }, - { 30, "SIGUSR1", N_("User defined signal 1") }, - { 31, "SIGUSR2", N_("User defined signal 2") }, - { 0, NULL, NULL }, -}; diff --git a/sysdeps/osf1/swap.c b/sysdeps/osf1/swap.c deleted file mode 100644 index 66f15c82..00000000 --- a/sysdeps/osf1/swap.c +++ /dev/null @@ -1,64 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static unsigned long _glibtop_sysdeps_swap = -(1 << GLIBTOP_SWAP_TOTAL) + (1 << GLIBTOP_SWAP_USED) + -(1 << GLIBTOP_SWAP_FREE); - -/* 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) -{ - struct tbl_swapinfo swapinfo; - int i; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SWAP, 0); - - memset (buf, 0, sizeof (glibtop_swap)); - - i = 0; - - while (table (TBL_SWAPINFO, i, (char *) &swapinfo, 1, - sizeof (struct tbl_swapinfo)) > 0) { - buf->total += swapinfo.size * getpagesize (); - buf->free += swapinfo.free * getpagesize (); - i++; - } - - buf->flags = _glibtop_sysdeps_swap; - - buf->used = buf->total - buf->free; -} diff --git a/sysdeps/osf1/uptime.c b/sysdeps/osf1/uptime.c deleted file mode 100644 index 911acaf9..00000000 --- a/sysdeps/osf1/uptime.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static unsigned long _glibtop_sysdeps_uptime = -(1 << GLIBTOP_UPTIME_UPTIME); - -/* 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) -{ - struct tbl_sysinfo sysinfo; - int ret; - - glibtop_init_s (&server, GLIBTOP_SYSDEPS_UPTIME, 0); - - memset (buf, 0, sizeof (glibtop_uptime)); - - ret = table (TBL_SYSINFO, 0, (char *) &sysinfo, 1, - sizeof (struct tbl_sysinfo)); - - if (ret != 1) return; - - buf->uptime = (double) (time (NULL) - sysinfo.si_boottime); - - buf->flags = _glibtop_sysdeps_uptime; -} diff --git a/sysdeps/stub/.cvsignore b/sysdeps/stub/.cvsignore deleted file mode 100644 index e71d5287..00000000 --- a/sysdeps/stub/.cvsignore +++ /dev/null @@ -1,27 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -close.lo -cpu.lo -init.lo -libgtop_sysdeps.la -loadavg.lo -mem.lo -msg_limits.lo -open.lo -prockernel.lo -proclist.lo -procmem.lo -procsegment.lo -procsignal.lo -procstate.lo -proctime.lo -procuid.lo -sem_limits.lo -shm_limits.lo -swap.lo -sysdeps.lo -uptime.lo -*.lo -so_locations diff --git a/sysdeps/stub/ChangeLog b/sysdeps/stub/ChangeLog deleted file mode 100644 index 16470426..00000000 --- a/sysdeps/stub/ChangeLog +++ /dev/null @@ -1,18 +0,0 @@ -1998-10-26 Martin Baulig - - * netload.c: New file. - -1998-10-26 Martin Baulig - - * procargs.c: New file. - -1998-10-25 Martin Baulig - - * ppp.c: New file. - -1998-08-24 Martin Baulig - - * *.c: Added initialization functions `glibtop_init__s'. - - * ChangeLog: New file. - diff --git a/sysdeps/stub/Makefile.am b/sysdeps/stub/Makefile.am deleted file mode 100644 index 35b8ea65..00000000 --- a/sysdeps/stub/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -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 - -libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) - -include_HEADERS = glibtop_server.h - diff --git a/sysdeps/stub/close.c b/sysdeps/stub/close.c deleted file mode 100644 index 4262d2f0..00000000 --- a/sysdeps/stub/close.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Closes pipe to gtop server. */ - -void -glibtop_close_s (glibtop *server) -{ } diff --git a/sysdeps/stub/cpu.c b/sysdeps/stub/cpu.c deleted file mode 100644 index 3ddfdfb8..00000000 --- a/sysdeps/stub/cpu.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/glibtop_server.h b/sysdeps/stub/glibtop_server.h deleted file mode 100644 index b3822d47..00000000 --- a/sysdeps/stub/glibtop_server.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 diff --git a/sysdeps/stub/libsysdeps.la b/sysdeps/stub/libsysdeps.la deleted file mode 100644 index 3f600ebb..00000000 --- a/sysdeps/stub/libsysdeps.la +++ /dev/null @@ -1,19 +0,0 @@ -# libsysdeps.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.0h - -# The name that we can dlopen(3). -dlname='' - -# Names of this library. -library_names='libsysdeps.so.0.0.0 libsysdeps.so.0 libsysdeps.so' - -# The name of the static archive. -old_library='libsysdeps.a' - -# Version information for libsysdeps. -current=0 -age=0 -revision=0 - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff --git a/sysdeps/stub/loadavg.c b/sysdeps/stub/loadavg.c deleted file mode 100644 index 9bf900f5..00000000 --- a/sysdeps/stub/loadavg.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -static const unsigned long _glibtop_sysdeps_loadavg = 0; - -/* 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)); -} diff --git a/sysdeps/stub/mem.c b/sysdeps/stub/mem.c deleted file mode 100644 index 8a2c31a5..00000000 --- a/sysdeps/stub/mem.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/msg_limits.c b/sysdeps/stub/msg_limits.c deleted file mode 100644 index adee0dae..00000000 --- a/sysdeps/stub/msg_limits.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/netload.c b/sysdeps/stub/netload.c deleted file mode 100644 index beebedba..00000000 --- a/sysdeps/stub/netload.c +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -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)); -} diff --git a/sysdeps/stub/open.c b/sysdeps/stub/open.c deleted file mode 100644 index eef22d71..00000000 --- a/sysdeps/stub/open.c +++ /dev/null @@ -1,33 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* 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; -} diff --git a/sysdeps/stub/ppp.c b/sysdeps/stub/ppp.c deleted file mode 100644 index 6d0905d5..00000000 --- a/sysdeps/stub/ppp.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -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)); -} diff --git a/sysdeps/stub/procargs.c b/sysdeps/stub/procargs.c deleted file mode 100644 index 7d010d5e..00000000 --- a/sysdeps/stub/procargs.c +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -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; -} diff --git a/sysdeps/stub/prockernel.c b/sysdeps/stub/prockernel.c deleted file mode 100644 index d06f6cab..00000000 --- a/sysdeps/stub/prockernel.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/proclist.c b/sysdeps/stub/proclist.c deleted file mode 100644 index 7794cdba..00000000 --- a/sysdeps/stub/proclist.c +++ /dev/null @@ -1,52 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#define GLIBTOP_PROCLIST_FLAGS 3 - -static const unsigned long _glibtop_sysdeps_proclist = 0; - -/* Init function. */ - -void -glibtop_init_proclist_s (glibtop *server) -{ - server->sysdeps.proclist = _glibtop_sysdeps_proclist; -} - -/* 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) -{ - memset (buf, 0, sizeof (glibtop_proclist)); - return NULL; -} diff --git a/sysdeps/stub/procmap.c b/sysdeps/stub/procmap.c deleted file mode 100644 index 5a6c479a..00000000 --- a/sysdeps/stub/procmap.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -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; -} diff --git a/sysdeps/stub/procmem.c b/sysdeps/stub/procmem.c deleted file mode 100644 index ab0c4170..00000000 --- a/sysdeps/stub/procmem.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/procsegment.c b/sysdeps/stub/procsegment.c deleted file mode 100644 index b03709d4..00000000 --- a/sysdeps/stub/procsegment.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/procsignal.c b/sysdeps/stub/procsignal.c deleted file mode 100644 index 540960f5..00000000 --- a/sysdeps/stub/procsignal.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/procstate.c b/sysdeps/stub/procstate.c deleted file mode 100644 index 227f52ee..00000000 --- a/sysdeps/stub/procstate.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -static const unsigned long _glibtop_sysdeps_proc_state = 0; - -/* 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) -{ - memset (buf, 0, sizeof (glibtop_proc_state)); -} diff --git a/sysdeps/stub/proctime.c b/sysdeps/stub/proctime.c deleted file mode 100644 index 4c060235..00000000 --- a/sysdeps/stub/proctime.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -static const unsigned long _glibtop_sysdeps_proc_time = 0; - -/* 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) -{ - memset (buf, 0, sizeof (glibtop_proc_time)); -} diff --git a/sysdeps/stub/procuid.c b/sysdeps/stub/procuid.c deleted file mode 100644 index f9f68311..00000000 --- a/sysdeps/stub/procuid.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -static const unsigned long _glibtop_sysdeps_proc_uid = 0; - -/* 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) -{ - memset (buf, 0, sizeof (glibtop_proc_uid)); -} diff --git a/sysdeps/stub/sem_limits.c b/sysdeps/stub/sem_limits.c deleted file mode 100644 index 474ce8c7..00000000 --- a/sysdeps/stub/sem_limits.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/shm_limits.c b/sysdeps/stub/shm_limits.c deleted file mode 100644 index 8a024b4a..00000000 --- a/sysdeps/stub/shm_limits.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/siglist.c b/sysdeps/stub/siglist.c deleted file mode 100644 index 94abfdc6..00000000 --- a/sysdeps/stub/siglist.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const glibtop_signame glibtop_sys_siglist [] = -{ { 0, NULL, NULL } }; diff --git a/sysdeps/stub/swap.c b/sysdeps/stub/swap.c deleted file mode 100644 index 4731b8e3..00000000 --- a/sysdeps/stub/swap.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub/uptime.c b/sysdeps/stub/uptime.c deleted file mode 100644 index a6189448..00000000 --- a/sysdeps/stub/uptime.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -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)); -} diff --git a/sysdeps/stub_suid/.cvsignore b/sysdeps/stub_suid/.cvsignore deleted file mode 100644 index d15c76bc..00000000 --- a/sysdeps/stub_suid/.cvsignore +++ /dev/null @@ -1,28 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -close.lo -cpu.lo -init.lo -libgtop_sysdeps.la -loadavg.lo -mem.lo -msg_limits.lo -open.lo -prockernel.lo -proclist.lo -procmem.lo -procsegment.lo -procsignal.lo -procstate.lo -proctime.lo -procuid.lo -sem_limits.lo -shm_limits.lo -swap.lo -sysdeps.lo -uptime.lo -*.lo -*.la -so_locations diff --git a/sysdeps/stub_suid/ChangeLog b/sysdeps/stub_suid/ChangeLog deleted file mode 100644 index 0017acbd..00000000 --- a/sysdeps/stub_suid/ChangeLog +++ /dev/null @@ -1,14 +0,0 @@ -1998-10-26 Martin Baulig - - * netload.c: New file. - -1998-10-26 Martin Baulig - - * procargs.c: New file. - * procmap.c: New file. - -1998-10-25 Martin Baulig - - * ChangeLog: New file. - * ppp.c: New file. - diff --git a/sysdeps/stub_suid/Makefile.am b/sysdeps/stub_suid/Makefile.am deleted file mode 100644 index 43245598..00000000 --- a/sysdeps/stub_suid/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la - -libgtop_sysdeps_la_SOURCES = nosuid.c siglist.c - -libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) - -libgtop_sysdeps_suid_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 - -libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO) - -include_HEADERS = glibtop_server.h glibtop_machine.h - -noinst_HEADERS = glibtop_suid.h diff --git a/sysdeps/stub_suid/close.c b/sysdeps/stub_suid/close.c deleted file mode 100644 index 4262d2f0..00000000 --- a/sysdeps/stub_suid/close.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Closes pipe to gtop server. */ - -void -glibtop_close_s (glibtop *server) -{ } diff --git a/sysdeps/stub_suid/cpu.c b/sysdeps/stub_suid/cpu.c deleted file mode 100644 index 7f05c827..00000000 --- a/sysdeps/stub_suid/cpu.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_cpu = 0; - -/* Init function. */ - -void -glibtop_init_cpu_p (glibtop *server) -{ - server->sysdeps.cpu = _glibtop_sysdeps_cpu; -} - -/* Provides information about cpu usage. */ - -void -glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_CPU, 0); - - memset (buf, 0, sizeof (glibtop_cpu)); -} diff --git a/sysdeps/stub_suid/glibtop_machine.h b/sysdeps/stub_suid/glibtop_machine.h deleted file mode 100644 index 835f177f..00000000 --- a/sysdeps/stub_suid/glibtop_machine.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_MACHINE_H__ -#define __GLIBTOP_MACHINE_H__ - -BEGIN_LIBGTOP_DECLS - -typedef struct _glibtop_machine glibtop_machine; - -struct _glibtop_machine -{ - uid_t uid, euid; /* Real and effective user id */ - gid_t gid, egid; /* Real and effective group id */ -}; - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/stub_suid/glibtop_server.h b/sysdeps/stub_suid/glibtop_server.h deleted file mode 100644 index ccf3d29d..00000000 --- a/sysdeps/stub_suid/glibtop_server.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 (1 << GLIBTOP_SYSDEPS_CPU) -#define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM) -#define GLIBTOP_SUID_SWAP (1 << GLIBTOP_SYSDEPS_SWAP) -#define GLIBTOP_SUID_UPTIME (1 << GLIBTOP_SYSDEPS_UPTIME) -#define GLIBTOP_SUID_LOADAVG (1 << GLIBTOP_SYSDEPS_LOADAVG) -#define GLIBTOP_SUID_SHM_LIMITS (1 << GLIBTOP_SYSDEPS_SHM_LIMITS) -#define GLIBTOP_SUID_MSG_LIMITS (1 << GLIBTOP_SYSDEPS_MSG_LIMITS) -#define GLIBTOP_SUID_SEM_LIMITS (1 << GLIBTOP_SYSDEPS_SEM_LIMITS) -#define GLIBTOP_SUID_PROCLIST (1 << GLIBTOP_SYSDEPS_PROCLIST) -#define GLIBTOP_SUID_PROC_STATE (1 << GLIBTOP_SYSDEPS_PROC_STATE) -#define GLIBTOP_SUID_PROC_UID (1 << GLIBTOP_SYSDEPS_PROC_UID) -#define GLIBTOP_SUID_PROC_MEM (1 << GLIBTOP_SYSDEPS_PROC_MEM) -#define GLIBTOP_SUID_PROC_TIME (1 << GLIBTOP_SYSDEPS_PROC_TIME) -#define GLIBTOP_SUID_PROC_SIGNAL (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL) -#define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL) -#define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) -#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS) -#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP) -#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD) -#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP) - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/stub_suid/glibtop_suid.h b/sysdeps/stub_suid/glibtop_suid.h deleted file mode 100644 index b88421ff..00000000 --- a/sysdeps/stub_suid/glibtop_suid.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_SUID_H__ -#define __GLIBTOP_SUID_H__ - -BEGIN_LIBGTOP_DECLS - -static inline void glibtop_suid_enter (glibtop *server) { - setreuid (server->machine.uid, server->machine.euid); -}; - -static inline void glibtop_suid_leave (glibtop *server) { - if (setreuid (server->machine.euid, server->machine.uid)) - _exit (1); -}; - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags); -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, - const unsigned flags); - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/stub_suid/init.c b/sysdeps/stub_suid/init.c deleted file mode 100644 index 0f643bd0..00000000 --- a/sysdeps/stub_suid/init.c +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -static glibtop _glibtop_global_server; -glibtop *glibtop_global_server = NULL; - -glibtop * -glibtop_init_r (glibtop **server, - const unsigned long features, - const unsigned flags) -{ - if (*server != NULL) - return *server; - - if (glibtop_global_server == NULL) { - glibtop_global_server = &_glibtop_global_server; - glibtop_open (glibtop_global_server, "glibtop", - features, flags); - } - - return *server = glibtop_global_server; -} diff --git a/sysdeps/stub_suid/loadavg.c b/sysdeps/stub_suid/loadavg.c deleted file mode 100644 index 6118d614..00000000 --- a/sysdeps/stub_suid/loadavg.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_loadavg = 0; - -/* Init function. */ - -void -glibtop_init_loadavg_p (glibtop *server) -{ - server->sysdeps.loadavg = _glibtop_sysdeps_loadavg; -} - -/* Provides load averange. */ - -void -glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_LOADAVG, 0); - - memset (buf, 0, sizeof (glibtop_loadavg)); -} diff --git a/sysdeps/stub_suid/mem.c b/sysdeps/stub_suid/mem.c deleted file mode 100644 index 85c4fc5d..00000000 --- a/sysdeps/stub_suid/mem.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_mem = 0; - -/* Init function. */ - -void -glibtop_init_mem_p (glibtop *server) -{ - server->sysdeps.mem = _glibtop_sysdeps_mem; -} - -/* Provides information about memory usage. */ - -void -glibtop_get_mem_p (glibtop *server, glibtop_mem *buf) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_MEM, 0); - - memset (buf, 0, sizeof (glibtop_mem)); -} diff --git a/sysdeps/stub_suid/msg_limits.c b/sysdeps/stub_suid/msg_limits.c deleted file mode 100644 index 7a2b8f93..00000000 --- a/sysdeps/stub_suid/msg_limits.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_msg_limits = 0; - -/* Init function. */ - -void -glibtop_init_msg_limits_p (glibtop *server) -{ - server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits; -} - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_msg_limits)); -} diff --git a/sysdeps/stub_suid/netload.c b/sysdeps/stub_suid/netload.c deleted file mode 100644 index bb1226ed..00000000 --- a/sysdeps/stub_suid/netload.c +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_netload = 0; - -/* Init function. */ - -void -glibtop_init_netload_p (glibtop *server) -{ - server->sysdeps.netload = _glibtop_sysdeps_netload; -} - -/* Provides Network statistics. */ - -void -glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, - const char *interface) -{ - memset (buf, 0, sizeof (glibtop_netload)); -} diff --git a/sysdeps/stub_suid/nosuid.c b/sysdeps/stub_suid/nosuid.c deleted file mode 100644 index 9f6ce9cb..00000000 --- a/sysdeps/stub_suid/nosuid.c +++ /dev/null @@ -1,34 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -void -glibtop_open_s (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) -{ } - -void -glibtop_close_s (glibtop *server) -{ } diff --git a/sysdeps/stub_suid/open.c b/sysdeps/stub_suid/open.c deleted file mode 100644 index 3357ad25..00000000 --- a/sysdeps/stub_suid/open.c +++ /dev/null @@ -1,77 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags) -{ - glibtop_init_func_t *init_fkt; - - if (server == NULL) - glibtop_error_r (NULL, "glibtop_init_p (server == NULL)"); - - /* Do the initialization, but only if not already initialized. */ - - if ((server->flags & _GLIBTOP_INIT_STATE_INIT) == 0) { - glibtop_open_p (server, "glibtop", features, flags); - - for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++) - (*init_fkt) (server); - - server->flags |= _GLIBTOP_INIT_STATE_INIT; - } -} - -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) -{ - /* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */ - - server->name = program_name; - - server->machine.uid = getuid (); - server->machine.euid = geteuid (); - server->machine.gid = getgid (); - server->machine.egid = getegid (); - - /* Drop priviledges. */ - - if (setreuid (server->machine.euid, server->machine.uid)) - _exit (1); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SUID ROOT PART !!! */ - - /* Our effective uid is now those of the user invoking the server, - * so we do no longer have any priviledges. */ -} - diff --git a/sysdeps/stub_suid/ppp.c b/sysdeps/stub_suid/ppp.c deleted file mode 100644 index 67d01fcf..00000000 --- a/sysdeps/stub_suid/ppp.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -static const unsigned long _glibtop_sysdeps_ppp = 0; - -/* Init function. */ - -void -glibtop_init_ppp_p (glibtop *server) -{ - server->sysdeps.ppp = _glibtop_sysdeps_ppp; -} - -/* Provides PPP/ISDN information. */ - -void -glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device) -{ - memset (buf, 0, sizeof (glibtop_ppp)); -} diff --git a/sysdeps/stub_suid/procargs.c b/sysdeps/stub_suid/procargs.c deleted file mode 100644 index 67c183e8..00000000 --- a/sysdeps/stub_suid/procargs.c +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_args = 0; - -/* Init function. */ - -void -glibtop_init_proc_args_p (glibtop *server) -{ - server->sysdeps.proc_args = _glibtop_sysdeps_proc_args; -} - -/* Provides detailed information about a process. */ - -char * -glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf, - pid_t pid, unsigned max_len) -{ - memset (buf, 0, sizeof (glibtop_proc_args)); - return NULL; -} diff --git a/sysdeps/stub_suid/procdata.c b/sysdeps/stub_suid/procdata.c deleted file mode 100644 index 1f24d61a..00000000 --- a/sysdeps/stub_suid/procdata.c +++ /dev/null @@ -1,180 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) - -#define BIT_SHIFT(x) (1 << (x % 32)) - -static const unsigned long _glibtop_sysdeps_procdata_0 = -BIT_SHIFT(GLIBTOP_PROCDATA_CMD) + -BIT_SHIFT(GLIBTOP_PROCDATA_STATE) + -BIT_SHIFT(GLIBTOP_PROCDATA_UID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PPID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PGRP) + -BIT_SHIFT(GLIBTOP_PROCDATA_SESSION) + -BIT_SHIFT(GLIBTOP_PROCDATA_TTY) + -BIT_SHIFT(GLIBTOP_PROCDATA_TPGID) + -BIT_SHIFT(GLIBTOP_PROCDATA_PRIORITY) + -BIT_SHIFT(GLIBTOP_PROCDATA_NICE) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGNAL) + -BIT_SHIFT(GLIBTOP_PROCDATA_BLOCKED) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGIGNORE) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIGCATCH) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_TIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_UTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_STIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_CUTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_CSTIME) + -BIT_SHIFT(GLIBTOP_PROCDATA_SIZE) + -BIT_SHIFT(GLIBTOP_PROCDATA_RESIDENT) + -BIT_SHIFT(GLIBTOP_PROCDATA_SHARE) + -BIT_SHIFT(GLIBTOP_PROCDATA_TRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_LRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_DRS) + -BIT_SHIFT(GLIBTOP_PROCDATA_DT) + -BIT_SHIFT(GLIBTOP_PROCDATA_VSIZE) + -BIT_SHIFT(GLIBTOP_PROCDATA_RSS) + -BIT_SHIFT(GLIBTOP_PROCDATA_RSS_RLIM) + -BIT_SHIFT(GLIBTOP_PROCDATA_TIMEOUT) + -BIT_SHIFT(GLIBTOP_PROCDATA_IT_REAL_VALUE); - -static const unsigned long _glibtop_sysdeps_procdata_1 = -BIT_SHIFT(GLIBTOP_PROCDATA_K_FLAGS) + -BIT_SHIFT(GLIBTOP_PROCDATA_MIN_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_MAJ_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_CMIN_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_CMAJ_FLT) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_CODE) + -BIT_SHIFT(GLIBTOP_PROCDATA_END_CODE) + -BIT_SHIFT(GLIBTOP_PROCDATA_START_STACK) + -BIT_SHIFT(GLIBTOP_PROCDATA_KSTK_ESP) + -BIT_SHIFT(GLIBTOP_PROCDATA_KSTK_EIP) + -BIT_SHIFT(GLIBTOP_PROCDATA_WCHAN); - -/* Provides detailed information about a process. */ - -void -glibtop_get_procdata_s (glibtop *server, glibtop_procdata *buf, pid_t pid) -{ - char input [BUFSIZ], *tmp; - struct stat statb; - int nread; - FILE *f; - - glibtop_init_r (&server, 0, 0); - - memset (buf, 0, sizeof (glibtop_procdata)); - - if (pid == 0) { - /* Client is only interested in the flags. */ - buf->flags [0] = _glibtop_sysdeps_procdata_0; - buf->flags [1] = _glibtop_sysdeps_procdata_1; - return; - } - - - sprintf (input, "/proc/%d/stat", pid); - - if (stat (input, &statb)) return; - - buf->uid = statb.st_uid; - - f = fopen (input, "r"); - if (!f) return; - - nread = fread (input, 1, BUFSIZ, f); - - if (nread < 0) { - fclose (f); - return; - } - - input [nread] = 0; - - /* This is from guile-utils/gtop/proc/readproc.c */ - - /* split into "PID (cmd" and "" */ - tmp = strrchr (input, ')'); - *tmp = '\0'; /* replace trailing ')' with NUL */ - /* parse these two strings separately, skipping the leading "(". */ - memset (buf->cmd, 0, sizeof (buf->cmd)); - sscanf (input, "%d (%39c", &buf->pid, buf->cmd); - sscanf(tmp + 2, /* skip space after ')' too */ - "%c %d %d %d %d %d %lu %lu %lu %lu %lu " - "%ld %ld %ld %ld %d %d %lu %lu %ld %lu " - "%lu %lu %lu %lu %lu %lu %lu %d %d %d %d %lu", - &buf->state, &buf->ppid, &buf->pgrp, &buf->session, - &buf->tty, &buf->tpgid, &buf->k_flags, &buf->min_flt, - &buf->cmin_flt, &buf->maj_flt, &buf->cmaj_flt, - &buf->utime, &buf->stime, &buf->cutime, &buf->cstime, - &buf->priority, &buf->nice, &buf->timeout, - &buf->it_real_value, &buf->start_time, &buf->vsize, - &buf->rss, &buf->rss_rlim, &buf->start_code, - &buf->end_code, &buf->start_stack, &buf->kstk_esp, - &buf->kstk_eip, &buf->signal, &buf->blocked, - &buf->sigignore, &buf->sigcatch, &buf->wchan); - - if (buf->tty == 0) - /* the old notty val, update elsewhere bef. moving to 0 */ - buf->tty = -1; - - if (server->os_version_code < LINUX_VERSION(1,3,39)) { - /* map old meanings to new */ - buf->priority = 2*15 - buf->priority; - buf->nice = 15 - buf->nice; - } - if (server->os_version_code < LINUX_VERSION(1,1,30) && buf->tty != -1) - /* when tty wasn't full devno */ - buf->tty = 4*0x100 + buf->tty; - - fclose (f); - - sprintf (input, "/proc/%d/statm", pid); - - f = fopen (input, "r"); - if (!f) return; - - nread = fread (input, 1, BUFSIZ, f); - - if (nread < 0) { - fclose (f); - return; - } - - input [nread] = 0; - - sscanf (input, "%ld %ld %ld %ld %ld %ld %ld", - &buf->size, &buf->resident, &buf->share, - &buf->trs, &buf->lrs, &buf->drs, &buf->dt); - - fclose (f); - - buf->flags [0] = _glibtop_sysdeps_procdata_0; - buf->flags [1] = _glibtop_sysdeps_procdata_1; -} diff --git a/sysdeps/stub_suid/prockernel.c b/sysdeps/stub_suid/prockernel.c deleted file mode 100644 index e7d961a1..00000000 --- a/sysdeps/stub_suid/prockernel.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_kernel = 0; - -/* Init function. */ - -void -glibtop_init_proc_kernel_p (glibtop *server) -{ - server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf, - pid_t pid) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0); - - memset (buf, 0, sizeof (glibtop_proc_kernel)); -} diff --git a/sysdeps/stub_suid/proclist.c b/sysdeps/stub_suid/proclist.c deleted file mode 100644 index 908dadb9..00000000 --- a/sysdeps/stub_suid/proclist.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proclist = 0; - -/* Init function. */ - -void -glibtop_init_proclist_p (glibtop *server) -{ - server->sysdeps.proclist = _glibtop_sysdeps_proclist; -} - -unsigned * -glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf, - int64_t which, int64_t arg) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROCLIST, 0); - - memset (buf, 0, sizeof (glibtop_proclist)); - - return NULL; -} diff --git a/sysdeps/stub_suid/procmap.c b/sysdeps/stub_suid/procmap.c deleted file mode 100644 index 0b9bd6e0..00000000 --- a/sysdeps/stub_suid/procmap.c +++ /dev/null @@ -1,46 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include -#include - -static const unsigned long _glibtop_sysdeps_proc_map = 0; - -/* Init function. */ - -void -glibtop_init_proc_map_p (glibtop *server) -{ - server->sysdeps.proc_map = _glibtop_sysdeps_proc_map; -} - -/* Provides detailed information about a process. */ - -glibtop_map_entry * -glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, pid_t pid) -{ - memset (buf, 0, sizeof (glibtop_proc_map)); - return NULL; -} diff --git a/sysdeps/stub_suid/procmem.c b/sysdeps/stub_suid/procmem.c deleted file mode 100644 index 6084aa66..00000000 --- a/sysdeps/stub_suid/procmem.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_mem = 0; - -/* Init function. */ - -void -glibtop_init_proc_mem_p (glibtop *server) -{ - server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, - pid_t pid) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_MEM, 0); - - memset (buf, 0, sizeof (glibtop_proc_mem)); -} diff --git a/sysdeps/stub_suid/procsegment.c b/sysdeps/stub_suid/procsegment.c deleted file mode 100644 index 38499f83..00000000 --- a/sysdeps/stub_suid/procsegment.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_segment = 0; - -/* Init function. */ - -void -glibtop_init_proc_segment_p (glibtop *server) -{ - server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, - pid_t pid) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0); - - memset (buf, 0, sizeof (glibtop_proc_segment)); -} diff --git a/sysdeps/stub_suid/procsignal.c b/sysdeps/stub_suid/procsignal.c deleted file mode 100644 index 9a89e8ab..00000000 --- a/sysdeps/stub_suid/procsignal.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_signal = 0; - -/* Init function. */ - -void -glibtop_init_proc_signal_p (glibtop *server) -{ - server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf, - pid_t pid) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0); - - memset (buf, 0, sizeof (glibtop_proc_signal)); -} diff --git a/sysdeps/stub_suid/procstate.c b/sysdeps/stub_suid/procstate.c deleted file mode 100644 index 576889c1..00000000 --- a/sysdeps/stub_suid/procstate.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_state = 0; - -/* Init function. */ - -void -glibtop_init_proc_state_p (glibtop *server) -{ - server->sysdeps.proc_state = _glibtop_sysdeps_proc_state; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf, - pid_t pid) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_STATE, 0); - - memset (buf, 0, sizeof (glibtop_proc_state)); -} diff --git a/sysdeps/stub_suid/proctime.c b/sysdeps/stub_suid/proctime.c deleted file mode 100644 index bc6c6c09..00000000 --- a/sysdeps/stub_suid/proctime.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_time = 0; - -/* Init function. */ - -void -glibtop_init_proc_time_p (glibtop *server) -{ - server->sysdeps.proc_time = _glibtop_sysdeps_proc_time; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, - pid_t pid) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_TIME, 0); - - memset (buf, 0, sizeof (glibtop_proc_time)); -} diff --git a/sysdeps/stub_suid/procuid.c b/sysdeps/stub_suid/procuid.c deleted file mode 100644 index e487375e..00000000 --- a/sysdeps/stub_suid/procuid.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_uid = 0; - -/* Init function. */ - -void -glibtop_init_proc_uid_p (glibtop *server) -{ - server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid; -} - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, - pid_t pid) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_UID, 0); - - memset (buf, 0, sizeof (glibtop_proc_uid)); -} diff --git a/sysdeps/stub_suid/sem_limits.c b/sysdeps/stub_suid/sem_limits.c deleted file mode 100644 index b1aa85cd..00000000 --- a/sysdeps/stub_suid/sem_limits.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_sem_limits = 0; - -/* Init function. */ - -void -glibtop_init_sem_limits_p (glibtop *server) -{ - server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits; -} - -/* Provides information about sysv sem limits. */ - -void -glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_sem_limits)); -} diff --git a/sysdeps/stub_suid/shm_limits.c b/sysdeps/stub_suid/shm_limits.c deleted file mode 100644 index 9aa3574c..00000000 --- a/sysdeps/stub_suid/shm_limits.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_shm_limits = 0; - -/* Init function. */ - -void -glibtop_init_shm_limits_p (glibtop *server) -{ - server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits; -} - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0); - - memset (buf, 0, sizeof (glibtop_shm_limits)); -} diff --git a/sysdeps/stub_suid/siglist.c b/sysdeps/stub_suid/siglist.c deleted file mode 100644 index 94abfdc6..00000000 --- a/sysdeps/stub_suid/siglist.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const glibtop_signame glibtop_sys_siglist [] = -{ { 0, NULL, NULL } }; diff --git a/sysdeps/stub_suid/swap.c b/sysdeps/stub_suid/swap.c deleted file mode 100644 index 2c97ebc6..00000000 --- a/sysdeps/stub_suid/swap.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_swap = 0; - -/* Init function. */ - -void -glibtop_init_swap_p (glibtop *server) -{ - server->sysdeps.swap = _glibtop_sysdeps_swap; -} - -/* Provides information about swap usage. */ - -void -glibtop_get_swap_p (glibtop *server, glibtop_swap *buf) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_SWAP, 0); - - memset (buf, 0, sizeof (glibtop_swap)); -} diff --git a/sysdeps/stub_suid/uptime.c b/sysdeps/stub_suid/uptime.c deleted file mode 100644 index 76a1d5b6..00000000 --- a/sysdeps/stub_suid/uptime.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_uptime = 0; - -/* Init function. */ - -void -glibtop_init_uptime_p (glibtop *server) -{ - server->sysdeps.uptime = _glibtop_sysdeps_uptime; -} - -/* Provides uptime and idle time. */ - -void -glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf) -{ - glibtop_init_p (server, GLIBTOP_SYSDEPS_UPTIME, 0); - - memset (buf, 0, sizeof (glibtop_uptime)); -} diff --git a/sysdeps/sun4/.cvsignore b/sysdeps/sun4/.cvsignore deleted file mode 100644 index dd420e7f..00000000 --- a/sysdeps/sun4/.cvsignore +++ /dev/null @@ -1,17 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -close.lo -cpu.lo -libgtop_sysdeps.la -loadavg.lo -mem.lo -msg_limits.lo -open.lo -proclist.lo -sem_limits.lo -shm_limits.lo -swap.lo -sysdeps.lo -uptime.lo diff --git a/sysdeps/sun4/ChangeLog b/sysdeps/sun4/ChangeLog deleted file mode 100644 index 48a1688a..00000000 --- a/sysdeps/sun4/ChangeLog +++ /dev/null @@ -1,13 +0,0 @@ -1998-10-25 Martin Baulig - - * ppp.c: New file. - -1998-08-25 Martin Baulig - - * *.c (glibtop_init_p): Using correct `(1 << GLIBTOP_SYSDPES_*)'. - (): Include. - - * glibtop_suid.h: New file. - - * ChangeLog: New file. - diff --git a/sysdeps/sun4/Makefile.am b/sysdeps/sun4/Makefile.am deleted file mode 100644 index ba4d6837..00000000 --- a/sysdeps/sun4/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -INCLUDES = @INCLUDES@ - -lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la - -libgtop_sysdeps_la_SOURCES = nosuid.c siglist.c -libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) -libgtop_sysdeps_la_LIBADD = -lkvm - -libgtop_sysdeps_suid_la_SOURCES = open.c close.c cpu.c mem.c swap.c \ - uptime.c loadavg.c shm_limits.c msg_limits.c \ - sem_limits.c proclist.c procstate.c procuid.c \ - proctime.c procmem.c procsignal.c prockernel.c \ - procsegment.c ppp.c -libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO) -libgtop_sysdeps_suid_la_LIBADD = -lkvm - -include_HEADERS = glibtop_server.h glibtop_machine.h - -noinst_HEADERS = glibtop_suid.h diff --git a/sysdeps/sun4/close.c b/sysdeps/sun4/close.c deleted file mode 100644 index a8733f0f..00000000 --- a/sysdeps/sun4/close.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 - -/* Closes pipe to gtop server. */ - -void -glibtop_close_p (glibtop *server) -{ } diff --git a/sysdeps/sun4/cpu.c b/sysdeps/sun4/cpu.c deleted file mode 100644 index 9c27e538..00000000 --- a/sysdeps/sun4/cpu.c +++ /dev/null @@ -1,107 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_cpu = -(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) + -(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) + -(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY); - -/* Provides information about cpu usage. */ - -void -glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf) -{ - long cp_time [CPUSTATES], mp_time [NCPU][CPUSTATES]; - int i; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_CPU), 0); - - memset (buf, 0, sizeof (glibtop_cpu)); - - /* !!! THE FOLLOWING CODE RUNS SGID KMEM - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - /* get the cp_time array */ - - (void) _glibtop_getkval (server, _glibtop_nlist [X_CP_TIME].n_value, - (int *) cp_time, sizeof (cp_time), - _glibtop_nlist [X_CP_TIME].n_name); - -#ifdef MULTIPROCESSOR - /* get the mp_time array as well */ - - if (server->machine.ncpu > 1) { - (void) _glibtop_getkval (server, _glibtop_nlist [X_MP_TIME].n_value, - (int *) mp_time, sizeof (mp_time), - _glibtop_nlist [X_MP_TIME].n_name); - } -#endif - - glibtop_suid_leave (server); - - /* !!! END OF SUID ROOT PART !!! */ - -#ifdef MULTIPROCESSOR - /* If we have multiple processors, we add the times for each of them - * and set frequency to 100 times the number of the processors. */ - - /* [FIXME]: I had no machine with more than one processor to test - * this code !!! */ - - if (server->machine.ncpu > 1) { - for (i = 0; i < server->machine.ncpu; i++) { - buf->user += mp_time [i][CP_USER]; - buf->nice += mp_time [i][CP_NICE]; - buf->sys += mp_time [i][CP_SYS]; - buf->idle += mp_time [i][CP_IDLE]; - buf->frequency += 100; - } - } else { - buf->user = cp_time [CP_USER]; - buf->nice = cp_time [CP_NICE]; - buf->sys = cp_time [CP_SYS]; - buf->idle = cp_time [CP_IDLE]; - buf->frequency = 100; - } -#else - buf->user = cp_time [CP_USER]; - buf->nice = cp_time [CP_NICE]; - buf->sys = cp_time [CP_SYS]; - buf->idle = cp_time [CP_IDLE]; - buf->frequency = 100; -#endif - - /* Calculate total time. */ - - buf->total = buf->user + buf->nice + buf->sys + buf->idle; - - /* Now we can set the flags. */ - - buf->flags = _glibtop_sysdeps_cpu; -} diff --git a/sysdeps/sun4/glibtop_machine.h b/sysdeps/sun4/glibtop_machine.h deleted file mode 100644 index 8ab56840..00000000 --- a/sysdeps/sun4/glibtop_machine.h +++ /dev/null @@ -1,117 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_MACHINE_H__ -#define __GLIBTOP_MACHINE_H__ - -/* make sure param.h gets loaded with KERNEL defined to get PZERO & NZERO */ -#define KERNEL -#include -#undef KERNEL - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef solbourne -#include -#endif - -#include "loadavg.h" - -BEGIN_LIBGTOP_DECLS - -/* Older versions of SunOS don't have a typedef for pid_t. - Hopefully this will catch all those cases without causing other problems. - */ -#ifndef __sys_stdtypes_h -typedef int pid_t; -#endif - -/* definitions for indices in the nlist array */ -#define X_AVENRUN 0 -#define X_CCPU 1 -#define X_MPID 2 -#define X_NPROC 3 -#define X_PROC 4 -#define X_TOTAL 5 -#define X_CP_TIME 6 -#define X_PAGES 7 -#define X_EPAGES 8 -#define X_SHMINFO 9 -#define X_MSGINFO 10 -#define X_SEMINFO 11 - -#ifdef MULTIPROCESSOR -#define X_NCPU 12 -#define X_MP_TIME 13 -#endif - -/* Log base 2 of 1024 is 10 (2^10 == 1024) */ -#define LOG1024 10 - -typedef struct _glibtop_machine glibtop_machine; - -struct _glibtop_machine -{ - uid_t uid, euid; /* Real and effective user id */ - gid_t gid, egid; /* Real and effective group id */ - int nlist_count; /* Number of symbols in the nlist */ - int ncpu; /* Number of CPUs we have */ - int nproc; /* Number of entries in the process array */ - size_t ptable_size; /* Size of process array. */ - unsigned long ptable_offset; /* Offset of process array in kernel. */ - struct proc *proc_table; /* Process array. */ - unsigned long pages, epages; - struct page *physpage; - int bytesize, count; - int pageshift; /* log base 2 of the pagesize */ - kvm_t *kd; -}; - -/* Those functions are used internally in libgtop */ - -#ifdef _IN_LIBGTOP - -extern struct nlist _glibtop_nlist[]; - -int _glibtop_check_nlist (void *server, register struct nlist *nlst); -int _glibtop_getkval (void *void_server, unsigned long offset, int *ptr, - int size, char *refstr); -void _glibtop_read_proc_table (void *void_server); -struct proc *_glibtop_find_pid (void *void_server, pid_t pid); - -#endif - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/sun4/glibtop_server.h b/sysdeps/sun4/glibtop_server.h deleted file mode 100644 index e631e43e..00000000 --- a/sysdeps/sun4/glibtop_server.h +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 (1 << GLIBTOP_SYSDEPS_CPU) -#define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM) -#define GLIBTOP_SUID_SWAP (1 << GLIBTOP_SYSDEPS_SWAP) -#define GLIBTOP_SUID_UPTIME (1 << GLIBTOP_SYSDEPS_UPTIME) -#define GLIBTOP_SUID_LOADAVG (1 << GLIBTOP_SYSDEPS_LOADAVG) -#define GLIBTOP_SUID_SHM_LIMITS (1 << GLIBTOP_SYSDEPS_SHM_LIMITS) -#define GLIBTOP_SUID_MSG_LIMITS (1 << GLIBTOP_SYSDEPS_MSG_LIMITS) -#define GLIBTOP_SUID_SEM_LIMITS (1 << GLIBTOP_SYSDEPS_SEM_LIMITS) -#define GLIBTOP_SUID_PROCLIST (1 << GLIBTOP_SYSDEPS_PROCLIST) -#define GLIBTOP_SUID_PROC_STATE (1 << GLIBTOP_SYSDEPS_PROC_STATE) -#define GLIBTOP_SUID_PROC_UID (1 << GLIBTOP_SYSDEPS_PROC_UID) -#define GLIBTOP_SUID_PROC_MEM (1 << GLIBTOP_SYSDEPS_PROC_MEM) -#define GLIBTOP_SUID_PROC_TIME (1 << GLIBTOP_SYSDEPS_PROC_TIME) -#define GLIBTOP_SUID_PROC_SIGNAL (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL) -#define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL) -#define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) -#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP) - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/sun4/glibtop_suid.h b/sysdeps/sun4/glibtop_suid.h deleted file mode 100644 index 18d3b1d3..00000000 --- a/sysdeps/sun4/glibtop_suid.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , April 1998. - - LibGTop is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - LibGTop is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with LibGTop; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ - -#ifndef __GLIBTOP_SUID_H__ -#define __GLIBTOP_SUID_H__ - -BEGIN_LIBGTOP_DECLS - -static inline void glibtop_suid_enter (glibtop *server) { - setregid (server->machine.gid, server->machine.egid); -}; - -static inline void glibtop_suid_leave (glibtop *server) { - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); -}; - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags); -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, - const unsigned flags); - -END_LIBGTOP_DECLS - -#endif diff --git a/sysdeps/sun4/libsysdeps.la b/sysdeps/sun4/libsysdeps.la deleted file mode 100644 index 3f600ebb..00000000 --- a/sysdeps/sun4/libsysdeps.la +++ /dev/null @@ -1,19 +0,0 @@ -# libsysdeps.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.0h - -# The name that we can dlopen(3). -dlname='' - -# Names of this library. -library_names='libsysdeps.so.0.0.0 libsysdeps.so.0 libsysdeps.so' - -# The name of the static archive. -old_library='libsysdeps.a' - -# Version information for libsysdeps. -current=0 -age=0 -revision=0 - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff --git a/sysdeps/sun4/loadavg.c b/sysdeps/sun4/loadavg.c deleted file mode 100644 index 530efb9a..00000000 --- a/sysdeps/sun4/loadavg.c +++ /dev/null @@ -1,67 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_loadavg = -(1 << GLIBTOP_LOADAVG_LOADAVG); - -/* Provides load averange. */ - -void -glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf) -{ - load_avg avenrun [3]; - int i; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_LOADAVG), 0); - - memset (buf, 0, sizeof (glibtop_loadavg)); - - /* !!! THE FOLLOWING CODE RUNS SGID KMEM - CHANGE WITH CAUTION !!! */ - - setregid (server->machine.gid, server->machine.egid); - - /* get the load average array */ - - (void) _glibtop_getkval (server, _glibtop_nlist [X_AVENRUN].n_value, - (int *) avenrun, sizeof (avenrun), - _glibtop_nlist [X_AVENRUN].n_name); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SGID KMEM PART !!! */ - - for (i = 0; i < 3; i++) { - /* Calculate loadavg values from avenrun. */ - buf->loadavg [i] = loaddouble (avenrun [i]); - } - - /* Now we can set the flags. */ - - buf->flags = _glibtop_sysdeps_loadavg; -} diff --git a/sysdeps/sun4/loadavg.h b/sysdeps/sun4/loadavg.h deleted file mode 100644 index f49541e7..00000000 --- a/sysdeps/sun4/loadavg.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Top - a top users display for Berkeley Unix - * - * Defines required to access load average figures. - * - * This include file sets up everything we need to access the load average - * values in the kernel in a machine independent way. First, it sets the - * typedef "load_avg" to be either double or long (depending on what is - * needed), then it defines these macros appropriately: - * - * loaddouble(la) - convert load_avg to double. - * intload(i) - convert integer to load_avg. - */ - -/* - * We assume that if FSCALE is defined, then avenrun and ccpu are type long. - * If your machine is an exception (mips, perhaps?) then make adjustments - * here. - * - * Defined types: load_avg for load averages, pctcpu for cpu percentages. - */ -#if defined(mips) && !defined(NetBSD) -# include -# if defined(FBITS) && !defined(FSCALE) -# define FSCALE (1 << FBITS) /* mips */ -# endif -#endif - -#ifdef FSCALE -# define FIXED_LOADAVG FSCALE -# define FIXED_PCTCPU FSCALE -#endif - -#ifdef ibm032 -# undef FIXED_LOADAVG -# undef FIXED_PCTCPU -# define FIXED_PCTCPU PCT_SCALE -#endif - - -#ifdef FIXED_PCTCPU - typedef long pctcpu; -# define pctdouble(p) ((double)(p) / FIXED_PCTCPU) -#else -typedef double pctcpu; -# define pctdouble(p) (p) -#endif - -#ifdef FIXED_LOADAVG - typedef long load_avg; -# define loaddouble(la) ((double)(la) / FIXED_LOADAVG) -# define intload(i) ((int)((i) * FIXED_LOADAVG)) -#else - typedef double load_avg; -# define loaddouble(la) (la) -# define intload(i) ((double)(i)) -#endif diff --git a/sysdeps/sun4/mem.c b/sysdeps/sun4/mem.c deleted file mode 100644 index 6bbac96b..00000000 --- a/sysdeps/sun4/mem.c +++ /dev/null @@ -1,91 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_mem = -(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) + -(1 << GLIBTOP_MEM_FREE) + (1 << GLIBTOP_MEM_LOCKED); - -/* define pagetok in terms of pageshift */ - -#define pagetok(size) ((size) << server->machine.pageshift) - -/* Provides information about memory usage. */ - -void -glibtop_get_mem_p (glibtop *server, glibtop_mem *buf) -{ - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MEM), 0); - - memset (buf, 0, sizeof (glibtop_mem)); - - /* !!! THE FOLLOWING CODE RUNS SGID KMEM - CHANGE WITH CAUTION !!! */ - - glibtop_suid_enter (server); - - /* get the array of physpage descriptors */ - - (void) _glibtop_getkval (server, server->machine.pages, - (int *) server->machine.physpage, - server->machine.bytesize, - "array _page"); - - glibtop_suid_leave (server); - - /* !!! END OF SGID KMEM PART !!! */ - - - { /* sum memory statistics */ - register struct page *pp; - register int cnt; - register int inuse; - register int free; - register int locked; - - /* bop thru the array counting page types */ - - pp = server->machine.physpage; - inuse = free = locked = 0; - for (cnt = server->machine.count; --cnt >= 0; pp++) { - if (pp->p_free) - free++; - else if (pp->p_lock || pp->p_keepcnt > 0) - locked++; - else - inuse++; - } - - /* convert memory stats to Kbytes */ - - buf->total = pagetok (inuse + free); - buf->used = pagetok (inuse); - buf->free = pagetok (free); - buf->locked = pagetok (locked); - - buf->flags = _glibtop_sysdeps_mem; - } -} diff --git a/sysdeps/sun4/msg_limits.c b/sysdeps/sun4/msg_limits.c deleted file mode 100644 index 7a01740c..00000000 --- a/sysdeps/sun4/msg_limits.c +++ /dev/null @@ -1,75 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -/* #define KERNEL to get declaration of `struct msginfo'. */ - -#define KERNEL - -#include -#include - -static const unsigned long _glibtop_sysdeps_msg_limits = -(1 << GLIBTOP_IPC_MSGMAP) + (1 << GLIBTOP_IPC_MSGMAX) + -(1 << GLIBTOP_IPC_MSGMNB) + (1 << GLIBTOP_IPC_MSGMNI) + -(1 << GLIBTOP_IPC_MSGSSZ) + (1 << GLIBTOP_IPC_MSGTQL); - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf) -{ - struct msginfo msginfo; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MSG_LIMITS), 0); - - memset (buf, 0, sizeof (glibtop_msg_limits)); - - /* !!! THE FOLLOWING CODE RUNS SGID KMEM - CHANGE WITH CAUTION !!! */ - - setregid (server->machine.gid, server->machine.egid); - - /* get the load average array */ - - (void) _glibtop_getkval (server, _glibtop_nlist [X_MSGINFO].n_value, - (int *) &msginfo, sizeof (msginfo), - _glibtop_nlist [X_MSGINFO].n_name); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SGID KMEM PART !!! */ - - buf->msgmap = msginfo.msgmap; - buf->msgmax = msginfo.msgmax; - buf->msgmnb = msginfo.msgmnb; - buf->msgmni = msginfo.msgmni; - buf->msgssz = msginfo.msgssz; - buf->msgtql = msginfo.msgtql; - - buf->flags = _glibtop_sysdeps_msg_limits; -} diff --git a/sysdeps/sun4/nosuid.c b/sysdeps/sun4/nosuid.c deleted file mode 100644 index cd52852c..00000000 --- a/sysdeps/sun4/nosuid.c +++ /dev/null @@ -1,35 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -void -glibtop_open_s (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) -{ } - -void -glibtop_close_s (glibtop *server) -{ } diff --git a/sysdeps/sun4/open.c b/sysdeps/sun4/open.c deleted file mode 100644 index 30fd3e1e..00000000 --- a/sysdeps/sun4/open.c +++ /dev/null @@ -1,308 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -struct nlist _glibtop_nlist[] = { -#ifdef i386 - { "avenrun" }, /* 0 */ - { "ccpu" }, /* 1 */ - { "mpid" }, /* 2 */ - { "nproc" }, /* 3 */ - { "proc" }, /* 4 */ - { "total" }, /* 5 */ - { "cp_time" }, /* 6 */ - { "pages" }, /* 7 */ - { "epages" }, /* 8 */ - { "shminfo" }, /* 9 */ - { "msginfo" }, /* 10 */ - { "seminfo" }, /* 11 */ -#else - { "_avenrun" }, /* 0 */ - { "_ccpu" }, /* 1 */ - { "_mpid" }, /* 2 */ - { "_nproc" }, /* 3 */ - { "_proc" }, /* 4 */ - { "_total" }, /* 5 */ - { "_cp_time" }, /* 6 */ - { "_pages" }, /* 7 */ - { "_epages" }, /* 8 */ - { "_shminfo" }, /* 9 */ - { "_msginfo" }, /* 10 */ - { "_seminfo" }, /* 11 */ -#ifdef MULTIPROCESSOR - { "_ncpu" }, - { "_mp_time" }, -#endif -#endif - { 0 } -}; - -/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */ - -/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */ - -void -glibtop_init_p (glibtop *server, const unsigned long features, - const unsigned flags) -{ - if (server == NULL) - glibtop_error_r (NULL, "glibtop_init_p (server == NULL)"); - - glibtop_open_p (server, "glibtop", features, flags); -} - -void -glibtop_open_p (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) -{ - register int pagesize; - - /* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */ - - server->name = program_name; - - server->machine.uid = getuid (); - server->machine.euid = geteuid (); - server->machine.gid = getgid (); - server->machine.egid = getegid (); - - /* initialize the kernel interface */ - - server->machine.kd = kvm_open (NULL, NULL, NULL, O_RDONLY, "libgtop"); - - if (server->machine.kd == NULL) - glibtop_error_io_r (server, "kvm_open"); - - /* get the list of symbols we want to access in the kernel */ - - server->machine.nlist_count = kvm_nlist - (server->machine.kd, _glibtop_nlist); - - if (server->machine.nlist_count < 0) - glibtop_error_io_r (server, "nlist"); - -#ifdef MULTIPROCESSOR - /* were ncpu and xp_time not found in the nlist? */ - - if ((server->machine.nlist_count > 0) && - (_glibtop_nlist[X_NCPU].n_type == 0) && - (_glibtop_nlist[X_MP_TIME].n_type == 0)) { - /* we were compiled on an MP system but we are not running - * on one, so we will pretend this didn't happen and set - * ncpu = 1 */ - server->machine.nlist_count -= 2; - server->machine.ncpu = 1; - } -#endif - -#ifdef solbourne - { - unsigned int status, type; - - /* Get the number of CPUs on this system. */ - syscall(SYS_getcpustatus, &status, - &server->machine.ncpu, &type); - } -#endif - - /* Make sure all of the symbols were found. */ - - if ((server->machine.nlist_count > 0) && - (_glibtop_check_nlist (server, _glibtop_nlist) > 0)) - _exit (1); - - /* Get process array stuff. */ - - (void) _glibtop_getkval (server, _glibtop_nlist[X_NPROC].n_value, - (int *)(&server->machine.nproc), - sizeof (server->machine.nproc), - _glibtop_nlist[X_NPROC].n_name); - - (void) _glibtop_getkval (server, _glibtop_nlist[X_PROC].n_value, - (int *)(&server->machine.ptable_offset), - sizeof (server->machine.ptable_offset), - _glibtop_nlist[X_PROC].n_name); - - server->machine.ptable_size = (unsigned long) server->machine.nproc * - (unsigned long) sizeof (struct proc); - - server->machine.proc_table = glibtop_malloc_r - (server, server->machine.ptable_size); - - /* This are for the memory statistics. */ - - (void) _glibtop_getkval (server, _glibtop_nlist[X_PAGES].n_value, - (int *)(&server->machine.pages), - sizeof (server->machine.pages), - _glibtop_nlist[X_PAGES].n_name); - - (void) _glibtop_getkval (server, _glibtop_nlist[X_EPAGES].n_value, - (int *)(&server->machine.epages), - sizeof (server->machine.epages), - _glibtop_nlist[X_EPAGES].n_name); - - server->machine.bytesize = server->machine.epages - - server->machine.pages; - server->machine.count = server->machine.bytesize / - sizeof (struct page); - - server->machine.physpage = (struct page *) - glibtop_malloc_r (server, server->machine.bytesize); - - /* get the page size with "getpagesize" and - * calculate pageshift from it */ - - pagesize = getpagesize(); - - server->machine.pageshift = 0; - - while (pagesize > 1) { - server->machine.pageshift++; - pagesize >>= 1; - } - - /* we only need the amount of log(2)1024 for our conversion */ - - server->machine.pageshift -= LOG1024; - - /* Drop priviledges. */ - - if (setreuid (server->machine.euid, server->machine.uid)) - _exit (1); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SUID ROOT PART !!! */ - - /* Our effective uid is now those of the user invoking the server, - * so we do no longer have any priviledges. */ - - /* NOTE: On SunOS, we do not need to be suid root, we just need to - * be sgid kmem. - * - * The server will only use setegid() to get back it's priviledges, - * so it will fail if it is suid root and not sgid kmem. */ -} - -/* Used internally. Returns number of symbols that cannot be found in - * the nlist. */ - -int -_glibtop_check_nlist (void *server, register struct nlist *nlst) -{ - register int not_found; - - /* check to see if we got ALL the symbols we requested */ - /* this will write one line to stderr for every symbol not found */ - - not_found = 0; - - while (nlst->n_name != NULL) { - -#ifdef i386 - if (nlst->n_value == 0) { - glibtop_error_r (server, - "kernel: no symbol named `%s'", - nlst->n_name); - not_found++; - } -#else - if (nlst->n_type == 0) { - glibtop_error_r (server, - "kernel: no symbol named `%s'", - nlst->n_name); - not_found++; - } -#endif - - nlst++; - } - - return not_found; -} - -/* Used internally. Fetches value from kernel. */ - -int -_glibtop_getkval (void *void_server, unsigned long offset, int *ptr, - int size, char *refstr) -{ - glibtop *server = (glibtop *) void_server; - - if (kvm_read (server->machine.kd, offset, ptr, size) != size) - { - if (*refstr == '!') return 0; - - glibtop_error_r (server, "kvm_read(%s): %s", - refstr, strerror (errno)); - } - - return 1; -} - -/* Used internally. Reads process table from kernel. */ - -void -_glibtop_read_proc_table (void *void_server) -{ - glibtop *server = (glibtop *) void_server; - - /* !!! THE FOLLOWING CODE RUNS SGID KMEM - CHANGE WITH CAUTION !!! */ - - setregid (server->machine.gid, server->machine.egid); - - /* Read process table from kernel. */ - - (void) _glibtop_getkval (server, server->machine.ptable_offset, - (int *) server->machine.proc_table, - (size_t) server->machine.ptable_size, - _glibtop_nlist[X_PROC].n_name); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SGID KMEM PART !!! */ -} - -/* Used internally. Finds pid in process table. */ - -struct proc * -_glibtop_find_pid (void *void_server, pid_t pid) -{ - register struct proc *pp; - register int i; - - glibtop *server = (glibtop *) void_server; - - for (pp = server->machine.proc_table, i = 0; - i < server->machine.nproc; pp++, i++) { - if ((pp->p_stat != 0) && (pp->p_pid == pid)) - return pp; - } - - return NULL; -} diff --git a/sysdeps/sun4/ppp.c b/sysdeps/sun4/ppp.c deleted file mode 100644 index 6d0905d5..00000000 --- a/sysdeps/sun4/ppp.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -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)); -} diff --git a/sysdeps/sun4/procdata.c b/sysdeps/sun4/procdata.c deleted file mode 100644 index 50756730..00000000 --- a/sysdeps/sun4/procdata.c +++ /dev/null @@ -1,33 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -/* Provides detailed information about a process. */ - -void -glibtop_get_procdata_p (glibtop *server, glibtop_procdata *buf, pid_t pid) -{ - memset (buf, 0, sizeof (glibtop_procdata)); -} diff --git a/sysdeps/sun4/prockernel.c b/sysdeps/sun4/prockernel.c deleted file mode 100644 index 603e881b..00000000 --- a/sysdeps/sun4/prockernel.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_kernel = -(1 << GLIBTOP_PROC_KERNEL_K_FLAGS) + (1 << GLIBTOP_PROC_KERNEL_WCHAN); - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf, - pid_t pid) -{ - struct proc *pp; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_KERNEL), 0); - - memset (buf, 0, sizeof (glibtop_proc_kernel)); - - /* Read process table from kernel. */ - - _glibtop_read_proc_table (server); - - /* Find the pid in the process table. */ - - pp = _glibtop_find_pid (server, pid); - - if (pp == NULL) return; - - /* Fill in data fields. */ - - buf->k_flags = pp->p_flag; - buf->nwchan = (unsigned long) pp->p_wchan; - - buf->flags = _glibtop_sysdeps_proc_kernel; -} diff --git a/sysdeps/sun4/proclist.c b/sysdeps/sun4/proclist.c deleted file mode 100644 index 4b6fc42e..00000000 --- a/sysdeps/sun4/proclist.c +++ /dev/null @@ -1,97 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_proclist = -(1 << GLIBTOP_PROCLIST_TOTAL) + (1 << GLIBTOP_PROCLIST_NUMBER) + -(1 << GLIBTOP_PROCLIST_SIZE); - -/* 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_p (glibtop *server, glibtop_proclist *buf, - int64_t which, int64_t arg) -{ - register struct proc *pp; - register int i, nproc = 0; - unsigned *proc_list = NULL; - size_t proc_size; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROCLIST), 0); - - memset (buf, 0, sizeof (glibtop_proclist)); - - /* Read process table from kernel. */ - - _glibtop_read_proc_table (server); - - /* Count number of processes. */ - - for (pp = server->machine.proc_table, i = 0; - i < server->machine.nproc; pp++, i++) { - if (pp->p_stat == 0) - continue; - else - nproc++; - } - - if (nproc == 0) /* Should never happen. */ - return NULL; - - /* Allocate space for process list. */ - - proc_size = nproc * sizeof (unsigned); - - proc_list = glibtop_malloc_r (server, proc_size); - - /* Write process list. */ - - for (pp = server->machine.proc_table, i = 0, nproc = 0; - i < server->machine.nproc; pp++, i++) { - if (pp->p_stat == 0) - continue; - proc_list [nproc++] = pp->p_pid; - } - - /* Since everything is ok now, we can set buf->flags, fill in the remaining fields - and return proc_list. */ - - buf->flags = _glibtop_sysdeps_proclist; - - buf->size = sizeof (unsigned); - buf->number = nproc; - - buf->total = nproc * sizeof (unsigned); - - return proc_list; -} diff --git a/sysdeps/sun4/procmem.c b/sysdeps/sun4/procmem.c deleted file mode 100644 index 979fc7af..00000000 --- a/sysdeps/sun4/procmem.c +++ /dev/null @@ -1,63 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_mem = -(1 << GLIBTOP_PROC_MEM_SIZE) + (1 << GLIBTOP_PROC_MEM_RSS) + -(1 << GLIBTOP_PROC_MEM_RSS_RLIM); - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, - pid_t pid) -{ - struct proc *pp; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MEM), 0); - - memset (buf, 0, sizeof (glibtop_proc_mem)); - - /* Read process table from kernel. */ - - _glibtop_read_proc_table (server); - - /* Find the pid in the process table. */ - - pp = _glibtop_find_pid (server, pid); - - if (pp == NULL) return; - - /* Fill in data fields. */ - - buf->size = (pp)->p_tsize + (pp)->p_dsize + (pp)->p_ssize; - - buf->rss = pp->p_rssize; - buf->rss_rlim = pp->p_maxrss; - - buf->flags = _glibtop_sysdeps_proc_mem; -} diff --git a/sysdeps/sun4/procsegment.c b/sysdeps/sun4/procsegment.c deleted file mode 100644 index 8dd64bea..00000000 --- a/sysdeps/sun4/procsegment.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_segment = -(1 << GLIBTOP_PROC_SEGMENT_TEXT_RSS) + -(1 << GLIBTOP_PROC_SEGMENT_DATA_RSS); - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, - pid_t pid) -{ - struct proc *pp; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0); - - memset (buf, 0, sizeof (glibtop_proc_segment)); - - /* Read process table from kernel. */ - - _glibtop_read_proc_table (server); - - /* Find the pid in the process table. */ - - pp = _glibtop_find_pid (server, pid); - - if (pp == NULL) return; - - /* Fill in data fields. */ - - buf->text_rss = pp->p_tsize; - buf->data_rss = pp->p_dsize; - - buf->flags = _glibtop_sysdeps_proc_segment; -} diff --git a/sysdeps/sun4/procsignal.c b/sysdeps/sun4/procsignal.c deleted file mode 100644 index 66a5a2bc..00000000 --- a/sysdeps/sun4/procsignal.c +++ /dev/null @@ -1,63 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_signal = -(1 << GLIBTOP_PROC_SIGNAL_SIGNAL) + (1 << GLIBTOP_PROC_SIGNAL_BLOCKED) + -(1 << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + (1 << GLIBTOP_PROC_SIGNAL_SIGCATCH); - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf, - pid_t pid) -{ - struct proc *pp; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0); - - memset (buf, 0, sizeof (glibtop_proc_signal)); - - /* Read process table from kernel. */ - - _glibtop_read_proc_table (server); - - /* Find the pid in the process table. */ - - pp = _glibtop_find_pid (server, pid); - - if (pp == NULL) return; - - /* Fill in data fields. */ - - buf->signal [0] = pp->p_sig; - buf->blocked [0] = pp->p_sigmask; - buf->sigignore [0] = pp->p_sigignore; - buf->sigcatch [0] = pp->p_sigcatch; - - buf->flags = _glibtop_sysdeps_proc_signal; -} diff --git a/sysdeps/sun4/procstate.c b/sysdeps/sun4/procstate.c deleted file mode 100644 index 4ce3734d..00000000 --- a/sysdeps/sun4/procstate.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_state = -(1 << GLIBTOP_PROC_STATE_STATE) + (1 << GLIBTOP_PROC_STATE_UID); - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf, - pid_t pid) -{ - struct proc *pp; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_STATE), 0); - - memset (buf, 0, sizeof (glibtop_proc_state)); - - /* Read process table from kernel. */ - - _glibtop_read_proc_table (server); - - /* Find the pid in the process table. */ - - pp = _glibtop_find_pid (server, pid); - - if (pp == NULL) return; - - /* Fill in data fields. */ - - buf->state = pp->p_stat; - buf->uid = pp->p_uid; - - buf->flags = _glibtop_sysdeps_proc_state; -} diff --git a/sysdeps/sun4/proctime.c b/sysdeps/sun4/proctime.c deleted file mode 100644 index 9541f948..00000000 --- a/sysdeps/sun4/proctime.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_time = -(1 << GLIBTOP_PROC_TIME_START_TIME) + (1 << GLIBTOP_PROC_TIME_UTIME); - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, - pid_t pid) -{ - struct proc *pp; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_TIME), 0); - - memset (buf, 0, sizeof (glibtop_proc_time)); - - /* Read process table from kernel. */ - - _glibtop_read_proc_table (server); - - /* Find the pid in the process table. */ - - pp = _glibtop_find_pid (server, pid); - - if (pp == NULL) return; - - /* Fill in data fields. */ - - buf->start_time = pp->p_time; - buf->utime = pp->p_cpticks; - - buf->flags = _glibtop_sysdeps_proc_time; -} diff --git a/sysdeps/sun4/procuid.c b/sysdeps/sun4/procuid.c deleted file mode 100644 index 5ff0e5bf..00000000 --- a/sysdeps/sun4/procuid.c +++ /dev/null @@ -1,71 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -static const unsigned long _glibtop_sysdeps_proc_uid = -(1 << GLIBTOP_PROC_UID_UID) + (1 << GLIBTOP_PROC_UID_EUID) + -(1 << GLIBTOP_PROC_UID_EGID) + (1 << GLIBTOP_PROC_UID_PID) + -(1 << GLIBTOP_PROC_UID_PPID) + (1 << GLIBTOP_PROC_UID_PGRP) + -(1 << GLIBTOP_PROC_UID_TPGID) + (1 << GLIBTOP_PROC_UID_PRIORITY) + -(1 << GLIBTOP_PROC_UID_NICE); - -/* Provides detailed information about a process. */ - -void -glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, - pid_t pid) -{ - struct proc *pp; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_UID), 0); - - memset (buf, 0, sizeof (glibtop_proc_uid)); - - /* Read process table from kernel. */ - - _glibtop_read_proc_table (server); - - /* Find the pid in the process table. */ - - pp = _glibtop_find_pid (server, pid); - - if (pp == NULL) return; - - /* Fill in data fields. */ - - buf->uid = pp->p_uid; - buf->euid = pp->p_suid; - buf->egid = pp->p_sgid; - buf->pid = pp->p_pid; - buf->ppid = pp->p_ppid; - buf->pgrp = pp->p_pgrp; - buf->tpgid = pp->p_pgrp; - buf->priority = pp->p_pri; - buf->nice = pp->p_nice; - - buf->flags = _glibtop_sysdeps_proc_uid; -} diff --git a/sysdeps/sun4/sem_limits.c b/sysdeps/sun4/sem_limits.c deleted file mode 100644 index e6f07c6c..00000000 --- a/sysdeps/sun4/sem_limits.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -/* #define KERNEL to get declaration of `struct seminfo'. */ - -#define KERNEL - -#include -#include - -static unsigned long _glibtop_sysdeps_sem_limits = -(1 << GLIBTOP_IPC_SEMMAP) + (1 << GLIBTOP_IPC_SEMMNI) + -(1 << GLIBTOP_IPC_SEMMNS) + (1 << GLIBTOP_IPC_SEMMNU) + -(1 << GLIBTOP_IPC_SEMMSL) + (1 << GLIBTOP_IPC_SEMOPM) + -(1 << GLIBTOP_IPC_SEMUME) + (1 << GLIBTOP_IPC_SEMUSZ) + -(1 << GLIBTOP_IPC_SEMVMX) + (1 << GLIBTOP_IPC_SEMAEM); - -/* Provides information about sysv sem limits. */ - -void -glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf) -{ - struct seminfo seminfo; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SEM_LIMITS), 0); - - memset (buf, 0, sizeof (glibtop_sem_limits)); - - /* !!! THE FOLLOWING CODE RUNS SGID KMEM - CHANGE WITH CAUTION !!! */ - - setregid (server->machine.gid, server->machine.egid); - - /* get the load average array */ - - (void) _glibtop_getkval (server, _glibtop_nlist [X_SEMINFO].n_value, - (int *) &seminfo, sizeof (seminfo), - _glibtop_nlist [X_SEMINFO].n_name); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SGID KMEM PART !!! */ - - buf->semmap = seminfo.semmap; - buf->semmni = seminfo.semmni; - buf->semmns = seminfo.semmns; - buf->semmnu = seminfo.semmnu; - buf->semmsl = seminfo.semmsl; - buf->semopm = seminfo.semopm; - buf->semume = seminfo.semume; - buf->semusz = seminfo.semusz; - buf->semvmx = seminfo.semvmx; - buf->semaem = seminfo.semaem; - - buf->flags = _glibtop_sysdeps_sem_limits; -} diff --git a/sysdeps/sun4/shm_limits.c b/sysdeps/sun4/shm_limits.c deleted file mode 100644 index a5f638f2..00000000 --- a/sysdeps/sun4/shm_limits.c +++ /dev/null @@ -1,74 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -/* #define KERNEL to get declaration of `struct shminfo'. */ - -#define KERNEL - -#include -#include - -static unsigned long _glibtop_sysdeps_shm_limits = -(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) + -(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) + -(1 << GLIBTOP_IPC_SHMALL); - -/* Provides information about sysv ipc limits. */ - -void -glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf) -{ - struct shminfo shminfo; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SHM_LIMITS), 0); - - memset (buf, 0, sizeof (glibtop_shm_limits)); - - /* !!! THE FOLLOWING CODE RUNS SGID KMEM - CHANGE WITH CAUTION !!! */ - - setregid (server->machine.gid, server->machine.egid); - - /* get the load average array */ - - (void) _glibtop_getkval (server, _glibtop_nlist [X_SHMINFO].n_value, - (int *) &shminfo, sizeof (shminfo), - _glibtop_nlist [X_SHMINFO].n_name); - - if (setregid (server->machine.egid, server->machine.gid)) - _exit (1); - - /* !!! END OF SGID KMEM PART !!! */ - - buf->shmmax = shminfo.shmmax; - buf->shmmin = shminfo.shmmin; - buf->shmmni = shminfo.shmmni; - buf->shmseg = shminfo.shmseg; - buf->shmall = shminfo.shmall; - - buf->flags = _glibtop_sysdeps_shm_limits; -} diff --git a/sysdeps/sun4/siglist.c b/sysdeps/sun4/siglist.c deleted file mode 100644 index c5bd59c0..00000000 --- a/sysdeps/sun4/siglist.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -const glibtop_signame glibtop_sys_siglist [] = -{ { 1, "SIGHUP", N_("Hangup") }, - { 2, "SIGINT", N_("Interrupt") }, - { 3, "SIGQUIT", N_("Quit") }, - { 4, "SIGILL", N_("Illegal instruction") }, - { 5, "SIGTRAP", N_("Trace trap") }, - { 6, "SIGABRT", N_("Abort") }, - { 7, "SIGEMT", N_("EMT error") }, - { 8, "SIGFPE", N_("Floating-point exception") }, - { 9, "SIGKILL", N_("Kill") }, - { 10, "SIGBUS", N_("Bus error") }, - { 11, "SIGSEGV", N_("Segmentation violation") }, - { 12, "SIGSYS", N_("Bad argument to system call") }, - { 13, "SIGPIPE", N_("Broken pipe") }, - { 14, "SIGALRM", N_("Alarm clock") }, - { 15, "SIGTERM", N_("Termination") }, - { 16, "SIGURG", N_("Urgent condition on socket") }, - { 17, "SIGSTOP", N_("Stop") }, - { 18, "SIGTSTP", N_("Keyboard stop") }, - { 19, "SIGCONT", N_("Continue") }, - { 20, "SIGCHLD", N_("Child status has changed") }, - { 21, "SIGTTIN", N_("Background read from tty") }, - { 22, "SIGTTOU", N_("Background write to tty") }, - { 23, "SIGIO", N_("I/O now possible") }, - { 24, "SIGXCPU", N_("CPU limit exceeded") }, - { 25, "SIGXFSZ", N_("File size limit exceeded") }, - { 26, "SIGVTALRM", N_("Virtual alarm clock") }, - { 27, "SIGPROF", N_("Profiling alarm clock") }, - { 28, "SIGWINCH", N_("Window size change") }, - { 29, "SIGINFO", N_("Information request") }, - { 30, "SIGUSR1", N_("User defined signal 1") }, - { 31, "SIGUSR2", N_("User defined signal 2") }, - { 0, NULL, NULL }, -}; diff --git a/sysdeps/sun4/swap.c b/sysdeps/sun4/swap.c deleted file mode 100644 index 3c93e3a7..00000000 --- a/sysdeps/sun4/swap.c +++ /dev/null @@ -1,37 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include - -#include - -/* Provides information about swap usage. */ - -void -glibtop_get_swap_p (glibtop *server, glibtop_swap *buf) -{ - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SWAP), 0); - - memset (buf, 0, sizeof (glibtop_swap)); -} diff --git a/sysdeps/sun4/uptime.c b/sysdeps/sun4/uptime.c deleted file mode 100644 index 023cf3f3..00000000 --- a/sysdeps/sun4/uptime.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $Id$ */ - -/* Copyright (C) 1998-99 Martin Baulig - This file is part of LibGTop 1.0. - - Contributed by Martin Baulig , 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 -#include -#include - -#include - -static const unsigned long _glibtop_sysdeps_uptime = -(1 << GLIBTOP_UPTIME_UPTIME) + (1 << GLIBTOP_UPTIME_IDLETIME); - -/* Provides uptime and idle time. */ - -void -glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf) -{ - glibtop_cpu cpu; - - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_UPTIME), 0); - - /* Get currect cpu usage. */ - - glibtop_get_cpu_p (server, &cpu); - - /* Make sure all required fields are present. */ - - if (((cpu.flags & (1 << GLIBTOP_CPU_TOTAL)) == 0) || - ((cpu.flags & (1 << GLIBTOP_CPU_IDLE)) == 0) || - ((cpu.flags & (1 << GLIBTOP_CPU_FREQUENCY)) == 0) || - (cpu.frequency == 0)) - return; - - /* Simply calculate uptime and idle time from - * cpu usage. */ - - buf->uptime = (double) cpu.total / (double) cpu.frequency; - buf->idletime = (double) cpu.idle / (double) cpu.frequency; - - buf->flags = _glibtop_sysdeps_uptime; -}