summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Perelló Marín <carlos@gnome.org>2003-10-19 16:55:56 +0000
committerCarlos Perelló Marín <carlos@src.gnome.org>2003-10-19 16:55:56 +0000
commit4c8ae9e25c1940d8876ca3f2330426863cae4737 (patch)
treec43f97bc0647546b0ed87022db0749c137f24edc
parentbae16b467f90df94d80feae41dceb7e816f16c61 (diff)
downloadlibgtop-4c8ae9e25c1940d8876ca3f2330426863cae4737.tar.gz
Reverted libgtop changes. It's a common module and I should not modify it.
2003-10-19 Carlos Perelló Marín <carlos@gnome.org> * support/*: Reverted libgtop changes. It's a common module and I should not modify it. * Added/removed files. Now the move should be done.
-rw-r--r--ChangeLog6
-rw-r--r--RELNOTES-1.0.x172
-rw-r--r--debian/libgtop1.README.Debian5
-rw-r--r--debian/libgtop1.copyright12
-rw-r--r--debian/libgtop1.docs5
-rw-r--r--debian/libgtop1.files.in4
-rw-r--r--doc/libgtop2.texi (renamed from doc/libgtop.texi)4
-rw-r--r--examples/.cvsignore16
-rw-r--r--examples/ChangeLog94
-rw-r--r--examples/Makefile.am121
-rw-r--r--examples/first.c575
-rw-r--r--examples/mountlist.c113
-rw-r--r--examples/netload.c125
-rw-r--r--examples/procmap.c164
-rw-r--r--examples/second.c300
-rw-r--r--examples/smp.c127
-rw-r--r--examples/sysdeps.c148
-rw-r--r--examples/test.scm80
-rw-r--r--examples/third.c57
-rw-r--r--examples/timings.c357
-rw-r--r--include/glibtop/command.h102
-rw-r--r--include/glibtop/gnuserv.h161
-rw-r--r--include/glibtop/read.h39
-rw-r--r--include/glibtop/read_data.h39
-rw-r--r--include/glibtop/version.h42
-rw-r--r--include/glibtop/write.h39
-rw-r--r--kernel/ChangeLog14
-rw-r--r--kernel/sysctl/patch-2.2.181
-rw-r--r--kernel/table.h188
-rw-r--r--kernel/table20/Makefile13
-rw-r--r--kernel/table20/README21
-rw-r--r--kernel/table20/entry-i386.S706
-rw-r--r--kernel/table20/kernel.patch51
-rw-r--r--kernel/table20/main.c468
-rw-r--r--kernel/table20/unistd-i386.h324
-rw-r--r--kernel/table20/version.h1
-rw-r--r--kernel/table21/.cvsignore4
-rw-r--r--kernel/table21/Makefile16
-rw-r--r--kernel/table21/README21
-rw-r--r--kernel/table21/entry-i386.S571
-rw-r--r--kernel/table21/main.c61
-rw-r--r--kernel/table21/module.c607
-rw-r--r--kernel/table21/unistd-i386.h344
-rw-r--r--kernel/table21/version.h1
-rw-r--r--kernel/version.h1
-rw-r--r--lib/command.c77
-rw-r--r--lib/read.c76
-rw-r--r--lib/read_data.c69
-rw-r--r--lib/write.c49
-rw-r--r--libgtop-sysdeps.m4300
-rw-r--r--po/LEEME.es26
-rw-r--r--po/POTFILES.ignore6
-rw-r--r--po/ar.po1359
-rw-r--r--po/be.po1412
-rw-r--r--po/bn.po1594
-rw-r--r--po/cs.po1349
-rw-r--r--po/cy.po1362
-rw-r--r--po/es_DO.po1186
-rw-r--r--po/es_GT.po1186
-rw-r--r--po/es_PA.po1186
-rw-r--r--po/es_PE.po1186
-rw-r--r--po/es_SV.po1186
-rw-r--r--po/et.po (renamed from po/es_MX.po)1159
-rw-r--r--po/he.po1333
-rw-r--r--po/hi.po1331
-rw-r--r--po/lv.po1361
-rw-r--r--po/mk.po1363
-rw-r--r--po/ms.po1341
-rw-r--r--po/sq.po1335
-rw-r--r--po/ta.po (renamed from po/es_HN.po)1092
-rw-r--r--src/daemon/.cvsignore7
-rw-r--r--src/daemon/ChangeLog104
-rw-r--r--src/daemon/Makefile.am53
-rw-r--r--src/daemon/daemon.h81
-rw-r--r--src/daemon/gnuserv.c643
-rw-r--r--src/daemon/io.c98
-rw-r--r--src/daemon/main.c237
-rw-r--r--src/daemon/server.c110
-rw-r--r--src/daemon/server_config.h11
-rw-r--r--src/daemon/server_config.h.in44
-rwxr-xr-xsrc/daemon/server_config.pl111
-rw-r--r--src/daemon/slave.c256
-rw-r--r--src/daemon/version.c62
-rw-r--r--src/inodedb/file_by_inode2.c (renamed from src/inodedb/file_by_inode.c)46
-rw-r--r--src/inodedb/mkinodedb.c137
-rw-r--r--src/inodedb/mkinodedb2.c135
-rw-r--r--sysdeps/aix/ChangeLog3
-rw-r--r--sysdeps/aix/Makefile.am23
-rw-r--r--sysdeps/aix/close.c30
-rw-r--r--sysdeps/aix/cpu.c125
-rw-r--r--sysdeps/aix/glibtop_machine.h53
-rw-r--r--sysdeps/aix/glibtop_server.h52
-rw-r--r--sysdeps/aix/glibtop_suid.h52
-rw-r--r--sysdeps/aix/loadavg.c78
-rw-r--r--sysdeps/aix/mem.c76
-rw-r--r--sysdeps/aix/msg_limits.c81
-rw-r--r--sysdeps/aix/netload.c207
-rw-r--r--sysdeps/aix/nosuid.c46
-rw-r--r--sysdeps/aix/open.c82
-rw-r--r--sysdeps/aix/ppp.c44
-rw-r--r--sysdeps/aix/procargs.c132
-rw-r--r--sysdeps/aix/prockernel.c98
-rw-r--r--sysdeps/aix/proclist.c247
-rw-r--r--sysdeps/aix/procmap.c50
-rw-r--r--sysdeps/aix/procmem.c73
-rw-r--r--sysdeps/aix/procsegment.c74
-rw-r--r--sysdeps/aix/procsignal.c89
-rw-r--r--sysdeps/aix/procstate.c127
-rw-r--r--sysdeps/aix/proctime.c72
-rw-r--r--sysdeps/aix/procuid.c101
-rw-r--r--sysdeps/aix/sem_limits.c86
-rw-r--r--sysdeps/aix/shm_limits.c79
-rw-r--r--sysdeps/aix/siglist.c72
-rw-r--r--sysdeps/aix/swap.c128
-rw-r--r--sysdeps/aix/sysinfo.c194
-rw-r--r--sysdeps/aix/uptime.c73
-rw-r--r--sysdeps/aix/utils.c141
-rw-r--r--sysdeps/aix/utils.h45
-rw-r--r--sysdeps/common/error.c88
-rw-r--r--sysdeps/common/gnuslib.c375
-rw-r--r--sysdeps/common/inodedb.c117
-rw-r--r--sysdeps/common/xmalloc.c72
-rw-r--r--sysdeps/freebsd/.cvsignore6
-rw-r--r--sysdeps/freebsd/AUTHORS2
-rw-r--r--sysdeps/freebsd/ChangeLog188
-rw-r--r--sysdeps/freebsd/Makefile.am23
-rw-r--r--sysdeps/freebsd/NOTES10
-rw-r--r--sysdeps/freebsd/close.c31
-rw-r--r--sysdeps/freebsd/cpu.c117
-rw-r--r--sysdeps/freebsd/glibtop_machine.h59
-rw-r--r--sysdeps/freebsd/glibtop_server.h52
-rw-r--r--sysdeps/freebsd/glibtop_suid.h58
-rw-r--r--sysdeps/freebsd/init.c45
-rw-r--r--sysdeps/freebsd/loadavg.c60
-rw-r--r--sysdeps/freebsd/mem.c222
-rw-r--r--sysdeps/freebsd/msg_limits.c115
-rw-r--r--sysdeps/freebsd/netload.c219
-rw-r--r--sysdeps/freebsd/nosuid.c37
-rw-r--r--sysdeps/freebsd/open.c95
-rw-r--r--sysdeps/freebsd/ppp.c144
-rw-r--r--sysdeps/freebsd/procargs.c111
-rw-r--r--sysdeps/freebsd/procdata.c180
-rw-r--r--sysdeps/freebsd/prockernel.c184
-rw-r--r--sysdeps/freebsd/proclist.c103
-rw-r--r--sysdeps/freebsd/procmap.c266
-rw-r--r--sysdeps/freebsd/procmem.c259
-rw-r--r--sysdeps/freebsd/procsegment.c82
-rw-r--r--sysdeps/freebsd/procsignal.c107
-rw-r--r--sysdeps/freebsd/procstate.c137
-rw-r--r--sysdeps/freebsd/proctime.c229
-rw-r--r--sysdeps/freebsd/procuid.c128
-rw-r--r--sysdeps/freebsd/sem_limits.c120
-rw-r--r--sysdeps/freebsd/shm_limits.c115
-rw-r--r--sysdeps/freebsd/siglist.c28
-rw-r--r--sysdeps/freebsd/swap.c426
-rw-r--r--sysdeps/freebsd/uptime.c73
-rw-r--r--sysdeps/guile/.cvsignore9
-rw-r--r--sysdeps/guile/ChangeLog50
-rw-r--r--sysdeps/guile/Makefile.am27
-rw-r--r--sysdeps/guile/guile.pl274
-rw-r--r--sysdeps/guile/names/.cvsignore10
-rw-r--r--sysdeps/guile/names/Makefile.am25
-rw-r--r--sysdeps/guile/names/guile-names.pl197
-rw-r--r--sysdeps/kernel/.cvsignore28
-rw-r--r--sysdeps/kernel/ChangeLog27
-rw-r--r--sysdeps/kernel/Makefile.am25
-rw-r--r--sysdeps/kernel/close.c30
-rw-r--r--sysdeps/kernel/cpu.c65
-rw-r--r--sysdeps/kernel/glibtop_private.h89
-rw-r--r--sysdeps/kernel/glibtop_server.h52
-rw-r--r--sysdeps/kernel/kernel.h40
-rw-r--r--sysdeps/kernel/kernel.s42
-rw-r--r--sysdeps/kernel/loadavg.c65
-rw-r--r--sysdeps/kernel/mem.c68
-rw-r--r--sysdeps/kernel/msg_limits.c65
-rw-r--r--sysdeps/kernel/netload.c45
-rw-r--r--sysdeps/kernel/open.c63
-rw-r--r--sysdeps/kernel/ppp.c44
-rw-r--r--sysdeps/kernel/procargs.c47
-rw-r--r--sysdeps/kernel/procdata.c180
-rw-r--r--sysdeps/kernel/prockernel.c68
-rw-r--r--sysdeps/kernel/proclist.c86
-rw-r--r--sysdeps/kernel/procmap.c49
-rw-r--r--sysdeps/kernel/procmem.c70
-rw-r--r--sysdeps/kernel/procsegment.c77
-rw-r--r--sysdeps/kernel/procsignal.c63
-rw-r--r--sysdeps/kernel/procstate.c75
-rw-r--r--sysdeps/kernel/proctime.c73
-rw-r--r--sysdeps/kernel/procuid.c105
-rw-r--r--sysdeps/kernel/sem_limits.c86
-rw-r--r--sysdeps/kernel/shm_limits.c62
-rw-r--r--sysdeps/kernel/siglist.c60
-rw-r--r--sysdeps/kernel/swap.c65
-rw-r--r--sysdeps/kernel/sysinfo.c94
-rw-r--r--sysdeps/kernel/uptime.c64
-rw-r--r--sysdeps/linux/.cvsignore6
-rw-r--r--sysdeps/linux/ChangeLog140
-rw-r--r--sysdeps/linux/Makefile.am18
-rw-r--r--sysdeps/linux/close.c30
-rw-r--r--sysdeps/linux/cpu.c111
-rw-r--r--sysdeps/linux/glibtop_machine.h58
-rw-r--r--sysdeps/linux/glibtop_server.h135
-rw-r--r--sysdeps/linux/loadavg.c94
-rw-r--r--sysdeps/linux/mem.c81
-rw-r--r--sysdeps/linux/msg_limits.c65
-rw-r--r--sysdeps/linux/netload.c354
-rw-r--r--sysdeps/linux/open.c109
-rw-r--r--sysdeps/linux/ppp.c201
-rw-r--r--sysdeps/linux/procargs.c101
-rw-r--r--sysdeps/linux/prockernel.c77
-rw-r--r--sysdeps/linux/proclist.c233
-rw-r--r--sysdeps/linux/procmap.c138
-rw-r--r--sysdeps/linux/procmem.c104
-rw-r--r--sysdeps/linux/procsegment.c115
-rw-r--r--sysdeps/linux/procsignal.c65
-rw-r--r--sysdeps/linux/procstate.c93
-rw-r--r--sysdeps/linux/proctime.c103
-rw-r--r--sysdeps/linux/procuid.c126
-rw-r--r--sysdeps/linux/sem_limits.c86
-rw-r--r--sysdeps/linux/shm_limits.c62
-rw-r--r--sysdeps/linux/siglist.c60
-rw-r--r--sysdeps/linux/swap.c104
-rw-r--r--sysdeps/linux/sysinfo.c94
-rw-r--r--sysdeps/linux/uptime.c69
-rw-r--r--sysdeps/osf1/.cvsignore21
-rw-r--r--sysdeps/osf1/ChangeLog20
-rw-r--r--sysdeps/osf1/Makefile.am23
-rw-r--r--sysdeps/osf1/close.c30
-rw-r--r--sysdeps/osf1/close_suid.c30
-rw-r--r--sysdeps/osf1/cpu.c69
-rw-r--r--sysdeps/osf1/glibtop_machine.h50
-rw-r--r--sysdeps/osf1/glibtop_server.h52
-rw-r--r--sysdeps/osf1/glibtop_suid.h50
-rw-r--r--sysdeps/osf1/loadavg.c73
-rw-r--r--sysdeps/osf1/mem.c69
-rw-r--r--sysdeps/osf1/msg_limits.c87
-rw-r--r--sysdeps/osf1/netload.c45
-rw-r--r--sysdeps/osf1/open.c35
-rw-r--r--sysdeps/osf1/open_suid.c91
-rw-r--r--sysdeps/osf1/ppp.c44
-rw-r--r--sysdeps/osf1/procargs.c47
-rw-r--r--sysdeps/osf1/procdata.c150
-rw-r--r--sysdeps/osf1/prockernel.c49
-rw-r--r--sysdeps/osf1/proclist.c172
-rw-r--r--sysdeps/osf1/procmap.c46
-rw-r--r--sysdeps/osf1/procmem.c103
-rw-r--r--sysdeps/osf1/procsegment.c80
-rw-r--r--sysdeps/osf1/procsignal.c74
-rw-r--r--sysdeps/osf1/procstate.c155
-rw-r--r--sysdeps/osf1/proctime.c79
-rw-r--r--sysdeps/osf1/procuid.c132
-rw-r--r--sysdeps/osf1/sem_limits.c110
-rw-r--r--sysdeps/osf1/shm_limits.c89
-rw-r--r--sysdeps/osf1/siglist.c60
-rw-r--r--sysdeps/osf1/swap.c64
-rw-r--r--sysdeps/osf1/uptime.c61
-rw-r--r--sysdeps/solaris/.cvsignore7
-rw-r--r--sysdeps/solaris/AUTHORS2
-rw-r--r--sysdeps/solaris/ChangeLog284
-rw-r--r--sysdeps/solaris/Makefile.am28
-rw-r--r--sysdeps/solaris/close.c30
-rw-r--r--sysdeps/solaris/close_suid.c30
-rw-r--r--sysdeps/solaris/cpu.c113
-rw-r--r--sysdeps/solaris/glibtop_machine.h78
-rw-r--r--sysdeps/solaris/glibtop_private.h68
-rw-r--r--sysdeps/solaris/glibtop_server.h52
-rw-r--r--sysdeps/solaris/glibtop_suid.h48
-rw-r--r--sysdeps/solaris/loadavg.c87
-rw-r--r--sysdeps/solaris/mem.c127
-rw-r--r--sysdeps/solaris/msg_limits.c80
-rw-r--r--sysdeps/solaris/netload.c45
-rw-r--r--sysdeps/solaris/open.c234
-rw-r--r--sysdeps/solaris/open_suid.c92
-rw-r--r--sysdeps/solaris/ppp.c44
-rw-r--r--sysdeps/solaris/procargs.c83
-rw-r--r--sysdeps/solaris/procdata.c268
-rw-r--r--sysdeps/solaris/prockernel.c44
-rw-r--r--sysdeps/solaris/proclist.c251
-rw-r--r--sysdeps/solaris/procmap.c207
-rw-r--r--sysdeps/solaris/procmem.c64
-rw-r--r--sysdeps/solaris/procsegment.c44
-rw-r--r--sysdeps/solaris/procsignal.c74
-rw-r--r--sysdeps/solaris/procstate.c122
-rw-r--r--sysdeps/solaris/proctime.c69
-rw-r--r--sysdeps/solaris/procuid.c127
-rw-r--r--sysdeps/solaris/safeio.c84
-rw-r--r--sysdeps/solaris/safeio.h48
-rw-r--r--sysdeps/solaris/sem_limits.c85
-rw-r--r--sysdeps/solaris/shm_limits.c68
-rw-r--r--sysdeps/solaris/siglist.c74
-rw-r--r--sysdeps/solaris/swap.c89
-rw-r--r--sysdeps/solaris/uptime.c58
-rw-r--r--sysdeps/stub/.cvsignore27
-rw-r--r--sysdeps/stub/ChangeLog22
-rw-r--r--sysdeps/stub/Makefile.am17
-rw-r--r--sysdeps/stub/close.c30
-rw-r--r--sysdeps/stub/cpu.c43
-rw-r--r--sysdeps/stub/glibtop_server.h52
-rw-r--r--sysdeps/stub/loadavg.c43
-rw-r--r--sysdeps/stub/mem.c43
-rw-r--r--sysdeps/stub/msg_limits.c43
-rw-r--r--sysdeps/stub/netload.c45
-rw-r--r--sysdeps/stub/open.c33
-rw-r--r--sysdeps/stub/ppp.c44
-rw-r--r--sysdeps/stub/procargs.c47
-rw-r--r--sysdeps/stub/prockernel.c44
-rw-r--r--sysdeps/stub/proclist.c52
-rw-r--r--sysdeps/stub/procmap.c50
-rw-r--r--sysdeps/stub/procmem.c44
-rw-r--r--sysdeps/stub/procsegment.c44
-rw-r--r--sysdeps/stub/procsignal.c44
-rw-r--r--sysdeps/stub/procstate.c44
-rw-r--r--sysdeps/stub/proctime.c44
-rw-r--r--sysdeps/stub/procuid.c44
-rw-r--r--sysdeps/stub/sem_limits.c43
-rw-r--r--sysdeps/stub/shm_limits.c43
-rw-r--r--sysdeps/stub/siglist.c28
-rw-r--r--sysdeps/stub/swap.c43
-rw-r--r--sysdeps/stub/uptime.c43
-rw-r--r--sysdeps/stub_suid/.cvsignore28
-rw-r--r--sysdeps/stub_suid/ChangeLog18
-rw-r--r--sysdeps/stub_suid/Makefile.am23
-rw-r--r--sysdeps/stub_suid/close.c30
-rw-r--r--sysdeps/stub_suid/cpu.c48
-rw-r--r--sysdeps/stub_suid/glibtop_machine.h39
-rw-r--r--sysdeps/stub_suid/glibtop_server.h52
-rw-r--r--sysdeps/stub_suid/glibtop_suid.h48
-rw-r--r--sysdeps/stub_suid/init.c45
-rw-r--r--sysdeps/stub_suid/loadavg.c48
-rw-r--r--sysdeps/stub_suid/mem.c48
-rw-r--r--sysdeps/stub_suid/msg_limits.c48
-rw-r--r--sysdeps/stub_suid/netload.c45
-rw-r--r--sysdeps/stub_suid/nosuid.c34
-rw-r--r--sysdeps/stub_suid/open.c77
-rw-r--r--sysdeps/stub_suid/ppp.c44
-rw-r--r--sysdeps/stub_suid/procargs.c47
-rw-r--r--sysdeps/stub_suid/procdata.c180
-rw-r--r--sysdeps/stub_suid/prockernel.c49
-rw-r--r--sysdeps/stub_suid/proclist.c49
-rw-r--r--sysdeps/stub_suid/procmap.c46
-rw-r--r--sysdeps/stub_suid/procmem.c49
-rw-r--r--sysdeps/stub_suid/procsegment.c49
-rw-r--r--sysdeps/stub_suid/procsignal.c49
-rw-r--r--sysdeps/stub_suid/procstate.c49
-rw-r--r--sysdeps/stub_suid/proctime.c49
-rw-r--r--sysdeps/stub_suid/procuid.c49
-rw-r--r--sysdeps/stub_suid/sem_limits.c48
-rw-r--r--sysdeps/stub_suid/shm_limits.c48
-rw-r--r--sysdeps/stub_suid/siglist.c28
-rw-r--r--sysdeps/stub_suid/swap.c48
-rw-r--r--sysdeps/stub_suid/uptime.c48
-rw-r--r--sysdeps/sun4/.cvsignore17
-rw-r--r--sysdeps/sun4/ChangeLog17
-rw-r--r--sysdeps/sun4/Makefile.am22
-rw-r--r--sysdeps/sun4/close.c30
-rw-r--r--sysdeps/sun4/cpu.c107
-rw-r--r--sysdeps/sun4/glibtop_machine.h117
-rw-r--r--sysdeps/sun4/glibtop_server.h49
-rw-r--r--sysdeps/sun4/glibtop_suid.h48
-rw-r--r--sysdeps/sun4/loadavg.c67
-rw-r--r--sysdeps/sun4/loadavg.h57
-rw-r--r--sysdeps/sun4/mem.c91
-rw-r--r--sysdeps/sun4/msg_limits.c75
-rw-r--r--sysdeps/sun4/nosuid.c35
-rw-r--r--sysdeps/sun4/open.c308
-rw-r--r--sysdeps/sun4/ppp.c44
-rw-r--r--sysdeps/sun4/procdata.c33
-rw-r--r--sysdeps/sun4/prockernel.c60
-rw-r--r--sysdeps/sun4/proclist.c97
-rw-r--r--sysdeps/sun4/procmem.c63
-rw-r--r--sysdeps/sun4/procsegment.c61
-rw-r--r--sysdeps/sun4/procsignal.c63
-rw-r--r--sysdeps/sun4/procstate.c60
-rw-r--r--sysdeps/sun4/proctime.c60
-rw-r--r--sysdeps/sun4/procuid.c71
-rw-r--r--sysdeps/sun4/sem_limits.c81
-rw-r--r--sysdeps/sun4/shm_limits.c74
-rw-r--r--sysdeps/sun4/siglist.c60
-rw-r--r--sysdeps/sun4/swap.c37
-rw-r--r--sysdeps/sun4/uptime.c61
380 files changed, 48760 insertions, 7103 deletions
diff --git a/ChangeLog b/ChangeLog
index c8fee4fd..63e4d645 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2003-10-19 Carlos Perelló Marín <carlos@gnome.org>
+ * support/*: Reverted libgtop changes. It's a common module
+ and I should not modify it.
+ * Added/removed files. Now the move should be done.
+
+2003-10-19 Carlos Perelló Marín <carlos@gnome.org>
+
* libgtop-GNOME-2-0-branch moved to HEAD.
2003-09-30 Laurent Dhima <laurenti@alblinux.net>
diff --git a/RELNOTES-1.0.x b/RELNOTES-1.0.x
new file mode 100644
index 00000000..d1d7ad64
--- /dev/null
+++ b/RELNOTES-1.0.x
@@ -0,0 +1,172 @@
+RELEASE NOTES FOR LIBGTOP 1.0.7
+===============================
+
+OVERVIEW
+--------
+
+LibGTop is a library that read information about processes and the
+running systems. This information include:
+
+General System Information:
+
+cpu - CPU Usage
+mem - Memory Usage
+swap - Swap Usage (including paging activity)
+loadavg - Load average (including nr_running, nr_tasks, last_pid)
+uptime - Uptime and Idle time, can be calculated from CPU usage
+
+SYS V IPC Limits:
+
+shm_limits - Shared Memory Limits
+msg_limits - Message Queue Limits
+sem_limits - Semaphore Set Limits
+
+Network:
+
+netload - Network load
+ppp - PPP statistics
+
+Process List:
+
+proclist - List of processes
+
+Process information:
+
+proc_state - cmd, state, uid, gid
+proc_uid - uid,euid,gid,egid,pid,ppid,pgrp
+ session,tty,tpgid,priority,nice
+proc_mem - size,vsize,resident,share,rss,rss_rlim
+proc_time - start_time,rtime,utime,stime,cutime,cstime
+ timeout,it_real_value,frequency
+proc_signal - signal,blocked,sigignore,sigcatch
+proc_kernel - k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt
+ kstk_esp,kstk_eip,nwchan,wchan
+proc_segment - text_rss,shlib_rss,data_rss,stack_rss,dirty_size
+ start_code,end_code,start_stack
+
+Process maps:
+
+proc_args - Command line arguments
+proc_map - Process map (/proc/<pid>/maps under Linux)
+
+File system usage:
+
+mountlist - List of currently mounted filesystems
+fsusage - File system usage
+
+PORTABILITY:
+-----------
+
+LibGTop is designed to be as portable as possible. None of the
+functions and retrieved information should be specific to a specific
+operating system. So you only need to port the system dependent part
+of the library to a new system and all application programs can then
+use libgtop on this new system.
+
+CLIENT/SERVER MODEL:
+-------------------
+
+Some systems like DEC OSF/1 or BSD require special privileges for the
+calling process to fetch the required information (SUID root/SGID
+kmem). To solve this problem, I designed a client/server model which
+makes a call to a SUID/SGID server which fetches the required
+information whenever it is required. This server is only called for
+features that really require privileges, otherwise the sysdeps code
+is called directory (every user can get the CPU usage on DEC OSF/1,
+but only root can get information about processes other than the
+current one).
+
+There is also some kind of daemon which can be used to fetch
+information from remote systems (still experimental). This daemon
+normally runs as nobody and calls the SUID/SGID itself when needed.
+
+LIBGTOP AND GNOME:
+-----------------
+
+Although LibGTop is part of the GNOME desktop environment, its main
+interface is totally independent from any particular desktop environment,
+so you can also use it as a standalone library in any piece of GPLed
+software which makes it also a valuable part of the GNU project.
+
+LibGTop is currently used in various places in the GNOME Project,
+for instance in some of the applets in gnome-core and - of cause -
+this ultra-cool application called GTop ...
+
+However, you need to give the configure.in script the `--without-gnome'
+parameter when you want to use LibGTop without GNOME (this is because,
+if you want to use it with GNOME, you need to compile it after the main
+GNOME libraries and I wanted to avoid getting unnecessary bug reports
+about this).
+
+LIBGTOP AND GNOME - PART II:
+---------------------------
+
+LibGTop was tested with FreeBSD 3.0 but it should also work with
+FreeBSD 2.2.7, NetBSD and OpenBSD.
+
+Unfortunately, I don't have the power and disk space to install all
+possible operating systems out there on my machine and test things myself,
+so I depend on people telling me whether it works and sending me bug
+reports and patches if not.
+
+However, I consider FreeBSD, NetBSD and OpenBSD as supported systems for
+LibGTop and whenever I get bug reports I will do my best to fix them as
+quickly as possible.
+
+PLATFORM SPECIFIC NOTES FOR LINUX:
+==================================
+
+[I am speaking of the Linux kernel here.]
+
+Under Linux, LibGTop should work without problems and read everything
+from /proc.
+
+LibGTop 0.25 also had an experimental kernel interface to read this
+information directly from the kernel with a system call - but I have
+currently dropped support for this as I am too busy with GNOME
+development to keep current with kernel hacking.
+
+PLATFORM SPECIFIC NOTES FOR SOLARIS:
+====================================
+
+The development branch of LibGTop (the 1.1.x series) has a first version
+of the Solaris port which works at least on Solaris 7.
+
+If you are on a Solaris system and want to give it a try, just fetch the
+latest 1.1.x tarball from ftp://ftp.home-of-linux.org/pub/libgtop/1.1/
+and try it out.
+
+PLATFORM SPECIFIC NOTES FOR BSD:
+=================================
+
+There are a few caveats:
+
+* You need to manually make the `$(prefix)/bin/libgtop_server' SGID to
+ kmem after installation and mount the /proc file system of FreeBSD
+ (/proc/<pid>/mem is used within kvm_uread ()).
+
+* To get the filenames of the process maps displayed in GTop, you need
+ to configure with the `--with-libgtop-inodedb' option (you need GDBM
+ for this to work).
+
+ You have then to create an inode database which is used to look up
+ filenames. This is done using the `mkinodedb' program which comes
+ along with libgtop.
+
+ See the file src/inodedb/README for details:
+
+ The `mkinodedb' program which is build in this directory takes two
+ command line arguments: the full pathname of the database to be
+ created and the name of a configuration file consisting of directory
+ and file names each on a line by itself - see `/etc/ld.so.conf' for
+ an example.
+
+ Putting a directory name in this file means all regular files found
+ in this directory are included in the database, but it will not
+ recursively descend into subdirectories (for instance, we want
+ everything in `/usr/lib' but not every single file in `/usr/lib/sgml').
+ You can also use filenames to include a single file.
+
+Have fun,
+
+Martin <martin@home-of-linux.org>
diff --git a/debian/libgtop1.README.Debian b/debian/libgtop1.README.Debian
new file mode 100644
index 00000000..d767a2f7
--- /dev/null
+++ b/debian/libgtop1.README.Debian
@@ -0,0 +1,5 @@
+
+The Debian package of libgtop, a GNOME library.
+
+--
+Martin Baulig <martin@home-of-linux.org>
diff --git a/debian/libgtop1.copyright b/debian/libgtop1.copyright
new file mode 100644
index 00000000..0d4ad835
--- /dev/null
+++ b/debian/libgtop1.copyright
@@ -0,0 +1,12 @@
+
+libgtop is released under the GPL.
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in /usr/share/common-licenses/GPL
+
+Original authors: Martin Baulig <martin@home-of-linux.org>
+ Drazen Kacar <dave@srce.hr>
+
+Originally Debianised by Jim Pick <jim@jimpick.com>
+Then re-Debianised in October 1998 by Martin Schulze
+<joey@finlandia.infodrom.north.de> before being taken over by Ian Lynagh
+<ian@lynagh.demon.co.uk> in November 1998.
diff --git a/debian/libgtop1.docs b/debian/libgtop1.docs
new file mode 100644
index 00000000..7074e441
--- /dev/null
+++ b/debian/libgtop1.docs
@@ -0,0 +1,5 @@
+RELNOTES-0.25
+RELNOTES-1.0.x
+NEWS
+AUTHORS
+debian/changelog
diff --git a/debian/libgtop1.files.in b/debian/libgtop1.files.in
new file mode 100644
index 00000000..2c150133
--- /dev/null
+++ b/debian/libgtop1.files.in
@@ -0,0 +1,4 @@
+@PREFIX@/lib/libgtop*.so.[0-9].[0-9][0-9].[0-9]
+@PREFIX@/lib/libgtop*.so.[0-9].[0-9].[0-9]
+@PREFIX@/lib/libgtop*.so.[0-9]
+@PREFIX@/share/locale/*/*/libgtop.mo
diff --git a/doc/libgtop.texi b/doc/libgtop2.texi
index a2972593..2dc8b31a 100644
--- a/doc/libgtop.texi
+++ b/doc/libgtop2.texi
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
-@setfilename libgtop.info
+@setfilename libgtop2.info
@settitle LibGTop Reference Manual
@setchapternewpage odd
@c %**end of header
@@ -44,7 +44,7 @@ translation approved by the Free Software Foundation.
@format
@dircategory Libraries:
@direntry
-* libgtop: (libgtop). Library to get system specific data
+* LibGTop2: (libgtop2). Library to get system specific data
such as cpu and memory usage, active
processes
@end direntry
diff --git a/examples/.cvsignore b/examples/.cvsignore
new file mode 100644
index 00000000..31e727eb
--- /dev/null
+++ b/examples/.cvsignore
@@ -0,0 +1,16 @@
+.deps
+.libs
+Makefile
+Makefile.in
+first
+first_linux
+first_static
+second
+third
+third_linux
+third_static
+second_static
+second_linux
+smp_static sysdeps_static netload_static procmap_static mountlist_static
+smp sysdeps netload procmap mountlist
+timings timings_static
diff --git a/examples/ChangeLog b/examples/ChangeLog
new file mode 100644
index 00000000..b3378fe2
--- /dev/null
+++ b/examples/ChangeLog
@@ -0,0 +1,94 @@
+2001-01-14 Abel Cheung <maddog@linux.org.hk>
+
+ * \*.c: bindtextdomain and textdomain uses GETTEXT_PACKAGE.
+
+ * Makefile.am, first.c, second.c, sysdeps.c: Make them at least
+ compile for now, by disabling chunks which should belong to
+ HEAD branch.
+
+1999-05-28 Martin Baulig <martin@home-of-linux.org>
+
+ * first.c, second.c, sysdeps.c: Use LibGTop version conditionals
+ so we can more easily merge the code into LIBGTOP_STABLE_1_0.
+
+1999-05-07 Martin Baulig <martin@home-of-linux.org>
+
+ * timings.c (timersub): Renamed this to `libgtop_timersub' and define
+ it on all systems.
+
+Fri Apr 9 00:14:52 1999 Timur Bakeyev <timur@gnu.org>
+
+ * timings.c: Added timersub defenition, to make code compilable on
+ BSDI.
+
+1999-03-24 Martin Baulig <martin@home-of-linux.org>
+
+ * timings.c: New example.
+
+1999-03-17 Martin Baulig <martin@home-of-linux.org>
+
+ * first.c, second.c: Fixed a bug that caused a core dump when
+ the sysdeps code does not return all data.
+
+1998-11-22 Martin Baulig <baulig@taurus.uni-trier.de>
+
+ * netload.c: Call inet_ntoa () to get address and subnet
+ in quatted dot notation (like 136.199.14.201) and not just
+ as a number (like 0xc90ec788).
+
+1998-11-02 Martin Baulig <martin@home-of-linux.org>
+
+ * sysdeps.c: New example.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * netload.c: New file. Gets network load for the interface
+ given as command line argument.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * first.c (glibtop_get_proc_args): Get command line arguments.
+ * second.c: Likewise.
+
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * first.c (glibtop_get_ppp): Get PPP/ISDN statistics.
+
+1998-09-28 Martin Baulig <martin@home-of-linux.org>
+
+ * Makefile.am: Install everything in $(libexecdir)/libgtop.
+
+1998-09-09 Martin Baulig <baulig@Stud.Informatik.uni-trier.de>
+
+ * smp.c: New file. Nice tool to show CPU statistics on SMP systems.
+
+1998-08-25 Martin Baulig <martin@home-of-linux.org>
+
+ * first.c, second.c, procmap.c: Fixed some compiler warnings.
+
+1998-08-18 Martin Baulig <martin@home-of-linux.org>
+
+ * procmap.c: We now display filenames when compiled
+ `--with-libgtop-inodedb'.
+
+1998-08-12 Martin Baulig <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * mountlist.c: New file.
+
+1998-06-12 Martin Baulig <martin@home-of-linux.org>
+
+ * test.scm: New file.
+
+1998-06-07 Martin Baulig <martin@home-of-linux.org>
+
+ * 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
new file mode 100644
index 00000000..be8d3a4c
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,121 @@
+## 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 timings \
+ @static_targets@ @guile_examples@ @smp_examples@
+
+EXTRA_PROGRAMS = first_static second_static \
+ mountlist_static procmap_static \
+ third third_static smp smp_static \
+ netload_static sysdeps_static \
+ timings_static
+
+first_SOURCES = first.c
+first_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.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-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.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-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.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-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.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-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.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-2.0.la
+third_names_LIBS = $(top_builddir)/sysdeps/names/libgtop_names-2.0.la
+
+third_SOURCES = third.c
+third_LDADD = $(top_builddir)/sysdeps/guile/libgtop_guile-2.0.la \
+ $(third_guile_names_LIBS) $(third_names_LIBS) \
+ $(top_builddir)/lib/libgtop-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.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-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.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-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
+ @LIBSUPPORT@ @INTLLIBS@
+
+smp_static_SOURCES = $(smp_SOURCES)
+smp_static_LDADD = $(smp_LDADD)
+smp_static_LDFLAGS = -static
+
+timings_SOURCES = timings.c
+timings_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
+ @LIBSUPPORT@ @INTLLIBS@
+
+timings_static_SOURCES = $(timings_SOURCES)
+timings_static_LDADD = $(timings_LDADD)
+timings_static_LDFLAGS = -static
+
diff --git a/examples/first.c b/examples/first.c
new file mode 100644
index 00000000..26249817
--- /dev/null
+++ b/examples/first.c
@@ -0,0 +1,575 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <locale.h>
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/parameter.h>
+
+#include <glibtop/union.h>
+#include <glibtop/sysdeps.h>
+
+#include <sys/resource.h>
+
+#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 (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_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 0x%lx 0x%lx 0x%lx (%s)\n", (int) pid,
+ (unsigned long) data.proc_kernel.flags,
+ (unsigned long) data.proc_kernel.k_flags,
+ (unsigned long) data.proc_kernel.min_flt,
+ (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 ? 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 0x%lx 0x%lx 0x%lx (%s)\n", (int) ppid,
+ (unsigned long) data.proc_kernel.flags,
+ (unsigned long) data.proc_kernel.k_flags,
+ (unsigned long) data.proc_kernel.min_flt,
+ (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 ? 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 0x%lx 0x%lx 0x%lx (%s)\n", 1,
+ (unsigned long) data.proc_kernel.flags,
+ (unsigned long) data.proc_kernel.k_flags,
+ (unsigned long) data.proc_kernel.min_flt,
+ (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 ? args : "");
+
+ glibtop_free (args);
+
+ glibtop_close ();
+
+ exit (0);
+}
diff --git a/examples/mountlist.c b/examples/mountlist.c
new file mode 100644
index 00000000..f4c6c0c6
--- /dev/null
+++ b/examples/mountlist.c
@@ -0,0 +1,113 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <locale.h>
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/parameter.h>
+
+#include <glibtop/mountlist.h>
+#include <glibtop/fsusage.h>
+
+#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 (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_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
new file mode 100644
index 00000000..f77130d2
--- /dev/null
+++ b/examples/netload.c
@@ -0,0 +1,125 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <locale.h>
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/parameter.h>
+
+#include <glibtop/netload.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#ifndef PROFILE_COUNT
+#define PROFILE_COUNT 1
+#endif
+
+int
+main (int argc, char *argv [])
+{
+ glibtop_netload netload;
+ unsigned method, count, port;
+ struct in_addr addr, subnet;
+ char *address_string, *subnet_string;
+ char buffer [BUFSIZ];
+
+ count = PROFILE_COUNT;
+
+ setlocale (LC_ALL, "");
+ bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_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
new file mode 100644
index 00000000..163e3671
--- /dev/null
+++ b/examples/procmap.c
@@ -0,0 +1,164 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <locale.h>
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/parameter.h>
+
+#include <glibtop/procmap.h>
+
+#ifdef GLIBTOP_INODEDB
+#include <glibtop/inodedb.h>
+#endif
+
+#include <sys/resource.h>
+#include <sys/mman.h>
+
+#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 (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_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 & (1L << 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) {
+ char *format;
+
+ if (sizeof (void*) == 8)
+ format = "%016lx-%016lx %016lx - "
+ "%02x:%02x %08lu - %4s - %s\n";
+ else
+ format = "%08lx-%08lx %08lx - "
+ "%02x:%02x %08lu - %4s - %s\n";
+
+ fprintf (stderr, format,
+ (unsigned long) maps [i].start,
+ (unsigned long) maps [i].end,
+ (unsigned long) maps [i].offset,
+ device_major, device_minor,
+ (unsigned long) maps [i].inode,
+ perm, filename);
+ } else {
+ char * format;
+
+ if (sizeof (void*) == 8)
+ format = "%016lx-%016lx %016lx - "
+ "%02x:%02x %08lu - %4s\n";
+ else
+ format = "%08lx-%08lx %08lx - "
+ "%02x:%02x %08lu - %4s\n";
+
+ fprintf (stderr, format,
+ (unsigned long) maps [i].start,
+ (unsigned long) maps [i].end,
+ (unsigned long) maps [i].offset,
+ device_major, device_minor,
+ (unsigned long) maps [i].inode,
+ perm);
+ }
+
+ if (filename && (filename != maps [i].filename))
+ glibtop_free (filename);
+ }
+
+ glibtop_free (maps);
+
+ glibtop_close ();
+
+ exit (0);
+}
diff --git a/examples/second.c b/examples/second.c
new file mode 100644
index 00000000..b65bf86f
--- /dev/null
+++ b/examples/second.c
@@ -0,0 +1,300 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <locale.h>
+#include <math.h>
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/union.h>
+#include <glibtop/sysdeps.h>
+
+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 0x%lx 0x%lx 0x%lx (%s)\n", (int) pid,
+ (unsigned long) data.proc_kernel.flags,
+ (unsigned long) data.proc_kernel.k_flags,
+ (unsigned long) data.proc_kernel.min_flt,
+ (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 ? 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 (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_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
new file mode 100644
index 00000000..f55df9ed
--- /dev/null
+++ b/examples/smp.c
@@ -0,0 +1,127 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, 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 <locale.h>
+#include <math.h>
+
+#include <glibtop.h>
+#include <glibtop/cpu.h>
+#include <glibtop/xmalloc.h>
+
+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 (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_PACKAGE);
+
+ glibtop_init();
+
+ 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 (%ld 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
new file mode 100644
index 00000000..08fa15a0
--- /dev/null
+++ b/examples/sysdeps.c
@@ -0,0 +1,148 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <locale.h>
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/parameter.h>
+
+#ifndef PROFILE_COUNT
+#define PROFILE_COUNT 1
+#endif
+
+int
+main (int argc, char *argv [])
+{
+ glibtop_sysdeps sysdeps;
+ unsigned method, count, port;
+ char buffer [BUFSIZ];
+
+ count = PROFILE_COUNT;
+
+ setlocale (LC_ALL, "");
+ bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_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 & (1L << 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
new file mode 100644
index 00000000..893893f5
--- /dev/null
+++ b/examples/test.scm
@@ -0,0 +1,80 @@
+(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
new file mode 100644
index 00000000..d94ab5cf
--- /dev/null
+++ b/examples/third.c
@@ -0,0 +1,57 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <locale.h>
+
+#include <glibtop.h>
+
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/union.h>
+#include <glibtop/sysdeps.h>
+
+void main_prog(int argc, char *argv[]);
+
+int
+main (int argc, char *argv[])
+{
+ setlocale (LC_ALL, "");
+ bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_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/examples/timings.c b/examples/timings.c
new file mode 100644
index 00000000..5874fa18
--- /dev/null
+++ b/examples/timings.c
@@ -0,0 +1,357 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <locale.h>
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/parameter.h>
+
+#include <glibtop/union.h>
+#include <glibtop/sysdeps.h>
+
+#include <sys/times.h>
+#include <sys/resource.h>
+
+#ifndef PROFILE_COUNT
+#define PROFILE_COUNT 100000L
+#endif
+
+#ifndef PROFILE_COUNT_EXPENSIVE
+#define PROFILE_COUNT_EXPENSIVE 10000L
+#endif
+
+#define ELAPSED_UTIME ((unsigned long) elapsed_utime.tv_sec * 1000000 + (unsigned long) elapsed_utime.tv_usec)
+#define ELAPSED_STIME ((unsigned long) elapsed_stime.tv_sec * 1000000 + (unsigned long) elapsed_stime.tv_usec)
+
+#define libgtop_timeradd(tvp, uvp, vvp) \
+ do { \
+ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
+ (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
+ if ((vvp)->tv_usec >= 1000000) { \
+ (vvp)->tv_sec++; \
+ (vvp)->tv_usec -= 1000000; \
+ } \
+ } while (0)
+#define libgtop_timersub(tvp, uvp, vvp) \
+ do { \
+ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
+ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
+ if ((vvp)->tv_usec < 0) { \
+ (vvp)->tv_sec--; \
+ (vvp)->tv_usec += 1000000; \
+ } \
+ } while (0)
+
+int
+main (int argc, char *argv [])
+{
+ glibtop_union data;
+ unsigned c, count, *ptr;
+ struct rusage total_start, total_end;
+ struct rusage rusage_start, rusage_end;
+ struct timeval elapsed_utime, elapsed_stime;
+ pid_t pid;
+
+ count = PROFILE_COUNT;
+
+ setlocale (LC_ALL, "");
+ bindtextdomain (GETTEXT_PACKAGE, GTOPLOCALEDIR);
+ textdomain (GETTEXT_PACKAGE);
+
+ printf ("%-12s (%-10s): %7s - %9s - %9s\n",
+ "Feature", "Flags", "Count", "utime", "stime");
+ printf ("-------------------------------------------"
+ "---------------\n");
+
+ glibtop_init_r (&glibtop_global_server, 0, 0);
+
+ getrusage (RUSAGE_SELF, &total_start);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_cpu (&data.cpu);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("CPU (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.cpu.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT_EXPENSIVE; c++)
+ glibtop_get_mem (&data.mem);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Memory (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.mem.flags, PROFILE_COUNT_EXPENSIVE,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT_EXPENSIVE,
+ (long double) ELAPSED_STIME / PROFILE_COUNT_EXPENSIVE);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT_EXPENSIVE; c++)
+ glibtop_get_swap (&data.swap);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Swap (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.swap.flags, PROFILE_COUNT_EXPENSIVE,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT_EXPENSIVE,
+ (long double) ELAPSED_STIME / PROFILE_COUNT_EXPENSIVE);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_uptime (&data.uptime);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Uptime (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.uptime.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_loadavg (&data.loadavg);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Loadavg (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.loadavg.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ printf ("\n");
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT_EXPENSIVE; c++) {
+ ptr = glibtop_get_proclist (&data.proclist, 0, 0);
+ glibtop_free (ptr);
+ }
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Proclist (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.proclist.flags,
+ PROFILE_COUNT_EXPENSIVE,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT_EXPENSIVE,
+ (long double) ELAPSED_STIME / PROFILE_COUNT_EXPENSIVE);
+
+ pid = getpid ();
+
+ printf ("\n");
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_proc_state (&data.proc_state, pid);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Proc_State (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.proc_state.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_proc_uid (&data.proc_uid, pid);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Proc_Uid (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.proc_uid.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_proc_mem (&data.proc_mem, pid);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Proc_Mem (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.proc_mem.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_proc_segment (&data.proc_segment, pid);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Proc_Segment (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.proc_segment.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_proc_time (&data.proc_time, pid);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Proc_Time (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.proc_time.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_proc_signal (&data.proc_signal, pid);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Proc_Signal (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.proc_signal.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &rusage_start);
+
+ for (c = 0; c < PROFILE_COUNT; c++)
+ glibtop_get_proc_kernel (&data.proc_kernel, pid);
+
+ getrusage (RUSAGE_SELF, &rusage_end);
+
+ libgtop_timersub (&rusage_end.ru_utime, &rusage_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&rusage_end.ru_stime, &rusage_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("Proc_Kernel (0x%08lx): %7lu - %9.2Lf - %9.2Lf\n",
+ (unsigned long) data.proc_kernel.flags, PROFILE_COUNT,
+ (long double) ELAPSED_UTIME / PROFILE_COUNT,
+ (long double) ELAPSED_STIME / PROFILE_COUNT);
+
+ getrusage (RUSAGE_SELF, &total_end);
+
+ libgtop_timersub (&total_end.ru_utime, &total_start.ru_utime,
+ &elapsed_utime);
+
+ libgtop_timersub (&total_end.ru_stime, &total_start.ru_stime,
+ &elapsed_stime);
+
+ printf ("-------------------------------------------"
+ "---------------\n");
+
+ printf ("%-36s %9lu - %9lu\n\n", "TOTAL",
+ ELAPSED_UTIME, ELAPSED_STIME);
+
+ printf ("All timings are in clock ticks "
+ "(1000000 ticks per second).\n\n");
+
+ glibtop_close ();
+
+ exit (0);
+}
diff --git a/include/glibtop/command.h b/include/glibtop/command.h
new file mode 100644
index 00000000..02eced03
--- /dev/null
+++ b/include/glibtop/command.h
@@ -0,0 +1,102 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_COMMAND_H__
+#define __GLIBTOP_COMMAND_H__
+
+#include <glibtop.h>
+#include <glibtop/sysdeps.h>
+#include <glibtop/union.h>
+
+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/gnuserv.h b/include/glibtop/gnuserv.h
new file mode 100644
index 00000000..6f945c71
--- /dev/null
+++ b/include/glibtop/gnuserv.h
@@ -0,0 +1,161 @@
+/* -*-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 <weiner@mot.com>,
+ * Darrell Kindred <dkindred@cmu.edu> and Arup Mukherjee <arup@cmu.edu>.
+ * 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 <glibtop.h>
+#include <glibtop/error.h>
+#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 <sys/socket.h>
+#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */
+
+#ifdef INTERNET_DOMAIN_SOCKETS
+#include <netdb.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#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 <sys/un.h>
+#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/read.h b/include/glibtop/read.h
new file mode 100644
index 00000000..e4862ba6
--- /dev/null
+++ b/include/glibtop/read.h
@@ -0,0 +1,39 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_READ_H__
+#define __GLIBTOP_READ_H__
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+
+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
new file mode 100644
index 00000000..07bfec05
--- /dev/null
+++ b/include/glibtop/read_data.h
@@ -0,0 +1,39 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_READ_DATA_H__
+#define __GLIBTOP_READ_DATA_H__
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+
+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/version.h b/include/glibtop/version.h
new file mode 100644
index 00000000..92354833
--- /dev/null
+++ b/include/glibtop/version.h
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_VERSION_H__
+#define __GLIBTOP_VERSION_H__
+
+#include <glibtop.h>
+#include <glibtop/union.h>
+#include <glibtop/sysdeps.h>
+#include <glibtop/command.h>
+
+#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
new file mode 100644
index 00000000..bff8d4e7
--- /dev/null
+++ b/include/glibtop/write.h
@@ -0,0 +1,39 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_WRITE_H__
+#define __GLIBTOP_WRITE_H__
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+
+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/kernel/ChangeLog b/kernel/ChangeLog
new file mode 100644
index 00000000..a3efd8d7
--- /dev/null
+++ b/kernel/ChangeLog
@@ -0,0 +1,14 @@
+1998-07-21 Martin Baulig <martin@home-of-linux.org>
+
+ * table20: New directory for 2.0.xx kernels.
+
+ * table21: New directory for 2.1.xx kernels.
+
+ * *: Moved into `table20' and `table21'.
+
+1998-06-14 Martin Baulig <baulig@taurus.uni-trier.de>
+
+ * README: Added README.
+
+ * kernel.patch: Patch for the Linux kernel to add the
+ new system call.
diff --git a/kernel/sysctl/patch-2.2.1 b/kernel/sysctl/patch-2.2.1
new file mode 100644
index 00000000..1781b921
--- /dev/null
+++ b/kernel/sysctl/patch-2.2.1
@@ -0,0 +1,81 @@
+diff -ru linux-2.2.1/Makefile hacker/Makefile
+--- linux-2.2.1/Makefile Sun Jan 31 22:45:42 1999
++++ hacker/Makefile Sun Mar 21 16:10:41 1999
+@@ -109,6 +109,7 @@
+ DRIVERS =drivers/block/block.a \
+ drivers/char/char.a \
+ drivers/misc/misc.a
++EXTRAS =
+ LIBS =$(TOPDIR)/lib/lib.a
+ SUBDIRS =kernel drivers mm fs net ipc lib
+
+@@ -186,6 +187,11 @@
+ DRIVERS := $(DRIVERS) drivers/net/irda/irda_drivers.a
+ endif
+
++ifdef CONFIG_LIBGTOP
++SUBDIRS := $(SUBDIRS) libgtop
++EXTRAS := $(EXTRAS) libgtop/kernel.o
++endif
++
+ include arch/$(ARCH)/Makefile
+
+ .S.s:
+@@ -206,6 +212,7 @@
+ $(FILESYSTEMS) \
+ $(NETWORKS) \
+ $(DRIVERS) \
++ $(EXTRAS) \
+ $(LIBS) \
+ --end-group \
+ -o vmlinux
+diff -ru linux-2.2.1/arch/i386/config.in hacker/arch/i386/config.in
+--- linux-2.2.1/arch/i386/config.in Sun Jan 31 22:25:25 1999
++++ hacker/arch/i386/config.in Sat Mar 20 18:26:18 1999
+@@ -84,6 +84,9 @@
+ bool 'System V IPC' CONFIG_SYSVIPC
+ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
+ bool 'Sysctl support' CONFIG_SYSCTL
++if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
++ tristate 'LibGTop support' CONFIG_LIBGTOP
++fi
+ tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
+ tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
+ tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
+diff -ru linux-2.2.1/include/linux/sysctl.h hacker/include/linux/sysctl.h
+--- linux-2.2.1/include/linux/sysctl.h Sun Jan 31 22:24:14 1999
++++ hacker/include/linux/sysctl.h Sat Mar 20 19:12:54 1999
+@@ -56,7 +56,8 @@
+ CTL_PROC=4, /* Process info */
+ CTL_FS=5, /* Filesystems */
+ CTL_DEBUG=6, /* Debugging */
+- CTL_DEV=7 /* Devices */
++ CTL_DEV=7, /* Devices */
++ CTL_LIBGTOP=408 /* LibGTop */
+ };
+
+
+diff -ru linux-2.2.1/kernel/sysctl.c hacker/kernel/sysctl.c
+--- linux-2.2.1/kernel/sysctl.c Sun Jan 31 22:24:43 1999
++++ hacker/kernel/sysctl.c Sat Mar 20 19:24:34 1999
+@@ -82,7 +82,9 @@
+ static ctl_table fs_table[];
+ static ctl_table debug_table[];
+ static ctl_table dev_table[];
+-
++#ifdef CONFIG_LIBGTOP
++extern ctl_table libgtop_table[];
++#endif
+
+ /* /proc declarations: */
+
+@@ -148,6 +150,9 @@
+ {CTL_FS, "fs", NULL, 0, 0555, fs_table},
+ {CTL_DEBUG, "debug", NULL, 0, 0555, debug_table},
+ {CTL_DEV, "dev", NULL, 0, 0555, dev_table},
++#ifdef CONFIG_LIBGTOP
++ {CTL_LIBGTOP, "libgtop", NULL, 0, 0555, libgtop_table},
++#endif
+ {0}
+ };
+
diff --git a/kernel/table.h b/kernel/table.h
new file mode 100644
index 00000000..d4959370
--- /dev/null
+++ b/kernel/table.h
@@ -0,0 +1,188 @@
+#ifndef _LINUX_TABLE_H
+#define _LINUX_TABLE_H
+
+#ifdef _KERNEL
+#include <linux/types.h>
+#else
+#define NR_TASKS 512
+#endif
+
+#define TABLE_KERN_PROC_ALL 0 /* all processes */
+#define TABLE_KERN_PROC_PID 1
+#define TABLE_KERN_PROC_PGRP 2
+#define TABLE_KERN_PROC_SESSION 3
+#define TABLE_KERN_PROC_TTY 4
+#define TABLE_KERN_PROC_UID 5
+#define TABLE_KERN_PROC_RUID 6
+
+#define TABLE_KERN_PROC_MASK 15
+
+#define TABLE_EXCLUDE_IDLE 0x1000
+#define TABLE_EXCLUDE_SYSTEM 0x2000
+#define TABLE_EXCLUDE_NOTTY 0x4000
+
+#define TABLE_VERSION 0
+#define TABLE_CPU 1
+#define TABLE_MEM 2
+#define TABLE_SWAP 3
+#define TABLE_LOADAVG 4
+#define TABLE_UPTIME 5
+#define TABLE_PROCLIST 6
+#define TABLE_PROC_UID 7
+#define TABLE_PROC_MEM 8
+#define TABLE_PROC_SEGMENT 9
+#define TABLE_PROC_TIME 10
+#define TABLE_PROC_STATE 11
+#define TABLE_PROC_SIGNAL 12
+#define TABLE_PROC_KERNEL 13
+
+/* CPU Usage (in jiffies = 1/100th seconds) */
+
+struct table_cpu
+{
+ unsigned long total; /* Total CPU Time */
+ unsigned long user; /* CPU Time in User Mode */
+ unsigned long nice; /* CPU Time in User Mode (nice) */
+ unsigned long sys; /* CPU Time in System Mode */
+ unsigned long idle; /* CPU Time in the Idle Task */
+ unsigned long frequency; /* Tick frequency */
+};
+
+/* Memory Usage (in bytes) */
+
+struct table_mem
+{
+ unsigned long total; /* Total physical memory */
+ unsigned long used; /* Used memory size */
+ unsigned long free; /* Free memory size */
+ unsigned long shared; /* Shared memory size */
+ unsigned long buffer; /* Size of buffers */
+ unsigned long cached; /* Size of cached memory */
+};
+
+/* Swap Space (in bytes) */
+
+struct table_swap
+{
+ unsigned long total; /* Total swap space */
+ unsigned long used; /* Used swap space */
+ unsigned long free; /* Free swap space */
+ unsigned long pagein; /* Total # of pages swapped in */
+ unsigned long pageout; /* Total # of pages swapped out */
+};
+
+/* Load average */
+
+struct table_loadavg
+{
+ double loadavg [3];
+ unsigned nr_running;
+ unsigned nr_tasks;
+ unsigned last_pid;
+};
+
+/* Uptime */
+
+struct table_uptime
+{
+ unsigned long uptime;
+ unsigned long idle;
+};
+
+/* Process list. */
+
+struct proclist_args
+{
+ int which, arg;
+};
+
+struct table_proclist
+{
+ int nr_running, nr_tasks, last_pid;
+ unsigned pids [NR_TASKS];
+};
+
+/* Information about processes. */
+
+struct table_proc_state
+{
+ long state;
+ unsigned long flags;
+ char comm[16];
+ int uid, gid;
+};
+
+struct table_proc_uid
+{
+ int uid, euid, suid, fsuid;
+ int gid, egid, sgid, fsgid;
+ int pid, pgrp, ppid;
+ int session;
+ unsigned int tty;
+ int tpgid;
+ long priority;
+ long counter;
+ long def_priority;
+};
+
+struct table_proc_mem
+{
+ unsigned long context;
+ unsigned long start_code, end_code, start_data, end_data;
+ unsigned long start_brk, brk, start_stack, start_mmap;
+ unsigned long arg_start, arg_end, env_start, env_end;
+ unsigned long rss, rlim, total_vm, locked_vm;
+};
+
+struct table_proc_segment
+{
+ unsigned long vsize;
+ unsigned long size, resident, shared;
+ unsigned long trs, lrs, drs, srs, dt;
+};
+
+struct table_proc_time
+{
+ long utime, stime, cutime, cstime, start_time;
+ unsigned long timeout, policy, rt_priority;
+ unsigned long it_real_value, it_prof_value, it_virt_value;
+ unsigned long it_real_incr, it_prof_incr, it_virt_incr;
+};
+
+struct table_proc_signal
+{
+ unsigned long long signal,
+ blocked, /* bitmap of masked signals */
+ ignored, /* mask of ignored signals */
+ caught; /* mask of caught signals */
+};
+
+struct table_proc_kernel
+{
+ unsigned long keip, kesp, wchan;
+ unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
+ unsigned long nswap, cnswap;
+};
+
+/* Union */
+
+union table
+{
+ struct table_cpu cpu;
+ struct table_mem mem;
+ struct table_swap swap;
+ struct table_loadavg loadavg;
+ struct table_uptime uptime;
+ struct table_proclist proclist;
+ struct table_proc_uid proc_uid;
+ struct table_proc_mem proc_mem;
+ struct table_proc_segment proc_segment;
+ struct table_proc_time proc_time;
+ struct table_proc_state proc_state;
+ struct table_proc_signal proc_signal;
+ struct table_proc_kernel proc_kernel;
+};
+
+#endif /* _LINUX_IPC_H */
+
+
diff --git a/kernel/table20/Makefile b/kernel/table20/Makefile
new file mode 100644
index 00000000..d24e3ba8
--- /dev/null
+++ b/kernel/table20/Makefile
@@ -0,0 +1,13 @@
+#
+# Makefile for the linux system information tables.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+# Note 2! The CFLAGS definition is now in the main makefile...
+
+O_TARGET := table.o
+O_OBJS := main.o
+
+include $(TOPDIR)/Rules.make
diff --git a/kernel/table20/README b/kernel/table20/README
new file mode 100644
index 00000000..88d26bec
--- /dev/null
+++ b/kernel/table20/README
@@ -0,0 +1,21 @@
+This is a new system call `table ()' for the Linux table. It is faster
+than reading from /proc and can be used to fetch all information required
+for libgtop until whe have some other function (extended sysctl, ...) in
+standard kernels.
+
+I didn't want to change sysctl or some other function myself cause this may
+cause other applications relying upon those function to fail. This is
+something for the ``real'' kernel gurus ...
+
+To use this new system call for libgtop, do the following:
+
+* Copy this directory to /usr/src/linux/table
+* Make /usr/src/linux/include/linux/table.h symlink to /usr/src/linux/table/table.h
+* Apply the patch `kernel.patch' to the kernel, compile, install and reboot
+* Recompile libgtop (remove `config.cache' and run the `autogen.sh' again).
+
+If you want to change and/or add something - feel free to do so !
+
+Have fun,
+
+Martin
diff --git a/kernel/table20/entry-i386.S b/kernel/table20/entry-i386.S
new file mode 100644
index 00000000..994fe27c
--- /dev/null
+++ b/kernel/table20/entry-i386.S
@@ -0,0 +1,706 @@
+/*
+ * linux/arch/i386/entry.S
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ */
+
+/*
+ * entry.S contains the system-call and fault low-level handling routines.
+ * This also contains the timer-interrupt handler, as well as all interrupts
+ * and faults that can result in a task-switch.
+ *
+ * NOTE: This code handles signal-recognition, which happens every time
+ * after a timer-interrupt and after each system call.
+ *
+ * I changed all the .align's to 4 (16 byte alignment), as that's faster
+ * on a 486.
+ *
+ * Stack layout in 'ret_from_system_call':
+ * ptrace needs to have all regs on the stack.
+ * if the order here is changed, it needs to be
+ * updated in fork.c:copy_process, signal.c:do_signal,
+ * ptrace.c and ptrace.h
+ *
+ * 0(%esp) - %ebx
+ * 4(%esp) - %ecx
+ * 8(%esp) - %edx
+ * C(%esp) - %esi
+ * 10(%esp) - %edi
+ * 14(%esp) - %ebp
+ * 18(%esp) - %eax
+ * 1C(%esp) - %ds
+ * 20(%esp) - %es
+ * 24(%esp) - %fs
+ * 28(%esp) - %gs
+ * 2C(%esp) - orig_eax
+ * 30(%esp) - %eip
+ * 34(%esp) - %cs
+ * 38(%esp) - %eflags
+ * 3C(%esp) - %oldesp
+ * 40(%esp) - %oldss
+ */
+
+#include <linux/sys.h>
+#include <linux/linkage.h>
+#include <asm/segment.h>
+#define ASSEMBLY
+#include <asm/smp.h>
+
+EBX = 0x00
+ECX = 0x04
+EDX = 0x08
+ESI = 0x0C
+EDI = 0x10
+EBP = 0x14
+EAX = 0x18
+DS = 0x1C
+ES = 0x20
+FS = 0x24
+GS = 0x28
+ORIG_EAX = 0x2C
+EIP = 0x30
+CS = 0x34
+EFLAGS = 0x38
+OLDESP = 0x3C
+OLDSS = 0x40
+
+CF_MASK = 0x00000001
+IF_MASK = 0x00000200
+NT_MASK = 0x00004000
+VM_MASK = 0x00020000
+
+/*
+ * these are offsets into the task-struct.
+ */
+state = 0
+counter = 4
+priority = 8
+signal = 12
+blocked = 16
+flags = 20
+dbgreg6 = 52
+dbgreg7 = 56
+exec_domain = 60
+
+ENOSYS = 38
+
+#define SAVE_ALL \
+ cld; \
+ push %gs; \
+ push %fs; \
+ push %es; \
+ push %ds; \
+ pushl %eax; \
+ pushl %ebp; \
+ pushl %edi; \
+ pushl %esi; \
+ pushl %edx; \
+ pushl %ecx; \
+ pushl %ebx; \
+ movl $(KERNEL_DS),%edx; \
+ mov %dx,%ds; \
+ mov %dx,%es; \
+ movl $(USER_DS),%edx; \
+ mov %dx,%fs;
+
+#ifdef __SMP__
+
+#define GET_PROCESSOR_ID \
+ movl SYMBOL_NAME(apic_reg), %edx; \
+ movl 32(%edx), %eax;\
+ movl %eax,SYMBOL_NAME(apic_retval); \
+ shrl $24,%eax; \
+ andb $0x0F,%al;
+
+/*
+ * Get the processor ID multiplied by 4
+ */
+
+#define GET_PROCESSOR_OFFSET(x) \
+ movl SYMBOL_NAME(apic_reg), x ; \
+ movl 32( x ), x ; \
+ shrl $22, x ; \
+ andl $0x3C, x ;
+
+/* macro LEAVE_KERNEL decrements kernel_counter and resets kernel_flag and
+ saves processor variables if zero */
+#define LEAVE_KERNEL \
+ pushfl; \
+ cli; \
+ GET_PROCESSOR_ID \
+ btrl $ SMP_FROM_SYSCALL,SYMBOL_NAME(smp_proc_in_lock)(,%eax,4); \
+ decl SYMBOL_NAME(syscall_count); \
+ decl SYMBOL_NAME(kernel_counter); \
+ jnz 1f; \
+ movb SYMBOL_NAME(saved_active_kernel_processor), %al; \
+ movb %al, SYMBOL_NAME(active_kernel_processor); \
+ cmpb $(NO_PROC_ID), %al; \
+ jnz 1f; \
+ lock; \
+ btrl $0, SYMBOL_NAME(kernel_flag); \
+1: popfl;
+
+/* macro ENTER_KERNEL waits for entering the kernel, increments
+ kernel_counter, and reloads the processor variables if necessary
+ uses : %eax, %edx (pushed and popped)
+
+ Note: We go to great pains to minimise the number of locked operations.
+ We want to spin without locking, and lock when we attempt an update.
+ The pentium has a MESI cache so the spin without lock will exit when
+ another CPU write invalidates our cache, and the lock is avoided when
+ possible so we don't play ping-pong games with the cache line.
+
+*/
+
+#ifndef __SMP_PROF__
+
+#define SMP_PROF_A
+#define SMP_PROF_B
+
+#else
+
+#define SMP_PROF_A movl $0,SYMBOL_NAME(smp_spins_syscall_cur)(,%eax,4);
+#define SMP_PROF_B incl SYMBOL_NAME(smp_spins_syscall)(,%eax,4); \
+ incl SYMBOL_NAME(smp_spins_syscall_cur)(,%eax,4);
+#endif
+
+#define ENTER_KERNEL \
+ pushl %eax; \
+ pushl %ebx; \
+ pushl %ecx; \
+ pushl %edx; \
+ pushfl; \
+ cli; \
+ movl $6000, %ebx; \
+ movl SYMBOL_NAME(smp_loops_per_tick), %ecx; \
+ GET_PROCESSOR_ID \
+ btsl $ SMP_FROM_SYSCALL,SYMBOL_NAME(smp_proc_in_lock)(,%eax,4); \
+ SMP_PROF_A \
+1: lock; \
+ btsl $0, SYMBOL_NAME(kernel_flag); \
+ jnc 3f; \
+ cmpb SYMBOL_NAME(active_kernel_processor), %al; \
+ je 4f; \
+2: SMP_PROF_B \
+ btl %eax, SYMBOL_NAME(smp_invalidate_needed); \
+ jnc 5f; \
+ lock; \
+ btrl %eax, SYMBOL_NAME(smp_invalidate_needed); \
+ jnc 5f; \
+ movl %cr3,%edx; \
+ movl %edx,%cr3; \
+5: sti; \
+ decl %ecx; \
+ cli; \
+ jne 7f; \
+ decl %ebx; \
+ jne 6f; \
+ call SYMBOL_NAME(non_irq_deadlock_detected); \
+6: movl SYMBOL_NAME(smp_loops_per_tick), %ecx; \
+ cmpb SYMBOL_NAME(boot_cpu_id), %al; \
+ jne 7f; \
+ incl SYMBOL_NAME(jiffies); \
+7: btl $0, SYMBOL_NAME(kernel_flag); \
+ jc 2b; \
+ jmp 1b; \
+3: movb %al, SYMBOL_NAME(active_kernel_processor); \
+4: incl SYMBOL_NAME(kernel_counter); \
+ incl SYMBOL_NAME(syscall_count); \
+ popfl; \
+ popl %edx; \
+ popl %ecx; \
+ popl %ebx; \
+ popl %eax;
+
+
+#define RESTORE_ALL \
+ cmpw $(KERNEL_CS),CS(%esp); \
+ je 1f; \
+ GET_PROCESSOR_OFFSET(%edx) \
+ movl SYMBOL_NAME(current_set)(,%edx), %eax ; ; \
+ movl dbgreg7(%eax),%ebx; \
+ movl %ebx,%db7; \
+1: LEAVE_KERNEL \
+ popl %ebx; \
+ popl %ecx; \
+ popl %edx; \
+ popl %esi; \
+ popl %edi; \
+ popl %ebp; \
+ popl %eax; \
+ pop %ds; \
+ pop %es; \
+ pop %fs; \
+ pop %gs; \
+ addl $4,%esp; \
+ iret
+
+#else
+
+#define RESTORE_ALL \
+ cmpw $(KERNEL_CS),CS(%esp); \
+ je 1f; \
+ movl SYMBOL_NAME(current_set),%eax; \
+ movl dbgreg7(%eax),%ebx; \
+ movl %ebx,%db7; \
+1: \
+ popl %ebx; \
+ popl %ecx; \
+ popl %edx; \
+ popl %esi; \
+ popl %edi; \
+ popl %ebp; \
+ popl %eax; \
+ pop %ds; \
+ pop %es; \
+ pop %fs; \
+ pop %gs; \
+ addl $4,%esp; \
+ iret
+#endif
+
+ENTRY(lcall7)
+ pushfl # We get a different stack layout with call gates,
+ pushl %eax # which has to be cleaned up later..
+ SAVE_ALL
+#ifdef __SMP__
+ ENTER_KERNEL
+#endif
+ movl EIP(%esp),%eax # due to call gates, this is eflags, not eip..
+ movl CS(%esp),%edx # this is eip..
+ movl EFLAGS(%esp),%ecx # and this is cs..
+ movl %eax,EFLAGS(%esp) #
+ movl %edx,EIP(%esp) # Now we move them to their "normal" places
+ movl %ecx,CS(%esp) #
+ movl %esp,%eax
+#ifdef __SMP__
+ GET_PROCESSOR_OFFSET(%edx) # Processor offset into edx
+ movl SYMBOL_NAME(current_set)(,%edx),%edx
+#else
+ movl SYMBOL_NAME(current_set),%edx
+#endif
+ pushl %eax
+ movl exec_domain(%edx),%edx # Get the execution domain
+ movl 4(%edx),%edx # Get the lcall7 handler for the domain
+ call *%edx
+ popl %eax
+ jmp ret_from_sys_call
+
+ ALIGN
+handle_bottom_half:
+ incl SYMBOL_NAME(intr_count)
+ call SYMBOL_NAME(do_bottom_half)
+ decl SYMBOL_NAME(intr_count)
+ jmp 9f
+ ALIGN
+reschedule:
+ pushl $ret_from_sys_call
+ jmp SYMBOL_NAME(schedule) # test
+
+ENTRY(system_call)
+ pushl %eax # save orig_eax
+ SAVE_ALL
+#ifdef __SMP__
+ ENTER_KERNEL
+#endif
+ movl $-ENOSYS,EAX(%esp)
+ cmpl $(NR_syscalls),%eax
+ jae ret_from_sys_call
+ movl SYMBOL_NAME(sys_call_table)(,%eax,4),%eax
+ testl %eax,%eax
+ je ret_from_sys_call
+#ifdef __SMP__
+ GET_PROCESSOR_OFFSET(%edx)
+ movl SYMBOL_NAME(current_set)(,%edx),%ebx
+#else
+ movl SYMBOL_NAME(current_set),%ebx
+#endif
+ andl $~CF_MASK,EFLAGS(%esp) # clear carry - assume no errors
+ movl %db6,%edx
+ movl %edx,dbgreg6(%ebx) # save current hardware debugging status
+ testb $0x20,flags(%ebx) # PF_TRACESYS
+ jne 1f
+ call *%eax
+ movl %eax,EAX(%esp) # save the return value
+ jmp ret_from_sys_call
+ ALIGN
+1: call SYMBOL_NAME(syscall_trace)
+ movl ORIG_EAX(%esp),%eax
+ call SYMBOL_NAME(sys_call_table)(,%eax,4)
+ movl %eax,EAX(%esp) # save the return value
+#ifdef __SMP__
+ GET_PROCESSOR_OFFSET(%eax)
+ movl SYMBOL_NAME(current_set)(,%eax),%eax
+#else
+ movl SYMBOL_NAME(current_set),%eax
+#endif
+ call SYMBOL_NAME(syscall_trace)
+
+ ALIGN
+ .globl ret_from_sys_call
+ret_from_sys_call:
+ cmpl $0,SYMBOL_NAME(intr_count)
+ jne 2f
+9: movl SYMBOL_NAME(bh_mask),%eax
+ andl SYMBOL_NAME(bh_active),%eax
+ jne handle_bottom_half
+#ifdef __SMP__
+ cmpb $(NO_PROC_ID), SYMBOL_NAME(saved_active_kernel_processor)
+ jne 2f
+#endif
+ movl EFLAGS(%esp),%eax # check VM86 flag: CS/SS are
+ testl $(VM_MASK),%eax # different then
+ jne 1f
+ cmpw $(KERNEL_CS),CS(%esp) # was old code segment supervisor ?
+ je 2f
+1: sti
+ orl $(IF_MASK),%eax # these just try to make sure
+ andl $~NT_MASK,%eax # the program doesn't do anything
+ movl %eax,EFLAGS(%esp) # stupid
+ cmpl $0,SYMBOL_NAME(need_resched)
+ jne reschedule
+#ifdef __SMP__
+ GET_PROCESSOR_OFFSET(%eax)
+ movl SYMBOL_NAME(current_set)(,%eax), %eax
+#else
+ movl SYMBOL_NAME(current_set),%eax
+#endif
+ cmpl SYMBOL_NAME(task),%eax # task[0] cannot have signals
+ je 2f
+ movl blocked(%eax),%ecx
+ movl %ecx,%ebx # save blocked in %ebx for signal handling
+ notl %ecx
+ andl signal(%eax),%ecx
+ jne signal_return
+2: RESTORE_ALL
+ ALIGN
+signal_return:
+ movl %esp,%ecx
+ pushl %ecx
+ testl $(VM_MASK),EFLAGS(%ecx)
+ jne v86_signal_return
+ pushl %ebx
+ call SYMBOL_NAME(do_signal)
+ popl %ebx
+ popl %ebx
+ RESTORE_ALL
+ ALIGN
+v86_signal_return:
+ call SYMBOL_NAME(save_v86_state)
+ movl %eax,%esp
+ pushl %eax
+ pushl %ebx
+ call SYMBOL_NAME(do_signal)
+ popl %ebx
+ popl %ebx
+ RESTORE_ALL
+
+ENTRY(divide_error)
+ pushl $0 # no error code
+ pushl $ SYMBOL_NAME(do_divide_error)
+ ALIGN
+error_code:
+ push %fs
+ push %es
+ push %ds
+ pushl %eax
+ xorl %eax,%eax
+ pushl %ebp
+ pushl %edi
+ pushl %esi
+ pushl %edx
+ decl %eax # eax = -1
+ pushl %ecx
+ pushl %ebx
+ cld
+ xorl %ebx,%ebx # zero ebx
+ xchgl %eax, ORIG_EAX(%esp) # orig_eax (get the error code. )
+ mov %gs,%bx # get the lower order bits of gs
+ movl %esp,%edx
+ xchgl %ebx, GS(%esp) # get the address and save gs.
+ pushl %eax # push the error code
+ pushl %edx
+ movl $(KERNEL_DS),%edx
+ mov %dx,%ds
+ mov %dx,%es
+ movl $(USER_DS),%edx
+ mov %dx,%fs
+#ifdef __SMP__
+ ENTER_KERNEL
+ GET_PROCESSOR_OFFSET(%eax)
+ movl SYMBOL_NAME(current_set)(,%eax), %eax
+#else
+ movl SYMBOL_NAME(current_set),%eax
+#endif
+ movl %db6,%edx
+ movl %edx,dbgreg6(%eax) # save current hardware debugging status
+ call *%ebx
+ addl $8,%esp
+ jmp ret_from_sys_call
+
+ENTRY(coprocessor_error)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_coprocessor_error)
+ jmp error_code
+
+ENTRY(device_not_available)
+ pushl $-1 # mark this as an int
+ SAVE_ALL
+#ifdef __SMP__
+ ENTER_KERNEL
+#endif
+ pushl $ret_from_sys_call
+ movl %cr0,%eax
+ testl $0x4,%eax # EM (math emulation bit)
+ je SYMBOL_NAME(math_state_restore)
+ pushl $0 # temporary storage for ORIG_EIP
+ call SYMBOL_NAME(math_emulate)
+ addl $4,%esp
+ ret
+
+ENTRY(debug)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_debug)
+ jmp error_code
+
+ENTRY(nmi)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_nmi)
+ jmp error_code
+
+ENTRY(int3)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_int3)
+ jmp error_code
+
+ENTRY(overflow)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_overflow)
+ jmp error_code
+
+ENTRY(bounds)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_bounds)
+ jmp error_code
+
+ENTRY(invalid_op)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_invalid_op)
+ jmp error_code
+
+ENTRY(coprocessor_segment_overrun)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
+ jmp error_code
+
+ENTRY(reserved)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_reserved)
+ jmp error_code
+
+ENTRY(double_fault)
+ pushl $ SYMBOL_NAME(do_double_fault)
+ jmp error_code
+
+ENTRY(invalid_TSS)
+ pushl $ SYMBOL_NAME(do_invalid_TSS)
+ jmp error_code
+
+ENTRY(segment_not_present)
+ pushl $ SYMBOL_NAME(do_segment_not_present)
+ jmp error_code
+
+ENTRY(stack_segment)
+ pushl $ SYMBOL_NAME(do_stack_segment)
+ jmp error_code
+
+ENTRY(general_protection)
+ pushl $ SYMBOL_NAME(do_general_protection)
+ jmp error_code
+
+ENTRY(alignment_check)
+ pushl $ SYMBOL_NAME(do_alignment_check)
+ jmp error_code
+
+ENTRY(page_fault)
+ pushl $ SYMBOL_NAME(do_page_fault)
+ jmp error_code
+
+ENTRY(spurious_interrupt_bug)
+ pushl $0
+ pushl $ SYMBOL_NAME(do_spurious_interrupt_bug)
+ jmp error_code
+
+.data
+ENTRY(sys_call_table)
+ .long SYMBOL_NAME(sys_setup) /* 0 */
+ .long SYMBOL_NAME(sys_exit)
+ .long SYMBOL_NAME(sys_fork)
+ .long SYMBOL_NAME(sys_read)
+ .long SYMBOL_NAME(sys_write)
+ .long SYMBOL_NAME(sys_open) /* 5 */
+ .long SYMBOL_NAME(sys_close)
+ .long SYMBOL_NAME(sys_waitpid)
+ .long SYMBOL_NAME(sys_creat)
+ .long SYMBOL_NAME(sys_link)
+ .long SYMBOL_NAME(sys_unlink) /* 10 */
+ .long SYMBOL_NAME(sys_execve)
+ .long SYMBOL_NAME(sys_chdir)
+ .long SYMBOL_NAME(sys_time)
+ .long SYMBOL_NAME(sys_mknod)
+ .long SYMBOL_NAME(sys_chmod) /* 15 */
+ .long SYMBOL_NAME(sys_chown)
+ .long SYMBOL_NAME(sys_break)
+ .long SYMBOL_NAME(sys_stat)
+ .long SYMBOL_NAME(sys_lseek)
+ .long SYMBOL_NAME(sys_getpid) /* 20 */
+ .long SYMBOL_NAME(sys_mount)
+ .long SYMBOL_NAME(sys_umount)
+ .long SYMBOL_NAME(sys_setuid)
+ .long SYMBOL_NAME(sys_getuid)
+ .long SYMBOL_NAME(sys_stime) /* 25 */
+ .long SYMBOL_NAME(sys_ptrace)
+ .long SYMBOL_NAME(sys_alarm)
+ .long SYMBOL_NAME(sys_fstat)
+ .long SYMBOL_NAME(sys_pause)
+ .long SYMBOL_NAME(sys_utime) /* 30 */
+ .long SYMBOL_NAME(sys_stty)
+ .long SYMBOL_NAME(sys_gtty)
+ .long SYMBOL_NAME(sys_access)
+ .long SYMBOL_NAME(sys_nice)
+ .long SYMBOL_NAME(sys_ftime) /* 35 */
+ .long SYMBOL_NAME(sys_sync)
+ .long SYMBOL_NAME(sys_kill)
+ .long SYMBOL_NAME(sys_rename)
+ .long SYMBOL_NAME(sys_mkdir)
+ .long SYMBOL_NAME(sys_rmdir) /* 40 */
+ .long SYMBOL_NAME(sys_dup)
+ .long SYMBOL_NAME(sys_pipe)
+ .long SYMBOL_NAME(sys_times)
+ .long SYMBOL_NAME(sys_prof)
+ .long SYMBOL_NAME(sys_brk) /* 45 */
+ .long SYMBOL_NAME(sys_setgid)
+ .long SYMBOL_NAME(sys_getgid)
+ .long SYMBOL_NAME(sys_signal)
+ .long SYMBOL_NAME(sys_geteuid)
+ .long SYMBOL_NAME(sys_getegid) /* 50 */
+ .long SYMBOL_NAME(sys_acct)
+ .long SYMBOL_NAME(sys_phys)
+ .long SYMBOL_NAME(sys_lock)
+ .long SYMBOL_NAME(sys_ioctl)
+ .long SYMBOL_NAME(sys_fcntl) /* 55 */
+ .long SYMBOL_NAME(sys_mpx)
+ .long SYMBOL_NAME(sys_setpgid)
+ .long SYMBOL_NAME(sys_ulimit)
+ .long SYMBOL_NAME(sys_olduname)
+ .long SYMBOL_NAME(sys_umask) /* 60 */
+ .long SYMBOL_NAME(sys_chroot)
+ .long SYMBOL_NAME(sys_ustat)
+ .long SYMBOL_NAME(sys_dup2)
+ .long SYMBOL_NAME(sys_getppid)
+ .long SYMBOL_NAME(sys_getpgrp) /* 65 */
+ .long SYMBOL_NAME(sys_setsid)
+ .long SYMBOL_NAME(sys_sigaction)
+ .long SYMBOL_NAME(sys_sgetmask)
+ .long SYMBOL_NAME(sys_ssetmask)
+ .long SYMBOL_NAME(sys_setreuid) /* 70 */
+ .long SYMBOL_NAME(sys_setregid)
+ .long SYMBOL_NAME(sys_sigsuspend)
+ .long SYMBOL_NAME(sys_sigpending)
+ .long SYMBOL_NAME(sys_sethostname)
+ .long SYMBOL_NAME(sys_setrlimit) /* 75 */
+ .long SYMBOL_NAME(sys_getrlimit)
+ .long SYMBOL_NAME(sys_getrusage)
+ .long SYMBOL_NAME(sys_gettimeofday)
+ .long SYMBOL_NAME(sys_settimeofday)
+ .long SYMBOL_NAME(sys_getgroups) /* 80 */
+ .long SYMBOL_NAME(sys_setgroups)
+ .long SYMBOL_NAME(old_select)
+ .long SYMBOL_NAME(sys_symlink)
+ .long SYMBOL_NAME(sys_lstat)
+ .long SYMBOL_NAME(sys_readlink) /* 85 */
+ .long SYMBOL_NAME(sys_uselib)
+ .long SYMBOL_NAME(sys_swapon)
+ .long SYMBOL_NAME(sys_reboot)
+ .long SYMBOL_NAME(old_readdir)
+ .long SYMBOL_NAME(old_mmap) /* 90 */
+ .long SYMBOL_NAME(sys_munmap)
+ .long SYMBOL_NAME(sys_truncate)
+ .long SYMBOL_NAME(sys_ftruncate)
+ .long SYMBOL_NAME(sys_fchmod)
+ .long SYMBOL_NAME(sys_fchown) /* 95 */
+ .long SYMBOL_NAME(sys_getpriority)
+ .long SYMBOL_NAME(sys_setpriority)
+ .long SYMBOL_NAME(sys_profil)
+ .long SYMBOL_NAME(sys_statfs)
+ .long SYMBOL_NAME(sys_fstatfs) /* 100 */
+ .long SYMBOL_NAME(sys_ioperm)
+ .long SYMBOL_NAME(sys_socketcall)
+ .long SYMBOL_NAME(sys_syslog)
+ .long SYMBOL_NAME(sys_setitimer)
+ .long SYMBOL_NAME(sys_getitimer) /* 105 */
+ .long SYMBOL_NAME(sys_newstat)
+ .long SYMBOL_NAME(sys_newlstat)
+ .long SYMBOL_NAME(sys_newfstat)
+ .long SYMBOL_NAME(sys_uname)
+ .long SYMBOL_NAME(sys_iopl) /* 110 */
+ .long SYMBOL_NAME(sys_vhangup)
+ .long SYMBOL_NAME(sys_idle)
+ .long SYMBOL_NAME(sys_vm86old)
+ .long SYMBOL_NAME(sys_wait4)
+ .long SYMBOL_NAME(sys_swapoff) /* 115 */
+ .long SYMBOL_NAME(sys_sysinfo)
+ .long SYMBOL_NAME(sys_ipc)
+ .long SYMBOL_NAME(sys_fsync)
+ .long SYMBOL_NAME(sys_sigreturn)
+ .long SYMBOL_NAME(sys_clone) /* 120 */
+ .long SYMBOL_NAME(sys_setdomainname)
+ .long SYMBOL_NAME(sys_newuname)
+ .long SYMBOL_NAME(sys_modify_ldt)
+ .long SYMBOL_NAME(sys_adjtimex)
+ .long SYMBOL_NAME(sys_mprotect) /* 125 */
+ .long SYMBOL_NAME(sys_sigprocmask)
+ .long SYMBOL_NAME(sys_create_module)
+ .long SYMBOL_NAME(sys_init_module)
+ .long SYMBOL_NAME(sys_delete_module)
+ .long SYMBOL_NAME(sys_get_kernel_syms) /* 130 */
+ .long SYMBOL_NAME(sys_quotactl)
+ .long SYMBOL_NAME(sys_getpgid)
+ .long SYMBOL_NAME(sys_fchdir)
+ .long SYMBOL_NAME(sys_bdflush)
+ .long SYMBOL_NAME(sys_sysfs) /* 135 */
+ .long SYMBOL_NAME(sys_personality)
+ .long 0 /* for afs_syscall */
+ .long SYMBOL_NAME(sys_setfsuid)
+ .long SYMBOL_NAME(sys_setfsgid)
+ .long SYMBOL_NAME(sys_llseek) /* 140 */
+ .long SYMBOL_NAME(sys_getdents)
+ .long SYMBOL_NAME(sys_select)
+ .long SYMBOL_NAME(sys_flock)
+ .long SYMBOL_NAME(sys_msync)
+ .long SYMBOL_NAME(sys_readv) /* 145 */
+ .long SYMBOL_NAME(sys_writev)
+ .long SYMBOL_NAME(sys_getsid)
+ .long SYMBOL_NAME(sys_fdatasync)
+ .long SYMBOL_NAME(sys_sysctl)
+ .long SYMBOL_NAME(sys_mlock) /* 150 */
+ .long SYMBOL_NAME(sys_munlock)
+ .long SYMBOL_NAME(sys_mlockall)
+ .long SYMBOL_NAME(sys_munlockall)
+ .long SYMBOL_NAME(sys_sched_setparam)
+ .long SYMBOL_NAME(sys_sched_getparam) /* 155 */
+ .long SYMBOL_NAME(sys_sched_setscheduler)
+ .long SYMBOL_NAME(sys_sched_getscheduler)
+ .long SYMBOL_NAME(sys_sched_yield)
+ .long SYMBOL_NAME(sys_sched_get_priority_max)
+ .long SYMBOL_NAME(sys_sched_get_priority_min) /* 160 */
+ .long SYMBOL_NAME(sys_sched_rr_get_interval)
+ .long SYMBOL_NAME(sys_nanosleep)
+ .long SYMBOL_NAME(sys_mremap)
+ .long 0,0
+ .long SYMBOL_NAME(sys_vm86)
+ .long 0,0,0,0 /* 170 */
+ .long 0,0,0,0,0,0,0,0,0,0 /* 180 */
+ .long 0,0,0,0,0,0,0
+ .long SYMBOL_NAME(sys_table)
+ .space (NR_syscalls-188)*4
diff --git a/kernel/table20/kernel.patch b/kernel/table20/kernel.patch
new file mode 100644
index 00000000..37654b3d
--- /dev/null
+++ b/kernel/table20/kernel.patch
@@ -0,0 +1,51 @@
+diff -ur linux-2.0.32/Makefile linux-hacked/Makefile
+--- linux-2.0.32/Makefile Fri Nov 7 19:51:05 1997
++++ linux-hacked/Makefile Thu Jun 11 20:41:12 1998
+@@ -87,7 +87,7 @@
+ # standard CFLAGS
+ #
+
+-CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce
++CFLAGS = -Wall -Wstrict-prototypes -g -O2 -fomit-frame-pointer -fno-strength-reduce
+
+ ifdef CONFIG_CPP
+ CFLAGS := $(CFLAGS) -x c++
+@@ -113,12 +113,12 @@
+ # Include the make variables (CC, etc...)
+ #
+
+-ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o net/network.a
++ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o net/network.a table/table.o
+ FILESYSTEMS =fs/filesystems.a
+ DRIVERS =drivers/block/block.a \
+ drivers/char/char.a
+ LIBS =$(TOPDIR)/lib/lib.a
+-SUBDIRS =kernel drivers mm fs net ipc lib
++SUBDIRS =kernel drivers mm fs net ipc lib table
+
+ ifeq ($(CONFIG_ISDN),y)
+ DRIVERS := $(DRIVERS) drivers/isdn/isdn.a
+diff -ur linux-2.0.32/arch/i386/kernel/entry.S linux-hacked/arch/i386/kernel/entry.S
+--- linux-2.0.32/arch/i386/kernel/entry.S Tue Sep 16 23:42:45 1997
++++ linux-hacked/arch/i386/kernel/entry.S Thu Jun 11 21:37:20 1998
+@@ -699,4 +699,8 @@
+ .long SYMBOL_NAME(sys_mremap)
+ .long 0,0
+ .long SYMBOL_NAME(sys_vm86)
+- .space (NR_syscalls-166)*4
++ .long 0,0,0,0 /* 170 */
++ .long 0,0,0,0,0,0,0,0,0,0 /* 180 */
++ .long 0,0,0,0,0,0,0
++ .long SYMBOL_NAME(sys_table)
++ .space (NR_syscalls-188)*4
+diff -ur linux-2.0.32/include/asm-i386/unistd.h linux-hacked/include/asm-i386/unistd.h
+--- linux-2.0.32/include/asm-i386/unistd.h Fri Mar 22 07:34:02 1996
++++ linux-hacked/include/asm-i386/unistd.h Thu Jun 11 21:37:03 1998
+@@ -169,6 +169,7 @@
+ #define __NR_sched_rr_get_interval 161
+ #define __NR_nanosleep 162
+ #define __NR_mremap 163
++#define __NR_table 188
+
+ /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
+ #define _syscall0(type,name) \
diff --git a/kernel/table20/main.c b/kernel/table20/main.c
new file mode 100644
index 00000000..97950afb
--- /dev/null
+++ b/kernel/table20/main.c
@@ -0,0 +1,468 @@
+/*
+ * linux/table/table_impl.c
+ * Copyright (C) 1998 Martin Baulig
+ */
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/kernel_stat.h>
+#include <linux/tty.h>
+#include <linux/user.h>
+#include <linux/a.out.h>
+#include <linux/string.h>
+#include <linux/mman.h>
+#include <linux/proc_fs.h>
+#include <linux/ioport.h>
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/pagemap.h>
+#include <linux/swap.h>
+
+#include <asm/segment.h>
+#include <asm/pgtable.h>
+#include <asm/io.h>
+
+#include <linux/table.h>
+
+#include "version.h"
+
+#if defined(__i386__)
+# define KSTK_EIP(tsk) (((unsigned long *)tsk->kernel_stack_page)[1019])
+# define KSTK_ESP(tsk) (((unsigned long *)tsk->kernel_stack_page)[1022])
+#elif defined(__alpha__)
+ /*
+ * See arch/alpha/kernel/ptrace.c for details.
+ */
+# define PT_REG(reg) (PAGE_SIZE - sizeof(struct pt_regs) \
+ + (long)&((struct pt_regs *)0)->reg)
+# define KSTK_EIP(tsk) (*(unsigned long *)(tsk->kernel_stack_page + PT_REG(pc)))
+# define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->tss.usp)
+#elif defined(__sparc__)
+# define PT_REG(reg) (PAGE_SIZE - sizeof(struct pt_regs) \
+ + (long)&((struct pt_regs *)0)->reg)
+# define KSTK_EIP(tsk) (*(unsigned long *)(tsk->kernel_stack_page + PT_REG(pc)))
+# define KSTK_ESP(tsk) (*(unsigned long *)(tsk->kernel_stack_page + PT_REG(u_regs[UREG_FP])))
+#endif
+
+static struct task_struct *
+get_task (pid_t pid)
+{
+ struct task_struct ** p;
+
+ p = task;
+ while (++p < task+NR_TASKS) {
+ if (*p && (*p)->pid == pid)
+ return *p;
+ }
+
+ return NULL;
+}
+
+static inline void statm_pte_range(pmd_t * pmd, unsigned long address, unsigned long size,
+ int * pages, int * shared, int * dirty, int * total)
+{
+ pte_t * pte;
+ unsigned long end;
+
+ if (pmd_none(*pmd))
+ return;
+ if (pmd_bad(*pmd)) {
+ printk("statm_pte_range: bad pmd (%08lx)\n", pmd_val(*pmd));
+ pmd_clear(pmd);
+ return;
+ }
+ pte = pte_offset(pmd, address);
+ address &= ~PMD_MASK;
+ end = address + size;
+ if (end > PMD_SIZE)
+ end = PMD_SIZE;
+ do {
+ pte_t page = *pte;
+
+ address += PAGE_SIZE;
+ pte++;
+ if (pte_none(page))
+ continue;
+ ++*total;
+ if (!pte_present(page))
+ continue;
+ ++*pages;
+ if (pte_dirty(page))
+ ++*dirty;
+ if (pte_page(page) >= high_memory)
+ continue;
+ if (mem_map[MAP_NR(pte_page(page))].count > 1)
+ ++*shared;
+ } while (address < end);
+}
+
+static inline void statm_pmd_range(pgd_t * pgd, unsigned long address, unsigned long size,
+ int * pages, int * shared, int * dirty, int * total)
+{
+ pmd_t * pmd;
+ unsigned long end;
+
+ if (pgd_none(*pgd))
+ return;
+ if (pgd_bad(*pgd)) {
+ printk("statm_pmd_range: bad pgd (%08lx)\n", pgd_val(*pgd));
+ pgd_clear(pgd);
+ return;
+ }
+ pmd = pmd_offset(pgd, address);
+ address &= ~PGDIR_MASK;
+ end = address + size;
+ if (end > PGDIR_SIZE)
+ end = PGDIR_SIZE;
+ do {
+ statm_pte_range(pmd, address, end - address, pages, shared, dirty, total);
+ address = (address + PMD_SIZE) & PMD_MASK;
+ pmd++;
+ } while (address < end);
+}
+
+static void statm_pgd_range(pgd_t * pgd, unsigned long address, unsigned long end,
+ int * pages, int * shared, int * dirty, int * total)
+{
+ while (address < end) {
+ statm_pmd_range(pgd, address, end - address, pages, shared, dirty, total);
+ address = (address + PGDIR_SIZE) & PGDIR_MASK;
+ pgd++;
+ }
+}
+
+static unsigned long
+get_wchan (struct task_struct *p)
+{
+ if (!p || p == current || p->state == TASK_RUNNING)
+ return 0;
+#if defined(__i386__)
+ {
+ unsigned long ebp, eip;
+ unsigned long stack_page;
+ int count = 0;
+
+ stack_page = p->kernel_stack_page;
+ if (!stack_page)
+ return 0;
+ ebp = p->tss.ebp;
+ do {
+ if (ebp < stack_page || ebp >= 4092+stack_page)
+ return 0;
+ eip = *(unsigned long *) (ebp+4);
+ if (eip < (unsigned long) interruptible_sleep_on
+ || eip >= (unsigned long) add_timer)
+ return eip;
+ ebp = *(unsigned long *) ebp;
+ } while (count++ < 16);
+ }
+#elif defined(__alpha__)
+ /*
+ * This one depends on the frame size of schedule(). Do a
+ * "disass schedule" in gdb to find the frame size. Also, the
+ * code assumes that sleep_on() follows immediately after
+ * interruptible_sleep_on() and that add_timer() follows
+ * immediately after interruptible_sleep(). Ugly, isn't it?
+ * Maybe adding a wchan field to task_struct would be better,
+ * after all...
+ */
+ {
+ unsigned long schedule_frame;
+ unsigned long pc;
+
+ pc = thread_saved_pc(&p->tss);
+ if (pc >= (unsigned long) interruptible_sleep_on && pc < (unsigned long) add_timer) {
+ schedule_frame = ((unsigned long *)p->tss.ksp)[6];
+ return ((unsigned long *)schedule_frame)[12];
+ }
+ return pc;
+ }
+#endif
+ return 0;
+}
+
+asmlinkage int
+sys_table (int type, union table *buf, const void *param)
+{
+ union table tbl;
+ struct sysinfo i;
+ struct task_struct *tsk = NULL;
+ struct ip_chain *chain;
+ struct ip_fwkernel *rule;
+ char devname [9];
+ int index, err;
+ pid_t pid;
+
+ if (type == TABLE_VERSION)
+ return _TABLE_VERSION;
+
+ if (!buf)
+ return -EFAULT;
+
+ memset (&tbl, 0, sizeof (union table));
+
+ /* For TABLE_PROC_*, read pid and get task_struct */
+
+ switch (type) {
+ case TABLE_PROC_UID:
+ case TABLE_PROC_MEM:
+ case TABLE_PROC_SEGMENT:
+ case TABLE_PROC_TIME:
+ case TABLE_PROC_STATE:
+ case TABLE_PROC_SIGNAL:
+ case TABLE_PROC_KERNEL:
+ err = verify_area (VERIFY_READ, param, sizeof (pid_t));
+ if (err)
+ return err;
+ memcpy_fromfs (&pid, param, sizeof (pid_t));
+
+ tsk = get_task (pid);
+ if (tsk == NULL)
+ return -ESRCH;
+ break;
+ case TABLE_NETACCT:
+ err = verify_area (VERIFY_READ, param, 5);
+ if (err)
+ return err;
+ copy_from_user (devname, param, 5);
+ devname [5] = 0;
+
+ break;
+ }
+
+ /* Main function dispatcher */
+
+ switch (type) {
+ case TABLE_PROCLIST:
+ tsk = task [0];
+ for (index = 0; index < nr_tasks; index++) {
+ tbl.proclist.pids [index] = tsk->pid;
+ tsk = tsk->next_task;
+ }
+ tbl.proclist.nr_running = nr_running;
+ tbl.proclist.nr_tasks = nr_tasks;
+ tbl.proclist.last_pid = last_pid;
+ break;
+ case TABLE_CPU:
+ tbl.cpu.total = jiffies;
+ tbl.cpu.user = kstat.cpu_user;
+ tbl.cpu.nice = kstat.cpu_nice;
+ tbl.cpu.sys = kstat.cpu_system;
+ tbl.cpu.idle = tbl.cpu.total -
+ (tbl.cpu.user + tbl.cpu.nice + tbl.cpu.sys);
+ tbl.cpu.frequency = HZ;
+ break;
+ case TABLE_MEM:
+ si_meminfo (&i);
+ tbl.mem.total = i.totalram;
+ tbl.mem.used = i.totalram - i.freeram;
+ tbl.mem.free = i.freeram;
+ tbl.mem.shared = i.sharedram;
+ tbl.mem.buffer = i.bufferram;
+ tbl.mem.cached = page_cache_size << PAGE_SHIFT;
+ break;
+ case TABLE_SWAP:
+ si_swapinfo (&i);
+ tbl.swap.total = i.totalswap;
+ tbl.swap.used = i.totalswap - i.freeswap;
+ tbl.swap.free = i.freeswap;
+ tbl.swap.pagein = kstat.pswpin;
+ tbl.swap.pageout = kstat.pswpout;
+ break;
+ case TABLE_LOADAVG:
+ tbl.loadavg.loadavg [0] = (double) avenrun [0] / (1 << FSHIFT);
+ tbl.loadavg.loadavg [1] = (double) avenrun [1] / (1 << FSHIFT);
+ tbl.loadavg.loadavg [2] = (double) avenrun [2] / (1 << FSHIFT);
+ tbl.loadavg.nr_running = nr_running;
+ tbl.loadavg.nr_tasks = nr_tasks;
+ tbl.loadavg.last_pid = last_pid;
+ break;
+ case TABLE_UPTIME:
+ tbl.uptime.uptime = jiffies;
+ tbl.uptime.idle = task[0]->utime + task[0]->stime;
+ break;
+ case TABLE_PROC_STATE:
+ tbl.proc_state.state = tsk->state;
+ tbl.proc_state.flags = tsk->flags;
+ memcpy (tbl.proc_state.comm, tsk->comm,
+ sizeof (tbl.proc_state.comm));
+ break;
+ case TABLE_PROC_UID:
+ tbl.proc_uid.uid = tsk->uid;
+ tbl.proc_uid.euid = tsk->euid;
+ tbl.proc_uid.suid = tsk->suid;
+ tbl.proc_uid.fsuid = tsk->fsuid;
+
+ tbl.proc_uid.gid = tsk->gid;
+ tbl.proc_uid.egid = tsk->egid;
+ tbl.proc_uid.sgid = tsk->sgid;
+ tbl.proc_uid.fsgid = tsk->fsgid;
+
+ tbl.proc_uid.pid = tsk->pid;
+ tbl.proc_uid.pgrp = tsk->pgrp;
+ tbl.proc_uid.ppid = tsk->p_pptr->pid;
+
+ tbl.proc_uid.session = tsk->session;
+ tbl.proc_uid.tty = tsk->tty ?
+ kdev_t_to_nr (tsk->tty->device) : 0;
+ tbl.proc_uid.tpgid = tsk->tty ? tsk->tty->pgrp : -1;
+
+ tbl.proc_uid.priority = tsk->priority;
+ tbl.proc_uid.counter = tsk->counter;
+ tbl.proc_uid.def_priority = DEF_PRIORITY;
+ break;
+ case TABLE_PROC_SIGNAL:
+ tbl.proc_signal.signal = tsk->signal;
+ tbl.proc_signal.blocked = tsk->blocked;
+
+ if (tsk->sig) {
+ struct sigaction * action = tsk->sig->action;
+ unsigned long sig_ign = 0, sig_caught = 0;
+ unsigned long bit = 1;
+ int i;
+
+ for (i = 0; i < 32; i++) {
+ switch((unsigned long) action->sa_handler) {
+ case 0:
+ break;
+ case 1:
+ sig_ign |= bit;
+ break;
+ default:
+ sig_caught |= bit;
+ }
+ bit <<= 1;
+ action++;
+ }
+
+ tbl.proc_signal.ignored = sig_ign;
+ tbl.proc_signal.caught = sig_caught;
+ } else {
+ tbl.proc_signal.ignored = 0;
+ tbl.proc_signal.caught = 0;
+ }
+ break;
+ case TABLE_PROC_MEM:
+ if (tsk->mm && tsk->mm != &init_mm) {
+ tbl.proc_mem.context = tsk->mm->context;
+ tbl.proc_mem.start_code = tsk->mm->start_code;
+ tbl.proc_mem.end_code = tsk->mm->end_code;
+ tbl.proc_mem.start_data = tsk->mm-> start_data;
+ tbl.proc_mem.end_data = tsk->mm->end_data;
+ tbl.proc_mem.start_brk = tsk->mm->start_brk;
+ tbl.proc_mem.brk = tsk->mm->brk;
+ tbl.proc_mem.start_stack = tsk->mm->start_stack;
+ tbl.proc_mem.start_mmap = tsk->mm->start_mmap;
+ tbl.proc_mem.arg_start = tsk->mm->arg_start;
+ tbl.proc_mem.arg_end = tsk->mm->arg_end;
+ tbl.proc_mem.env_start = tsk->mm->env_start;
+ tbl.proc_mem.env_end = tsk->mm->env_end;
+ tbl.proc_mem.rss = tsk->mm->rss;
+ tbl.proc_mem.total_vm = tsk->mm->total_vm;
+ tbl.proc_mem.locked_vm = tsk->mm->locked_vm;
+ }
+ tbl.proc_mem.rlim = tsk->rlim ?
+ tsk->rlim[RLIMIT_RSS].rlim_cur : 0;
+ break;
+ case TABLE_PROC_SEGMENT:
+ if (tsk->mm && tsk->mm != &init_mm) {
+ unsigned long vsize = 0;
+ int size = 0, resident = 0, share = 0;
+ int trs = 0, lrs = 0, drs = 0, dt = 0;
+ struct vm_area_struct * vma = tsk->mm->mmap;
+
+ while (vma) {
+ pgd_t *pgd = pgd_offset(tsk->mm, vma->vm_start);
+ int pages = 0, shared = 0, dirty = 0, total = 0;
+
+ vsize += vma->vm_end - vma->vm_start;
+
+ statm_pgd_range (pgd, vma->vm_start, vma->vm_end,
+ &pages, &shared, &dirty, &total);
+ resident += pages;
+ share += shared;
+ dt += dirty;
+ size += total;
+ if (vma->vm_flags & VM_EXECUTABLE)
+ trs += pages; /* text */
+ else if (vma->vm_flags & VM_GROWSDOWN)
+ drs += pages; /* stack */
+ else if (vma->vm_end > 0x60000000)
+ lrs += pages; /* library */
+ else
+ drs += pages;
+ vma = vma->vm_next;
+ }
+
+ tbl.proc_segment.vsize = vsize;
+ tbl.proc_segment.size = size;
+ tbl.proc_segment.resident = resident;
+ tbl.proc_segment.shared = share;
+ tbl.proc_segment.trs = trs;
+ tbl.proc_segment.lrs = lrs;
+ tbl.proc_segment.dt = dt;
+ }
+ break;
+ case TABLE_PROC_TIME:
+ tbl.proc_time.utime = tsk->utime;
+ tbl.proc_time.stime = tsk->stime;
+ tbl.proc_time.cutime = tsk->cutime;
+ tbl.proc_time.cstime = tsk->cstime;
+
+ tbl.proc_time.start_time = tsk->start_time;
+ tbl.proc_time.timeout = tsk->timeout;
+ tbl.proc_time.policy = tsk->policy;
+ tbl.proc_time.rt_priority = tsk->rt_priority;
+
+ tbl.proc_time.it_real_value = tsk->it_real_value;
+ tbl.proc_time.it_prof_value = tsk->it_prof_value;
+ tbl.proc_time.it_virt_value = tsk->it_virt_value;
+ tbl.proc_time.it_real_incr = tsk->it_real_incr;
+ tbl.proc_time.it_prof_incr = tsk->it_prof_incr;
+ tbl.proc_time.it_virt_incr = tsk->it_virt_incr;
+ break;
+ case TABLE_PROC_KERNEL:
+ tbl.proc_kernel.min_flt = tsk->min_flt;
+ tbl.proc_kernel.cmin_flt = tsk->cmin_flt;
+ tbl.proc_kernel.maj_flt = tsk->maj_flt;
+ tbl.proc_kernel.cmaj_flt = tsk->cmaj_flt;
+
+ tbl.proc_kernel.kesp = tsk->kernel_stack_page ? KSTK_EIP(tsk) : 0;
+ tbl.proc_kernel.keip = tsk->kernel_stack_page ? KSTK_ESP(tsk) : 0;
+
+ tbl.proc_kernel.nswap = tsk->nswap;
+ tbl.proc_kernel.cnswap = tsk->cnswap;
+
+ tbl.proc_kernel.wchan = get_wchan (tsk);
+ break;
+ case TABLE_NETACCT:
+ for (chain = ip_fw_chains; chain; chain = chain->next) {
+ for (rule = chain->chain; rule; rule = rule->next) {
+ const char *name = rule->ipfw.fw_vianame;
+ int k;
+
+ if (name [0] && !strncmp (param, name, 5))
+ continue;
+
+ for (k = 0; k < NUM_SLOTS; k++) {
+ tbl.netacct.packets +=
+ rule->counters[k].pcnt;
+ tbl.netacct.bytes +=
+ rule->counters[k].bcnt;
+ }
+ }
+ }
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ err = verify_area (VERIFY_WRITE, buf, sizeof (struct table));
+ if (err)
+ return err;
+
+ memcpy_tofs (buf, &tbl, sizeof (union table));
+ return 0;
+}
diff --git a/kernel/table20/unistd-i386.h b/kernel/table20/unistd-i386.h
new file mode 100644
index 00000000..0d5b4f8b
--- /dev/null
+++ b/kernel/table20/unistd-i386.h
@@ -0,0 +1,324 @@
+#ifndef _ASM_I386_UNISTD_H_
+#define _ASM_I386_UNISTD_H_
+
+/*
+ * This file contains the system call numbers.
+ */
+
+#define __NR_setup 0 /* used only by init, to get system going */
+#define __NR_exit 1
+#define __NR_fork 2
+#define __NR_read 3
+#define __NR_write 4
+#define __NR_open 5
+#define __NR_close 6
+#define __NR_waitpid 7
+#define __NR_creat 8
+#define __NR_link 9
+#define __NR_unlink 10
+#define __NR_execve 11
+#define __NR_chdir 12
+#define __NR_time 13
+#define __NR_mknod 14
+#define __NR_chmod 15
+#define __NR_chown 16
+#define __NR_break 17
+#define __NR_oldstat 18
+#define __NR_lseek 19
+#define __NR_getpid 20
+#define __NR_mount 21
+#define __NR_umount 22
+#define __NR_setuid 23
+#define __NR_getuid 24
+#define __NR_stime 25
+#define __NR_ptrace 26
+#define __NR_alarm 27
+#define __NR_oldfstat 28
+#define __NR_pause 29
+#define __NR_utime 30
+#define __NR_stty 31
+#define __NR_gtty 32
+#define __NR_access 33
+#define __NR_nice 34
+#define __NR_ftime 35
+#define __NR_sync 36
+#define __NR_kill 37
+#define __NR_rename 38
+#define __NR_mkdir 39
+#define __NR_rmdir 40
+#define __NR_dup 41
+#define __NR_pipe 42
+#define __NR_times 43
+#define __NR_prof 44
+#define __NR_brk 45
+#define __NR_setgid 46
+#define __NR_getgid 47
+#define __NR_signal 48
+#define __NR_geteuid 49
+#define __NR_getegid 50
+#define __NR_acct 51
+#define __NR_phys 52
+#define __NR_lock 53
+#define __NR_ioctl 54
+#define __NR_fcntl 55
+#define __NR_mpx 56
+#define __NR_setpgid 57
+#define __NR_ulimit 58
+#define __NR_oldolduname 59
+#define __NR_umask 60
+#define __NR_chroot 61
+#define __NR_ustat 62
+#define __NR_dup2 63
+#define __NR_getppid 64
+#define __NR_getpgrp 65
+#define __NR_setsid 66
+#define __NR_sigaction 67
+#define __NR_sgetmask 68
+#define __NR_ssetmask 69
+#define __NR_setreuid 70
+#define __NR_setregid 71
+#define __NR_sigsuspend 72
+#define __NR_sigpending 73
+#define __NR_sethostname 74
+#define __NR_setrlimit 75
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_gettimeofday 78
+#define __NR_settimeofday 79
+#define __NR_getgroups 80
+#define __NR_setgroups 81
+#define __NR_select 82
+#define __NR_symlink 83
+#define __NR_oldlstat 84
+#define __NR_readlink 85
+#define __NR_uselib 86
+#define __NR_swapon 87
+#define __NR_reboot 88
+#define __NR_readdir 89
+#define __NR_mmap 90
+#define __NR_munmap 91
+#define __NR_truncate 92
+#define __NR_ftruncate 93
+#define __NR_fchmod 94
+#define __NR_fchown 95
+#define __NR_getpriority 96
+#define __NR_setpriority 97
+#define __NR_profil 98
+#define __NR_statfs 99
+#define __NR_fstatfs 100
+#define __NR_ioperm 101
+#define __NR_socketcall 102
+#define __NR_syslog 103
+#define __NR_setitimer 104
+#define __NR_getitimer 105
+#define __NR_stat 106
+#define __NR_lstat 107
+#define __NR_fstat 108
+#define __NR_olduname 109
+#define __NR_iopl 110
+#define __NR_vhangup 111
+#define __NR_idle 112
+#define __NR_vm86 113
+#define __NR_wait4 114
+#define __NR_swapoff 115
+#define __NR_sysinfo 116
+#define __NR_ipc 117
+#define __NR_fsync 118
+#define __NR_sigreturn 119
+#define __NR_clone 120
+#define __NR_setdomainname 121
+#define __NR_uname 122
+#define __NR_modify_ldt 123
+#define __NR_adjtimex 124
+#define __NR_mprotect 125
+#define __NR_sigprocmask 126
+#define __NR_create_module 127
+#define __NR_init_module 128
+#define __NR_delete_module 129
+#define __NR_get_kernel_syms 130
+#define __NR_quotactl 131
+#define __NR_getpgid 132
+#define __NR_fchdir 133
+#define __NR_bdflush 134
+#define __NR_sysfs 135
+#define __NR_personality 136
+#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
+#define __NR_setfsuid 138
+#define __NR_setfsgid 139
+#define __NR__llseek 140
+#define __NR_getdents 141
+#define __NR__newselect 142
+#define __NR_flock 143
+#define __NR_msync 144
+#define __NR_readv 145
+#define __NR_writev 146
+#define __NR_getsid 147
+#define __NR_fdatasync 148
+#define __NR__sysctl 149
+#define __NR_mlock 150
+#define __NR_munlock 151
+#define __NR_mlockall 152
+#define __NR_munlockall 153
+#define __NR_sched_setparam 154
+#define __NR_sched_getparam 155
+#define __NR_sched_setscheduler 156
+#define __NR_sched_getscheduler 157
+#define __NR_sched_yield 158
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_rr_get_interval 161
+#define __NR_nanosleep 162
+#define __NR_mremap 163
+#define __NR_table 188
+
+/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
+#define _syscall0(type,name) \
+type name(void) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x80" \
+ : "=a" (__res) \
+ : "0" (__NR_##name)); \
+if (__res >= 0) \
+ return (type) __res; \
+errno = -__res; \
+return -1; \
+}
+
+#define _syscall1(type,name,type1,arg1) \
+type name(type1 arg1) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x80" \
+ : "=a" (__res) \
+ : "0" (__NR_##name),"b" ((long)(arg1))); \
+if (__res >= 0) \
+ return (type) __res; \
+errno = -__res; \
+return -1; \
+}
+
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
+type name(type1 arg1,type2 arg2) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x80" \
+ : "=a" (__res) \
+ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \
+if (__res >= 0) \
+ return (type) __res; \
+errno = -__res; \
+return -1; \
+}
+
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+type name(type1 arg1,type2 arg2,type3 arg3) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x80" \
+ : "=a" (__res) \
+ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+ "d" ((long)(arg3))); \
+if (__res>=0) \
+ return (type) __res; \
+errno=-__res; \
+return -1; \
+}
+
+#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x80" \
+ : "=a" (__res) \
+ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+ "d" ((long)(arg3)),"S" ((long)(arg4))); \
+if (__res>=0) \
+ return (type) __res; \
+errno=-__res; \
+return -1; \
+}
+
+#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+ type5,arg5) \
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
+{ \
+long __res; \
+__asm__ volatile ("int $0x80" \
+ : "=a" (__res) \
+ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
+ "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
+if (__res>=0) \
+ return (type) __res; \
+errno=-__res; \
+return -1; \
+}
+
+#ifdef __KERNEL_SYSCALLS__
+
+/*
+ * we need this inline - forking from kernel space will result
+ * in NO COPY ON WRITE (!!!), until an execve is executed. This
+ * is no problem, but for the stack. This is handled by not letting
+ * main() use the stack at all after fork(). Thus, no function
+ * calls - which means inline code for fork too, as otherwise we
+ * would use the stack upon exit from 'fork()'.
+ *
+ * Actually only pause and fork are needed inline, so that there
+ * won't be any messing with the stack from main(), but we define
+ * some others too.
+ */
+#define __NR__exit __NR_exit
+static inline _syscall0(int,idle)
+static inline _syscall0(int,fork)
+static inline _syscall2(int,clone,unsigned long,flags,char *,esp)
+static inline _syscall0(int,pause)
+static inline _syscall0(int,setup)
+static inline _syscall0(int,sync)
+static inline _syscall0(pid_t,setsid)
+static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
+static inline _syscall1(int,dup,int,fd)
+static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
+static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
+static inline _syscall1(int,close,int,fd)
+static inline _syscall1(int,_exit,int,exitcode)
+static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
+
+static inline pid_t wait(int * wait_stat)
+{
+ return waitpid(-1,wait_stat,0);
+}
+
+/*
+ * This is the mechanism for creating a new kernel thread.
+ *
+ * NOTE! Only a kernel-only process(ie the swapper or direct descendants
+ * who haven't done an "execve()") should use this: it will work within
+ * a system call from a "real" process, but the process memory space will
+ * not be free'd until both the parent and the child have exited.
+ */
+static inline pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
+{
+ long retval;
+
+ __asm__ __volatile__(
+ "movl %%esp,%%esi\n\t"
+ "int $0x80\n\t" /* Linux/i386 system call */
+ "cmpl %%esp,%%esi\n\t" /* child or parent? */
+ "je 1f\n\t" /* parent - jump */
+ "pushl %3\n\t" /* push argument */
+ "call *%4\n\t" /* call fn */
+ "movl %2,%0\n\t" /* exit */
+ "int $0x80\n"
+ "1:\t"
+ :"=a" (retval)
+ :"0" (__NR_clone), "i" (__NR_exit),
+ "r" (arg), "r" (fn),
+ "b" (flags | CLONE_VM)
+ :"si");
+ return retval;
+}
+
+#endif
+
+#endif /* _ASM_I386_UNISTD_H_ */
diff --git a/kernel/table20/version.h b/kernel/table20/version.h
new file mode 100644
index 00000000..d47411ee
--- /dev/null
+++ b/kernel/table20/version.h
@@ -0,0 +1 @@
+#define _TABLE_VERSION 1
diff --git a/kernel/table21/.cvsignore b/kernel/table21/.cvsignore
new file mode 100644
index 00000000..a7ab2843
--- /dev/null
+++ b/kernel/table21/.cvsignore
@@ -0,0 +1,4 @@
+kernel.patch
+.main.o.flags
+.table.o.flags
+.module.o.flags
diff --git a/kernel/table21/Makefile b/kernel/table21/Makefile
new file mode 100644
index 00000000..2eedd527
--- /dev/null
+++ b/kernel/table21/Makefile
@@ -0,0 +1,16 @@
+#
+# Makefile for the linux system information tables.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+# Note 2! The CFLAGS definition is now in the main makefile...
+
+O_TARGET := table.o
+OX_OBJS := main.o
+
+M_TARGET := table_mod.o
+MX_OBJS := module.o
+
+include $(TOPDIR)/Rules.make
diff --git a/kernel/table21/README b/kernel/table21/README
new file mode 100644
index 00000000..88d26bec
--- /dev/null
+++ b/kernel/table21/README
@@ -0,0 +1,21 @@
+This is a new system call `table ()' for the Linux table. It is faster
+than reading from /proc and can be used to fetch all information required
+for libgtop until whe have some other function (extended sysctl, ...) in
+standard kernels.
+
+I didn't want to change sysctl or some other function myself cause this may
+cause other applications relying upon those function to fail. This is
+something for the ``real'' kernel gurus ...
+
+To use this new system call for libgtop, do the following:
+
+* Copy this directory to /usr/src/linux/table
+* Make /usr/src/linux/include/linux/table.h symlink to /usr/src/linux/table/table.h
+* Apply the patch `kernel.patch' to the kernel, compile, install and reboot
+* Recompile libgtop (remove `config.cache' and run the `autogen.sh' again).
+
+If you want to change and/or add something - feel free to do so !
+
+Have fun,
+
+Martin
diff --git a/kernel/table21/entry-i386.S b/kernel/table21/entry-i386.S
new file mode 100644
index 00000000..fb734fbc
--- /dev/null
+++ b/kernel/table21/entry-i386.S
@@ -0,0 +1,571 @@
+/*
+ * 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 <linux/sys.h>
+#include <linux/linkage.h>
+#include <asm/segment.h>
+#define ASSEMBLY
+#include <asm/smp.h>
+
+EBX = 0x00
+ECX = 0x04
+EDX = 0x08
+ESI = 0x0C
+EDI = 0x10
+EBP = 0x14
+EAX = 0x18
+DS = 0x1C
+ES = 0x20
+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
new file mode 100644
index 00000000..e6d1882b
--- /dev/null
+++ b/kernel/table21/main.c
@@ -0,0 +1,61 @@
+/*
+ * linux/table/table_impl.c
+ * Copyright (C) 1998 Martin Baulig
+ */
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/kernel_stat.h>
+#include <linux/tty.h>
+#include <linux/user.h>
+#include <linux/a.out.h>
+#include <linux/string.h>
+#include <linux/mman.h>
+#include <linux/proc_fs.h>
+#include <linux/ioport.h>
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/pagemap.h>
+#include <linux/swap.h>
+#include <linux/slab.h>
+#include <linux/smp.h>
+#include <linux/signal.h>
+
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+#include <asm/io.h>
+
+#include <linux/module.h>
+#include <linux/table.h>
+
+#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
new file mode 100644
index 00000000..1c1fa9c2
--- /dev/null
+++ b/kernel/table21/module.c
@@ -0,0 +1,607 @@
+/*
+ * linux/table/table_impl.c
+ * Copyright (C) 1998 Martin Baulig
+ */
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/kernel_stat.h>
+#include <linux/tty.h>
+#include <linux/user.h>
+#include <linux/a.out.h>
+#include <linux/string.h>
+#include <linux/mman.h>
+#include <linux/proc_fs.h>
+#include <linux/ioport.h>
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/pagemap.h>
+#include <linux/swap.h>
+#include <linux/slab.h>
+#include <linux/smp.h>
+#include <linux/signal.h>
+
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+#include <asm/io.h>
+
+#include <linux/module.h>
+#include <linux/table.h>
+
+#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
new file mode 100644
index 00000000..a7c30c83
--- /dev/null
+++ b/kernel/table21/unistd-i386.h
@@ -0,0 +1,344 @@
+#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 <asm-i386/errno.h> */
+
+#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
new file mode 100644
index 00000000..d47411ee
--- /dev/null
+++ b/kernel/table21/version.h
@@ -0,0 +1 @@
+#define _TABLE_VERSION 1
diff --git a/kernel/version.h b/kernel/version.h
new file mode 100644
index 00000000..d47411ee
--- /dev/null
+++ b/kernel/version.h
@@ -0,0 +1 @@
+#define _TABLE_VERSION 1
diff --git a/lib/command.c b/lib/command.c
new file mode 100644
index 00000000..be59c38d
--- /dev/null
+++ b/lib/command.c
@@ -0,0 +1,77 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/read.h>
+#include <glibtop/write.h>
+#include <glibtop/read_data.h>
+
+#include <glibtop/command.h>
+#include <glibtop/xmalloc.h>
+
+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/read.c b/lib/read.c
new file mode 100644
index 00000000..dd6af726
--- /dev/null
+++ b/lib/read.c
@@ -0,0 +1,76 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/read.h>
+
+/* 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;
+ char *tmp_ptr;
+
+ 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; */
+ tmp_ptr = ptr;
+ tmp_ptr += nread;
+ ptr = tmp_ptr;
+ }
+}
+
+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
new file mode 100644
index 00000000..8c1bc416
--- /dev/null
+++ b/lib/read_data.c
@@ -0,0 +1,69 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/xmalloc.h>
+#include <glibtop/read_data.h>
+
+/* 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/write.c b/lib/write.c
new file mode 100644
index 00000000..591badd2
--- /dev/null
+++ b/lib/write.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/write.h>
+
+/* 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-sysdeps.m4 b/libgtop-sysdeps.m4
new file mode 100644
index 00000000..796376b1
--- /dev/null
+++ b/libgtop-sysdeps.m4
@@ -0,0 +1,300 @@
+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 <stdio.h>
+#include <stdlib.h>
+
+#include <unistd.h>
+#include <linux/unistd.h>
+#include <linux/table.h>
+
+#include <syscall.h>
+
+static inline _syscall3 (int, table, int, type, union table *, tbl, const void *, param);
+
+int
+main (void)
+{
+ union table tbl;
+ int ret;
+
+ ret = table (TABLE_VERSION, NULL, NULL);
+
+ if (ret == -1)
+ exit (-errno);
+
+ exit (ret < 1 ? ret : 0);
+}
+], linux_table=yes, linux_table=no, linux_table=no)
+ AC_MSG_RESULT($linux_table)
+ fi
+ if test $linux_table = yes ; then
+ AC_DEFINE(HAVE_LINUX_TABLE)
+ fi
+ 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="$enableval"], [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
+ ;;
+ aix*)
+ libgtop_smp=yes
+ ;;
+ *)
+ libgtop_smp=no
+ ;;
+ esac
+ AC_MSG_RESULT($libgtop_smp)
+ fi
+
+ if test $libgtop_smp = yes ; then
+ AC_DEFINE(HAVE_LIBGTOP_SMP)
+ fi
+
+ AM_CONDITIONAL(LIBGTOP_SMP, test $libgtop_smp = yes)
+
+ AC_MSG_CHECKING(for libgtop sysdeps directory)
+
+ case "$host_os" in
+ linux*)
+ if test x$linux_table = xyes ; then
+ libgtop_sysdeps_dir=kernel
+ libgtop_use_machine_h=no
+ else
+ libgtop_sysdeps_dir=linux
+ libgtop_use_machine_h=no
+ libgtop_have_sysinfo=yes
+ fi
+ libgtop_need_server=no
+ ;;
+ freebsd*|netbsd*|openbsd*|bsdi*)
+ libgtop_sysdeps_dir=freebsd
+ libgtop_use_machine_h=yes
+ libgtop_need_server=yes
+ libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
+ ;;
+ solaris*)
+ libgtop_sysdeps_dir=solaris
+ libgtop_use_machine_h=yes
+ libgtop_need_server=yes
+ libgtop_postinstall='chgrp sys $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
+ ;;
+ aix*)
+ libgtop_sysdeps_dir=aix
+ libgtop_use_machine_h=yes
+ libgtop_need_server=yes
+ libgtop_have_sysinfo=yes
+ libgtop_postinstall='chgrp system $(bindir)/libgtop_server && chmod g+s $(bindir)/libgtop_server2'
+ ;;
+ *)
+ if test x$hacker_mode = xyes ; then
+ case "$host_os" in
+ sunos4*)
+ #Please note that this port is obsolete and not working at
+ #all. It is only useful for people who want to fix it ... :-)
+ libgtop_sysdeps_dir=sun4
+ libgtop_use_machine_h=yes
+ libgtop_need_server=yes
+ ;;
+ osf*)
+ libgtop_sysdeps_dir=osf1
+ libgtop_use_machine_h=yes
+ libgtop_need_server=yes
+ ;;
+ *)
+ libgtop_sysdeps_dir=stub
+ libgtop_use_machine_h=no
+ libgtop_need_server=no
+ ;;
+ esac
+ else
+ libgtop_sysdeps_dir=stub
+ libgtop_use_machine_h=no
+ libgtop_need_server=no
+ fi
+ ;;
+ esac
+
+ test -z "$libgtop_postinstall" && libgtop_postinstall=:
+
+ AC_MSG_RESULT($libgtop_sysdeps_dir)
+
+ AC_SUBST(libgtop_sysdeps_dir)
+ AC_SUBST(libgtop_postinstall)
+ AC_SUBST(libgtop_have_sysinfo)
+
+ case "$host_os" in
+ *bsd*)
+ AC_CHECK_HEADERS(net/if_var.h)
+ AC_MSG_CHECKING([for I4B])
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <net/if.h>
+#include <net/if_types.h>
+
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+
+#include <net/netisr.h>
+#include <net/route.h>
+
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+#include <net/if_sppp.h>
+#else
+#include <i4b/sppp/if_sppp.h>
+#endif
+],[
+ size_t size = sizeof (struct sppp);
+], have_i4b=yes, have_i4b=no)
+ AC_MSG_RESULT($have_i4b)
+ if test x$have_i4b = xyes; then
+ AC_DEFINE(HAVE_I4B)
+ AC_MSG_CHECKING([for I4B accounting])
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <net/if.h>
+#include <net/if_types.h>
+
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+
+#include <net/netisr.h>
+#include <net/route.h>
+
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+#include <net/if_sppp.h>
+#else
+#include <i4b/sppp/if_sppp.h>
+#endif
+
+#include <machine/i4b_acct.h>
+],[
+ size_t size = sizeof (struct i4bisppp_softc);
+], have_i4b_acct=yes, have_i4b_acct=no)
+ AC_MSG_RESULT($have_i4b_acct)
+ if test x$have_i4b_acct = xyes ; then
+ AC_DEFINE(HAVE_I4B_ACCT)
+ else
+ AC_WARN([
+*** I4B accounting disabled - you won't get any PPP statistics.
+*** Read "misc/i4b_acct.txt" in the LibGTop source directory
+*** to see how to enable it.])
+ fi
+ fi
+ ;;
+ linux*)
+ os_major_version=`uname -r | sed 's/-pre[[0-9]]*//' | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ os_minor_version=`uname -r | sed 's/-pre[[0-9]]*//' | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ os_micro_version=`uname -r | sed 's/-pre[[0-9]]*//' | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ os_version_expr="$os_major_version 65536 * $os_minor_version 256 * + $os_micro_version + p q"
+
+ AC_CHECK_HEADERS(linux/version.h, have_linux_version_h=yes,
+ have_linux_version_h=no)
+
+ if test x$have_linux_version_h = xyes ; then
+ version_code=`cat /usr/include/linux/version.h | \
+ grep \#define | grep LINUX_VERSION_CODE`
+ os_version_code=`echo $version_code | \
+ sed 's/^.*LINUX_VERSION_CODE[[ \t]]*\([[0-9]]*\).*$/\1/'`
+ else
+ os_version_code=`echo "$os_version_expr" | dc`
+ fi
+
+ AC_MSG_CHECKING(for Linux kernel version code)
+ AC_DEFINE_UNQUOTED(GLIBTOP_LINUX_VERSION_CODE, $os_version_code)
+ AC_MSG_RESULT($os_version_code)
+ ;;
+ solaris*)
+ os_major_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\1/'`
+ os_minor_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\2/'`
+ os_micro_version=`uname -r | sed 's/\([[0-9]]*\).\([[0-9]]\)\.*\([[0-9]]*\)/\3/'`
+ test -z "$os_micro_version" && os_micro_version=0
+ os_version_expr="$os_major_version 100 * $os_minor_version 10 * + $os_micro_version + p q"
+ os_version_code=`echo "$os_version_expr" | dc`
+
+ AC_MSG_CHECKING(for Solaris release code)
+ AC_DEFINE_UNQUOTED(GLIBTOP_SOLARIS_RELEASE, $os_version_code)
+ AC_MSG_RESULT($os_version_code)
+ ;;
+ esac
+
+ AC_MSG_CHECKING(for machine.h in libgtop sysdeps dir)
+ AC_MSG_RESULT($libgtop_use_machine_h)
+
+ AC_MSG_CHECKING(whether we need libgtop)
+ AC_MSG_RESULT($libgtop_need_server)
+
+ if test x$libgtop_need_server = xyes ; then
+ AC_DEFINE(NEED_LIBGTOP)
+ fi
+
+ if test x$libgtop_use_machine_h = xyes ; then
+ AC_DEFINE(HAVE_GLIBTOP_MACHINE_H)
+ fi
+
+ AM_CONDITIONAL(NEED_LIBGTOP, test x$libgtop_need_server = xyes)
+])
+
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 representacin
-de los nmeros diferente de la que se usa en los dems paises de habla
-castellan (usan el sistema anglosajn, esdecir 1,000 en vez de 1.000 para
-'mil').
-
-Por ello solo es necesario traducir aquellas ocurrencias donde aparezcan
-nmeros; no hace falta perder el tiempo traduciendo en doble lo dems;
-el sistema de internacionalizacin de GNU gettext es lo suficientemente
-inteligente como para buscar las traducciones en la locale 'es' cuando no
-las encuentra en una 'es_XX' ms especfica.
-
-Tambin podriase crear un es_ES para traducir aquellos terminos que difieren
-en Espaa y Amrica (ej: computadora/ordenador, archivo/fichero, cono/icono),
-si algn espaol 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 Espaa; no es necesario traducir las
-dems, con que estn en la traduccin general 'es' ya basta.
-
-Pablo Saratxaga
-<srtxg@chanae.alphanet.ch>
-
-
diff --git a/po/POTFILES.ignore b/po/POTFILES.ignore
new file mode 100644
index 00000000..9c7679ed
--- /dev/null
+++ b/po/POTFILES.ignore
@@ -0,0 +1,6 @@
+#Please remember + in front of the files that should be ignored
+#Please keep these files in alphabetic order
+
+#Shouldn't be translated according to Martin:
++kernel/table20/unistd-i386.h
++kernel/table21/unistd-i386.h
diff --git a/po/ar.po b/po/ar.po
new file mode 100644
index 00000000..3fd22c0e
--- /dev/null
+++ b/po/ar.po
@@ -0,0 +1,1359 @@
+# translation of libgtop.libgtop-GNOME-2-0-port.ar.po to Arabic
+# translation of libgtop.po to
+# translation of libgtop.po to
+# translation of libgtop.po to
+# translation of libgtop.po to
+# translation of libgtop.po to Arabic
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# Arafat Medini <lumina@silverpen.de>, 2002,2003
+# Isam Bayazidi <bayazidi@arabeyes.org>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop.libgtop-GNOME-2-0-port.ar\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2003-07-21 11:07+0200\n"
+"PO-Revision-Date: 2003-07-21 17:50+0200\n"
+"Last-Translator: Arafat Medini <lumina@silverpen.de>\n"
+"Language-Team: Arabic <doc@arabeyes.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0\n"
+
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "نقرات (%ld في الثانية):"
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr "الكلي"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "المستخدم"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "جميلe"
+
+#: examples/smp.c:74
+msgid "Sys"
+msgstr "نظام"
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "مبطل"
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "بالمئة:"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "الكلي (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "المستخدم (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr "ظريف (%)"
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr "النظام (%)"
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "مبطل (%)"
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr "تدوير:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "اقرء %d بايتس"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "قراءت حجم البيانات"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "قراءت بيانات %d بايتس"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "اكتب %d بايتس "
+
+#: src/daemon/gnuserv.c:453
+msgid "Enable debugging"
+msgstr "تفعيل التنقيح"
+
+#: src/daemon/gnuserv.c:453
+msgid "DEBUG"
+msgstr "تنقيح"
+
+#: src/daemon/gnuserv.c:455
+msgid "Enable verbose output"
+msgstr "تمكين اخراج مسهب"
+
+#: src/daemon/gnuserv.c:455
+msgid "VERBOSE"
+msgstr "مضجر"
+
+#: src/daemon/gnuserv.c:457
+msgid "Don't fork into background"
+msgstr "لا تشعّب إلى الخلفية"
+
+#: src/daemon/gnuserv.c:457
+msgid "NO-DAEMON"
+msgstr "لا-جنّي"
+
+#: src/daemon/gnuserv.c:459
+msgid "Invoked from inetd"
+msgstr "استُحضرت من inetd "
+
+#: src/daemon/gnuserv.c:459
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:493
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"خطأ عند الخيار %s: %s.\n"
+"فعل '%s --help' لرئية قائمة كاملة لخيارات سطر الأوامر.\n"
+
+#: 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"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "إظهار رسالة المساعدة هذه"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "عرض رسالة استعمال قصيرة"
+
+#: 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 "وقت الـ 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 في نمط المستخدم (طيب)"
+
+#: 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 "عدد اشارات الساعة التي قضاها النظام في نمط المستعمل (طيب)"
+
+#: 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 "عدد الأعمال الشاغلة متزامنة موسطة على دقيقة واحدة أو 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: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/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "شارات الواجهة"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Subnet"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "العنوان"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "الرزم الداخلة"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "الرزم الخارجة"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "الرزم الكلية"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "البايتات الداخلة"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "البايتات الخارجة"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "البايتات الكلية"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "الأخطاء الداخلة"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "الأخطاء الخارجة"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "الأخطاء الكلية"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "تصادمات"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "وحدة النقل القصوى"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "حالة الـPPP"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "بايتات الإدخال"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "بايتات الإخراج"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "عدد بايتات الإخراج"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "عدد بايتات الإخراج"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "الحجم"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "الطول بالبايتات للسلسلة المرجعة."
+
+#: sysdeps/names/prockernel.c:42
+msgid "K_Flags"
+msgstr "شارات K"
+
+#: sysdeps/names/prockernel.c:42
+msgid "Min_Flt"
+msgstr "Min_Flt"
+
+#: sysdeps/names/prockernel.c:42
+msgid "Maj_Flt"
+msgstr "الحد اﻻقصى"
+
+#: 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 ""
+"شارات الكرنل للعملية.\n"
+"\n"
+"عنج لنكس، لكل شارة مجموعة بايتات رياضية، بسبب فحص crt0.s "
+"لممثالة رياضية، و بالتالي فهذا غير مضمن في الإخراج.\n"
+"\n"
+"هذا ربما خلل، بما أن كل عملية ليست برنامج C مجمع.\n"
+"\n"
+"البايت الرياضي يجب أن يكون عشري 4، و البايت المرسوم 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-bit )."
+
+#. 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 ""
+"هذه \"القنات\" التي تنتظر فيها العملية. هذا نداء نظام، ويمكن مراجعته في "
+"قائمة اسماء اذا استحققت الاسم النصي. (اذا كان لديك /etc/psdatabase محدثة، "
+"فحاول 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 "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 resident 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 ""
+"عدد الصفحات التي للعملية في الذاكرة الحقيقية، إلا ثلاثة لأغراض إدارية. "
+"هذه فقط الصفحات التي استعملت للنصوص و البيانات أو فضاء الكومة. هذا "
+"لا يحتوي على صفحات حملت بطلب، او التي وقع اخراجها عند التبادل."
+
+#: 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 "نص_RSS"
+
+#: sysdeps/names/procsegment.c:42
+msgid "ShLib_RSS"
+msgstr "ShLib_RSS"
+
+#: sysdeps/names/procsegment.c:42
+msgid "Data_RSS"
+msgstr "يبانات_RSS"
+
+#: sysdeps/names/procsegment.c:42
+msgid "Stack_RSS"
+msgstr "_كومة الـ RSS"
+
+#: 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 "هوية المستخدم (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 "Basename الملفات الـ executable عند النداء لـ exec()"
+
+#: 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 "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 "وقتR"
+
+#: sysdeps/names/proctime.c:44
+msgid "UTime"
+msgstr "وقتU"
+
+#: sysdeps/names/proctime.c:44
+msgid "STime"
+msgstr "وقتS"
+
+#: sysdeps/names/proctime.c:45
+msgid "CUTime"
+msgstr "وقتCU"
+
+#: sysdeps/names/proctime.c:45
+msgid "CSTime"
+msgstr "وقتCS"
+
+#: 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 "تردد"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_UTime"
+msgstr "XCPU_UTime"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_STime"
+msgstr "XCPU_STime"
+
+#: 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 "الوقت الحقيقي المتراكم من طرف العملية (يجب أن يكون وقتu + وقتs)"
+
+#: 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 "وقتu التراكمي للعملية و الابناء المحصودة"
+
+#: sysdeps/names/proctime.c:56
+msgid "cumulative stime of process and reaped children"
+msgstr "وقتs التراكمي للعملية و الابناء المحصودة"
+
+#: sysdeps/names/proctime.c:57
+msgid "The time (in jiffies) of the process's next timeout"
+msgstr "الوقت (بالـ jiffies) لالـ timeout التالي للعملية"
+
+#: 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 "الوقت (بالـ jiffies) قبل بعث الـ SIGALRM التالي للعملية بسبب مؤقت فترات."
+
+#: 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 "EUid"
+
+#: sysdeps/names/procuid.c:56
+msgid "Gid"
+msgstr "هوية المجموعة"
+
+#: 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 "جلسة"
+
+#: 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 "الأولوية"
+
+#: 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 "PID العملية الأب"
+
+#: 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 "عدد المدخلات في خريطة ادات انشاء الاشارات (semaphore)"
+
+#: 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 "حجم الهيكل sem_undo"
+
+#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
+msgid "Semaphore max value"
+msgstr "حجم الأقصى لأدات انشاء الإشارات (Semaphore)"
+
+#: 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 "ضبط حدود أدات إنشاء الإشارات (Semaphore)"
+
+#: 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 "الوقت بالثواني الذي قضاه النظام في المهمة الفارغة منذ اعادة تشغيل النظام"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "أغلاق الخط"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "مقاطعة"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "خروج"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "توجيه ممنوع"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "فخ رسم"
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "ايقاف"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "خطأ EMT"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "استثناء Floating-point"
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "قتل"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "خطأ باص"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "انتهاك اﻻنقسام"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "متغيّر سيء عند نداء النظام"
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "انبوب مكسور"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "ساعة منبهة"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "إنهاء"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr "حالة استعجالية عند نقطة الاتصال"
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "توقّف"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "توقيف لوحة المفاتيح"
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "متابعة"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "تغيرت حالة الابن"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "قراءة خلفية من tty"
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "كتابة خلفية لـ tty"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "ادخال/اخراج ممكن الآن"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "تجاوز حد الـمعالج"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "تجاوز حد حجم الملف"
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "ساعة تنبيه تخيّلية"
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr "كتابة لمحة عن ساعة التنبيه"
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "تغير حجم النافذة"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "طلب معلومات"
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "اشارة معرفة من طرف المستخدم 1"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "اشارة معرفة من طرف المستخدم 2"
+
diff --git a/po/be.po b/po/be.po
new file mode 100644
index 00000000..55341ba7
--- /dev/null
+++ b/po/be.po
@@ -0,0 +1,1412 @@
+# ver. 0.0.1
+# Copyright (C) 1999 Free Software Foundation, Inc.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop-1.0.1\n"
+"POT-Creation-Date: 2002-06-10 17:36-0400\n"
+"PO-Revision-Date: 2002-10-27 23:57GMT+2\n"
+"Last-Translator: Vital Khilko <dojlid@mova.org>\n"
+"Language-Team: belarusian <i18n@mova.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.5\n"
+
+#: examples/smp.c:68
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "Цікі (%ld у сэкунду):"
+
+#: examples/smp.c:71
+msgid "Total"
+msgstr "Агулам"
+
+#: examples/smp.c:71 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "Карыстаьнік"
+
+#: examples/smp.c:71 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "Прыярытэт"
+
+#: examples/smp.c:71
+msgid "Sys"
+msgstr "Сыст."
+
+#: examples/smp.c:71
+msgid "Idle"
+msgstr "Чаканьне"
+
+#: examples/smp.c:73
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"ЦПУ (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:77
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "ЦПУ %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:94
+msgid "Percent:"
+msgstr "Адсоткі:"
+
+#: examples/smp.c:95
+msgid "Total (%)"
+msgstr "Агулам (%)"
+
+#: examples/smp.c:95
+msgid "User (%)"
+msgstr "Карыстальнік (%)"
+
+#: examples/smp.c:95
+msgid "Nice (%)"
+msgstr "Прыярытэт (%)"
+
+#: examples/smp.c:95
+msgid "Sys (%)"
+msgstr "Сыст. (%)"
+
+#: examples/smp.c:96
+msgid "Idle (%)"
+msgstr "Чакан. (%)"
+
+#: examples/smp.c:98
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"ЦПУ (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:114
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "ЦПУ %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:120
+msgid "Spin:"
+msgstr "Спін:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "прачыт: %d байтаў"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "памер прачытаных даньняў"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "прачытана %d байтаў даньняў"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "запісана %d байтаў"
+
+#: src/daemon/gnuserv.c:448
+msgid "Enable debugging"
+msgstr "Уключыць атладку"
+
+#: src/daemon/gnuserv.c:448
+msgid "DEBUG"
+msgstr "АТЛАДКА"
+
+#: src/daemon/gnuserv.c:450
+msgid "Enable verbose output"
+msgstr "Уключыць дэталёвы вывад"
+
+#: src/daemon/gnuserv.c:450
+msgid "VERBOSE"
+msgstr "ПАДРАБЯЗНА"
+
+#: src/daemon/gnuserv.c:452
+msgid "Don't fork into background"
+msgstr "Ня нараджаць у рэжыме тла"
+
+#: src/daemon/gnuserv.c:452
+msgid "NO-DAEMON"
+msgstr "БЯЗ-ДЭМАНУ"
+
+#: src/daemon/gnuserv.c:454
+msgid "Invoked from inetd"
+msgstr "Выкліканы з inetd"
+
+#: src/daemon/gnuserv.c:454
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:488
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"Памылка ў ключох %s: %s.\n"
+"Запусьціце '%s --help' каб убачыць поўны сьпіс даступных ключоў.\n"
+
+#: 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"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "Адлюстраваць гэтае даведачнае паведамленьне"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "Паказаць кароткую інструкцыю"
+
+#: 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 "Час ЦПУ у рэжыме карыстальніку (nice)"
+
+#: 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 "SMP агульны час ЦПУ"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "SMP агульны час ЦПУ у рэжыме карыстальніку"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "SMP агульны час ЦПУ у рэжыме карыстальніку"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "SMP час ЦПУ у сыстэмным рэжыме"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "Час SMP ЦПУ у рэжыме чаканьня"
+
+#: 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: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/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "Сьцягі інтэрфэйсу"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Падсетка"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "Адрэса"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "Пакетаў атрымана"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "Пакетаў даслана"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "Пакетаў агулам"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "Байтаў прынята"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "Байтаў даслана"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "Байтаў агулам"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "Памылкі пад час прыйманьня"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "Памылкі пад час адпраўкі"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "Памылак агулам"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "Кілізыі"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "Максымальная адзінка перадачы (MTU)"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "Стан PPP"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "Атрымана байтаў"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "Даслана байтаў"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "Колькасьць атрыманых байтаў"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "Колькасьць дасланых байтаў"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "Памер"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "Даўжыня вернутага радку ў байтох."
+
+#: 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 ""
+"Сьцягі ядра для працэсу.\n"
+"\n"
+"У Linux у бягучы момант кожны сьцяг мае "
+"ўсталяваны біт math, таму як crt0.s "
+"правяраецца на эмуляцыю супроцэсару, "
+"таму сьцяг ня ўключаецца ў вывад.\n"
+"\n"
+"Мажліва, гэта памылка, таму што ня кожны "
+"працэс зьяўляецца праграмай на мове C.\n"
+"\n"
+"Біт math мусіць быць дзесяткавай лічбай 4, і "
+"біт сачэньня - дзесяткавай лічбай 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 ""
+"Гэта \"channel\", у якім працэс чакае. Гэта "
+"адрэса сыстэмнага выкліку, і ён можа быць "
+"адшуканы ў сьпісе імёнаў, калі неабходна "
+"ведаць яго назву. (Калі маецца бягучы "
+"файл /etc/psdatabase, паспрабуйце 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 "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 resident set (non-swapped) pages"
+msgstr ""
+"Колькасьць рэзыдэнтных (якія ня падгружаюцца) "
+"набораў старонак"
+
+#: sysdeps/names/procmem.c:56
+msgid "Number of pages of shared (mmap'd) memory"
+msgstr "Колькасьць старонак падзеленае (mmap'd) памяці"
+
+#: 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 "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 "Брудны памер"
+
+#: 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 "Памер рэзыдэнтнага набору (RSS) тэксту"
+
+#: sysdeps/names/procsegment.c:49
+msgid "Shared-Lib resident set size"
+msgstr ""
+"Памер рэзыдэнтнага набору (RSS) "
+"падзеленых бібліятэк"
+
+#: sysdeps/names/procsegment.c:50
+msgid "Data resident set size"
+msgstr "Памер рэзыдэнтнага набору (RSS) даньняў"
+
+#: sysdeps/names/procsegment.c:51
+msgid "Stack resident set size"
+msgstr "Памер рэзыдэнтнага набору (RSS) стэка"
+
+#: 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 "SigIgnore"
+
+#: sysdeps/names/procsignal.c:40
+msgid "SigCatch"
+msgstr "SigCatch"
+
+#: 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 "Cmd"
+
+#: sysdeps/names/procstate.c:40
+msgid "State"
+msgstr "Стан"
+
+#: 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 "Асноўнае імя файлу, які выконваецца, у выкліку exec()"
+
+#: sysdeps/names/procstate.c:46
+msgid "Single-Char code for process state (S=sleeping)"
+msgstr "Самотны код стану працэсу (S=sleeping)"
+
+#: 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 "RTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "UTime"
+msgstr "UTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "STime"
+msgstr "STime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CUTime"
+msgstr "CUTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CSTime"
+msgstr "CSTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "TimeOut"
+msgstr "TimeOut"
+
+#: 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 "XCPU_UTime"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_STime"
+msgstr "XCPU_STime"
+
+#: 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 "Сапраўдны час, набраны працэсам (мусіць быць utime +stime)"
+
+#: 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 "Агульны час (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 "Час (у jiffiles) наступнага таймаўту працэсу"
+
+#: 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 ""
+"Час (у jiffies) перад тым, як наступны SIGALRM "
+"дасланы працэсу з-за спрацоўкі таймэру."
+
+#: 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 час ЦПУ, набраны працэсам у "
+"рэжыме карыстальніку"
+
+#: sysdeps/names/proctime.c:62
+msgid "SMP kernel-mode CPU time accumulated by process"
+msgstr ""
+"SMP час ЦПУ, набраны працэсам у рэжыме "
+"ядра"
+
+#: 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 "FsGid"
+
+#: 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 "Сэанс"
+
+#: sysdeps/names/procuid.c:57
+msgid "Tty"
+msgstr "Тэрмінал"
+
+#: sysdeps/names/procuid.c:58
+msgid "TPGid"
+msgstr "TPGid"
+
+#: sysdeps/names/procuid.c:58
+msgid "Priority"
+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 "Колькасьць структураў адкату ў сыстэме"
+
+#: 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 "памер структуры 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 "Выкарыстаньне ЦПУ"
+
+#: 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 працэсу й інфармацыя пра тэрмінал"
+
+#: 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 ""
+"Час у сэкундах, згублены сыстэмай на "
+"чаканьне з моманту загрузкі"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "Разарваць"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "Перарваць"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "Выйсьці"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "Недапушчальная інструкцыя"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "Захоп трасыроўкі"
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "Перарываньне"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "Памылка EMT"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "Выключэньне пункту, які плавае"
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "Забіць"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "Памылка шыны"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "Парушэньне сэгментацыі"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "Кепскі аргумэнт у сыстэмным выкліку"
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "Парушаны канал"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "Таймэр"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "Завяршэньне"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr "Тэрміновыя умовы сокету"
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "Спыніць"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "Спыненьне клявіятуры"
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "Працягнуць"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "Стан нашчадку быў зьменены"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "Чытаньне ў тле з tty"
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "Запіс у тле ў tty"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "Зараз магчымы ўвод/вывад"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "Перавышана мяжа ЦПУ"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "Перавышана мяжа памеру файлу"
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "Віртуальны таймэр"
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr "Прафіляваны таймэр"
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "Зьмена памераў акна"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "Запыт інфармацыі"
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "Сыгнал карыстальніку 1"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "Сыгнал карыстальніку 2"
+
diff --git a/po/bn.po b/po/bn.po
new file mode 100644
index 00000000..c49e17e6
--- /dev/null
+++ b/po/bn.po
@@ -0,0 +1,1594 @@
+# Bengali translation of libgtop.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgtop package.
+# Vat <vatzcar@yahoo.co.in>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2003-09-06 00:56-0400\n"
+"PO-Revision-Date: 2003-05-23 11:39+0200\n"
+"Last-Translator: Vat <vatzcar@yahoo.co.in>\n"
+"Language-Team: Bengali <gnome-translation@bengalinux.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "টিক (প্রতি সেকেন্ডে %ld সংখ্যক):"
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr "মোট"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "ব্যবহারকারী"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "নাইস"
+
+# msgstr "সুন্দর"
+# "Nice" একটা প্রোগ্রামের নাম; সুতরাং বাংলা করার দরকার নাই। আরো জানার জন্য Nice-এর ম্যানপেজ দেখেন।
+#: examples/smp.c:74
+msgid "Sys"
+msgstr ""
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "নিস্ক্রিয়"
+
+# msgstr "নিষ্ক্রিয়"
+# ২ বানান ভুল করছেন; ভাল করে খেয়াল করেন
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"সিপিইউ (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "সিপিইউ %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "শতাংশ:"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "মোট (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "ব্যবহারকারী (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr "সুন্দর (%)"
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr ""
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "নিস্ক্রিয় (%)"
+
+# বানান
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"সিপিইউ (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "সিপিইউ %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr "আবর্তন:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "%d বাইট পড়া গিয়েছে"
+
+# msgstr "%d বাইট পড়া গেছে" "ড়" এর জায়গায় "ডহ্হা" লেখা
+# #########################################
+# দয়া করে "গেছে" এর পরিবর্তে "গিয়েছে" লিখেন
+# #########################################
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "তথ্যের মাপ পড়া গিয়েছে"
+
+# msgstr "তথ্যের মাপ পড়া গেছে"
+# msgstr "তথ্যের মাপ পড়া হোক"
+# #############################################
+# #############################################
+# ২ আচ্ছা
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "%d বাইট তথ্য পড়া গিয়েছে"
+
+# msgstr "%d বাইট তথ্য পড়া গেছে"
+# msgstr "%d বাইট তথ্য পড়া হোক"
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "%d বাইট লেখা গিয়েছে"
+
+# msgstr "%d বাইট লেখা হয়েছে"
+#: src/daemon/gnuserv.c:453
+msgid "Enable debugging"
+msgstr "ত্রুটিমুক্তকরণ চালু করুন"
+
+# msgstr "ডিবাগ প্রক্রিয়া সক্রিয় করা হোক"
+# ২ এটা কি বিবেচনা করা যায় না? অন্যান্য জায়গায় "ডিবাগ" লেখা হইছে, তাই এখানে অন্য রকম হয়ে যায়।
+# আপনার আপত্তি থাকলে অবশ্য কোন কথা নাই।
+#: src/daemon/gnuserv.c:453
+msgid "DEBUG"
+msgstr "ডিবাগ"
+
+# msgstr "ডিবাগ"
+#: src/daemon/gnuserv.c:455
+msgid "Enable verbose output"
+msgstr "বর্ণনাযুক্ত (Verbose) ফলাফল দেখানো হোক"
+
+# msgstr "ভার্বোস (Verbose) ফলাফল চালু করুন"
+# msgstr "বর্ণনাযুক্ত ফলাফল দেখানো হোক"
+#: src/daemon/gnuserv.c:455
+msgid "VERBOSE"
+msgstr "বর্ণনাযুক্ত"
+
+#: src/daemon/gnuserv.c:457
+msgid "Don't fork into background"
+msgstr "পশ্চাতে ফর্ক (Fork) করা হবে না"
+
+#: src/daemon/gnuserv.c:457
+msgid "NO-DAEMON"
+msgstr "ডিমনবিহীন"
+
+#: src/daemon/gnuserv.c:459
+msgid "Invoked from inetd"
+msgstr "inetd এর থেকে নেওয়া হয়েছে"
+
+#: src/daemon/gnuserv.c:459
+msgid "INETD"
+msgstr "আইনেটডি (INetd)"
+
+#: src/daemon/gnuserv.c:493
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"অপশন %s এ ভুল হয়েছে: %s.\n"
+"কমান্ড লাইন অপশনের সম্পূর্ণ তালিকা দেখার জন্য '%s --help' লিখুন।\n"
+
+# msgstr "কমান্ড লাইন অপশন সম্পূর্ণ তালিকা দেখার জন্য '%s --help' লিখুন।\n"
+# Option এর বাংলা করার দরকার নাই
+# ২ আপনি কি এটার ব্যাপারে নিশ্চিত ?
+#: support/error.c:109
+msgid "Unknown system error"
+msgstr "সিস্টেম সংক্রান্ত অজ্ঞাত ভুল"
+
+# msgstr "সিস্টেম সংক্রান্ত অজানা ভুল"
+# 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"
+
+# msgstr "%s: '--%s' অপশনের জন্য কোন মান প্রদান করা অনুমোদিত নয়"
+#: 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"
+
+# msgstr "%s: বিকল্প '--%s' এ মান প্রেরন প্রয়োজন" <-- "প্রেরণ" বানান ভুল আছে
+# msgstr "%s: '--%s' অপশনের জন্য মান প্রেরণ করা প্রয়োজন"
+#. --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"
+
+# msgstr "%s: অবৈধ বিকল্প"
+# msgstr "%s: অসিদ্ধ বিকল্প" <- "অসিদ্ধ" মানে যেটা সিদ্ধ/প্রমাণ করা যায় নাই
+# "Illegal=Invalid=অবৈধ" লিখলে কোন সমস্যা নাই; কারণ অর্থ ঠিকই বোঝা যাচ্ছে
+#. 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"
+
+# msgstr "%s: বিকল্পে মান প্রেরন প্রয়োজন -- %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"
+
+# msgstr "%s: অপশন '-W %s' অনিশ্চিত অর্থবোধক"
+# msgstr "%s: অপশন '-W %s' দ্ব্যর্থক"
+#: support/getopt.c:872
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: '--W %s' অপশন কোন মান প্রদান অনুমোদন করে না\n"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "এই সাহাযয্ বার্তাটি দেখানো হোক"
+
+# msgstr "এই সাহাযয্ বার্তা দেখাও"
+# msgstr "এই সাহায্য বার্তাটি দেখানো হোক"
+# ২ "সাহায্য" বানান খেয়াল করেন
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "সংক্ষেপে ব্যবহার সংক্রান্ত বার্তা দেখান হোক"
+
+# msgstr "সংক্ষিপ্ত ব্যবহার বিধি প্রদর্শন করা হোক"
+#: sysdeps/names/cpu.c:43
+msgid "Total CPU Time"
+msgstr "মোট সিপিইউ সময়"
+
+#: sysdeps/names/cpu.c:44
+msgid "CPU Time in User Mode"
+msgstr "ইউজার মোডে (User Mode) ব্যয়িত সিপিইউ সময়"
+
+# এটা বোঝা যাচ্ছে না ;-(
+# আরো ভাল কিছু মাথায় না আসলে এইটা Try করে:
+# msgstr "ইউজার মোডে (User Mode) ব্যয়িত সিপিইউ সময়"
+# User Mode এর বাংলা না করাই ভাল; কারণ এটা একটা Technical Term
+#: sysdeps/names/cpu.c:45
+msgid "CPU Time in User Mode (nice)"
+msgstr "ইউজার মোডে (User Mode) ব্যয়িত সিপিইউ সময় (নাইস)"
+
+#: sysdeps/names/cpu.c:46
+msgid "CPU Time in System Mode"
+msgstr "সিস্টেম মোডে ব্যয়িত সিপিইউ সময়"
+
+# msgstr "সিস্টেম মোডে ব্যয়িত সিপিইউ সময়"
+#: sysdeps/names/cpu.c:47
+msgid "CPU Time in the Idle Task"
+msgstr "নিস্ক্রিয় অবস্থায় ব্যয়িত সিপিইউ সময়"
+
+# msgstr "কর্মহীন অবস্থায় ব্যয়িত সিপিইউ সময়"
+#: sysdeps/names/cpu.c:48
+msgid "Tick Frequency"
+msgstr "টিক (Tick) কম্পাঙ্ক"
+
+#: sysdeps/names/cpu.c:49
+msgid "SMP Total CPU Time"
+msgstr "এসএমপি মোট সিপিইউ সময়"
+
+# msgstr "মোট এসএমপি সিপিইউ সময়"
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "ইউজার মোডে ব্যয়িত এসএমপি সিপিইউ সময়"
+
+# msgstr "ইউজার মোডে ব্যয়িত এসএমপি সিপিইউ সময়"
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "ইউজার মোডে ব্যয়িত এসএমপি সিপিইউ সময় (নাইস)"
+
+# msgstr "ইউজার মোডে ব্যয়িত এসএমপি সিপিইউ সময় (নাইস)"
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "সিস্টেম মোডে ব্যয়িত এসএমপি সিপিইউ সময়"
+
+# msgstr "সিস্টেম মোডে ব্যয়িত এসএমপি সিপিইউ সময়"
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "নিস্ক্রিয় কাজের পেছনে ব্যয়িত এসএমপি সিপিইউ সময়"
+
+# msgstr "নিষ্ক্রিয় টাস্কের পেছনে ব্যয়িত এসএমপি সিপিইউ সময়"
+# Task একটা Technical term
+#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
+msgid "Number of clock ticks since system boot"
+msgstr "সিস্টেম বুট হওয়ার পর অতিক্রান্ত ঘড়ির টিক (Tick) সংখ্যা"
+
+#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65
+msgid "Number of clock ticks the system spent in user mode"
+msgstr "ইউজার মোডে সিস্টেমটি যে সংখ্যক ঘড়ির টিক (Tick) অতিবাহিত করেছে"
+
+#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66
+msgid "Number of clock ticks the system spent in user mode (nice)"
+msgstr "ইউজার মোডে সিস্টেমটি যে সংখ্যক ঘড়ির টিক (Tick) অতিবাহিত করেছে (নাইস)"
+
+#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
+msgid "Number of clock ticks the system spent in system mode"
+msgstr "সিস্টেম মোডে সিস্টেমটি যে সংখ্যক ঘড়ির টিক (Tick) অতিবাহিত করেছে"
+
+#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
+msgid "Number of clock ticks the system spent in the idle task"
+msgstr "নিস্ক্রিয় অবস্থায় সিস্টেমটি যে সংখ্যক ঘড়ির টিক (Tick) অতিবাহিত করেছে"
+
+#: 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 "মোট ব্লক"
+
+# msgstr "মোট ব্লক"
+#: sysdeps/names/fsusage.c:40
+msgid "Free blocks"
+msgstr "ফাঁকা ব্লক"
+
+# msgstr "ফাঁকা ব্লক"
+#: sysdeps/names/fsusage.c:41
+msgid "Available blocks"
+msgstr "ব্যবহারযোগ্য ব্লক"
+
+# msgstr "ব্যবহারযোগ্য ব্লক"
+#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
+msgid "Total file nodes"
+msgstr "মোট ফাইল নোড"
+
+# msgstr "মোট ফাইল নোড"
+#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
+msgid "Free file nodes"
+msgstr "ফাঁকা ফাইল নোড"
+
+# msgstr "ফাঁকা ফাইল নোড"
+#: sysdeps/names/fsusage.c:49
+msgid "Free blocks available to the superuser"
+msgstr "সুপারইউজারের ব্যবহারযোগ্য মুক্ত ব্লক"
+
+# msgstr "প্রধানব্যবহারকারীর ব্যবহারযোগ্য ফাঁকা ব্লক"
+# msgstr "সুপারইউজারের ব্যবহারযোগ্য ফাঁকা ব্লক" <-- এইটার ব্যাপারে নিশ্চিত না
+#: sysdeps/names/fsusage.c:50
+msgid "Free blocks available to non-superusers"
+msgstr "সাধারন ব্যবহারকারীদের ব্যবহারযোগ্য মুক্ত ব্লক"
+
+# আগেরটার মত
+#: sysdeps/names/loadavg.c:39
+msgid "Load Average"
+msgstr "গড় বোঝা"
+
+# msgstr "গড় বোঝা" <- "গড়" বানান "গড" কেন ?
+# msgstr "গড় কাজের পরিমাণ"
+#: sysdeps/names/loadavg.c:40
+msgid "Running Tasks"
+msgstr "চলন্ত কার্যসমূহ"
+
+# টাস্ক
+#: sysdeps/names/loadavg.c:41
+msgid "Number of Tasks"
+msgstr "কার্যসমূহের সংখ্যা"
+
+# 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 "গড়ে ১, ৫ ও ১৫ মিনিটের বেশি যুগপত্‍ চলা কাজগুলি সংখ্যায়"
+
+# msgstr "গড়ে ১,৫ ও ১৫ মিনিটের বেশি যুগপত্ চলা কাজগুলি সংখ্যায়"
+# msgstr "গড়ে ১, ৫ ও ১৫ মিনিটের বেশি যুগপত্‍ত্চচলন্ত কাজের সংখ্যা"
+# ইংরেজিটা বোঝা যাচ্ছে না বলে বাংলা নিয়েও Confusion আছে
+#: sysdeps/names/loadavg.c:48
+msgid "Number of tasks currently running"
+msgstr "বর্তমানে চলা কার্যসমূহের সংখ্যা"
+
+# msgstr "বর্তমানে চলন্ত টাস্কের সংখ্যা"
+# "সংখ্যায়" না, বরং "সংখ্যা"
+# "চলন্ত" কি ভাল শোনায় না ?
+#: sysdeps/names/loadavg.c:49
+msgid "Total number of tasks"
+msgstr "কার্যসমূহের মোট সংখ্যা"
+
+# msgstr "টাস্কের মোট সংখ্যা"
+#: sysdeps/names/mem.c:41
+msgid "Total Memory"
+msgstr "মোট মেমরি"
+
+# Memory-এর বাংলা করার দরকার নাই
+#: sysdeps/names/mem.c:42
+msgid "Used Memory"
+msgstr "ব্যবহৃত মেমরি"
+
+#: sysdeps/names/mem.c:43
+msgid "Free Memory"
+msgstr "মুক্ত মেমরি"
+
+# msgstr "মুক্ত মেমরি"
+# msgstr "ফাঁকা মেমরি"
+#: sysdeps/names/mem.c:44
+msgid "Shared Memory"
+msgstr "বন্টিত মেমরি"
+
+# msgstr "বন্টিত মেমরি"
+# "Shared=বন্টিত", এটা সুন্দর হইছে
+#: sysdeps/names/mem.c:45
+msgid "Buffers"
+msgstr "বাফার"
+
+#: sysdeps/names/mem.c:46
+msgid "Cached"
+msgstr "ক্যাশ-এ রক্ষিত"
+
+#: sysdeps/names/mem.c:48
+msgid "Locked"
+msgstr "আটকান (Locked)"
+
+# msgstr "লক'কৃত (Locked)"
+#: sysdeps/names/mem.c:53
+msgid "Total physical memory in kB"
+msgstr "প্রকৃত মেমরির পরিমাণ (কিলোবাইট)"
+
+# 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 "ইউজার প্রসেসসমূহের ব্যবহৃত মেমরির পরিমাণ (কিলোবাইট)"
+
+# msgstr "ইউজার প্রসেসসমূহের ব্যবহৃত মেমরির পরিমাণ (কিলোবাইট)"
+#: sysdeps/names/mem.c:60
+msgid "Memory in locked pages in kB"
+msgstr "আটকান (Locked) পৃষ্ঠাতে রক্ষিত মেমেরির পরিমাণ (কিলোবাইট)"
+
+# msgstr "লক'কৃত (Locked) পেজ-এ রক্ষিত মেমেরির পরিমাণ (কিলোবাইট)"
+#: 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 "তালিকাস্থ উপাদানের সংখ্যা"
+
+# msgstr "তালিকার উপাদানের সংখ্যা"
+# 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 "সঞ্চিত বার্তাসমূহের (Message pool) আকার (কিলোবাইট)"
+
+# এইটা নিয়ে Confusion আছে
+#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
+msgid "Number of entries in message map"
+msgstr "বার্তা ম্যাপে লিপিভুক্ত বিষয়গুলি সংখ্যায়"
+
+# ২ "সংখ্যা"
+# ২ "গুলো" <- Sayamindu will ultimately change it and so it's better to change it now.
+#: 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 "সারির সর্বাধিক ডিফল্ট আয়তন"
+
+# msgstr "সারির সাধারন সর্বাধিক আয়তন" <-- বানান ভুল আছে
+# বোঝা যাচ্ছে না
+# Default এর বাংলা করলে বোঝা যায় না; তাই না করাই ভাল
+#: 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/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "ইন্টারফেস পতাকা"
+
+# msgstr "ইন্টারফেস পতাকা"
+# msgstr "ইন্টারফেস ফ্ল্যাগ"
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "এমটিইউ"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "সাবনেট"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "ঠিকানা"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "আগত প্যাকেট"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "বহিরাগত প্যাকেট"
+
+# msgstr "প্যাকেট গেছে"
+# msgstr "প্রেরিত প্যাকেট"
+# ২ "বহিরাগত" মানে "বাইরে থেকে আগত" - মনে হয় আপনি এটা বোঝাতে চাচ্ছেন না
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "মোট প্যাকেট সংখ্যা"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "আগত বাইট"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "বহিরাগত বাইট"
+
+# msgstr "বাইট গেছে"
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "মোট বাইট"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "আগত ভুল"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "বহিরাগত ভুল"
+
+# আগের মত
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "মোট ভুল"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "সংঘর্ষ"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "সর্বাধিক স্থানান্তরিত একক"
+
+# msgstr "সর্বাধিক একক স্থানান্তকরন"
+# msgstr "সর্বাধিক স্থানান্তরিত একক"
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "পিপিপি অবস্থা"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "আগত বাইট"
+
+# এটা ভাল হইছে; এটার মত "আগত প্যাকেট" লিখলে আরো ভাল হয়।
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "বহিরাগত বাইট"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "আগত বাইট সংখ্যা"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "বহিরাগত বাইট সংখ্যা"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "আয়তন"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "ফিরিয়ে দেওয়া পংক্তির দৈর্ঘ্য (বাইটে)।"
+
+# 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"
+"লিনাক্সে, crt0.s এর গাণিতিক সমকক্ষতা (Math Emulation) পরীক্ষার জন্য বর্তমানে "
+"প্রতিটি ফ্ল্যাগের গাণিতিক বিট থাকে এবং একারণে এটি ফলাফলের অন্তর্ভুক্ত নয়।\n"
+"\n"
+"প্রতিটি প্রসেস কম্পাইল করা সি প্রোগ্রাম নয় বলে এটি সম্ভবত একটি প্রোগ্রাম সংক্রান্ত "
+"ত্রুটি (বাগ)।\n"
+"\n"
+"গাণিতিক বিট দশমিক ৪ এবং শনাক্তকৃত (Traced) বিটটি দশমিক ১০ হওয়া উচিত্‍।"
+
+# msgstr ""
+# "প্রসেসের কার্নেল ফ্ল্যাগ।\n"
+# "\n"
+# "লিনাক্সে, crt0.s গাণিতিক সমকক্ষতা (Math Emulation) পরীক্ষা বলে বর্তমানে প্রতিটি ফ্ল্যাগের গাণিতিক বিট সক্রিয় থাকে এবং "
+# "একারণে এটি ফলাফলের অন্তর্ভুক্ত নয়।\n"
+# "\n"
+# "প্রতিটি প্রোগ্রামই কম্পাইলকৃত সি প্রোগ্রাম নয় বলে এটি সম্ভবত একটি প্রোগ্রাম ত্রুটি (Bug)।\n"
+# "\n"
+# "গাণিতিক বিট দশমিক ৪ এবং শনাক্তকৃত (Traced) বিটটি দশমিক ১০ হওয়া উচিত্‍।"
+# *************** Process এর বাংলা করার দরকার নাই ***************************
+# ২ ৩য় লাইনে, "গাণিতিক বিট" কি অবস্থায় থাকে ?
+#. 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 ""
+"প্রক্রিয়ার করা গৌণ ফল্ট-এর সংখ্যা, যেগুলির ডিস্ক থেকে মেমরি পাতা আনার প্রয়োজন হয়নি।"
+
+# msgstr "প্রসেসটির গৌণ ফল্ট-এর সংখ্যা যার জন্য ডিস্ক থেকে মেমরি পেজ আনতে হয়নি।"
+# এখানে Fault একটা Technical Term। তবে সব জায়গায় না ;-)
+# ২ "প্রসেস" লিখলে খুবই ভাল হইতো
+#. 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 ""
+"প্রক্রিয়ার করা মুখ্য ফল্ট-এর সংখ্যা, যেগুলির ডিস্ক থেকে মেমরি পাতা আনার প্রয়োজন হয়েছে।"
+
+# msgstr "প্রসেসটির গৌণ ফল্ট-এর সংখ্যা যার জন্য ডিস্ক থেকে মেমরি পেজ আনতে হয়েছে।"
+#. CMin_Flt
+#: sysdeps/names/prockernel.c:65
+msgid "The number of minor faults that the process and its children have made."
+msgstr "প্রসেস ও তার child দের করা গৌণ ফল্ট-এর সংখ্যা"
+
+# ঠিক করেন
+#. CMaj_Flt
+#: sysdeps/names/prockernel.c:68
+msgid "The number of major faults that the process and its children have made."
+msgstr "প্রসেস ও তার child দের করা মুখ্য ফল্ট-এর সংখ্যা"
+
+# ঠিক করেন
+#. 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 (৩২-বিট স্ট্যাক পয়েন্টার) এর বর্তমান "
+"মান।"
+
+#. KStk_EIP
+#: sysdeps/names/prockernel.c:74
+msgid "The current EIP (32-bit instruction pointer)."
+msgstr "EIP এর বর্তমান মান (৩২-বিট ইনস্ট্রাকশন পয়েন্টার)।"
+
+#. 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 ""
+"এটি \"channel\" যেখানে প্রক্রিয়া অপেক্ষা করছে। এটি সিস্টেম কলের ঠিকানা,এবং এর "
+"জন্য নথিতালিকা দেখা যেতে পারে যদি আপনার কোন পাঠযোগ্য নাম প্রয়োজন হয়। (যদিআপনার "
+"সাম্প্রতিক /etc/psdatabase থাকে, তাহলে কাজের WCHAN এলাকায় দেখার জন্য ps -l "
+"চেষ্টা করুন)"
+
+# ২ এটি সেই চ্যানেল যেখানে প্রসেসটি অপেক্ষা করছে...............
+#. WChan
+#: sysdeps/names/prockernel.c:81
+msgid "This is the textual name of the `nwchan' field."
+msgstr "এটি 'nwchan' ক্ষেত্রের (Field) পাঠযোগ্য নাম"
+
+# msgstr "এটি 'nwchan' ক্ষেত্রের (Field) পাঠযোগ্য নাম"
+#: sysdeps/names/procmem.c:47
+msgid "Virtual"
+msgstr "ভার্চুয়াল"
+
+# msgstr "ভার্চুয়াল"
+# এখানে Virtual একটা Technical term। "ভার্চুয়াল মেমরি" থেকে আসছে।
+#: sysdeps/names/procmem.c:47
+msgid "Resident"
+msgstr "রেসিডেন্ট"
+
+# 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 resident set (non-swapped) pages"
+msgstr ""
+
+#: sysdeps/names/procmem.c:56
+msgid "Number of pages of shared (mmap'd) memory"
+msgstr "বন্টিত মেমরির (mmap'd) মোট পাতার সংখ্যা"
+
+# "শেয়ার্‌ড মেমরি" বা "বন্টিত মেমরি"। বাংলা না করাই মনে হয় ভাল।
+#: 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 ""
+"বাস্তব মেমরির মোট পাতার সংখ্যা, পরিচালনার জন্য ৩ বাদ দিয়ে। এটি কেবল একটি "
+"পাতাযেটা অক্ষর, তথ্য, অথবা স্ট্যাকের জায়গা গননা করে। এটিতে সেই সমস্ত পাতা অম্তর্ভুক্ত "
+"নয় যেগুলি,চাহিদায়-নেওয়া (demand-loaded) নয় অথবা সরিয়ে ফেলা হয়েছে।"
+
+# ২ "গণনা", "অন্তর্ভুক্ত"
+# ২ আগেরবার এটা কোন কারণে আমার চোখে পরে নাই ;-(
+#: sysdeps/names/procmem.c:62
+msgid ""
+"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
+msgstr "বাইটে প্রকাশিত প্রসেসের বর্তমান rss সীমা (সাধারণত ২,১৪৭,৪৮৩,৬৪৭)।"
+
+#: 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 "অপরিচ্ছন্ন (Dirty) আয়তন"
+
+# msgstr "অপরিচ্ছন্ন (Dirty) আয়তন"
+#: 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 "অপরিচ্ছন্ন (Dirty) পেজ-এর মোট আয়তন"
+
+# msgstr "অপরিচ্ছন্ন (Dirty) পেজ-এর মোট আয়তন"
+#: sysdeps/names/procsegment.c:53
+msgid "Address of beginning of code segment"
+msgstr "কোড সেগমেন্ট আরম্ভের ঠিকানা"
+
+# msgstr "কোড সেগমেন্ট আরম্ভের ঠিকানা"
+#: sysdeps/names/procsegment.c:54
+msgid "Address of end of code segment"
+msgstr "কোড সেগমেন্ট শেষের ঠিকানা"
+
+# msgstr "কোড সেগমেন্ট শেষ হওয়ার ঠিকানা"
+#: sysdeps/names/procsegment.c:55
+msgid "Address of the bottom of stack segment"
+msgstr "স্ট্যাক সেগমেন্ট-এর তলদেশের ঠিকানা"
+
+# msgstr "কোড অংশের নিচের ঠিকানা" <-- স্ট্যাক নাই
+# সেগমেন্ট
+#: sysdeps/names/procsignal.c:40
+msgid "Signal"
+msgstr "সংকেত (Signal)"
+
+# msgstr "সংকেত (Signal)"
+# msgstr "সিগন্যাল"
+# এখানে Signal একটা Technical Term
+#: 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 "অমীমাংসিত সংকেতের (Signal) মুখোশ"
+
+# msgstr "অমীমাংসিত সিগন্যাল-এর মুখোশ"
+#: sysdeps/names/procsignal.c:46
+msgid "Mask of blocked signals"
+msgstr "আটকে রাখা সংকেতের (Signal) মুখোশ"
+
+# সিগন্যাল
+# ২ msgstr "সংকেত আটকে রাখার (Signal) মুখোশ"
+#: sysdeps/names/procsignal.c:47
+msgid "Mask of ignored signals"
+msgstr "প্রত্যাখ্যাত সংকেতের (Signal) মুখোশ"
+
+# সিগন্যাল
+#: sysdeps/names/procsignal.c:48
+msgid "Mask of caught signals"
+msgstr "গ্রহণ করা সংকেতের মুখোশ"
+
+# 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 "ইউআইডি (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 "exec() ডাকা এক্সিকিউটেবল ফাইলের মূল নাম"
+
+# ইংরেজি স্পষ্ট না; exec()'কে এক্সিকিউটেবল ডাকতেছে নাকি এক্সিকিউটেবল'কে exec() ডাকতেছে ?
+#: sysdeps/names/procstate.c:46
+msgid "Single-Char code for process state (S=sleeping)"
+msgstr "একটি অক্ষর দিয়ে প্রসেসের অবস্থা প্রকাশের সংকেত (Code) (S=নিস্ক্রিয়)"
+
+# msgstr "একটি অক্ষর দিয়ে প্রসেসের অবস্থা প্রকাশের সংকেত (Code) (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 হওয়া উচিত্‍)"
+
+# msgstr "যে প্রকৃত সময় যাবত্‍ প্রসেসটি চলছে (utime+stime হওয়া উচিত্‍)"
+#: 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 "প্রসেসটি কার্নেল মোডে যে পরিমাণ সিপিইউ সময় ব্যয় করেছে"
+
+# msgstr "প্রসেসটি কার্নেল মোডে যে পরিমাণ সিপিইউ সময় ব্যয় করেছে"
+#: sysdeps/names/proctime.c:55
+msgid "cumulative utime of process and reaped children"
+msgstr "প্রসেসের ক্রমবর্ধিত utime এবং অর্জিত children"
+
+# আরেকটু সহজ করা যায় না ? ;-)
+#: sysdeps/names/proctime.c:56
+msgid "cumulative stime of process and reaped children"
+msgstr "প্রmsmsj ক্রমবর্ধিত stime এবং অর্জিত children"
+
+# ২ এইটা কিরকম হইলো ???
+#: sysdeps/names/proctime.c:57
+msgid "The time (in jiffies) of the process's next timeout"
+msgstr "পরবর্তীতে যখন প্রসেসটির সময় শেষ হয়ে যাবে (jiffies এ)"
+
+# msgstr "পরবর্তীতে যখন প্রসেসটির সময় শেষ হয়ে যাবে (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 প্রেরণ করা হবে। "
+"(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 "প্রসেসটি ইউজার মোডে যে পরিমাণ এসএমপি সিপিইউ সময় ব্যয় করেছে"
+
+#: sysdeps/names/proctime.c:62
+msgid "SMP kernel-mode CPU time accumulated by process"
+msgstr "প্রসেসটি কার্নেল মোডে যে পরিমাণ এসএমপি সিপিইউ সময় ব্যয় করেছে"
+
+# msgstr "প্রসেসটি কার্নেল মোডে যে পরিমাণ এসএমপি সিপিইউ সময় ব্যয় করেছে"
+#: 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)"
+
+# ২ ( এর আগে একটা Space দিয়ে দিছি
+#: 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 "অধিবেশন (session)"
+
+# msgstr "সেশন"
+#: sysdeps/names/procuid.c:57
+msgid "Tty"
+msgstr "টিটিআই (Tty)"
+
+# ২ টিটিওয়াই - মনে হয় আমারই ভুল ;-(
+#: sysdeps/names/procuid.c:58
+msgid "TPGid"
+msgstr "টিপিজিআইডি (TiGid)"
+
+#: sysdeps/names/procuid.c:58
+msgid "Priority"
+msgstr "অগ্রাধিকার"
+
+#: sysdeps/names/procuid.c:63
+msgid "User ID"
+msgstr "ব্যবহারকারীর আইডি"
+
+# msgstr "ব্যবহারকারীর আইডি"
+# অন্যান্য ফাইলে আইডি-ই লেখা হইছে
+#: sysdeps/names/procuid.c:64
+msgid "Effective User ID"
+msgstr "সক্রিয় ব্যবহারকারীর আইডি"
+
+#: sysdeps/names/procuid.c:65
+msgid "Group ID"
+msgstr "গ্রুপের আইডি"
+
+# msgstr "গ্রুপ পরিচয়"
+#: sysdeps/names/procuid.c:66
+msgid "Effective Group ID"
+msgstr "সক্রিয় গ্রুপের আইডি"
+
+#: sysdeps/names/procuid.c:67
+msgid "Process ID"
+msgstr "প্রসেস আইডি"
+
+# msgstr "প্রক্রিয়াকরন পরিচয়" <-- "করণ"
+# msgstr "প্রসেস আইডি"
+#: sysdeps/names/procuid.c:68
+msgid "PID of parent process"
+msgstr "মূল (Parent) প্রসেসের পিআইডি"
+
+# msgstr "মূল (Parent) প্রসেসের পিআইডি"
+#: sysdeps/names/procuid.c:69
+msgid "Process group ID"
+msgstr "প্রসেস গ্রুপ আইডি"
+
+# msgstr "গোষ্ঠি প্রক্রিয়াকরন পরিচয়"
+# msgstr "প্রসেস গ্রুপ আইডি"
+#: sysdeps/names/procuid.c:70
+msgid "Session ID"
+msgstr "অধিবেশন (session) আইডি"
+
+# msgstr "সেশন আইডি"
+#: sysdeps/names/procuid.c:71
+msgid "Full device number of controlling terminal"
+msgstr "নিয়ন্ত্রণকারী প্রান্তের সমস্ত যন্ত্রের সংখ্যা"
+
+# msgstr "নিয়ন্ত্রন প্রান্তের সমস্ত যন্ত্রের সংখ্যা" <-- "নিয়ন্ত্রণ" বানান ভুল আছে
+# msgstr "নিয়ন্ত্রণকারী টার্মিনালের পূর্ণ ডিভাইস নম্বর"
+# ২ এটা কি ভাল করে খেয়াল করে ঠিক করছেন ?
+#: sysdeps/names/procuid.c:72
+msgid "Terminal process group ID"
+msgstr "প্রান্তিক প্রসেসের গ্রুপ আইডি"
+
+# msgstr "টার্মিনাল প্রসেসের গ্রুপ আইডি"
+#: sysdeps/names/procuid.c:73
+msgid "Kernel scheduling priority"
+msgstr "কার্নেল শিডিউলিং (scheduling) এর অগ্রাধিকার"
+
+# msgstr "কার্নেল শিডিউলিং (scheduling) এর অগ্রাধিকার"
+# scheduling একটা দুর্ধর্ষ Technical Term।
+#: sysdeps/names/procuid.c:74
+msgid "Standard unix nice level of process"
+msgstr "প্রসেসের সাধারণ ইউনিক্স নাইস স্তর"
+
+# msgstr "সাধারন ইউনিক্স সুন্দর স্তরের প্রক্রিয়া"
+# msgstr "প্রসেসের প্রমিত ইউনিক্স নাইস স্তর"
+# নাইস
+#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
+msgid "Number of entries in semaphore map"
+msgstr "সিমাফোর (semaphore) ম্যাপে অন্তর্ভুক্তির (Entry) সংখ্যা"
+
+# msgstr "সিমাফোর (semaphore) ম্যাপে অন্তর্ভুক্তির (Entry) সংখ্যা"
+#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
+msgid "Max number of arrays"
+msgstr "সর্বাধিক array এর সংখ্যা"
+
+#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
+msgid "Max semaphores system wide"
+msgstr "নিয়মানুগ সর্বাধিক semaphore গুলো"
+
+# msgstr "নিয়মানুগ সর্বাধিক semaphore গুলি"
+# msgstr "সিস্টেমে ব্যবহারযোগ্য সর্বাধিক সিমাফোর (Semaphor)"
+#: 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 "গুচ্ছ (Array) প্রতি সর্বাধিক সিমাফোর (Semaphore)"
+
+# msgstr "গুচ্ছ (Array) প্রতি সর্বাধিক সিমাফোর (Semaphore)"
+#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
+msgid "Max ops per semop call"
+msgstr "semop call প্রতি সর্বাধিক ops"
+
+#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
+msgid "Max number of undo entries per process"
+msgstr "প্রসেস প্রতি শেষ পরিবর্তন বাতিল (Undo) অন্তর্ভুক্তির (Entry) সর্বাধিক সংখ্যা"
+
+# msgstr "প্রসেস প্রতি শেষ পরিবর্তন বাতিল (Undo) অন্তর্ভুক্তির (Entry) সর্বাধিক সংখ্যা"
+#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
+msgid "sizeof struct sem_undo"
+msgstr "struct sem_undo এর আয়তন"
+
+#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
+msgid "Semaphore max value"
+msgstr "সিমাফোর (Semaphor) এর সর্বাধিক মান"
+
+# msgstr "সিমাফোর (Semaphor) এর সর্বাধিক মান"
+#: 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 "সেগমেন্টের সর্বোচ্চ আকার"
+
+# 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 "প্রসেস প্রতি সর্বাধিক বন্টিত সেগমেন্ট"
+
+# msgstr "প্রসেস প্রতি সর্বাধিক বন্টিত (Shared) সেগমেন্ট"
+#: 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 "মোট সোয়াপ (Swap) জায়গা"
+
+# msgstr "মোট সোয়াপ (Swap)"
+#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
+msgid "Used Swap Space"
+msgstr "ব্যবহৃত সোয়াপ (Swap) জায়গা"
+
+# ঐ
+#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
+msgid "Free Swap Space"
+msgstr "মুক্ত সোয়াপ (Swap) জায়গা"
+
+#: sysdeps/names/swap.c:42
+msgid "Page In"
+msgstr "আগত পাতা"
+
+#: sysdeps/names/swap.c:43
+msgid "Page Out"
+msgstr "পাতা গেছে"
+
+# msgstr "পাতা (Page) গিয়েছে"
+# ২ এটা মনে হয় খেয়াল করেন নাই
+#: sysdeps/names/swap.c:51
+msgid "Total number of swap pages that have been brought in since system boot"
+msgstr "সিস্টেম চালু হবার পর থেকে মোট যে সংখ্যক সোয়াপ (Swap) পাতা আনা হয়েছে"
+
+# msgstr "সিস্টেম চালু হবার পর থেকে মোট যে সংখ্যক সোয়াপ (Swap) পাতা (Page) আনা হয়েছে"
+#: 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 "সার্ভারের বৈশিষ্ট্যগুলো"
+
+# msgstr "সার্ভারের বৈশিষ্ট্যগুলি" <-- "গুলি" ভাল শোনায় না
+# 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 "গড় ভার"
+
+# msgstr "গড় ভার" <- "গড"
+# 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 "বার্তা সারির (Message Queue) সীমা"
+
+# msgstr "বার্তা সারির (Message Queue) ধারণক্ষমতা"
+#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
+msgid "Semaphore Set Limits"
+msgstr "Semaphore Set এর সীমা"
+
+#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
+msgid "List of running Processes"
+msgstr "চলন্ত প্রসেসসমূহের তালিকা"
+
+# msgstr "চলন্ত প্রক্রিয়াকরনগুলির তালিকা" <- "করণ"
+#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86
+msgid "Process Status information"
+msgstr "প্রসেসের অবস্থাসূচক তথ্যাবলী"
+
+# এটা কিছু বোঝা যাচ্ছে না। তাছাড়া "করুন" শব্দটা এখানে আসার কথা না।
+# msgstr "প্রসেসের অবস্থাসূচক তথ্যাবলী"
+#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87
+msgid "Process UID and TTY information"
+msgstr "ইউআইডি এবং টিটিওয়াই তথ্য প্রক্রিয়াকরন করুন"
+
+# msgstr "প্রসেসের ইউআইডি (UID) ও টিটিওয়াই (TTY) সংক্রান্ত তথ্যাবলী"
+# ২ "প্রক্রিয়াকরণ"
+# ২ এটা কি ভাল করে খেয়াল করছেন ?
+#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88
+msgid "Process Memory information"
+msgstr "প্রসেসের মেমরি সংক্রান্ত তথ্যাবলী"
+
+# msgstr "প্রসেসের মেমরি সংক্রান্ত তথ্যাবলী"
+#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
+msgid "Process Time information"
+msgstr "প্রসেসের সময় সংক্রান্ত তথ্যাবলী"
+
+# msgstr "প্রসেসের সময় সংক্রান্ত তথ্যাবলী"
+#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
+msgid "Process Signal information"
+msgstr "প্রসেসের সিগন্যাল সংক্রান্ত তথ্যাবলী"
+
+# msgstr "প্রসেসের সিগন্যাল সংক্রান্ত তথ্যাবলী"
+#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
+msgid "Process Kernel Data information"
+msgstr "প্রসেসের কার্নেল তথ্যবিষয়ক তথ্যাবলী"
+
+# msgstr "প্রসেসের কার্নেল তথ্যবিষয়ক তথ্যাবলী"
+#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
+msgid "Process Segment information"
+msgstr "প্রসেসের সেগমেন্ট সংক্রান্ত তথ্যাবলী"
+
+# msgstr "প্রসেসের সেগমেন্ট সংক্রান্ত তথ্যাবলী"
+#: sysdeps/names/sysdeps.c:66
+msgid "Process Arguments"
+msgstr "প্রসেসে প্রেরিত মান"
+
+# msgstr "প্রসেসের নিকট প্রেরিত মান"
+#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
+msgid "Process Memory Map"
+msgstr "প্রসেসের মেমরি ম্যাপ"
+
+# 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 "ফাইল সিস্টেমের ব্যবহার"
+
+# msgstr "ফাইলসিস্টেমের ব্যবহার"
+#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
+msgid "Network Load"
+msgstr "নেটওয়ার্ক ভার"
+
+# 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 "কমান্ড লাইন থেকে প্রসেসকে প্রেরিত মান"
+
+# msgstr "কমান্ড লাইন থেকে প্রসেসকে প্রেরিত মান"
+#: sysdeps/names/sysdeps.c:95
+msgid "List of currently mounted filesystems"
+msgstr "বর্তমানে মাউন্ট করা ফাইল-সিস্টেমের তালিকা"
+
+# msgstr "বর্তমানে মাউন্ট করা ফাইল-সিস্টেমের তালিকা"
+#: sysdeps/names/uptime.c:38
+msgid "Uptime"
+msgstr "চালু থাকা সময়"
+
+# msgstr "চালু থাকার সময়"
+# msgstr "সচল থাকার সময়"
+#: sysdeps/names/uptime.c:39
+msgid "Idletime"
+msgstr "নিস্ক্রিয়ভাবে ব্যয়িত সময়"
+
+# 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 "সিস্টেম বুট হবার পর থেকে নিস্ক্রিয় কাজে অতিবাহিত সময় (সেকেন্ডে)"
+
+# msgstr "সিস্টেম বুট হবার পর থেকে নিষ্ক্রিয় কাজে অতিবাহিত সময় (সেকেন্ডে)"
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "সংযোগ বিচ্ছিন্ন করুন"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "ইন্টারাপ্ট"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "প্রস্থান"
+
+# msgstr "প্রস্থান"
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "অবৈধ ইনস্ট্রাকশন"
+
+# msgstr "অবৈধ ইনস্ট্রাকশন"
+# Instruction এখানে Technical term।
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "প্রমাণ ফাঁদ"
+
+# ২ এটা আসলে ঠিক বোঝা যাচ্ছে না। তাই মনে হয় বাদ রাখাই ভাল
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "বন্ধ করা"
+
+# msgstr "বন্ধ করা"
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "ইএমটি সংক্রান্ত ভুল"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "ভগ্নাংশ সংক্রান্ত ব্যতিক্রম"
+
+# msgstr "ভগ্নাংশ সংক্রান্ত ব্যতীক্রম" <-- বানান ভুল
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "শেষ করা (Kill)"
+
+# msgstr "শেষ করা (Kill)"
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "বাস (Bus) সংক্রান্ত ভুল"
+
+# msgstr "বাস (Bus) সংক্রান্ত সমস্যা"
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "সেগমেন্ট সীমা লঙ্ঘন"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "সিস্টেম call এ ভুল মান প্রেরিত হয়েছে"
+
+# msgstr "সিস্টেম call এ ভুল মান প্রেরিত হয়েছে"
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "অচল পাইপ"
+
+# msgstr "অচল পাইপ"
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "এলার্ম ঘড়ি"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "সমাপন"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr "সকেটে জরুরি অবস্থা"
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "বন্ধ করুন"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "কিবোর্ড বন্ধ করুন"
+
+# ২ কীবোর্ড
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "চালিয়ে যান"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "Child অবস্থা পরিবর্তিত হয়েছে"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "পশ্চাত থেকে টিটিআই (tty) পড়া"
+
+# ভাল হইলো না
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "পশ্চাত থেকে টিটিআই (tty) এ লেখা"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "আই/ও এখন সম্ভব"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "সিপিইউ সীমা ছাড়িয়ে গেছে"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "ফাইলের আয়তন সীমা ছাড়িয়ে গেছে"
+
+# msgstr "ফাইলের আয়তন সীমা ছাড়িয়ে গেছে"
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "কাল্পনিক এলার্ম ঘড়ি"
+
+# msgstr "কাল্পনিক এলার্ম ঘড়ি"
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "উইন্ডো'র আয়তন পরিবর্তন"
+
+# msgstr "উইন্ডো'র আয়তন পরিবর্তন"
+# Window এর বাংলা করার দরকার নাই
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "তথ্যের আবেদন"
+
+# msgstr "তথ্যের আবেদন"
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "ব্যবহারকারী নির্ধারিত সিগনাল ১"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "ব্যবহারকারী নির্ধারিত সিগনাল ২"
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 00000000..e6e639b9
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,1349 @@
+# Czech translation of libgtop
+# This file is distributed under the same license as the libgtop package.
+# Miloslav Trmac <mitr@volny.cz>, 2002, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop 2.0\n"
+"POT-Creation-Date: 2003-02-06 12:08+0100\n"
+"PO-Revision-Date: 2003-02-07 05:01+0100\n"
+"Last-Translator: Miloslav Trmac <mitr@volny.cz>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "Tiky (%ld za sekundu):"
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr "Celkem"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "Uživatel"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "Nice"
+
+#: examples/smp.c:74
+msgid "Sys"
+msgstr "Sys"
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "Nevyužito"
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "Procent:"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "Celkem (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "Uživatel (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr "Nice (%)"
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr "Sys (%)"
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "Nevyužito (%)"
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr "Spin:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "přečteno %d bytů"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "velikost přečtených dat"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "přečteno %d bytů dat"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "zapsáno %d bytů"
+
+#: src/daemon/gnuserv.c:448
+msgid "Enable debugging"
+msgstr "Povolit ladění"
+
+#: src/daemon/gnuserv.c:448
+msgid "DEBUG"
+msgstr "LADĚNÍ"
+
+#: src/daemon/gnuserv.c:450
+msgid "Enable verbose output"
+msgstr "Povolit podrobný výstup"
+
+#: src/daemon/gnuserv.c:450
+msgid "VERBOSE"
+msgstr "PODROBNĚ"
+
+#: src/daemon/gnuserv.c:452
+msgid "Don't fork into background"
+msgstr "Neforkovat do pozadí"
+
+#: src/daemon/gnuserv.c:452
+msgid "NO-DAEMON"
+msgstr "NE-DÉMON"
+
+#: src/daemon/gnuserv.c:454
+msgid "Invoked from inetd"
+msgstr "Spuštěn z inetd"
+
+#: src/daemon/gnuserv.c:454
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:488
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"Chyba v přepínači %s: %s.\n"
+"Úplný seznam dostupných přepínačů zobrazíte spuštěním '%s --help'.\n"
+
+#: support/error.c:109
+msgid "Unknown system error"
+msgstr "Neznámá systémová chyba"
+
+#: support/getopt.c:669
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: přepínač `%s' není jednoznačný\n"
+
+#: support/getopt.c:693
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: přepínač `--%s' musí být zadán bez argumentu\n"
+
+#: support/getopt.c:698
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: přepínač `%c%s' musí být zadán bez argumentu\n"
+
+#: support/getopt.c:715 support/getopt.c:888
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: přepínač `%s' vyžaduje argument\n"
+
+#. --option
+#: support/getopt.c:744
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: neznámý přepínač `--%s'\n"
+
+#. +option or -option
+#: support/getopt.c:748
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: neznámý přepínač `%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: neznámý přepínač -- %c\n"
+
+#: support/getopt.c:777
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: neznámý přepínač -- %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: přepínač vyžaduje argument -- %c\n"
+
+#: support/getopt.c:854
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: přepínač `-W %s' není jednoznačný\n"
+
+#: support/getopt.c:872
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: přepínač `-W %s' musí být zadán bez argumentu\n"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "Zobrazit tuto nápovědu"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "Zobrazit krátkou zprávu o použití"
+
+#: sysdeps/names/cpu.c:43
+msgid "Total CPU Time"
+msgstr "Celkový čas CPU"
+
+#: sysdeps/names/cpu.c:44
+msgid "CPU Time in User Mode"
+msgstr "Čas CPU v uživatelském režimu"
+
+#: sysdeps/names/cpu.c:45
+msgid "CPU Time in User Mode (nice)"
+msgstr "Čas CPU v uživatelském režimu (nice)"
+
+#: sysdeps/names/cpu.c:46
+msgid "CPU Time in System Mode"
+msgstr "Čas CPU v systémovém režimu"
+
+# Any better idea?
+#: sysdeps/names/cpu.c:47
+msgid "CPU Time in the Idle Task"
+msgstr "Čas CPU v idle task"
+
+#: sysdeps/names/cpu.c:48
+msgid "Tick Frequency"
+msgstr "Frekvence tiků"
+
+#: sysdeps/names/cpu.c:49
+msgid "SMP Total CPU Time"
+msgstr "SMP celkový čas CPU"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "CMP čas CPU v uživatelském režimu"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "CMP čas CPU v uživatelském režimu (nice)"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "CMP čas CPU v systémovém režimu"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "SMP čas CPU v idle task"
+
+#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
+msgid "Number of clock ticks since system boot"
+msgstr "Počet tiků hodin od startu systému"
+
+#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65
+msgid "Number of clock ticks the system spent in user mode"
+msgstr "Počet tiků hodin strávených v uživatelském režimu"
+
+#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66
+msgid "Number of clock ticks the system spent in user mode (nice)"
+msgstr "Počet tiků hodin strávených v uživatelském režimu (nice)"
+
+#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
+msgid "Number of clock ticks the system spent in system mode"
+msgstr "Počet tiků hodin strávených v systémovém režimu"
+
+#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
+msgid "Number of clock ticks the system spent in the idle task"
+msgstr "Počet tiků hodin strávených v idle task"
+
+#: sysdeps/names/cpu.c:63
+msgid "Tick frequency (default is 100)"
+msgstr "Frekvence tiků (implicitně 100)"
+
+#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
+msgid "Total blocks"
+msgstr "Celkem bloků"
+
+#: sysdeps/names/fsusage.c:40
+msgid "Free blocks"
+msgstr "Volných bloků"
+
+#: sysdeps/names/fsusage.c:41
+msgid "Available blocks"
+msgstr "Dostupných bloků"
+
+#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
+msgid "Total file nodes"
+msgstr "Celkem uzlů souborů"
+
+#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
+msgid "Free file nodes"
+msgstr "Volných uzlů souborů"
+
+#: sysdeps/names/fsusage.c:49
+msgid "Free blocks available to the superuser"
+msgstr "Volné bloky dostupné superuživateli"
+
+#: sysdeps/names/fsusage.c:50
+msgid "Free blocks available to non-superusers"
+msgstr "Volné bloky dostupné obyčejným uživatelům"
+
+#: sysdeps/names/loadavg.c:39
+msgid "Load Average"
+msgstr "Průměrná zátěž"
+
+#: sysdeps/names/loadavg.c:40
+msgid "Running Tasks"
+msgstr "Běžící úlohy"
+
+#: sysdeps/names/loadavg.c:41
+msgid "Number of Tasks"
+msgstr "Počet úloh"
+
+#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50
+msgid "Last PID"
+msgstr "Poslední PID"
+
+#: sysdeps/names/loadavg.c:47
+msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
+msgstr "Počet současně běžících úloh průměrovaný za 1, 5 a 15 minut"
+
+#: sysdeps/names/loadavg.c:48
+msgid "Number of tasks currently running"
+msgstr "Počet právě běžících úloh"
+
+#: sysdeps/names/loadavg.c:49
+msgid "Total number of tasks"
+msgstr "Celkový počet úloh"
+
+#: sysdeps/names/mem.c:41
+msgid "Total Memory"
+msgstr "Celkem paměť"
+
+#: sysdeps/names/mem.c:42
+msgid "Used Memory"
+msgstr "Použitá paměť"
+
+#: sysdeps/names/mem.c:43
+msgid "Free Memory"
+msgstr "Volná paměť"
+
+#: sysdeps/names/mem.c:44
+msgid "Shared Memory"
+msgstr "Sdílená paměť"
+
+#: sysdeps/names/mem.c:45
+msgid "Buffers"
+msgstr "Buffery"
+
+#: sysdeps/names/mem.c:46
+msgid "Cached"
+msgstr "Kešováno"
+
+#: sysdeps/names/mem.c:48
+msgid "Locked"
+msgstr "Zamknuto"
+
+#: sysdeps/names/mem.c:53
+msgid "Total physical memory in kB"
+msgstr "Fyzická paměť celkem v kB"
+
+#: sysdeps/names/mem.c:54
+msgid "Used memory size in kB"
+msgstr "Velikost použité paměti v kB"
+
+#: sysdeps/names/mem.c:55
+msgid "Free memory size in kB"
+msgstr "Velikost volné paměti v kB"
+
+#: sysdeps/names/mem.c:56
+msgid "Shared memory size in kB"
+msgstr "Velikost sdílené paměti v kB"
+
+#: sysdeps/names/mem.c:57
+msgid "Size of buffers kB"
+msgstr "Velikost bufferů kB"
+
+#: sysdeps/names/mem.c:58
+msgid "Size of cached memory in kB"
+msgstr "Velikost kešované paměti v kB"
+
+#: sysdeps/names/mem.c:59
+msgid "Memory used from user processes in kB"
+msgstr "Paměť použitá v uživatelských procesech v kB"
+
+#: sysdeps/names/mem.c:60
+msgid "Memory in locked pages in kB"
+msgstr "Paměť v zamknutých stránkách v 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 "Počet prvků seznamu"
+
+#: 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 "Celková velikost seznamu"
+
+#: 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 "Velikost jednoho prvku seznamu"
+
+#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51
+msgid "Size in kilobytes of message pool"
+msgstr "Velikost oblasti zpráv v kilobytech"
+
+#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
+msgid "Number of entries in message map"
+msgstr "Počet položek v mapě zpráv"
+
+#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
+msgid "Max size of message"
+msgstr "Maximální velikost zprávy"
+
+#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
+msgid "Default max size of queue"
+msgstr "Implicitní maximální velikost fronty"
+
+#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
+msgid "Max queues system wide"
+msgstr "Maximum front v systému"
+
+#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
+msgid "Message segment size"
+msgstr "Velikost segmentu zprávy"
+
+#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
+msgid "Number of system message headers"
+msgstr "Počet hlaviček zpráv v systému"
+
+#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "Příznaky rozhraní"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Podsíť"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "Adresa"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "Pakety dovnitř"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "Pakety ven"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "Pakety celkem"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "Byty dovnitř"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "Byty ven"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "Byty celkem"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "Chyby dovnitř"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "Chyby ven"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "Chyby celkem"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "Kolize"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "Maximální jednotka přenosu"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "Stav PPP"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "Přijaté byty"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "Odeslané byty"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "Počet přijatých bytů"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "Počet vyslaných bytů"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "Velikost"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "Délka vráceného řetězce v bytech."
+
+#: 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 ""
+"Příznaky procesu v jádře.\n"
+"\n"
+"V Linuxu je pokaždé nastaven bit floating-point, protože crt0.s kontroluje "
+"emulaci floating-point, takže tento bit není obsažen ve výstupu.\n"
+"\n"
+"To je asi chyba, protože ne každý proces je kompilovaný program v C.\n"
+"\n"
+"Bit floating-point by měl bít 4 desítkové, a bit trasování je 10 desítkově."
+
+#. 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 ""
+"Počet menších výpadků, které proces způsobil, těch, které nevyžadovaly "
+"načtení stránky paměti z disku."
+
+#. 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 ""
+"Počet větších výpadků, které proces způsobil, těch, které vyžadovaly načtení "
+"stránky paměti z disku."
+
+#. CMin_Flt
+#: sysdeps/names/prockernel.c:65
+msgid "The number of minor faults that the process and its children have made."
+msgstr "Počet menších výpadků, které způsobil proces a jeho potomci."
+
+#. CMaj_Flt
+#: sysdeps/names/prockernel.c:68
+msgid "The number of major faults that the process and its children have made."
+msgstr "Počet větších výpadků, které způsobil proces a jeho potomci."
+
+#. 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 ""
+"Aktuální hodnota esp (32bitového ukazatele zásobníku) v stránce zásobníku "
+"jádra pro proces."
+
+#. KStk_EIP
+#: sysdeps/names/prockernel.c:74
+msgid "The current EIP (32-bit instruction pointer)."
+msgstr "Aktuální EIP (32bitový ukazatel instrukcí)."
+
+#. 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 ""
+"Toto je \"kanál\", ve kterém proces čeká. Je to adresa systémového volání, a "
+"pokud potřebujete textové jméno, dá se najít v seznamu. (Máte-li aktuální /"
+"etc/psdatabase, uvidíte použití WCHAN po zadání ps -l)"
+
+#. WChan
+#: sysdeps/names/prockernel.c:81
+msgid "This is the textual name of the `nwchan' field."
+msgstr "Toto je textové jméno pole `nwchan'."
+
+#: sysdeps/names/procmem.c:47
+msgid "Virtual"
+msgstr "Virtuální"
+
+#: sysdeps/names/procmem.c:47
+msgid "Resident"
+msgstr "Rezidentní"
+
+#: sysdeps/names/procmem.c:47
+msgid "Share"
+msgstr "Sdílená"
+
+#: sysdeps/names/procmem.c:48
+msgid "Resident Set Size"
+msgstr "Velikost rezidentní sady"
+
+#: sysdeps/names/procmem.c:48
+msgid "Resident Set Size Limit"
+msgstr "Limit velikosti rezidentní sady"
+
+#: sysdeps/names/procmem.c:53
+msgid "Total # of pages of memory"
+msgstr "Celkový počet stránek paměti"
+
+#: sysdeps/names/procmem.c:54
+msgid "Number of pages of virtual memory"
+msgstr "Počet stránek virtuální paměti"
+
+#: sysdeps/names/procmem.c:55
+msgid "Number of resident set (non-swapped) pages"
+msgstr "Počet rezidentních (neodložených) stránek"
+
+#: sysdeps/names/procmem.c:56
+msgid "Number of pages of shared (mmap'd) memory"
+msgstr "Počet stránek sdílené (mmapované) paměti"
+
+#: 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 "Počet stránek, které má proces v reálné paměti, mínus 3 pro účely správy. Jde jen o stránky, které patří k prostoru textu, dat nebo zásobníku. Nezahrnuje stránky, které byly načteny na požádání nebo byly odloženy."
+
+#: sysdeps/names/procmem.c:62
+msgid ""
+"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
+msgstr "Aktuální limit v bytech pro rss procesu (obvykle 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 "Velikost nezapsaného"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Code"
+msgstr "Start_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "End_Code"
+msgstr "End_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Stack"
+msgstr "Start_Stack"
+
+#: sysdeps/names/procsegment.c:48
+msgid "Text resident set size"
+msgstr "Velikost rezidentní sady textu"
+
+#: sysdeps/names/procsegment.c:49
+msgid "Shared-Lib resident set size"
+msgstr "Velikost rezidentní sady sdílených knihoven"
+
+#: sysdeps/names/procsegment.c:50
+msgid "Data resident set size"
+msgstr "Velikost rezidentní sady dat"
+
+#: sysdeps/names/procsegment.c:51
+msgid "Stack resident set size"
+msgstr "Velikost rezidentní sady zásobníku"
+
+#: sysdeps/names/procsegment.c:52
+msgid "Total size of dirty pages"
+msgstr "Celková velikost nezapsaných stránek"
+
+#: sysdeps/names/procsegment.c:53
+msgid "Address of beginning of code segment"
+msgstr "Adresa začátku kódového segmentu"
+
+#: sysdeps/names/procsegment.c:54
+msgid "Address of end of code segment"
+msgstr "Adresa konce kódového segmentu"
+
+#: sysdeps/names/procsegment.c:55
+msgid "Address of the bottom of stack segment"
+msgstr "Adresa dna zásobníkového segmentu"
+
+#: sysdeps/names/procsignal.c:40
+msgid "Signal"
+msgstr "Signál"
+
+#: sysdeps/names/procsignal.c:40
+msgid "Blocked"
+msgstr "Blokovaný"
+
+#: 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 "Maska čekajících signálů"
+
+#: sysdeps/names/procsignal.c:46
+msgid "Mask of blocked signals"
+msgstr "Maska blokovaných signálů"
+
+#: sysdeps/names/procsignal.c:47
+msgid "Mask of ignored signals"
+msgstr "Maska ignorovaných signálů"
+
+#: sysdeps/names/procsignal.c:48
+msgid "Mask of caught signals"
+msgstr "Maska obsloužených signálů"
+
+#: sysdeps/names/procstate.c:40
+msgid "Cmd"
+msgstr "Cmd"
+
+#: sysdeps/names/procstate.c:40
+msgid "State"
+msgstr "Stav"
+
+#: 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 "Jméno spustitelného souboru při volání exec()"
+
+#: sysdeps/names/procstate.c:46
+msgid "Single-Char code for process state (S=sleeping)"
+msgstr "Jednoznakový kód stavu procesu (S=spící)"
+
+#: sysdeps/names/procstate.c:47
+msgid "UID of process"
+msgstr "UID procesu"
+
+#: sysdeps/names/procstate.c:48
+msgid "GID of process"
+msgstr "GID procesu"
+
+#: sysdeps/names/proctime.c:44
+msgid "Start_Time"
+msgstr "Start_Time"
+
+#: sysdeps/names/proctime.c:44
+msgid "RTime"
+msgstr "RTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "UTime"
+msgstr "UTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "STime"
+msgstr "STime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CUTime"
+msgstr "CUTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CSTime"
+msgstr "CSTime"
+
+#: 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 "Frekvence"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_UTime"
+msgstr "XCPU_UTime"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_STime"
+msgstr "XCPU_STime"
+
+#: sysdeps/names/proctime.c:51
+msgid "Start time of process in seconds since the epoch"
+msgstr "Čas spuštění procesu v sekundách od epoch"
+
+#: sysdeps/names/proctime.c:52
+msgid "Real time accumulated by process (should be utime + stime)"
+msgstr "Reálný čas použitý procesem (měl by být utime + stime)"
+
+#: sysdeps/names/proctime.c:53
+msgid "user-mode CPU time accumulated by process"
+msgstr "čas CPU použitý procesem v uživatelském režimu"
+
+#: sysdeps/names/proctime.c:54
+msgid "kernel-mode CPU time accumulated by process"
+msgstr "čas CPU použitý procesem v režimu jádra"
+
+#: sysdeps/names/proctime.c:55
+msgid "cumulative utime of process and reaped children"
+msgstr "souhrnný utime procesu a dokončených potomků"
+
+#: sysdeps/names/proctime.c:56
+msgid "cumulative stime of process and reaped children"
+msgstr "souhrnný stime procesu a dokončených potomků"
+
+#: sysdeps/names/proctime.c:57
+msgid "The time (in jiffies) of the process's next timeout"
+msgstr "Čas (v jiffies) dalšího timeoutu procesu"
+
+#: 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 ""
+"Čas (v jiffies) do dalšího poslání SIGALRM procesu kvůli časovači intervalu"
+
+#: sysdeps/names/proctime.c:60
+msgid "Tick frequency"
+msgstr "Frekvence tiků"
+
+#: sysdeps/names/proctime.c:61
+msgid "SMP user-mode CPU time accumulated by process"
+msgstr "SMP čas CPU použitý procesem v uživatelském režimu"
+
+#: sysdeps/names/proctime.c:62
+msgid "SMP kernel-mode CPU time accumulated by process"
+msgstr "SMP čas CPU použitý procesem v režimu jádra"
+
+#: 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 "Sezení"
+
+#: 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 "Priorita"
+
+#: sysdeps/names/procuid.c:63
+msgid "User ID"
+msgstr "ID uživatele"
+
+#: sysdeps/names/procuid.c:64
+msgid "Effective User ID"
+msgstr "Efektivní ID uživatele"
+
+#: sysdeps/names/procuid.c:65
+msgid "Group ID"
+msgstr "ID skupiny"
+
+#: sysdeps/names/procuid.c:66
+msgid "Effective Group ID"
+msgstr "Efektivní ID skupiny"
+
+#: sysdeps/names/procuid.c:67
+msgid "Process ID"
+msgstr "ID procesu"
+
+#: sysdeps/names/procuid.c:68
+msgid "PID of parent process"
+msgstr "ID rodičovského procesu"
+
+#: sysdeps/names/procuid.c:69
+msgid "Process group ID"
+msgstr "ID skupiny procesů"
+
+#: sysdeps/names/procuid.c:70
+msgid "Session ID"
+msgstr "ID sezení"
+
+#: sysdeps/names/procuid.c:71
+msgid "Full device number of controlling terminal"
+msgstr "Číslo zařízení řídicího terminálu"
+
+#: sysdeps/names/procuid.c:72
+msgid "Terminal process group ID"
+msgstr "ID skupiny procesů terminálu"
+
+#: sysdeps/names/procuid.c:73
+msgid "Kernel scheduling priority"
+msgstr "Plánovací priorita v jádru"
+
+#: sysdeps/names/procuid.c:74
+msgid "Standard unix nice level of process"
+msgstr "Standardní unixová úroveň nice procesu"
+
+#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
+msgid "Number of entries in semaphore map"
+msgstr "Počet položek v mapě semaforů"
+
+#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
+msgid "Max number of arrays"
+msgstr "Maximální počet polí"
+
+#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
+msgid "Max semaphores system wide"
+msgstr "Maximum semaforů v systému"
+
+#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
+msgid "Number of undo structures system wide"
+msgstr "Počet struktur undo v systému"
+
+#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
+msgid "Max semaphores per array"
+msgstr "Maximum semaforů v poli"
+
+#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
+msgid "Max ops per semop call"
+msgstr "Maximum operací ve volání semop"
+
+#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
+msgid "Max number of undo entries per process"
+msgstr "Maximální počet položek undo pro proces"
+
+#: 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 "Maximální hodnota semaforu"
+
+#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
+msgid "Adjust on exit max value"
+msgstr "Maximální hodnota opravy při ukončení"
+
+#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
+msgid "Max segment size"
+msgstr "Maximální velikost segmentu"
+
+#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
+msgid "Min segment size"
+msgstr "Minimální velikost segmentu"
+
+#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
+msgid "Max number of segments"
+msgstr "Maximální počet segmentů"
+
+#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
+msgid "Max shared segments per process"
+msgstr "Maximum sdílených segmentů pro proces"
+
+#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
+msgid "Max total shared memory"
+msgstr "Maximum celkem sdílené paměti"
+
+#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
+msgid "Total Swap Space"
+msgstr "Odkládací prostor celkem"
+
+#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
+msgid "Used Swap Space"
+msgstr "Použitý odkládací prostor"
+
+#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
+msgid "Free Swap Space"
+msgstr "Volný odkládací prostor"
+
+#: sysdeps/names/swap.c:42
+msgid "Page In"
+msgstr "Načtení stránky"
+
+#: sysdeps/names/swap.c:43
+msgid "Page Out"
+msgstr "Zapsání stránky"
+
+#: sysdeps/names/swap.c:51
+msgid "Total number of swap pages that have been brought in since system boot"
+msgstr "Celkový počet odložených stránek, které byly od startu systému načteny"
+
+#: sysdeps/names/swap.c:53
+msgid "Total number of swap pages that have been brought out since system boot"
+msgstr "Celkový počet odložených stránek, které byly od startu systému zapsány"
+
+#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
+msgid "Server Features"
+msgstr "Vlastnosti serveru"
+
+#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
+msgid "CPU Usage"
+msgstr "Použití CPU"
+
+#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78
+msgid "Memory Usage"
+msgstr "Použití paměti"
+
+#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79
+msgid "Swap Usage"
+msgstr "Použití swapu"
+
+#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80
+msgid "System Uptime"
+msgstr "Čas běhu systému"
+
+#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81
+msgid "Load Averange"
+msgstr "Průměrná zátěž"
+
+#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82
+msgid "Shared Memory Limits"
+msgstr "Limity sdílené paměti"
+
+#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83
+msgid "Message Queue Limits"
+msgstr "Limity fronty zpráv"
+
+#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
+msgid "Semaphore Set Limits"
+msgstr "Limity sady semaforů"
+
+#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
+msgid "List of running Processes"
+msgstr "Seznam běžících procesů"
+
+#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86
+msgid "Process Status information"
+msgstr "Informace o stavu procesu"
+
+#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87
+msgid "Process UID and TTY information"
+msgstr "Informace o UID a TTY procesu"
+
+#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88
+msgid "Process Memory information"
+msgstr "Informace o paměti procesu"
+
+#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
+msgid "Process Time information"
+msgstr "Informace o časech procesu"
+
+#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
+msgid "Process Signal information"
+msgstr "Informace o signálech procesu"
+
+#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
+msgid "Process Kernel Data information"
+msgstr "Informace o datech jádra o procesu"
+
+#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
+msgid "Process Segment information"
+msgstr "Informace o segmentech procesu"
+
+#: sysdeps/names/sysdeps.c:66
+msgid "Process Arguments"
+msgstr "Argumenty procesu"
+
+#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
+msgid "Process Memory Map"
+msgstr "Mapa paměti procesu"
+
+#: sysdeps/names/sysdeps.c:68
+msgid "Mount List"
+msgstr "Seznam připojení"
+
+#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96
+msgid "File System Usage"
+msgstr "Použití systému souborů"
+
+#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
+msgid "Network Load"
+msgstr "Zátěž sítě"
+
+#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98
+msgid "PPP Statistics"
+msgstr "Statistiky PPP"
+
+#: sysdeps/names/sysdeps.c:93
+msgid "Command line arguments of the process"
+msgstr "Argumenty procesu na příkazovém řádku"
+
+#: sysdeps/names/sysdeps.c:95
+msgid "List of currently mounted filesystems"
+msgstr "Seznam právě připojených systémů souborů"
+
+#: sysdeps/names/uptime.c:38
+msgid "Uptime"
+msgstr "Čas běhu"
+
+#: sysdeps/names/uptime.c:39
+msgid "Idletime"
+msgstr "Nevyužitý čas"
+
+#: sysdeps/names/uptime.c:44
+msgid "Time in seconds since system boot"
+msgstr "Čas v sekundách od startu systému"
+
+#: sysdeps/names/uptime.c:45
+msgid "Time in seconds the system spent in the idle task since system boot"
+msgstr "Čas v sekundách, který systém od startu strávil v idle task"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "Zavěšení"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "Přerušení"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "Konec"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "Neplatná instrukce"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "Trasovací zachycení"
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "Přerušení"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "Chyba EMT"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "Výjimka v plovoucí řádové čárce"
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "Zabití"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "Chyba sběrnice"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "Porušení segmentace"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "Špatný argument systémového volání"
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "Přerušená roura"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "Alarm"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "Přerušení"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr "Urgentní stav soketu"
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "Zastavení"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "Zastavení z klávesnice"
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "Pokračování"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "Stav potomka se změnil"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "Čtení tty z pozadí"
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "Zápis na tty z pozadí"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "I/O je nyní možné"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "Překročen limit CPU"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "Překročen limit velikosti souboru"
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "Virtuální alarm"
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr "Profilovací alarm"
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "Změna velikosti okna"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "Požadavek na informaci"
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "Uživatelem definovaný signál 1"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "Uživatelem definovaný signál 2"
diff --git a/po/cy.po b/po/cy.po
new file mode 100644
index 00000000..992c105d
--- /dev/null
+++ b/po/cy.po
@@ -0,0 +1,1362 @@
+# libgtop yn Gymraeg
+# Copyright (C) 2003, The Free Software Foundation
+# This file is distributed under the same license as the libgtop package.
+# Dafydd Harries <daf@parnassus.ath.cx>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop\n"
+"POT-Creation-Date: 2003-08-09 19:47+0100\n"
+"PO-Revision-Date: 2003-08-09 19:46+0100\n"
+"Last-Translator: Dafydd Harries <daf@parnassus.ath.cx>\n"
+"Language-Team: Cymraeg <gnome-cy@www.linux.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "Ticiau (%ld yr eiliad):"
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr "Cyfanswm"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "Defnyddiwr"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "Neis"
+
+#: examples/smp.c:74
+msgid "Sys"
+msgstr "Sys"
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "Segur"
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "Canran:"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "Cyfanswm (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "Defnyddiwr (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr "Neis (%)"
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr "Sys (%)"
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "Segur (%)"
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr "Troelli:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "darllen %d beit"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "darllen maint data"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "data darllen %d beit"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "ysgrifennu %d beit"
+
+#: src/daemon/gnuserv.c:453
+msgid "Enable debugging"
+msgstr "Galluogi datnamu"
+
+#: src/daemon/gnuserv.c:453
+msgid "DEBUG"
+msgstr "DATNAMU"
+
+#: src/daemon/gnuserv.c:455
+msgid "Enable verbose output"
+msgstr "Galluogi allbwn amleiriog"
+
+#: src/daemon/gnuserv.c:455
+msgid "VERBOSE"
+msgstr "AMLEIRIOG"
+
+#: src/daemon/gnuserv.c:457
+msgid "Don't fork into background"
+msgstr "Peidio fforcio i'r cefndir"
+
+#: src/daemon/gnuserv.c:457
+msgid "NO-DAEMON"
+msgstr "DIM-ELLYLL"
+
+#: src/daemon/gnuserv.c:459
+msgid "Invoked from inetd"
+msgstr "Cychwynwyd o inetd"
+
+#: src/daemon/gnuserv.c:459
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:493
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"Gwall efo'r opsiwn %s: %s.\n"
+"Rhedwch '%s --help' er mwyn gweld rhestr cyflawn o'r opsinnau llinell "
+"gorchymyn sydd ar gael.\n"
+
+#: support/error.c:109
+msgid "Unknown system error"
+msgstr "Gwall system anhysbys"
+
+#: support/getopt.c:669
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: mae'r opsiwn `%s' yn amwys\n"
+
+#: support/getopt.c:693
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: nid yw'r opsiwn `--%s' yn caniatau ymresymiad\n"
+
+#: support/getopt.c:698
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: nid yw'r opsiwn `%c%s' yn caniatau ymresymiad\n"
+
+#: support/getopt.c:715 support/getopt.c:888
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: mae'r opsiwn `%s' yn mynnu ymresymiad\n"
+
+#. --option
+#: support/getopt.c:744
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opsiwn anadnabyddus `--%s'\n"
+
+#. +option or -option
+#: support/getopt.c:748
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opswin anadnabyddus `%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: opsiwn anghyfreithlon -- %c\n"
+
+#: support/getopt.c:777
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opsiwn annilys -- %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: mae'r opsiwn yn mynnu ymresymiad -- `%c'\n"
+
+#: support/getopt.c:854
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: mae'r opsiwn `-W %s' yn amwys\n"
+
+#: support/getopt.c:872
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: nid yw'r opsiwn `-W %s' yn caniatau ymresymiad\n"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "Dangos y neges cymorth hwn"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "Dangos neges defnydd byr"
+
+#: sysdeps/names/cpu.c:43
+msgid "Total CPU Time"
+msgstr "Cyfanswm Amser CPU"
+
+#: sysdeps/names/cpu.c:44
+msgid "CPU Time in User Mode"
+msgstr "Amser CPU Modd Defnyddiwr"
+
+#: sysdeps/names/cpu.c:45
+msgid "CPU Time in User Mode (nice)"
+msgstr "Amser CPU Modd Defnyddiwr (neis)"
+
+#: sysdeps/names/cpu.c:46
+msgid "CPU Time in System Mode"
+msgstr "Amser CPU Modd System"
+
+#: sysdeps/names/cpu.c:47
+msgid "CPU Time in the Idle Task"
+msgstr "Amser CPU yn y Tasg Segur"
+
+#: sysdeps/names/cpu.c:48
+msgid "Tick Frequency"
+msgstr "Amledd Tic"
+
+#: sysdeps/names/cpu.c:49
+msgid "SMP Total CPU Time"
+msgstr "Cyfanswm Amser CPU SMP"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "Amser CPU SMP Modd Defnyddiwr"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "Amser CPU SMP Modd Defnyddiwr (neis)"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "Amser CPU SMP Modd System"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "Amser CPU SMP yn y Tasg Segur"
+
+#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
+msgid "Number of clock ticks since system boot"
+msgstr "Nifer o diciau cloc ers fwtio'r system"
+
+#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65
+msgid "Number of clock ticks the system spent in user mode"
+msgstr "Nifer o diciau cloc gwariodd y system yn y modd defnyddiwr"
+
+#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66
+msgid "Number of clock ticks the system spent in user mode (nice)"
+msgstr "Nifer o diciau cloc gwariodd y system yn y modd defnyddiwr (neis)"
+
+#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
+msgid "Number of clock ticks the system spent in system mode"
+msgstr "Nifer o diciau cloc gwariodd y system yn y modd system"
+
+#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
+msgid "Number of clock ticks the system spent in the idle task"
+msgstr "Nifer o diciau cloc gwariodd y system yn y tasg segur"
+
+#: sysdeps/names/cpu.c:63
+msgid "Tick frequency (default is 100)"
+msgstr "Amledd tic (100 yw'r rhagoosdiad)"
+
+#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
+msgid "Total blocks"
+msgstr "Cyfanswm blociau"
+
+#: sysdeps/names/fsusage.c:40
+msgid "Free blocks"
+msgstr "Blociau rhydd"
+
+#: sysdeps/names/fsusage.c:41
+msgid "Available blocks"
+msgstr "Blociau ar gael"
+
+#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
+msgid "Total file nodes"
+msgstr "Cyfanswm nodau ffeil"
+
+#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
+msgid "Free file nodes"
+msgstr "Nodau ffeil rhydd"
+
+#: sysdeps/names/fsusage.c:49
+msgid "Free blocks available to the superuser"
+msgstr "Blociau rhydd ar gael i'r uwchddefnyddiwr"
+
+#: sysdeps/names/fsusage.c:50
+msgid "Free blocks available to non-superusers"
+msgstr "Blociau rhydd ar gale i nid-uwchddefnyddwyr"
+
+#: sysdeps/names/loadavg.c:39
+msgid "Load Average"
+msgstr "Cyfartaledd Llwyth"
+
+#: sysdeps/names/loadavg.c:40
+msgid "Running Tasks"
+msgstr "Tasgiau sy'n Rhedeg"
+
+#: sysdeps/names/loadavg.c:41
+msgid "Number of Tasks"
+msgstr "Nifer o Dasgiau"
+
+#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50
+msgid "Last PID"
+msgstr "PID Diwethaf"
+
+#: sysdeps/names/loadavg.c:47
+msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
+msgstr ""
+"Nifer o dasgau'n rhedeg ar yr un pryd wedi eu cyfartaleddu dros 1, 5 a 15 "
+"munud"
+
+#: sysdeps/names/loadavg.c:48
+msgid "Number of tasks currently running"
+msgstr "Y nifer o dasgiau'n rhedeg yn gyfredol"
+
+#: sysdeps/names/loadavg.c:49
+msgid "Total number of tasks"
+msgstr "Cyfanswm y tasgau"
+
+#: sysdeps/names/mem.c:41
+msgid "Total Memory"
+msgstr "Cyfanswm Cof"
+
+#: sysdeps/names/mem.c:42
+msgid "Used Memory"
+msgstr "Cof Mewn Defnydd"
+
+#: sysdeps/names/mem.c:43
+msgid "Free Memory"
+msgstr "Cof Rhydd"
+
+#: sysdeps/names/mem.c:44
+msgid "Shared Memory"
+msgstr "Cof Rhannedig"
+
+#: sysdeps/names/mem.c:45
+msgid "Buffers"
+msgstr "Byffrau"
+
+#: sysdeps/names/mem.c:46
+msgid "Cached"
+msgstr "Yn Y Storfa"
+
+#: sysdeps/names/mem.c:48
+msgid "Locked"
+msgstr "Wedi Cloi"
+
+#: sysdeps/names/mem.c:53
+msgid "Total physical memory in kB"
+msgstr "Cyfanswm cof ffisegol mewn cB"
+
+#: sysdeps/names/mem.c:54
+msgid "Used memory size in kB"
+msgstr "Maint cof mewn defnydd mewn cB"
+
+#: sysdeps/names/mem.c:55
+msgid "Free memory size in kB"
+msgstr "Maint cof rhydd mewn cB"
+
+#: sysdeps/names/mem.c:56
+msgid "Shared memory size in kB"
+msgstr "Maint cof rhannedig mewn cB"
+
+#: sysdeps/names/mem.c:57
+msgid "Size of buffers kB"
+msgstr "Maint byffrau mewn cB"
+
+#: sysdeps/names/mem.c:58
+msgid "Size of cached memory in kB"
+msgstr "Maint storfa cof mewn cB"
+
+#: sysdeps/names/mem.c:59
+msgid "Memory used from user processes in kB"
+msgstr "Cof a ddefnyddir gan brosesau defnyddwyr mewn cB"
+
+#: sysdeps/names/mem.c:60
+msgid "Memory in locked pages in kB"
+msgstr "Cof mewn tudalennau cloedig mewn cB"
+
+#: 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 "Nifer o elfennau rhestr"
+
+#: 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 "Maint cyfan y rhestr"
+
+#: 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 "Maint elfen rhestr sengl"
+
+#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51
+msgid "Size in kilobytes of message pool"
+msgstr "Maint mewn cilobeitiau y pwll negeseuon"
+
+#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
+msgid "Number of entries in message map"
+msgstr "Nifer o elfennau yn y map negeseuon"
+
+#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
+msgid "Max size of message"
+msgstr "Maint mwyaf neges"
+
+#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
+msgid "Default max size of queue"
+msgstr "Maint mwyaf rhagosod ciw"
+
+#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
+msgid "Max queues system wide"
+msgstr "Maint ciwiau system-eang"
+
+#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
+msgid "Message segment size"
+msgstr "Maint segment neges"
+
+#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
+msgid "Number of system message headers"
+msgstr "Nifer o benawdau neges system"
+
+#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "Banneri Rhyngwyneb"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Isrhwyd"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "Cyfeiriad"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "Pecynnau Mewn"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "Pecynnau Allan"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "Cyfanswm Pecynnau"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "Beitiau Mewn"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "Beitiau Allan"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "Cyfanswm Beitiau"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "Gwallau Mewn"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "Gwallau Allan"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "Cyfanswm Gwallau"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "Gwrthdrawiadau"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "Uned Cludo Mwyaf"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "Cyflwr PPP"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "Beitiau mewnbwn"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "Beitiau allbwn"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "Nifer o feitiau mewnbwn"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "Nifer o feitiau allbwn"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "Maint"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "Hyd mewn beitiau y llinyn a ddychwelir"
+
+#: 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 ""
+"Banneri cnewyllyn y proses.\n"
+"\n"
+"Ar Linux, mae gan bob baner y did mathemateg wedi ei osod, gan fod crt0.s yn "
+"edrych am efelychiad mathematg, felly ni chynhwysir hyn yn yr allbwn.\n"
+"\n"
+"Mae hyn mwynathebyg yn wall, gan nad yw pob proses yn rhaglen C crynhoedig.\n"
+"\n"
+"Dylai'r did mathemateg fod yn 4 degol, a'r bit trywyddu yn 10 degol."
+
+#. 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 ""
+"Nifer o wallau bychan mae'r proses wedi ei wneud, rheiny nad ydynt wedi "
+"angen llwytho tudalen cof o'r disg."
+
+#. 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 ""
+"Nifer o wallau mawr mae'r proses wedi ei wneud, rheiny sydd wedi angen "
+"llwytho tudalen cof o'r disg."
+
+#. CMin_Flt
+#: sysdeps/names/prockernel.c:65
+msgid "The number of minor faults that the process and its children have made."
+msgstr "Y nifer o wallau bychan mae'r proses a'i blant wedi eu gwneud."
+
+#. CMaj_Flt
+#: sysdeps/names/prockernel.c:68
+msgid "The number of major faults that the process and its children have made."
+msgstr "Y nifer o wallau mawr mae'r proses a'i blant wedi eu gwneud."
+
+#. 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 ""
+"Gwerth cyfredol yr ESP (pwyntydd stac 32-did), fel a chanfuir yn nhydalen "
+"stac y cnewyllyn ar gyfer y proses."
+
+#. KStk_EIP
+#: sysdeps/names/prockernel.c:74
+msgid "The current EIP (32-bit instruction pointer)."
+msgstr "Yr EIP cyfredol (pwyntydd cyfarwyddiad 32-did)."
+
+#. 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 ""
+"Dyma'r \"sianel\" mae'r proses yn aros ynddi. Dyma gyfeiriad galwad system, "
+"a gellir ei edrych i fyny mewn rhestr enw os ydych angen enw testunol. (Os "
+"mae /etc/psdatabase diweddar gennych, ceisiwch ps -l er mwyn gweld y maes "
+"WCHAN ar waith)"
+
+#. WChan
+#: sysdeps/names/prockernel.c:81
+msgid "This is the textual name of the `nwchan' field."
+msgstr "Dyma enw testun y maes `nwchan'."
+
+#: sysdeps/names/procmem.c:47
+msgid "Virtual"
+msgstr "Rhithwyr"
+
+#: sysdeps/names/procmem.c:47
+msgid "Resident"
+msgstr "Preswyl"
+
+#: sysdeps/names/procmem.c:47
+msgid "Share"
+msgstr "Rhannu"
+
+#: sysdeps/names/procmem.c:48
+msgid "Resident Set Size"
+msgstr "Maint Set Preswyl"
+
+#: sysdeps/names/procmem.c:48
+msgid "Resident Set Size Limit"
+msgstr "Cyfwmng Maint Set Preswyl"
+
+#: sysdeps/names/procmem.c:53
+msgid "Total # of pages of memory"
+msgstr "Cyfanswm nifer o dydalennau mewn cof"
+
+#: sysdeps/names/procmem.c:54
+msgid "Number of pages of virtual memory"
+msgstr "Nifer o dudalennau o gof rhithwir"
+
+#: sysdeps/names/procmem.c:55
+msgid "Number of resident set (non-swapped) pages"
+msgstr "Nifer o dudalennau set preswyl (heb eu cyfnewid)"
+
+#: sysdeps/names/procmem.c:56
+msgid "Number of pages of shared (mmap'd) memory"
+msgstr "Nifer o dudalennau o gof wedi ei rhannu (wedi mmap()io)"
+
+#: 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 ""
+"Nifer y tudalennau sydd gan y proses mewn gwir gof, llai 3 ar gyfer rhesymau "
+"gweinyddol. Dim ond y tudalennau sy'n cyfri at ofod testun, data neu stac yw "
+"hyn. Nid yw hyn yn cynnwys tudalennau a gafwyd eu llwytho i fewn ar gais, "
+"neu sydd wedi eu cyfnewid allan."
+
+#: sysdeps/names/procmem.c:62
+msgid ""
+"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
+msgstr ""
+"Y cyfwng presenol mewn beitiau ar RSS y proses (fel arfer 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 "Maint Brwnt"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Code"
+msgstr "Start_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "End_Code"
+msgstr "End_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Stack"
+msgstr "Start_Stack"
+
+#: sysdeps/names/procsegment.c:48
+msgid "Text resident set size"
+msgstr "Maint set preswyl testun"
+
+#: sysdeps/names/procsegment.c:49
+msgid "Shared-Lib resident set size"
+msgstr "Maint set preswyl llyfrgellau rhanedig"
+
+#: sysdeps/names/procsegment.c:50
+msgid "Data resident set size"
+msgstr "Maint set preswyl data"
+
+#: sysdeps/names/procsegment.c:51
+msgid "Stack resident set size"
+msgstr "Maint set preswyl stac"
+
+#: sysdeps/names/procsegment.c:52
+msgid "Total size of dirty pages"
+msgstr "Cyfanswm maint tudalennau brwnt"
+
+#: sysdeps/names/procsegment.c:53
+msgid "Address of beginning of code segment"
+msgstr "Cyfeiriad dechrau y segment côd"
+
+#: sysdeps/names/procsegment.c:54
+msgid "Address of end of code segment"
+msgstr "Cyfeiriad diwedd y segment côd"
+
+#: sysdeps/names/procsegment.c:55
+msgid "Address of the bottom of stack segment"
+msgstr "Cyfeiriad gwaelod y segment stac"
+
+#: sysdeps/names/procsignal.c:40
+msgid "Signal"
+msgstr "Arwydd"
+
+#: sysdeps/names/procsignal.c:40
+msgid "Blocked"
+msgstr "Wedi Blocio"
+
+#: 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 "Masg signalau disgwyl"
+
+#: sysdeps/names/procsignal.c:46
+msgid "Mask of blocked signals"
+msgstr "Masg signalau wedi eu blocio"
+
+#: sysdeps/names/procsignal.c:47
+msgid "Mask of ignored signals"
+msgstr "Masg signalau a anwybyddir"
+
+#: sysdeps/names/procsignal.c:48
+msgid "Mask of caught signals"
+msgstr "Masg signalau a ddelir"
+
+#: sysdeps/names/procstate.c:40
+msgid "Cmd"
+msgstr "Cmd"
+
+#: sysdeps/names/procstate.c:40
+msgid "State"
+msgstr "Cyflwr"
+
+#: 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 "Enw sail y ffeil gweithredadwy yn y galwad i exec()"
+
+#: sysdeps/names/procstate.c:46
+msgid "Single-Char code for process state (S=sleeping)"
+msgstr "Côd un nod ar gyfer cyflwr y proses (S=cysgu)"
+
+#: sysdeps/names/procstate.c:47
+msgid "UID of process"
+msgstr "UID y proses"
+
+#: sysdeps/names/procstate.c:48
+msgid "GID of process"
+msgstr "GID y proses"
+
+#: sysdeps/names/proctime.c:44
+msgid "Start_Time"
+msgstr "Start_Time"
+
+#: sysdeps/names/proctime.c:44
+msgid "RTime"
+msgstr "RTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "UTime"
+msgstr "UTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "STime"
+msgstr "STime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CUTime"
+msgstr "CUTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CSTime"
+msgstr "CSTime"
+
+#: 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 "Amledd"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_UTime"
+msgstr "XCPU_UTime"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_STime"
+msgstr "XCPU_STime"
+
+#: sysdeps/names/proctime.c:51
+msgid "Start time of process in seconds since the epoch"
+msgstr "Amser cychwyn y proses mewn eiliadau ers yr epoc"
+
+#: sysdeps/names/proctime.c:52
+msgid "Real time accumulated by process (should be utime + stime)"
+msgstr "Gwir amser a gasglwyd gan y proses (dylai god utime + stime)"
+
+#: sysdeps/names/proctime.c:53
+msgid "user-mode CPU time accumulated by process"
+msgstr "amser CPU modd defnyddiwr a gasglwyd gan y proses"
+
+#: sysdeps/names/proctime.c:54
+msgid "kernel-mode CPU time accumulated by process"
+msgstr "amser CPU modd cnewyllyn a gasglwyd gan y proses"
+
+#: sysdeps/names/proctime.c:55
+msgid "cumulative utime of process and reaped children"
+msgstr "utime cynyddol y proses a plant a gafodd eu medi"
+
+#: sysdeps/names/proctime.c:56
+msgid "cumulative stime of process and reaped children"
+msgstr "utime cynyddol y proses a plant a gafodd eu medi"
+
+#: sysdeps/names/proctime.c:57
+msgid "The time (in jiffies) of the process's next timeout"
+msgstr "Amser (mewn jiffiau) diwedd amser nesa'r proses"
+
+#: 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 ""
+"Yr amser (mewn jiffiau) cyn caiff y SIGALRM nesaf ei anfon i'r proses "
+"oherwydd amserydd ysbaid."
+
+#: sysdeps/names/proctime.c:60
+msgid "Tick frequency"
+msgstr "Amledd tic"
+
+#: sysdeps/names/proctime.c:61
+msgid "SMP user-mode CPU time accumulated by process"
+msgstr "Amser CPU SMP modd defnyddiwr a gasglwyd gan y proses"
+
+#: sysdeps/names/proctime.c:62
+msgid "SMP kernel-mode CPU time accumulated by process"
+msgstr "Amser CPU SMP modd cnewyllyn a gasglwyd gan y proses"
+
+#: 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 "Sesiwn"
+
+#: 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 "Blaenoriaeth"
+
+#: sysdeps/names/procuid.c:63
+msgid "User ID"
+msgstr "ID Defnyddiwr"
+
+#: sysdeps/names/procuid.c:64
+msgid "Effective User ID"
+msgstr "ID Defnyddiwr Effeithiol"
+
+#: sysdeps/names/procuid.c:65
+msgid "Group ID"
+msgstr "ID Grŵp"
+
+#: sysdeps/names/procuid.c:66
+msgid "Effective Group ID"
+msgstr "ID Grŵp Effeithiol"
+
+#: sysdeps/names/procuid.c:67
+msgid "Process ID"
+msgstr "ID Proses"
+
+#: sysdeps/names/procuid.c:68
+msgid "PID of parent process"
+msgstr "PID y proses rhiant"
+
+#: sysdeps/names/procuid.c:69
+msgid "Process group ID"
+msgstr "ID grŵp prosesau"
+
+#: sysdeps/names/procuid.c:70
+msgid "Session ID"
+msgstr "ID Sesiwn"
+
+#: sysdeps/names/procuid.c:71
+msgid "Full device number of controlling terminal"
+msgstr "Rhif dyfais llawn y terfynell rheoli"
+
+#: sysdeps/names/procuid.c:72
+msgid "Terminal process group ID"
+msgstr "ID grŵp proses terfynell"
+
+#: sysdeps/names/procuid.c:73
+msgid "Kernel scheduling priority"
+msgstr "Blaenoriaeth trefnu'r cnewyllyn"
+
+#: sysdeps/names/procuid.c:74
+msgid "Standard unix nice level of process"
+msgstr "Lfel neis unix safonnol y proses"
+
+#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
+msgid "Number of entries in semaphore map"
+msgstr "Nifer o gofnodion yn y map semaffor"
+
+#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
+msgid "Max number of arrays"
+msgstr "Uchafrif araeau"
+
+#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
+msgid "Max semaphores system wide"
+msgstr "Uchafrif semafforau system-eang"
+
+#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
+msgid "Number of undo structures system wide"
+msgstr "Nifer o strwythurau datwneud system-eang"
+
+#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
+msgid "Max semaphores per array"
+msgstr "Uchafrif semafforau i bob arae"
+
+#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
+msgid "Max ops per semop call"
+msgstr "Uchafrif gweithredion i bob galwad semop"
+
+#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
+msgid "Max number of undo entries per process"
+msgstr "Uchafrif cofnodion datwneud i bob proses"
+
+#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
+msgid "sizeof struct sem_undo"
+msgstr "maint strwythyr sem_undo"
+
+#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
+msgid "Semaphore max value"
+msgstr "Gwerth uchaf semaffor"
+
+#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
+msgid "Adjust on exit max value"
+msgstr "Gwerth uchafrif addasu wrth adael"
+
+#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
+msgid "Max segment size"
+msgstr "Maint segment mwyaf"
+
+#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
+msgid "Min segment size"
+msgstr "Maint segment lleiaf"
+
+#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
+msgid "Max number of segments"
+msgstr "Uchafrif nifer segmentau"
+
+#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
+msgid "Max shared segments per process"
+msgstr "Uchafrif segmentau rhanedig i bob proses"
+
+#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
+msgid "Max total shared memory"
+msgstr "Uchafrif cyfanswm cof rhanedig"
+
+#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
+msgid "Total Swap Space"
+msgstr "Cyfanswm Gofod Cyfnewid"
+
+#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
+msgid "Used Swap Space"
+msgstr "Gofod Cyfnewid Mewn Defnydd"
+
+#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
+msgid "Free Swap Space"
+msgstr "Gofod Cyfnewid Rhydd"
+
+#: sysdeps/names/swap.c:42
+msgid "Page In"
+msgstr "Tudalen Mewn"
+
+#: sysdeps/names/swap.c:43
+msgid "Page Out"
+msgstr "Tudalen Allan"
+
+#: sysdeps/names/swap.c:51
+msgid "Total number of swap pages that have been brought in since system boot"
+msgstr ""
+"Cyfansm nifer y tudalennau cyfnewid a dynnwyd i fewn ers bwtio'r system"
+
+#: sysdeps/names/swap.c:53
+msgid "Total number of swap pages that have been brought out since system boot"
+msgstr "Cyfansm nifer y tudalennau cyfnewid a dynnwyd allan ers bwtio'r system"
+
+#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
+msgid "Server Features"
+msgstr "Nodweddion Gweinydd"
+
+#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
+msgid "CPU Usage"
+msgstr "Defnydd CPU"
+
+#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78
+msgid "Memory Usage"
+msgstr "Defnydd Cof"
+
+#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79
+msgid "Swap Usage"
+msgstr "Defnydd Cyfnewid"
+
+#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80
+msgid "System Uptime"
+msgstr "Amser Rehdeg y System"
+
+#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81
+msgid "Load Averange"
+msgstr "Cyfartaledd Llwyth"
+
+#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82
+msgid "Shared Memory Limits"
+msgstr "Cyfyngion Cof Rhanedig"
+
+#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83
+msgid "Message Queue Limits"
+msgstr "Cyfyngion Ciwiau Neges"
+
+#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
+msgid "Semaphore Set Limits"
+msgstr "Cyfyngion Set Semaffor"
+
+#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
+msgid "List of running Processes"
+msgstr "Rhestr o brosesau sy'n rhedeg"
+
+#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86
+msgid "Process Status information"
+msgstr "Gwybodaeth statws proses"
+
+#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87
+msgid "Process UID and TTY information"
+msgstr "Gwybodaeth TTY a UID proses"
+
+#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88
+msgid "Process Memory information"
+msgstr "Gwybodaeth cof proses"
+
+#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
+msgid "Process Time information"
+msgstr "Gwybodaeth amser proses"
+
+#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
+msgid "Process Signal information"
+msgstr "Gwybodaeth arwydd proses"
+
+#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
+msgid "Process Kernel Data information"
+msgstr "Gwybodaeth data cnewyllyn proses"
+
+#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
+msgid "Process Segment information"
+msgstr "Gwybodaeth segment proses"
+
+#: sysdeps/names/sysdeps.c:66
+msgid "Process Arguments"
+msgstr "Ymresymiadau Proses"
+
+#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
+msgid "Process Memory Map"
+msgstr "Map Cof Proses"
+
+#: sysdeps/names/sysdeps.c:68
+msgid "Mount List"
+msgstr "Rhestr Gosod"
+
+#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96
+msgid "File System Usage"
+msgstr "Defnydd System Ffeilio"
+
+#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
+msgid "Network Load"
+msgstr "Llwyth Rhwydwaith"
+
+#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98
+msgid "PPP Statistics"
+msgstr "Ystadegau PPP"
+
+#: sysdeps/names/sysdeps.c:93
+msgid "Command line arguments of the process"
+msgstr "Ymresymiadau llinell gorchymyn proses"
+
+#: sysdeps/names/sysdeps.c:95
+msgid "List of currently mounted filesystems"
+msgstr "Rhestr o systemau ffeil wedi eu gosod yn gyfredol"
+
+#: sysdeps/names/uptime.c:38
+msgid "Uptime"
+msgstr "Amser Rhedeg"
+
+#: sysdeps/names/uptime.c:39
+msgid "Idletime"
+msgstr "Amser Segur"
+
+#: sysdeps/names/uptime.c:44
+msgid "Time in seconds since system boot"
+msgstr "Amser mewn eiliadau ers bwtio'r system"
+
+#: sysdeps/names/uptime.c:45
+msgid "Time in seconds the system spent in the idle task since system boot"
+msgstr ""
+"Amser mewn eiliadau mae'r system wedi gwario yn y tasg segur ers bwtio'r "
+"system"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "Hongian i fyny"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "Ymyrryd"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "Gadael"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "Cyfarwyddiad anghyfriethlon"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "Trap trywyddu"
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "Terfynu"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "Gwall EMT"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "Eithriad pwynt symudol"
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "Lladd"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "Gwall bws"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "Trosedd segmentu"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "Ymresymiad gwael i alwad system"
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "Piben torredig"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "Cloc larwm"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "Terfynnu"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr "Amod pwysig ar soced"
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "Atal"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "Ataliad bysellfwrdd"
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "Parhau"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "Statws plentyn wedi newid"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "Darllen cefndir o TTY"
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "Ysgrifennu cefndir at TTY"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "I/O nawr yn bosib"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "Y tu hwnt i'r cyfwng CPU"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "Y tu hwnt i'r cyfwng maint ffeil"
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "Cloc larwm rhithwir"
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr "Cloc larm proffeilio"
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "Newid maint ffenest"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "Cais gwybodaeth"
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "Arwydd diffiniwyd gan y defnyddiwr 1"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "Arwydd diffiniwyd gan y defnyddiwr 2"
diff --git a/po/es_DO.po b/po/es_DO.po
deleted file mode 100644
index 45a28ece..00000000
--- a/po/es_DO.po
+++ /dev/null
@@ -1,1186 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: glibtop cvs\n"
-"POT-Creation-Date: 2000-02-23 00:23+0100\n"
-"PO-Revision-Date: 1998-12-13 04:38+0100\n"
-"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: sysdeps/names/cpu.c:45
-msgid "Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:46
-msgid "CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:47
-msgid "CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:48
-msgid "CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:49
-msgid "CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:50
-msgid "Tick Frequency"
-msgstr ""
-
-#: sysdeps/names/cpu.c:51
-msgid "SMP Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:52
-msgid "SMP CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:53
-msgid "SMP CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:54
-msgid "SMP CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:55
-msgid "SMP CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:56 sysdeps/names/cpu.c:72 sysdeps/names/proctime.c:66
-msgid "SMP CPU Flags"
-msgstr ""
-
-#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
-msgid "Number of clock ticks since system boot"
-msgstr ""
-
-#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
-msgid "Number of clock ticks the system spent in user mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:63 sysdeps/names/cpu.c:69
-msgid "Number of clock ticks the system spent in user mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:64 sysdeps/names/cpu.c:70
-msgid "Number of clock ticks the system spent in system mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:65 sysdeps/names/cpu.c:71
-msgid "Number of clock ticks the system spent in the idle task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:66
-msgid "Tick frequency (default is 100)"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:41 sysdeps/names/fsusage.c:50
-msgid "Total blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:42
-msgid "Free blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:43
-msgid "Available blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:44 sysdeps/names/fsusage.c:53
-msgid "Total file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:45 sysdeps/names/fsusage.c:54
-msgid "Free file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:51
-msgid "Free blocks available to the superuser"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:52
-msgid "Free blocks available to non-superusers"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:41
-msgid "Load Average"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:42
-msgid "Running Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:43
-msgid "Number of Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:44 sysdeps/names/loadavg.c:52
-msgid "Last PID"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:49
-msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:50
-msgid "Number of tasks currently running"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:51
-msgid "Total number of tasks"
-msgstr ""
-
-#: sysdeps/names/mem.c:43
-msgid "Total Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:44
-msgid "Used Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:45
-msgid "Free Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:46
-msgid "Shared Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:47
-msgid "Buffers"
-msgstr ""
-
-#: sysdeps/names/mem.c:48
-msgid "Cached"
-msgstr ""
-
-#: sysdeps/names/mem.c:49
-msgid "User"
-msgstr ""
-
-#: sysdeps/names/mem.c:50
-msgid "Locked"
-msgstr ""
-
-#: sysdeps/names/mem.c:55
-msgid "Total physical memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:56
-msgid "Used memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:57
-msgid "Free memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:58
-msgid "Shared memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:59
-msgid "Size of buffers kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:60
-msgid "Size of cached memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:61
-msgid "Memory used from user processes in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:62
-msgid "Memory in locked pages in kB"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
-msgid "Size in kilobytes of message pool"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
-msgid "Number of entries in message map"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
-msgid "Max size of message"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
-msgid "Default max size of queue"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
-msgid "Max queues system wide"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:47 sysdeps/names/msg_limits.c:58
-msgid "Message segment size"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:48 sysdeps/names/msg_limits.c:59
-msgid "Number of system message headers"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "K_Flags"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Min_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Maj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "CMin_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "CMaj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_ESP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_EIP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "NWChan"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:46
-msgid "WChan"
-msgstr ""
-
-#. K_Flags
-#: sysdeps/names/prockernel.c:52
-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:61
-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:64
-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:67
-msgid "The number of minor faults that the process and its children have made."
-msgstr ""
-
-#. CMaj_Flt
-#: sysdeps/names/prockernel.c:70
-msgid "The number of major faults that the process and its children have made."
-msgstr ""
-
-#. KStk_ESP
-#: sysdeps/names/prockernel.c:73
-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:76
-msgid "The current EIP (32-bit instruction pointer)."
-msgstr ""
-
-#. NWChan
-#: sysdeps/names/prockernel.c:78
-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:83
-msgid "This is the textual name of the `nwchan' field."
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Virtual"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Resident"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Share"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size Limit"
-msgstr ""
-
-#: sysdeps/names/procmem.c:55
-msgid "Total # of pages of memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:56
-msgid "Number of pages of virtual memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:57
-msgid "Number of resident set (non-swapped) pages"
-msgstr ""
-
-#: sysdeps/names/procmem.c:58
-msgid "Number of pages of shared (mmap'd) memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:59
-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 Mxico, 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:64
-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:50
-msgid "Text_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "ShLib_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Data_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Stack_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Dirty Size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Start_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "End_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "End_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_Stack"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_MMap"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53 sysdeps/names/procsegment.c:72
-msgid "Arg_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:73
-msgid "Arg_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:74
-msgid "Env_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:75
-msgid "Env_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:59
-msgid "Text resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:60
-msgid "Shared-Lib resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:61
-msgid "Data resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:62
-msgid "Stack resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:63
-msgid "Total size of dirty pages"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:64
-msgid "Address of beginning of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:65
-msgid "Address of end of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:66
-msgid "Address of beginning of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:67
-msgid "Address of end of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:68
-msgid "Brk_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:69
-msgid "Brk_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:70
-msgid "Address of the bottom of stack segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:71
-msgid "Start of mmap()ed areas"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Signal"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Blocked"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigIgnore"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigCatch"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:47
-msgid "Mask of pending signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:48
-msgid "Mask of blocked signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:49
-msgid "Mask of ignored signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:50
-msgid "Mask of caught signals"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "Cmd"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "State"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "UID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "GID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "RUID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "RGID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Has CPU"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:47
-msgid "Last Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:52
-msgid "Basename of executable file in call to exec()"
-msgstr ""
-
-#: sysdeps/names/procstate.c:53
-msgid "Single-Char code for process state (S=sleeping)"
-msgstr ""
-
-#: sysdeps/names/procstate.c:54
-msgid "effective UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:55
-msgid "effective GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:56
-msgid "real UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:57
-msgid "real GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:58
-msgid "has_cpu"
-msgstr ""
-
-#: sysdeps/names/procstate.c:59
-msgid "processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:60
-msgid "last_processor"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "Start_Time"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "RTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CUTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CSTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "TimeOut"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "It_Real_Value"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "Frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:49
-msgid "XCPU_Flags"
-msgstr ""
-
-#: sysdeps/names/proctime.c:54
-msgid "Start time of process in seconds since the epoch"
-msgstr ""
-
-#: sysdeps/names/proctime.c:55
-msgid "Real time accumulated by process (should be utime + stime)"
-msgstr ""
-
-#: sysdeps/names/proctime.c:56
-msgid "user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:57
-msgid "kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:58
-msgid "cumulative utime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:59
-msgid "cumulative stime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:60
-msgid "The time (in jiffies) of the process's next timeout"
-msgstr ""
-
-#: sysdeps/names/proctime.c:61
-msgid ""
-"The time (in jiffies) before the next SIGALRM is sent to the process due to "
-"an interval timer."
-msgstr ""
-
-#: sysdeps/names/proctime.c:63
-msgid "Tick frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:64
-msgid "SMP user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:65
-msgid "SMP kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Uid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Gid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "SUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "SGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "Pid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PPid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PGrp"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Session"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Tty"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "TPGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Nice"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "NGroups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:52
-msgid "Groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:57
-msgid "User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:58
-msgid "Effective User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:59
-msgid "Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:60
-msgid "Effective Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:61
-msgid "Saved User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:62
-msgid "Saved Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:63
-msgid "Filesystem User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:64
-msgid "Filesystem Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:65
-msgid "Process ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:66
-msgid "PID of parent process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:67
-msgid "Process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:68
-msgid "Session ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:69
-msgid "Full device number of controlling terminal"
-msgstr ""
-
-#: sysdeps/names/procuid.c:70
-msgid "Terminal process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:71
-msgid "Kernel scheduling priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:72
-msgid "Standard unix nice level of process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:73
-msgid "Number of additional process groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:74
-msgid "Additional process groups"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
-msgid "Number of entries in semaphore map"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
-msgid "Max number of arrays"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
-msgid "Max semaphores system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
-msgid "Number of undo structures system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
-msgid "Max semaphores per array"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
-msgid "Max ops per semop call"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
-msgid "Max number of undo entries per process"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
-msgid "sizeof struct sem_undo"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:52 sysdeps/names/sem_limits.c:66
-msgid "Semaphore max value"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:53 sysdeps/names/sem_limits.c:67
-msgid "Adjust on exit max value"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
-msgid "Max segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
-msgid "Min segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
-msgid "Max number of segments"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:44 sysdeps/names/shm_limits.c:53
-msgid "Max shared segments per process"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:45 sysdeps/names/shm_limits.c:54
-msgid "Max total shared memory"
-msgstr ""
-
-#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
-msgid "Total Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:42 sysdeps/names/swap.c:51
-msgid "Used Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:43 sysdeps/names/swap.c:52
-msgid "Free Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:44
-msgid "Page In"
-msgstr ""
-
-#: sysdeps/names/swap.c:45
-msgid "Page Out"
-msgstr ""
-
-#: sysdeps/names/swap.c:53
-msgid "Total number of swap pages that have been brought in since system boot"
-msgstr ""
-
-#: sysdeps/names/swap.c:55
-msgid "Total number of swap pages that have been brought out since system boot"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:82
-msgid "Server Features"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:54
-msgid "Pointer Size"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:84
-msgid "CPU Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:85
-msgid "Memory Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:86
-msgid "Swap Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:87
-msgid "System Uptime"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:88
-msgid "Load Averange"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:89
-msgid "Shared Memory Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:90
-msgid "Message Queue Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:91
-msgid "Semaphore Set Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:92
-msgid "List of running Processes"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:93
-msgid "Process Status information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:94
-msgid "Process UID and TTY information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:66 sysdeps/names/sysdeps.c:95
-msgid "Process Memory information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:96
-msgid "Process Time information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:68 sysdeps/names/sysdeps.c:97
-msgid "Process Signal information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:98
-msgid "Process Kernel Data information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:99
-msgid "Process Segment information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:71
-msgid "Process Arguments"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:72 sysdeps/names/sysdeps.c:101
-msgid "Process Memory Map"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:73
-msgid "Mount List"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:74 sysdeps/names/sysdeps.c:103
-msgid "File System Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:75 sysdeps/names/sysdeps.c:104
-msgid "Network Load"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:76 sysdeps/names/sysdeps.c:105
-msgid "Interface Names"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:77 sysdeps/names/sysdeps.c:106
-msgid "PPP Statistics"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:83
-msgid "Pointer Size on the Server (in bits)"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:100
-msgid "Command line arguments of the process"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:102
-msgid "List of currently mounted filesystems"
-msgstr ""
-
-#: sysdeps/names/uptime.c:40
-msgid "Uptime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:41
-msgid "Idletime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:42
-msgid "Boot time"
-msgstr ""
-
-#: sysdeps/names/uptime.c:47
-msgid "Time in seconds since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:48
-msgid "Time in seconds the system spent in the idle task since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:49
-msgid "Boot time (seconds sice epoch)"
-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/errors.c:31
-msgid "No error"
-msgstr ""
-
-#: lib/errors.c:32
-msgid "Unknown error"
-msgstr ""
-
-#: lib/errors.c:33
-msgid "Invalid argument"
-msgstr ""
-
-#: lib/errors.c:34
-msgid "No such parameter"
-msgstr ""
-
-#: lib/errors.c:35
-msgid "Attempted to modify a read-only value"
-msgstr ""
-
-#: lib/errors.c:36
-msgid "Parameter size mismatch"
-msgstr ""
-
-#: lib/errors.c:37
-msgid "Communication with LibGTop server failed"
-msgstr ""
-
-#: lib/errors.c:38
-msgid "No such process"
-msgstr ""
-
-#: lib/errors.c:39
-msgid "No kernel support"
-msgstr ""
-
-#: lib/errors.c:40
-msgid "Incompatible kernel version"
-msgstr ""
diff --git a/po/es_GT.po b/po/es_GT.po
deleted file mode 100644
index 45a28ece..00000000
--- a/po/es_GT.po
+++ /dev/null
@@ -1,1186 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: glibtop cvs\n"
-"POT-Creation-Date: 2000-02-23 00:23+0100\n"
-"PO-Revision-Date: 1998-12-13 04:38+0100\n"
-"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: sysdeps/names/cpu.c:45
-msgid "Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:46
-msgid "CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:47
-msgid "CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:48
-msgid "CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:49
-msgid "CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:50
-msgid "Tick Frequency"
-msgstr ""
-
-#: sysdeps/names/cpu.c:51
-msgid "SMP Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:52
-msgid "SMP CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:53
-msgid "SMP CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:54
-msgid "SMP CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:55
-msgid "SMP CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:56 sysdeps/names/cpu.c:72 sysdeps/names/proctime.c:66
-msgid "SMP CPU Flags"
-msgstr ""
-
-#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
-msgid "Number of clock ticks since system boot"
-msgstr ""
-
-#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
-msgid "Number of clock ticks the system spent in user mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:63 sysdeps/names/cpu.c:69
-msgid "Number of clock ticks the system spent in user mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:64 sysdeps/names/cpu.c:70
-msgid "Number of clock ticks the system spent in system mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:65 sysdeps/names/cpu.c:71
-msgid "Number of clock ticks the system spent in the idle task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:66
-msgid "Tick frequency (default is 100)"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:41 sysdeps/names/fsusage.c:50
-msgid "Total blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:42
-msgid "Free blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:43
-msgid "Available blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:44 sysdeps/names/fsusage.c:53
-msgid "Total file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:45 sysdeps/names/fsusage.c:54
-msgid "Free file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:51
-msgid "Free blocks available to the superuser"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:52
-msgid "Free blocks available to non-superusers"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:41
-msgid "Load Average"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:42
-msgid "Running Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:43
-msgid "Number of Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:44 sysdeps/names/loadavg.c:52
-msgid "Last PID"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:49
-msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:50
-msgid "Number of tasks currently running"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:51
-msgid "Total number of tasks"
-msgstr ""
-
-#: sysdeps/names/mem.c:43
-msgid "Total Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:44
-msgid "Used Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:45
-msgid "Free Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:46
-msgid "Shared Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:47
-msgid "Buffers"
-msgstr ""
-
-#: sysdeps/names/mem.c:48
-msgid "Cached"
-msgstr ""
-
-#: sysdeps/names/mem.c:49
-msgid "User"
-msgstr ""
-
-#: sysdeps/names/mem.c:50
-msgid "Locked"
-msgstr ""
-
-#: sysdeps/names/mem.c:55
-msgid "Total physical memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:56
-msgid "Used memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:57
-msgid "Free memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:58
-msgid "Shared memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:59
-msgid "Size of buffers kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:60
-msgid "Size of cached memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:61
-msgid "Memory used from user processes in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:62
-msgid "Memory in locked pages in kB"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
-msgid "Size in kilobytes of message pool"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
-msgid "Number of entries in message map"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
-msgid "Max size of message"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
-msgid "Default max size of queue"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
-msgid "Max queues system wide"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:47 sysdeps/names/msg_limits.c:58
-msgid "Message segment size"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:48 sysdeps/names/msg_limits.c:59
-msgid "Number of system message headers"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "K_Flags"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Min_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Maj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "CMin_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "CMaj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_ESP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_EIP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "NWChan"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:46
-msgid "WChan"
-msgstr ""
-
-#. K_Flags
-#: sysdeps/names/prockernel.c:52
-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:61
-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:64
-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:67
-msgid "The number of minor faults that the process and its children have made."
-msgstr ""
-
-#. CMaj_Flt
-#: sysdeps/names/prockernel.c:70
-msgid "The number of major faults that the process and its children have made."
-msgstr ""
-
-#. KStk_ESP
-#: sysdeps/names/prockernel.c:73
-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:76
-msgid "The current EIP (32-bit instruction pointer)."
-msgstr ""
-
-#. NWChan
-#: sysdeps/names/prockernel.c:78
-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:83
-msgid "This is the textual name of the `nwchan' field."
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Virtual"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Resident"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Share"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size Limit"
-msgstr ""
-
-#: sysdeps/names/procmem.c:55
-msgid "Total # of pages of memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:56
-msgid "Number of pages of virtual memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:57
-msgid "Number of resident set (non-swapped) pages"
-msgstr ""
-
-#: sysdeps/names/procmem.c:58
-msgid "Number of pages of shared (mmap'd) memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:59
-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 Mxico, 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:64
-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:50
-msgid "Text_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "ShLib_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Data_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Stack_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Dirty Size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Start_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "End_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "End_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_Stack"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_MMap"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53 sysdeps/names/procsegment.c:72
-msgid "Arg_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:73
-msgid "Arg_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:74
-msgid "Env_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:75
-msgid "Env_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:59
-msgid "Text resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:60
-msgid "Shared-Lib resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:61
-msgid "Data resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:62
-msgid "Stack resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:63
-msgid "Total size of dirty pages"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:64
-msgid "Address of beginning of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:65
-msgid "Address of end of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:66
-msgid "Address of beginning of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:67
-msgid "Address of end of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:68
-msgid "Brk_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:69
-msgid "Brk_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:70
-msgid "Address of the bottom of stack segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:71
-msgid "Start of mmap()ed areas"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Signal"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Blocked"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigIgnore"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigCatch"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:47
-msgid "Mask of pending signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:48
-msgid "Mask of blocked signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:49
-msgid "Mask of ignored signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:50
-msgid "Mask of caught signals"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "Cmd"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "State"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "UID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "GID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "RUID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "RGID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Has CPU"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:47
-msgid "Last Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:52
-msgid "Basename of executable file in call to exec()"
-msgstr ""
-
-#: sysdeps/names/procstate.c:53
-msgid "Single-Char code for process state (S=sleeping)"
-msgstr ""
-
-#: sysdeps/names/procstate.c:54
-msgid "effective UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:55
-msgid "effective GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:56
-msgid "real UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:57
-msgid "real GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:58
-msgid "has_cpu"
-msgstr ""
-
-#: sysdeps/names/procstate.c:59
-msgid "processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:60
-msgid "last_processor"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "Start_Time"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "RTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CUTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CSTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "TimeOut"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "It_Real_Value"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "Frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:49
-msgid "XCPU_Flags"
-msgstr ""
-
-#: sysdeps/names/proctime.c:54
-msgid "Start time of process in seconds since the epoch"
-msgstr ""
-
-#: sysdeps/names/proctime.c:55
-msgid "Real time accumulated by process (should be utime + stime)"
-msgstr ""
-
-#: sysdeps/names/proctime.c:56
-msgid "user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:57
-msgid "kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:58
-msgid "cumulative utime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:59
-msgid "cumulative stime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:60
-msgid "The time (in jiffies) of the process's next timeout"
-msgstr ""
-
-#: sysdeps/names/proctime.c:61
-msgid ""
-"The time (in jiffies) before the next SIGALRM is sent to the process due to "
-"an interval timer."
-msgstr ""
-
-#: sysdeps/names/proctime.c:63
-msgid "Tick frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:64
-msgid "SMP user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:65
-msgid "SMP kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Uid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Gid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "SUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "SGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "Pid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PPid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PGrp"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Session"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Tty"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "TPGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Nice"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "NGroups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:52
-msgid "Groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:57
-msgid "User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:58
-msgid "Effective User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:59
-msgid "Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:60
-msgid "Effective Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:61
-msgid "Saved User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:62
-msgid "Saved Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:63
-msgid "Filesystem User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:64
-msgid "Filesystem Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:65
-msgid "Process ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:66
-msgid "PID of parent process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:67
-msgid "Process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:68
-msgid "Session ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:69
-msgid "Full device number of controlling terminal"
-msgstr ""
-
-#: sysdeps/names/procuid.c:70
-msgid "Terminal process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:71
-msgid "Kernel scheduling priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:72
-msgid "Standard unix nice level of process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:73
-msgid "Number of additional process groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:74
-msgid "Additional process groups"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
-msgid "Number of entries in semaphore map"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
-msgid "Max number of arrays"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
-msgid "Max semaphores system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
-msgid "Number of undo structures system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
-msgid "Max semaphores per array"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
-msgid "Max ops per semop call"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
-msgid "Max number of undo entries per process"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
-msgid "sizeof struct sem_undo"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:52 sysdeps/names/sem_limits.c:66
-msgid "Semaphore max value"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:53 sysdeps/names/sem_limits.c:67
-msgid "Adjust on exit max value"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
-msgid "Max segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
-msgid "Min segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
-msgid "Max number of segments"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:44 sysdeps/names/shm_limits.c:53
-msgid "Max shared segments per process"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:45 sysdeps/names/shm_limits.c:54
-msgid "Max total shared memory"
-msgstr ""
-
-#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
-msgid "Total Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:42 sysdeps/names/swap.c:51
-msgid "Used Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:43 sysdeps/names/swap.c:52
-msgid "Free Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:44
-msgid "Page In"
-msgstr ""
-
-#: sysdeps/names/swap.c:45
-msgid "Page Out"
-msgstr ""
-
-#: sysdeps/names/swap.c:53
-msgid "Total number of swap pages that have been brought in since system boot"
-msgstr ""
-
-#: sysdeps/names/swap.c:55
-msgid "Total number of swap pages that have been brought out since system boot"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:82
-msgid "Server Features"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:54
-msgid "Pointer Size"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:84
-msgid "CPU Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:85
-msgid "Memory Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:86
-msgid "Swap Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:87
-msgid "System Uptime"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:88
-msgid "Load Averange"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:89
-msgid "Shared Memory Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:90
-msgid "Message Queue Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:91
-msgid "Semaphore Set Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:92
-msgid "List of running Processes"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:93
-msgid "Process Status information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:94
-msgid "Process UID and TTY information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:66 sysdeps/names/sysdeps.c:95
-msgid "Process Memory information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:96
-msgid "Process Time information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:68 sysdeps/names/sysdeps.c:97
-msgid "Process Signal information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:98
-msgid "Process Kernel Data information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:99
-msgid "Process Segment information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:71
-msgid "Process Arguments"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:72 sysdeps/names/sysdeps.c:101
-msgid "Process Memory Map"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:73
-msgid "Mount List"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:74 sysdeps/names/sysdeps.c:103
-msgid "File System Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:75 sysdeps/names/sysdeps.c:104
-msgid "Network Load"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:76 sysdeps/names/sysdeps.c:105
-msgid "Interface Names"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:77 sysdeps/names/sysdeps.c:106
-msgid "PPP Statistics"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:83
-msgid "Pointer Size on the Server (in bits)"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:100
-msgid "Command line arguments of the process"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:102
-msgid "List of currently mounted filesystems"
-msgstr ""
-
-#: sysdeps/names/uptime.c:40
-msgid "Uptime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:41
-msgid "Idletime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:42
-msgid "Boot time"
-msgstr ""
-
-#: sysdeps/names/uptime.c:47
-msgid "Time in seconds since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:48
-msgid "Time in seconds the system spent in the idle task since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:49
-msgid "Boot time (seconds sice epoch)"
-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/errors.c:31
-msgid "No error"
-msgstr ""
-
-#: lib/errors.c:32
-msgid "Unknown error"
-msgstr ""
-
-#: lib/errors.c:33
-msgid "Invalid argument"
-msgstr ""
-
-#: lib/errors.c:34
-msgid "No such parameter"
-msgstr ""
-
-#: lib/errors.c:35
-msgid "Attempted to modify a read-only value"
-msgstr ""
-
-#: lib/errors.c:36
-msgid "Parameter size mismatch"
-msgstr ""
-
-#: lib/errors.c:37
-msgid "Communication with LibGTop server failed"
-msgstr ""
-
-#: lib/errors.c:38
-msgid "No such process"
-msgstr ""
-
-#: lib/errors.c:39
-msgid "No kernel support"
-msgstr ""
-
-#: lib/errors.c:40
-msgid "Incompatible kernel version"
-msgstr ""
diff --git a/po/es_PA.po b/po/es_PA.po
deleted file mode 100644
index 45a28ece..00000000
--- a/po/es_PA.po
+++ /dev/null
@@ -1,1186 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: glibtop cvs\n"
-"POT-Creation-Date: 2000-02-23 00:23+0100\n"
-"PO-Revision-Date: 1998-12-13 04:38+0100\n"
-"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: sysdeps/names/cpu.c:45
-msgid "Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:46
-msgid "CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:47
-msgid "CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:48
-msgid "CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:49
-msgid "CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:50
-msgid "Tick Frequency"
-msgstr ""
-
-#: sysdeps/names/cpu.c:51
-msgid "SMP Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:52
-msgid "SMP CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:53
-msgid "SMP CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:54
-msgid "SMP CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:55
-msgid "SMP CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:56 sysdeps/names/cpu.c:72 sysdeps/names/proctime.c:66
-msgid "SMP CPU Flags"
-msgstr ""
-
-#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
-msgid "Number of clock ticks since system boot"
-msgstr ""
-
-#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
-msgid "Number of clock ticks the system spent in user mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:63 sysdeps/names/cpu.c:69
-msgid "Number of clock ticks the system spent in user mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:64 sysdeps/names/cpu.c:70
-msgid "Number of clock ticks the system spent in system mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:65 sysdeps/names/cpu.c:71
-msgid "Number of clock ticks the system spent in the idle task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:66
-msgid "Tick frequency (default is 100)"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:41 sysdeps/names/fsusage.c:50
-msgid "Total blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:42
-msgid "Free blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:43
-msgid "Available blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:44 sysdeps/names/fsusage.c:53
-msgid "Total file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:45 sysdeps/names/fsusage.c:54
-msgid "Free file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:51
-msgid "Free blocks available to the superuser"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:52
-msgid "Free blocks available to non-superusers"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:41
-msgid "Load Average"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:42
-msgid "Running Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:43
-msgid "Number of Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:44 sysdeps/names/loadavg.c:52
-msgid "Last PID"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:49
-msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:50
-msgid "Number of tasks currently running"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:51
-msgid "Total number of tasks"
-msgstr ""
-
-#: sysdeps/names/mem.c:43
-msgid "Total Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:44
-msgid "Used Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:45
-msgid "Free Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:46
-msgid "Shared Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:47
-msgid "Buffers"
-msgstr ""
-
-#: sysdeps/names/mem.c:48
-msgid "Cached"
-msgstr ""
-
-#: sysdeps/names/mem.c:49
-msgid "User"
-msgstr ""
-
-#: sysdeps/names/mem.c:50
-msgid "Locked"
-msgstr ""
-
-#: sysdeps/names/mem.c:55
-msgid "Total physical memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:56
-msgid "Used memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:57
-msgid "Free memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:58
-msgid "Shared memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:59
-msgid "Size of buffers kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:60
-msgid "Size of cached memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:61
-msgid "Memory used from user processes in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:62
-msgid "Memory in locked pages in kB"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
-msgid "Size in kilobytes of message pool"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
-msgid "Number of entries in message map"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
-msgid "Max size of message"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
-msgid "Default max size of queue"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
-msgid "Max queues system wide"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:47 sysdeps/names/msg_limits.c:58
-msgid "Message segment size"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:48 sysdeps/names/msg_limits.c:59
-msgid "Number of system message headers"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "K_Flags"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Min_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Maj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "CMin_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "CMaj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_ESP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_EIP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "NWChan"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:46
-msgid "WChan"
-msgstr ""
-
-#. K_Flags
-#: sysdeps/names/prockernel.c:52
-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:61
-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:64
-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:67
-msgid "The number of minor faults that the process and its children have made."
-msgstr ""
-
-#. CMaj_Flt
-#: sysdeps/names/prockernel.c:70
-msgid "The number of major faults that the process and its children have made."
-msgstr ""
-
-#. KStk_ESP
-#: sysdeps/names/prockernel.c:73
-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:76
-msgid "The current EIP (32-bit instruction pointer)."
-msgstr ""
-
-#. NWChan
-#: sysdeps/names/prockernel.c:78
-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:83
-msgid "This is the textual name of the `nwchan' field."
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Virtual"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Resident"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Share"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size Limit"
-msgstr ""
-
-#: sysdeps/names/procmem.c:55
-msgid "Total # of pages of memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:56
-msgid "Number of pages of virtual memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:57
-msgid "Number of resident set (non-swapped) pages"
-msgstr ""
-
-#: sysdeps/names/procmem.c:58
-msgid "Number of pages of shared (mmap'd) memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:59
-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 Mxico, 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:64
-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:50
-msgid "Text_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "ShLib_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Data_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Stack_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Dirty Size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Start_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "End_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "End_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_Stack"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_MMap"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53 sysdeps/names/procsegment.c:72
-msgid "Arg_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:73
-msgid "Arg_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:74
-msgid "Env_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:75
-msgid "Env_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:59
-msgid "Text resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:60
-msgid "Shared-Lib resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:61
-msgid "Data resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:62
-msgid "Stack resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:63
-msgid "Total size of dirty pages"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:64
-msgid "Address of beginning of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:65
-msgid "Address of end of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:66
-msgid "Address of beginning of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:67
-msgid "Address of end of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:68
-msgid "Brk_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:69
-msgid "Brk_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:70
-msgid "Address of the bottom of stack segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:71
-msgid "Start of mmap()ed areas"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Signal"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Blocked"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigIgnore"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigCatch"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:47
-msgid "Mask of pending signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:48
-msgid "Mask of blocked signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:49
-msgid "Mask of ignored signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:50
-msgid "Mask of caught signals"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "Cmd"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "State"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "UID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "GID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "RUID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "RGID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Has CPU"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:47
-msgid "Last Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:52
-msgid "Basename of executable file in call to exec()"
-msgstr ""
-
-#: sysdeps/names/procstate.c:53
-msgid "Single-Char code for process state (S=sleeping)"
-msgstr ""
-
-#: sysdeps/names/procstate.c:54
-msgid "effective UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:55
-msgid "effective GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:56
-msgid "real UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:57
-msgid "real GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:58
-msgid "has_cpu"
-msgstr ""
-
-#: sysdeps/names/procstate.c:59
-msgid "processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:60
-msgid "last_processor"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "Start_Time"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "RTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CUTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CSTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "TimeOut"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "It_Real_Value"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "Frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:49
-msgid "XCPU_Flags"
-msgstr ""
-
-#: sysdeps/names/proctime.c:54
-msgid "Start time of process in seconds since the epoch"
-msgstr ""
-
-#: sysdeps/names/proctime.c:55
-msgid "Real time accumulated by process (should be utime + stime)"
-msgstr ""
-
-#: sysdeps/names/proctime.c:56
-msgid "user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:57
-msgid "kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:58
-msgid "cumulative utime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:59
-msgid "cumulative stime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:60
-msgid "The time (in jiffies) of the process's next timeout"
-msgstr ""
-
-#: sysdeps/names/proctime.c:61
-msgid ""
-"The time (in jiffies) before the next SIGALRM is sent to the process due to "
-"an interval timer."
-msgstr ""
-
-#: sysdeps/names/proctime.c:63
-msgid "Tick frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:64
-msgid "SMP user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:65
-msgid "SMP kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Uid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Gid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "SUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "SGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "Pid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PPid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PGrp"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Session"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Tty"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "TPGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Nice"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "NGroups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:52
-msgid "Groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:57
-msgid "User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:58
-msgid "Effective User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:59
-msgid "Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:60
-msgid "Effective Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:61
-msgid "Saved User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:62
-msgid "Saved Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:63
-msgid "Filesystem User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:64
-msgid "Filesystem Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:65
-msgid "Process ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:66
-msgid "PID of parent process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:67
-msgid "Process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:68
-msgid "Session ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:69
-msgid "Full device number of controlling terminal"
-msgstr ""
-
-#: sysdeps/names/procuid.c:70
-msgid "Terminal process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:71
-msgid "Kernel scheduling priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:72
-msgid "Standard unix nice level of process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:73
-msgid "Number of additional process groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:74
-msgid "Additional process groups"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
-msgid "Number of entries in semaphore map"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
-msgid "Max number of arrays"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
-msgid "Max semaphores system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
-msgid "Number of undo structures system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
-msgid "Max semaphores per array"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
-msgid "Max ops per semop call"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
-msgid "Max number of undo entries per process"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
-msgid "sizeof struct sem_undo"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:52 sysdeps/names/sem_limits.c:66
-msgid "Semaphore max value"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:53 sysdeps/names/sem_limits.c:67
-msgid "Adjust on exit max value"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
-msgid "Max segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
-msgid "Min segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
-msgid "Max number of segments"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:44 sysdeps/names/shm_limits.c:53
-msgid "Max shared segments per process"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:45 sysdeps/names/shm_limits.c:54
-msgid "Max total shared memory"
-msgstr ""
-
-#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
-msgid "Total Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:42 sysdeps/names/swap.c:51
-msgid "Used Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:43 sysdeps/names/swap.c:52
-msgid "Free Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:44
-msgid "Page In"
-msgstr ""
-
-#: sysdeps/names/swap.c:45
-msgid "Page Out"
-msgstr ""
-
-#: sysdeps/names/swap.c:53
-msgid "Total number of swap pages that have been brought in since system boot"
-msgstr ""
-
-#: sysdeps/names/swap.c:55
-msgid "Total number of swap pages that have been brought out since system boot"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:82
-msgid "Server Features"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:54
-msgid "Pointer Size"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:84
-msgid "CPU Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:85
-msgid "Memory Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:86
-msgid "Swap Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:87
-msgid "System Uptime"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:88
-msgid "Load Averange"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:89
-msgid "Shared Memory Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:90
-msgid "Message Queue Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:91
-msgid "Semaphore Set Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:92
-msgid "List of running Processes"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:93
-msgid "Process Status information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:94
-msgid "Process UID and TTY information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:66 sysdeps/names/sysdeps.c:95
-msgid "Process Memory information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:96
-msgid "Process Time information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:68 sysdeps/names/sysdeps.c:97
-msgid "Process Signal information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:98
-msgid "Process Kernel Data information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:99
-msgid "Process Segment information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:71
-msgid "Process Arguments"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:72 sysdeps/names/sysdeps.c:101
-msgid "Process Memory Map"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:73
-msgid "Mount List"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:74 sysdeps/names/sysdeps.c:103
-msgid "File System Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:75 sysdeps/names/sysdeps.c:104
-msgid "Network Load"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:76 sysdeps/names/sysdeps.c:105
-msgid "Interface Names"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:77 sysdeps/names/sysdeps.c:106
-msgid "PPP Statistics"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:83
-msgid "Pointer Size on the Server (in bits)"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:100
-msgid "Command line arguments of the process"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:102
-msgid "List of currently mounted filesystems"
-msgstr ""
-
-#: sysdeps/names/uptime.c:40
-msgid "Uptime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:41
-msgid "Idletime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:42
-msgid "Boot time"
-msgstr ""
-
-#: sysdeps/names/uptime.c:47
-msgid "Time in seconds since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:48
-msgid "Time in seconds the system spent in the idle task since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:49
-msgid "Boot time (seconds sice epoch)"
-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/errors.c:31
-msgid "No error"
-msgstr ""
-
-#: lib/errors.c:32
-msgid "Unknown error"
-msgstr ""
-
-#: lib/errors.c:33
-msgid "Invalid argument"
-msgstr ""
-
-#: lib/errors.c:34
-msgid "No such parameter"
-msgstr ""
-
-#: lib/errors.c:35
-msgid "Attempted to modify a read-only value"
-msgstr ""
-
-#: lib/errors.c:36
-msgid "Parameter size mismatch"
-msgstr ""
-
-#: lib/errors.c:37
-msgid "Communication with LibGTop server failed"
-msgstr ""
-
-#: lib/errors.c:38
-msgid "No such process"
-msgstr ""
-
-#: lib/errors.c:39
-msgid "No kernel support"
-msgstr ""
-
-#: lib/errors.c:40
-msgid "Incompatible kernel version"
-msgstr ""
diff --git a/po/es_PE.po b/po/es_PE.po
deleted file mode 100644
index 45a28ece..00000000
--- a/po/es_PE.po
+++ /dev/null
@@ -1,1186 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: glibtop cvs\n"
-"POT-Creation-Date: 2000-02-23 00:23+0100\n"
-"PO-Revision-Date: 1998-12-13 04:38+0100\n"
-"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: sysdeps/names/cpu.c:45
-msgid "Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:46
-msgid "CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:47
-msgid "CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:48
-msgid "CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:49
-msgid "CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:50
-msgid "Tick Frequency"
-msgstr ""
-
-#: sysdeps/names/cpu.c:51
-msgid "SMP Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:52
-msgid "SMP CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:53
-msgid "SMP CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:54
-msgid "SMP CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:55
-msgid "SMP CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:56 sysdeps/names/cpu.c:72 sysdeps/names/proctime.c:66
-msgid "SMP CPU Flags"
-msgstr ""
-
-#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
-msgid "Number of clock ticks since system boot"
-msgstr ""
-
-#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
-msgid "Number of clock ticks the system spent in user mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:63 sysdeps/names/cpu.c:69
-msgid "Number of clock ticks the system spent in user mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:64 sysdeps/names/cpu.c:70
-msgid "Number of clock ticks the system spent in system mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:65 sysdeps/names/cpu.c:71
-msgid "Number of clock ticks the system spent in the idle task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:66
-msgid "Tick frequency (default is 100)"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:41 sysdeps/names/fsusage.c:50
-msgid "Total blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:42
-msgid "Free blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:43
-msgid "Available blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:44 sysdeps/names/fsusage.c:53
-msgid "Total file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:45 sysdeps/names/fsusage.c:54
-msgid "Free file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:51
-msgid "Free blocks available to the superuser"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:52
-msgid "Free blocks available to non-superusers"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:41
-msgid "Load Average"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:42
-msgid "Running Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:43
-msgid "Number of Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:44 sysdeps/names/loadavg.c:52
-msgid "Last PID"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:49
-msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:50
-msgid "Number of tasks currently running"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:51
-msgid "Total number of tasks"
-msgstr ""
-
-#: sysdeps/names/mem.c:43
-msgid "Total Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:44
-msgid "Used Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:45
-msgid "Free Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:46
-msgid "Shared Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:47
-msgid "Buffers"
-msgstr ""
-
-#: sysdeps/names/mem.c:48
-msgid "Cached"
-msgstr ""
-
-#: sysdeps/names/mem.c:49
-msgid "User"
-msgstr ""
-
-#: sysdeps/names/mem.c:50
-msgid "Locked"
-msgstr ""
-
-#: sysdeps/names/mem.c:55
-msgid "Total physical memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:56
-msgid "Used memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:57
-msgid "Free memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:58
-msgid "Shared memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:59
-msgid "Size of buffers kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:60
-msgid "Size of cached memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:61
-msgid "Memory used from user processes in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:62
-msgid "Memory in locked pages in kB"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
-msgid "Size in kilobytes of message pool"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
-msgid "Number of entries in message map"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
-msgid "Max size of message"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
-msgid "Default max size of queue"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
-msgid "Max queues system wide"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:47 sysdeps/names/msg_limits.c:58
-msgid "Message segment size"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:48 sysdeps/names/msg_limits.c:59
-msgid "Number of system message headers"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "K_Flags"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Min_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Maj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "CMin_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "CMaj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_ESP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_EIP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "NWChan"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:46
-msgid "WChan"
-msgstr ""
-
-#. K_Flags
-#: sysdeps/names/prockernel.c:52
-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:61
-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:64
-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:67
-msgid "The number of minor faults that the process and its children have made."
-msgstr ""
-
-#. CMaj_Flt
-#: sysdeps/names/prockernel.c:70
-msgid "The number of major faults that the process and its children have made."
-msgstr ""
-
-#. KStk_ESP
-#: sysdeps/names/prockernel.c:73
-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:76
-msgid "The current EIP (32-bit instruction pointer)."
-msgstr ""
-
-#. NWChan
-#: sysdeps/names/prockernel.c:78
-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:83
-msgid "This is the textual name of the `nwchan' field."
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Virtual"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Resident"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Share"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size Limit"
-msgstr ""
-
-#: sysdeps/names/procmem.c:55
-msgid "Total # of pages of memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:56
-msgid "Number of pages of virtual memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:57
-msgid "Number of resident set (non-swapped) pages"
-msgstr ""
-
-#: sysdeps/names/procmem.c:58
-msgid "Number of pages of shared (mmap'd) memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:59
-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 Mxico, 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:64
-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:50
-msgid "Text_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "ShLib_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Data_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Stack_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Dirty Size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Start_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "End_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "End_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_Stack"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_MMap"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53 sysdeps/names/procsegment.c:72
-msgid "Arg_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:73
-msgid "Arg_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:74
-msgid "Env_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:75
-msgid "Env_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:59
-msgid "Text resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:60
-msgid "Shared-Lib resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:61
-msgid "Data resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:62
-msgid "Stack resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:63
-msgid "Total size of dirty pages"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:64
-msgid "Address of beginning of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:65
-msgid "Address of end of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:66
-msgid "Address of beginning of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:67
-msgid "Address of end of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:68
-msgid "Brk_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:69
-msgid "Brk_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:70
-msgid "Address of the bottom of stack segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:71
-msgid "Start of mmap()ed areas"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Signal"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Blocked"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigIgnore"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigCatch"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:47
-msgid "Mask of pending signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:48
-msgid "Mask of blocked signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:49
-msgid "Mask of ignored signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:50
-msgid "Mask of caught signals"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "Cmd"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "State"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "UID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "GID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "RUID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "RGID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Has CPU"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:47
-msgid "Last Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:52
-msgid "Basename of executable file in call to exec()"
-msgstr ""
-
-#: sysdeps/names/procstate.c:53
-msgid "Single-Char code for process state (S=sleeping)"
-msgstr ""
-
-#: sysdeps/names/procstate.c:54
-msgid "effective UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:55
-msgid "effective GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:56
-msgid "real UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:57
-msgid "real GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:58
-msgid "has_cpu"
-msgstr ""
-
-#: sysdeps/names/procstate.c:59
-msgid "processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:60
-msgid "last_processor"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "Start_Time"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "RTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CUTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CSTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "TimeOut"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "It_Real_Value"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "Frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:49
-msgid "XCPU_Flags"
-msgstr ""
-
-#: sysdeps/names/proctime.c:54
-msgid "Start time of process in seconds since the epoch"
-msgstr ""
-
-#: sysdeps/names/proctime.c:55
-msgid "Real time accumulated by process (should be utime + stime)"
-msgstr ""
-
-#: sysdeps/names/proctime.c:56
-msgid "user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:57
-msgid "kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:58
-msgid "cumulative utime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:59
-msgid "cumulative stime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:60
-msgid "The time (in jiffies) of the process's next timeout"
-msgstr ""
-
-#: sysdeps/names/proctime.c:61
-msgid ""
-"The time (in jiffies) before the next SIGALRM is sent to the process due to "
-"an interval timer."
-msgstr ""
-
-#: sysdeps/names/proctime.c:63
-msgid "Tick frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:64
-msgid "SMP user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:65
-msgid "SMP kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Uid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Gid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "SUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "SGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "Pid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PPid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PGrp"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Session"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Tty"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "TPGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Nice"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "NGroups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:52
-msgid "Groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:57
-msgid "User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:58
-msgid "Effective User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:59
-msgid "Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:60
-msgid "Effective Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:61
-msgid "Saved User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:62
-msgid "Saved Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:63
-msgid "Filesystem User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:64
-msgid "Filesystem Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:65
-msgid "Process ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:66
-msgid "PID of parent process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:67
-msgid "Process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:68
-msgid "Session ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:69
-msgid "Full device number of controlling terminal"
-msgstr ""
-
-#: sysdeps/names/procuid.c:70
-msgid "Terminal process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:71
-msgid "Kernel scheduling priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:72
-msgid "Standard unix nice level of process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:73
-msgid "Number of additional process groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:74
-msgid "Additional process groups"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
-msgid "Number of entries in semaphore map"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
-msgid "Max number of arrays"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
-msgid "Max semaphores system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
-msgid "Number of undo structures system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
-msgid "Max semaphores per array"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
-msgid "Max ops per semop call"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
-msgid "Max number of undo entries per process"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
-msgid "sizeof struct sem_undo"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:52 sysdeps/names/sem_limits.c:66
-msgid "Semaphore max value"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:53 sysdeps/names/sem_limits.c:67
-msgid "Adjust on exit max value"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
-msgid "Max segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
-msgid "Min segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
-msgid "Max number of segments"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:44 sysdeps/names/shm_limits.c:53
-msgid "Max shared segments per process"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:45 sysdeps/names/shm_limits.c:54
-msgid "Max total shared memory"
-msgstr ""
-
-#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
-msgid "Total Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:42 sysdeps/names/swap.c:51
-msgid "Used Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:43 sysdeps/names/swap.c:52
-msgid "Free Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:44
-msgid "Page In"
-msgstr ""
-
-#: sysdeps/names/swap.c:45
-msgid "Page Out"
-msgstr ""
-
-#: sysdeps/names/swap.c:53
-msgid "Total number of swap pages that have been brought in since system boot"
-msgstr ""
-
-#: sysdeps/names/swap.c:55
-msgid "Total number of swap pages that have been brought out since system boot"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:82
-msgid "Server Features"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:54
-msgid "Pointer Size"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:84
-msgid "CPU Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:85
-msgid "Memory Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:86
-msgid "Swap Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:87
-msgid "System Uptime"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:88
-msgid "Load Averange"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:89
-msgid "Shared Memory Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:90
-msgid "Message Queue Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:91
-msgid "Semaphore Set Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:92
-msgid "List of running Processes"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:93
-msgid "Process Status information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:94
-msgid "Process UID and TTY information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:66 sysdeps/names/sysdeps.c:95
-msgid "Process Memory information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:96
-msgid "Process Time information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:68 sysdeps/names/sysdeps.c:97
-msgid "Process Signal information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:98
-msgid "Process Kernel Data information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:99
-msgid "Process Segment information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:71
-msgid "Process Arguments"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:72 sysdeps/names/sysdeps.c:101
-msgid "Process Memory Map"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:73
-msgid "Mount List"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:74 sysdeps/names/sysdeps.c:103
-msgid "File System Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:75 sysdeps/names/sysdeps.c:104
-msgid "Network Load"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:76 sysdeps/names/sysdeps.c:105
-msgid "Interface Names"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:77 sysdeps/names/sysdeps.c:106
-msgid "PPP Statistics"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:83
-msgid "Pointer Size on the Server (in bits)"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:100
-msgid "Command line arguments of the process"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:102
-msgid "List of currently mounted filesystems"
-msgstr ""
-
-#: sysdeps/names/uptime.c:40
-msgid "Uptime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:41
-msgid "Idletime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:42
-msgid "Boot time"
-msgstr ""
-
-#: sysdeps/names/uptime.c:47
-msgid "Time in seconds since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:48
-msgid "Time in seconds the system spent in the idle task since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:49
-msgid "Boot time (seconds sice epoch)"
-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/errors.c:31
-msgid "No error"
-msgstr ""
-
-#: lib/errors.c:32
-msgid "Unknown error"
-msgstr ""
-
-#: lib/errors.c:33
-msgid "Invalid argument"
-msgstr ""
-
-#: lib/errors.c:34
-msgid "No such parameter"
-msgstr ""
-
-#: lib/errors.c:35
-msgid "Attempted to modify a read-only value"
-msgstr ""
-
-#: lib/errors.c:36
-msgid "Parameter size mismatch"
-msgstr ""
-
-#: lib/errors.c:37
-msgid "Communication with LibGTop server failed"
-msgstr ""
-
-#: lib/errors.c:38
-msgid "No such process"
-msgstr ""
-
-#: lib/errors.c:39
-msgid "No kernel support"
-msgstr ""
-
-#: lib/errors.c:40
-msgid "Incompatible kernel version"
-msgstr ""
diff --git a/po/es_SV.po b/po/es_SV.po
deleted file mode 100644
index 45a28ece..00000000
--- a/po/es_SV.po
+++ /dev/null
@@ -1,1186 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: glibtop cvs\n"
-"POT-Creation-Date: 2000-02-23 00:23+0100\n"
-"PO-Revision-Date: 1998-12-13 04:38+0100\n"
-"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: sysdeps/names/cpu.c:45
-msgid "Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:46
-msgid "CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:47
-msgid "CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:48
-msgid "CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:49
-msgid "CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:50
-msgid "Tick Frequency"
-msgstr ""
-
-#: sysdeps/names/cpu.c:51
-msgid "SMP Total CPU Time"
-msgstr ""
-
-#: sysdeps/names/cpu.c:52
-msgid "SMP CPU Time in User Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:53
-msgid "SMP CPU Time in User Mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:54
-msgid "SMP CPU Time in System Mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:55
-msgid "SMP CPU Time in the Idle Task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:56 sysdeps/names/cpu.c:72 sysdeps/names/proctime.c:66
-msgid "SMP CPU Flags"
-msgstr ""
-
-#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
-msgid "Number of clock ticks since system boot"
-msgstr ""
-
-#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
-msgid "Number of clock ticks the system spent in user mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:63 sysdeps/names/cpu.c:69
-msgid "Number of clock ticks the system spent in user mode (nice)"
-msgstr ""
-
-#: sysdeps/names/cpu.c:64 sysdeps/names/cpu.c:70
-msgid "Number of clock ticks the system spent in system mode"
-msgstr ""
-
-#: sysdeps/names/cpu.c:65 sysdeps/names/cpu.c:71
-msgid "Number of clock ticks the system spent in the idle task"
-msgstr ""
-
-#: sysdeps/names/cpu.c:66
-msgid "Tick frequency (default is 100)"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:41 sysdeps/names/fsusage.c:50
-msgid "Total blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:42
-msgid "Free blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:43
-msgid "Available blocks"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:44 sysdeps/names/fsusage.c:53
-msgid "Total file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:45 sysdeps/names/fsusage.c:54
-msgid "Free file nodes"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:51
-msgid "Free blocks available to the superuser"
-msgstr ""
-
-#: sysdeps/names/fsusage.c:52
-msgid "Free blocks available to non-superusers"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:41
-msgid "Load Average"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:42
-msgid "Running Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:43
-msgid "Number of Tasks"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:44 sysdeps/names/loadavg.c:52
-msgid "Last PID"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:49
-msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:50
-msgid "Number of tasks currently running"
-msgstr ""
-
-#: sysdeps/names/loadavg.c:51
-msgid "Total number of tasks"
-msgstr ""
-
-#: sysdeps/names/mem.c:43
-msgid "Total Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:44
-msgid "Used Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:45
-msgid "Free Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:46
-msgid "Shared Memory"
-msgstr ""
-
-#: sysdeps/names/mem.c:47
-msgid "Buffers"
-msgstr ""
-
-#: sysdeps/names/mem.c:48
-msgid "Cached"
-msgstr ""
-
-#: sysdeps/names/mem.c:49
-msgid "User"
-msgstr ""
-
-#: sysdeps/names/mem.c:50
-msgid "Locked"
-msgstr ""
-
-#: sysdeps/names/mem.c:55
-msgid "Total physical memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:56
-msgid "Used memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:57
-msgid "Free memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:58
-msgid "Shared memory size in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:59
-msgid "Size of buffers kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:60
-msgid "Size of cached memory in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:61
-msgid "Memory used from user processes in kB"
-msgstr ""
-
-#: sysdeps/names/mem.c:62
-msgid "Memory in locked pages in kB"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
-msgid "Size in kilobytes of message pool"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
-msgid "Number of entries in message map"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
-msgid "Max size of message"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
-msgid "Default max size of queue"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
-msgid "Max queues system wide"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:47 sysdeps/names/msg_limits.c:58
-msgid "Message segment size"
-msgstr ""
-
-#: sysdeps/names/msg_limits.c:48 sysdeps/names/msg_limits.c:59
-msgid "Number of system message headers"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "K_Flags"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Min_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "Maj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:44
-msgid "CMin_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "CMaj_Flt"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_ESP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "KStk_EIP"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:45
-msgid "NWChan"
-msgstr ""
-
-#: sysdeps/names/prockernel.c:46
-msgid "WChan"
-msgstr ""
-
-#. K_Flags
-#: sysdeps/names/prockernel.c:52
-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:61
-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:64
-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:67
-msgid "The number of minor faults that the process and its children have made."
-msgstr ""
-
-#. CMaj_Flt
-#: sysdeps/names/prockernel.c:70
-msgid "The number of major faults that the process and its children have made."
-msgstr ""
-
-#. KStk_ESP
-#: sysdeps/names/prockernel.c:73
-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:76
-msgid "The current EIP (32-bit instruction pointer)."
-msgstr ""
-
-#. NWChan
-#: sysdeps/names/prockernel.c:78
-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:83
-msgid "This is the textual name of the `nwchan' field."
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Virtual"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Resident"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
-msgid "Share"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:50
-msgid "Resident Set Size Limit"
-msgstr ""
-
-#: sysdeps/names/procmem.c:55
-msgid "Total # of pages of memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:56
-msgid "Number of pages of virtual memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:57
-msgid "Number of resident set (non-swapped) pages"
-msgstr ""
-
-#: sysdeps/names/procmem.c:58
-msgid "Number of pages of shared (mmap'd) memory"
-msgstr ""
-
-#: sysdeps/names/procmem.c:59
-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 Mxico, 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:64
-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:50
-msgid "Text_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "ShLib_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Data_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:50
-msgid "Stack_RSS"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Dirty Size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "Start_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:51
-msgid "End_Code"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "End_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_Stack"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
-msgid "Start_MMap"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53 sysdeps/names/procsegment.c:72
-msgid "Arg_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:73
-msgid "Arg_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:74
-msgid "Env_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:75
-msgid "Env_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:59
-msgid "Text resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:60
-msgid "Shared-Lib resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:61
-msgid "Data resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:62
-msgid "Stack resident set size"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:63
-msgid "Total size of dirty pages"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:64
-msgid "Address of beginning of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:65
-msgid "Address of end of code segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:66
-msgid "Address of beginning of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:67
-msgid "Address of end of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:68
-msgid "Brk_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:69
-msgid "Brk_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:70
-msgid "Address of the bottom of stack segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:71
-msgid "Start of mmap()ed areas"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Signal"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "Blocked"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigIgnore"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
-msgid "SigCatch"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:47
-msgid "Mask of pending signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:48
-msgid "Mask of blocked signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:49
-msgid "Mask of ignored signals"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:50
-msgid "Mask of caught signals"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "Cmd"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "State"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "UID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "GID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:45
-msgid "RUID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "RGID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Has CPU"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:47
-msgid "Last Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:52
-msgid "Basename of executable file in call to exec()"
-msgstr ""
-
-#: sysdeps/names/procstate.c:53
-msgid "Single-Char code for process state (S=sleeping)"
-msgstr ""
-
-#: sysdeps/names/procstate.c:54
-msgid "effective UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:55
-msgid "effective GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:56
-msgid "real UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:57
-msgid "real GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:58
-msgid "has_cpu"
-msgstr ""
-
-#: sysdeps/names/procstate.c:59
-msgid "processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:60
-msgid "last_processor"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "Start_Time"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "RTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:46
-msgid "STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CUTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "CSTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "TimeOut"
-msgstr ""
-
-#: sysdeps/names/proctime.c:47
-msgid "It_Real_Value"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "Frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_UTime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:48
-msgid "XCPU_STime"
-msgstr ""
-
-#: sysdeps/names/proctime.c:49
-msgid "XCPU_Flags"
-msgstr ""
-
-#: sysdeps/names/proctime.c:54
-msgid "Start time of process in seconds since the epoch"
-msgstr ""
-
-#: sysdeps/names/proctime.c:55
-msgid "Real time accumulated by process (should be utime + stime)"
-msgstr ""
-
-#: sysdeps/names/proctime.c:56
-msgid "user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:57
-msgid "kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:58
-msgid "cumulative utime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:59
-msgid "cumulative stime of process and reaped children"
-msgstr ""
-
-#: sysdeps/names/proctime.c:60
-msgid "The time (in jiffies) of the process's next timeout"
-msgstr ""
-
-#: sysdeps/names/proctime.c:61
-msgid ""
-"The time (in jiffies) before the next SIGALRM is sent to the process due to "
-"an interval timer."
-msgstr ""
-
-#: sysdeps/names/proctime.c:63
-msgid "Tick frequency"
-msgstr ""
-
-#: sysdeps/names/proctime.c:64
-msgid "SMP user-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/proctime.c:65
-msgid "SMP kernel-mode CPU time accumulated by process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Uid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "Gid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "EGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:48
-msgid "SUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "SGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "Pid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PPid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "PGrp"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Session"
-msgstr ""
-
-#: sysdeps/names/procuid.c:50
-msgid "Tty"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "TPGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Nice"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "NGroups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:52
-msgid "Groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:57
-msgid "User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:58
-msgid "Effective User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:59
-msgid "Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:60
-msgid "Effective Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:61
-msgid "Saved User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:62
-msgid "Saved Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:63
-msgid "Filesystem User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:64
-msgid "Filesystem Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:65
-msgid "Process ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:66
-msgid "PID of parent process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:67
-msgid "Process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:68
-msgid "Session ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:69
-msgid "Full device number of controlling terminal"
-msgstr ""
-
-#: sysdeps/names/procuid.c:70
-msgid "Terminal process group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:71
-msgid "Kernel scheduling priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:72
-msgid "Standard unix nice level of process"
-msgstr ""
-
-#: sysdeps/names/procuid.c:73
-msgid "Number of additional process groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:74
-msgid "Additional process groups"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
-msgid "Number of entries in semaphore map"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
-msgid "Max number of arrays"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
-msgid "Max semaphores system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
-msgid "Number of undo structures system wide"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
-msgid "Max semaphores per array"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
-msgid "Max ops per semop call"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
-msgid "Max number of undo entries per process"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
-msgid "sizeof struct sem_undo"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:52 sysdeps/names/sem_limits.c:66
-msgid "Semaphore max value"
-msgstr ""
-
-#: sysdeps/names/sem_limits.c:53 sysdeps/names/sem_limits.c:67
-msgid "Adjust on exit max value"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
-msgid "Max segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
-msgid "Min segment size"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
-msgid "Max number of segments"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:44 sysdeps/names/shm_limits.c:53
-msgid "Max shared segments per process"
-msgstr ""
-
-#: sysdeps/names/shm_limits.c:45 sysdeps/names/shm_limits.c:54
-msgid "Max total shared memory"
-msgstr ""
-
-#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
-msgid "Total Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:42 sysdeps/names/swap.c:51
-msgid "Used Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:43 sysdeps/names/swap.c:52
-msgid "Free Swap Space"
-msgstr ""
-
-#: sysdeps/names/swap.c:44
-msgid "Page In"
-msgstr ""
-
-#: sysdeps/names/swap.c:45
-msgid "Page Out"
-msgstr ""
-
-#: sysdeps/names/swap.c:53
-msgid "Total number of swap pages that have been brought in since system boot"
-msgstr ""
-
-#: sysdeps/names/swap.c:55
-msgid "Total number of swap pages that have been brought out since system boot"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:82
-msgid "Server Features"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:54
-msgid "Pointer Size"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:84
-msgid "CPU Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:85
-msgid "Memory Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:86
-msgid "Swap Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:87
-msgid "System Uptime"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:88
-msgid "Load Averange"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:89
-msgid "Shared Memory Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:90
-msgid "Message Queue Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:91
-msgid "Semaphore Set Limits"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:92
-msgid "List of running Processes"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:93
-msgid "Process Status information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:94
-msgid "Process UID and TTY information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:66 sysdeps/names/sysdeps.c:95
-msgid "Process Memory information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:96
-msgid "Process Time information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:68 sysdeps/names/sysdeps.c:97
-msgid "Process Signal information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:98
-msgid "Process Kernel Data information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:99
-msgid "Process Segment information"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:71
-msgid "Process Arguments"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:72 sysdeps/names/sysdeps.c:101
-msgid "Process Memory Map"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:73
-msgid "Mount List"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:74 sysdeps/names/sysdeps.c:103
-msgid "File System Usage"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:75 sysdeps/names/sysdeps.c:104
-msgid "Network Load"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:76 sysdeps/names/sysdeps.c:105
-msgid "Interface Names"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:77 sysdeps/names/sysdeps.c:106
-msgid "PPP Statistics"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:83
-msgid "Pointer Size on the Server (in bits)"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:100
-msgid "Command line arguments of the process"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:102
-msgid "List of currently mounted filesystems"
-msgstr ""
-
-#: sysdeps/names/uptime.c:40
-msgid "Uptime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:41
-msgid "Idletime"
-msgstr ""
-
-#: sysdeps/names/uptime.c:42
-msgid "Boot time"
-msgstr ""
-
-#: sysdeps/names/uptime.c:47
-msgid "Time in seconds since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:48
-msgid "Time in seconds the system spent in the idle task since system boot"
-msgstr ""
-
-#: sysdeps/names/uptime.c:49
-msgid "Boot time (seconds sice epoch)"
-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/errors.c:31
-msgid "No error"
-msgstr ""
-
-#: lib/errors.c:32
-msgid "Unknown error"
-msgstr ""
-
-#: lib/errors.c:33
-msgid "Invalid argument"
-msgstr ""
-
-#: lib/errors.c:34
-msgid "No such parameter"
-msgstr ""
-
-#: lib/errors.c:35
-msgid "Attempted to modify a read-only value"
-msgstr ""
-
-#: lib/errors.c:36
-msgid "Parameter size mismatch"
-msgstr ""
-
-#: lib/errors.c:37
-msgid "Communication with LibGTop server failed"
-msgstr ""
-
-#: lib/errors.c:38
-msgid "No such process"
-msgstr ""
-
-#: lib/errors.c:39
-msgid "No kernel support"
-msgstr ""
-
-#: lib/errors.c:40
-msgid "Incompatible kernel version"
-msgstr ""
diff --git a/po/es_MX.po b/po/et.po
index 45a28ece..93111364 100644
--- a/po/es_MX.po
+++ b/po/et.po
@@ -1,276 +1,585 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# libgtop eesti tõlge.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgtop package.
+# Tõivo Leedjärv <toivo@linux.ee>, 2003.
#
msgid ""
msgstr ""
-"Project-Id-Version: glibtop cvs\n"
-"POT-Creation-Date: 2000-02-23 00:23+0100\n"
-"PO-Revision-Date: 1998-12-13 04:38+0100\n"
-"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
+"Project-Id-Version: libgtop\n"
+"POT-Creation-Date: 2003-02-24 22:57+0200\n"
+"PO-Revision-Date: 2003-02-25 01:05+0200\n"
+"Last-Translator: Tõivo Leedjärv <toivo@linux.ee>\n"
+"Language-Team: Estonian <gnome-et@linux.ee>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: sysdeps/names/cpu.c:45
-msgid "Total CPU Time"
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
msgstr ""
-#: sysdeps/names/cpu.c:46
-msgid "CPU Time in User Mode"
+#: examples/smp.c:74
+msgid "Total"
+msgstr "Kokku"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "Kasutaja"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
msgstr ""
-#: sysdeps/names/cpu.c:47
-msgid "CPU Time in User Mode (nice)"
+#: examples/smp.c:74
+msgid "Sys"
+msgstr "Süsteem"
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "Kasutamata"
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
msgstr ""
+"Protsessor (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
-#: sysdeps/names/cpu.c:48
-msgid "CPU Time in System Mode"
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "Prots. %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "Protsenti:"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "Kokku (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "Kasutaja (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
msgstr ""
-#: sysdeps/names/cpu.c:49
-msgid "CPU Time in the Idle Task"
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr "Süsteem (%)"
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "Kasutamata (%)"
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
msgstr ""
+"Protsessor (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
-#: sysdeps/names/cpu.c:50
-msgid "Tick Frequency"
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "Prots. %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
msgstr ""
-#: sysdeps/names/cpu.c:51
-msgid "SMP Total CPU Time"
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
msgstr ""
-#: sysdeps/names/cpu.c:52
-msgid "SMP CPU Time in User Mode"
+#: lib/read_data.c:49
+msgid "read data size"
msgstr ""
-#: sysdeps/names/cpu.c:53
-msgid "SMP CPU Time in User Mode (nice)"
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
msgstr ""
-#: sysdeps/names/cpu.c:54
-msgid "SMP CPU Time in System Mode"
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
msgstr ""
-#: sysdeps/names/cpu.c:55
-msgid "SMP CPU Time in the Idle Task"
+#: src/daemon/gnuserv.c:448
+msgid "Enable debugging"
msgstr ""
-#: sysdeps/names/cpu.c:56 sysdeps/names/cpu.c:72 sysdeps/names/proctime.c:66
-msgid "SMP CPU Flags"
+#: src/daemon/gnuserv.c:448
+msgid "DEBUG"
msgstr ""
-#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
+#: src/daemon/gnuserv.c:450
+msgid "Enable verbose output"
+msgstr ""
+
+#: src/daemon/gnuserv.c:450
+msgid "VERBOSE"
+msgstr ""
+
+#: src/daemon/gnuserv.c:452
+msgid "Don't fork into background"
+msgstr ""
+
+#: src/daemon/gnuserv.c:452
+msgid "NO-DAEMON"
+msgstr ""
+
+#: src/daemon/gnuserv.c:454
+msgid "Invoked from inetd"
+msgstr ""
+
+#: src/daemon/gnuserv.c:454
+msgid "INETD"
+msgstr ""
+
+#: src/daemon/gnuserv.c:488
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+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 ""
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr ""
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr ""
+
+#: sysdeps/names/cpu.c:43
+msgid "Total CPU Time"
+msgstr "Protsessori aeg kokku"
+
+#: sysdeps/names/cpu.c:44
+msgid "CPU Time in User Mode"
+msgstr "Protsessori aeg kasutajale"
+
+#: sysdeps/names/cpu.c:45
+msgid "CPU Time in User Mode (nice)"
+msgstr "Protsessori aeg kasutajale (nice)"
+
+#: sysdeps/names/cpu.c:46
+msgid "CPU Time in System Mode"
+msgstr "Protsessori aeg süsteemile"
+
+#: sysdeps/names/cpu.c:47
+msgid "CPU Time in the Idle Task"
+msgstr "Protsessori aeg jõude"
+
+#: sysdeps/names/cpu.c:48
+msgid "Tick Frequency"
+msgstr ""
+
+#: sysdeps/names/cpu.c:49
+msgid "SMP Total CPU Time"
+msgstr "SMP protsessori aeg kokku"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "SMP Protsessori aeg kasutajale"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "SMP Protsessori aeg kasutajale (nice)"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "SMP Protsessori aeg süsteemile"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "SMP Protsessori aeg jõude"
+
+#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
msgid "Number of clock ticks since system boot"
msgstr ""
-#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
+#: 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:63 sysdeps/names/cpu.c:69
+#: 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:64 sysdeps/names/cpu.c:70
+#: 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:65 sysdeps/names/cpu.c:71
+#: 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:66
+#: sysdeps/names/cpu.c:63
msgid "Tick frequency (default is 100)"
msgstr ""
-#: sysdeps/names/fsusage.c:41 sysdeps/names/fsusage.c:50
+#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
msgid "Total blocks"
-msgstr ""
+msgstr "Blokke kokku"
-#: sysdeps/names/fsusage.c:42
+#: sysdeps/names/fsusage.c:40
msgid "Free blocks"
-msgstr ""
+msgstr "Blokke vaba"
-#: sysdeps/names/fsusage.c:43
+#: sysdeps/names/fsusage.c:41
msgid "Available blocks"
-msgstr ""
+msgstr "Saadaval blokke"
-#: sysdeps/names/fsusage.c:44 sysdeps/names/fsusage.c:53
+#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
msgid "Total file nodes"
-msgstr ""
+msgstr "Failisõlmi kokku"
-#: sysdeps/names/fsusage.c:45 sysdeps/names/fsusage.c:54
+#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
msgid "Free file nodes"
-msgstr ""
+msgstr "Failisõlmi vaba"
-#: sysdeps/names/fsusage.c:51
+#: sysdeps/names/fsusage.c:49
msgid "Free blocks available to the superuser"
-msgstr ""
+msgstr "Vabu blokke saadaval juurkasutajale"
-#: sysdeps/names/fsusage.c:52
+#: sysdeps/names/fsusage.c:50
msgid "Free blocks available to non-superusers"
-msgstr ""
+msgstr "Vabu blokke saadaval tavakasutajatele"
-#: sysdeps/names/loadavg.c:41
+#: sysdeps/names/loadavg.c:39
msgid "Load Average"
-msgstr ""
+msgstr "Keskmine koormus"
-#: sysdeps/names/loadavg.c:42
+#: sysdeps/names/loadavg.c:40
msgid "Running Tasks"
msgstr ""
-#: sysdeps/names/loadavg.c:43
+#: sysdeps/names/loadavg.c:41
msgid "Number of Tasks"
msgstr ""
-#: sysdeps/names/loadavg.c:44 sysdeps/names/loadavg.c:52
+#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50
msgid "Last PID"
msgstr ""
-#: sysdeps/names/loadavg.c:49
+#: sysdeps/names/loadavg.c:47
msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
msgstr ""
-#: sysdeps/names/loadavg.c:50
+#: sysdeps/names/loadavg.c:48
msgid "Number of tasks currently running"
msgstr ""
-#: sysdeps/names/loadavg.c:51
+#: sysdeps/names/loadavg.c:49
msgid "Total number of tasks"
msgstr ""
-#: sysdeps/names/mem.c:43
+#: sysdeps/names/mem.c:41
msgid "Total Memory"
-msgstr ""
+msgstr "Mälu kokku"
-#: sysdeps/names/mem.c:44
+#: sysdeps/names/mem.c:42
msgid "Used Memory"
-msgstr ""
+msgstr "Kasutatud mälu"
-#: sysdeps/names/mem.c:45
+#: sysdeps/names/mem.c:43
msgid "Free Memory"
-msgstr ""
+msgstr "Vaba mälu"
-#: sysdeps/names/mem.c:46
+#: sysdeps/names/mem.c:44
msgid "Shared Memory"
-msgstr ""
+msgstr "Jagatud mälu"
-#: sysdeps/names/mem.c:47
+#: sysdeps/names/mem.c:45
msgid "Buffers"
-msgstr ""
+msgstr "Puhvrid"
-#: sysdeps/names/mem.c:48
+#: sysdeps/names/mem.c:46
msgid "Cached"
-msgstr ""
+msgstr "Puhverdatud"
-#: sysdeps/names/mem.c:49
-msgid "User"
+#: sysdeps/names/mem.c:48
+msgid "Lukustatud"
msgstr ""
-#: sysdeps/names/mem.c:50
-msgid "Locked"
-msgstr ""
+#: sysdeps/names/mem.c:53
+msgid "Total physical memory in kB"
+msgstr "Kokku füüsilist mälu kB"
+
+#: sysdeps/names/mem.c:54
+msgid "Used memory size in kB"
+msgstr "Kasutatud mälu kB"
#: sysdeps/names/mem.c:55
-msgid "Total physical memory in kB"
-msgstr ""
+msgid "Free memory size in kB"
+msgstr "Vaba mälu kB"
#: sysdeps/names/mem.c:56
-msgid "Used memory size in kB"
-msgstr ""
+msgid "Shared memory size in kB"
+msgstr "Jagatud mälu kB"
#: sysdeps/names/mem.c:57
-msgid "Free memory size in kB"
-msgstr ""
+msgid "Size of buffers kB"
+msgstr "Puhvrite suurus kB"
#: sysdeps/names/mem.c:58
-msgid "Shared memory size in kB"
-msgstr ""
+msgid "Size of cached memory in kB"
+msgstr "Puhverdatud mälu kB"
#: sysdeps/names/mem.c:59
-msgid "Size of buffers kB"
+msgid "Memory used from user processes in kB"
msgstr ""
#: sysdeps/names/mem.c:60
-msgid "Size of cached memory in kB"
+msgid "Memory in locked pages in kB"
msgstr ""
-#: sysdeps/names/mem.c:61
-msgid "Memory used from user processes 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 ""
-#: sysdeps/names/mem.c:62
-msgid "Memory in locked pages in kB"
+#: 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/msg_limits.c:42 sysdeps/names/msg_limits.c:53
+#: 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:43 sysdeps/names/msg_limits.c:54
+#: 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:44 sysdeps/names/msg_limits.c:55
+#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
msgid "Max size of message"
msgstr ""
-#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
+#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
msgid "Default max size of queue"
msgstr ""
-#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
+#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
msgid "Max queues system wide"
msgstr ""
-#: sysdeps/names/msg_limits.c:47 sysdeps/names/msg_limits.c:58
+#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
msgid "Message segment size"
msgstr ""
-#: sysdeps/names/msg_limits.c:48 sysdeps/names/msg_limits.c:59
+#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
msgid "Number of system message headers"
msgstr ""
-#: sysdeps/names/prockernel.c:44
+#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr ""
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr ""
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Alamvõrk"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "Aadress"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "Pakette sisse"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "Pakette välja"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "Kokku pakette"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "Baite sisse"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "Baite välja"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "Kokku baite"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "Vigu sisse"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "Vigu välja"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "Kokku vigu"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "Põrkumisi"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr ""
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr ""
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr ""
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr ""
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr ""
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr ""
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr ""
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr ""
+
+#: sysdeps/names/prockernel.c:42
msgid "K_Flags"
msgstr ""
-#: sysdeps/names/prockernel.c:44
+#: sysdeps/names/prockernel.c:42
msgid "Min_Flt"
msgstr ""
-#: sysdeps/names/prockernel.c:44
+#: sysdeps/names/prockernel.c:42
msgid "Maj_Flt"
msgstr ""
-#: sysdeps/names/prockernel.c:44
+#: sysdeps/names/prockernel.c:42
msgid "CMin_Flt"
msgstr ""
-#: sysdeps/names/prockernel.c:45
+#: sysdeps/names/prockernel.c:43
msgid "CMaj_Flt"
msgstr ""
-#: sysdeps/names/prockernel.c:45
+#: sysdeps/names/prockernel.c:43
msgid "KStk_ESP"
msgstr ""
-#: sysdeps/names/prockernel.c:45
+#: sysdeps/names/prockernel.c:43
msgid "KStk_EIP"
msgstr ""
-#: sysdeps/names/prockernel.c:45
+#: sysdeps/names/prockernel.c:43
msgid "NWChan"
msgstr ""
-#: sysdeps/names/prockernel.c:46
+#: sysdeps/names/prockernel.c:44
msgid "WChan"
msgstr ""
#. K_Flags
-#: sysdeps/names/prockernel.c:52
+#: sysdeps/names/prockernel.c:50
msgid ""
"Kernel flags of the process.\n"
"\n"
@@ -283,43 +592,43 @@ msgid ""
msgstr ""
#. Min_Flt
-#: sysdeps/names/prockernel.c:61
+#: 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:64
+#: 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:67
+#: 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:70
+#: 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:73
+#: 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:76
+#: sysdeps/names/prockernel.c:74
msgid "The current EIP (32-bit instruction pointer)."
msgstr ""
#. NWChan
-#: sysdeps/names/prockernel.c:78
+#: 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 "
@@ -328,51 +637,47 @@ msgid ""
msgstr ""
#. WChan
-#: sysdeps/names/prockernel.c:83
+#: sysdeps/names/prockernel.c:81
msgid "This is the textual name of the `nwchan' field."
msgstr ""
-#: sysdeps/names/procmem.c:49
-msgid "Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
+#: sysdeps/names/procmem.c:47
msgid "Virtual"
msgstr ""
-#: sysdeps/names/procmem.c:49
+#: sysdeps/names/procmem.c:47
msgid "Resident"
msgstr ""
-#: sysdeps/names/procmem.c:49
+#: sysdeps/names/procmem.c:47
msgid "Share"
msgstr ""
-#: sysdeps/names/procmem.c:50
+#: sysdeps/names/procmem.c:48
msgid "Resident Set Size"
msgstr ""
-#: sysdeps/names/procmem.c:50
+#: sysdeps/names/procmem.c:48
msgid "Resident Set Size Limit"
msgstr ""
-#: sysdeps/names/procmem.c:55
+#: sysdeps/names/procmem.c:53
msgid "Total # of pages of memory"
msgstr ""
-#: sysdeps/names/procmem.c:56
+#: sysdeps/names/procmem.c:54
msgid "Number of pages of virtual memory"
msgstr ""
-#: sysdeps/names/procmem.c:57
+#: sysdeps/names/procmem.c:55
msgid "Number of resident set (non-swapped) pages"
msgstr ""
-#: sysdeps/names/procmem.c:58
+#: sysdeps/names/procmem.c:56
msgid "Number of pages of shared (mmap'd) memory"
msgstr ""
-#: sysdeps/names/procmem.c:59
+#: 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 "
@@ -380,807 +685,645 @@ msgid ""
"which are swapped out."
msgstr ""
-#
-# In Mxico, 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:64
+#: 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:50
+#: sysdeps/names/procsegment.c:42
msgid "Text_RSS"
msgstr ""
-#: sysdeps/names/procsegment.c:50
+#: sysdeps/names/procsegment.c:42
msgid "ShLib_RSS"
msgstr ""
-#: sysdeps/names/procsegment.c:50
+#: sysdeps/names/procsegment.c:42
msgid "Data_RSS"
msgstr ""
-#: sysdeps/names/procsegment.c:50
+#: sysdeps/names/procsegment.c:42
msgid "Stack_RSS"
msgstr ""
-#: sysdeps/names/procsegment.c:51
+#: sysdeps/names/procsegment.c:43
msgid "Dirty Size"
msgstr ""
-#: sysdeps/names/procsegment.c:51
+#: sysdeps/names/procsegment.c:43
msgid "Start_Code"
msgstr ""
-#: sysdeps/names/procsegment.c:51
+#: sysdeps/names/procsegment.c:43
msgid "End_Code"
msgstr ""
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "End_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
+#: sysdeps/names/procsegment.c:43
msgid "Start_Stack"
msgstr ""
-#: sysdeps/names/procsegment.c:53
-msgid "Start_MMap"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53 sysdeps/names/procsegment.c:72
-msgid "Arg_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:73
-msgid "Arg_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:74
-msgid "Env_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:75
-msgid "Env_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:59
+#: sysdeps/names/procsegment.c:48
msgid "Text resident set size"
msgstr ""
-#: sysdeps/names/procsegment.c:60
+#: sysdeps/names/procsegment.c:49
msgid "Shared-Lib resident set size"
msgstr ""
-#: sysdeps/names/procsegment.c:61
+#: sysdeps/names/procsegment.c:50
msgid "Data resident set size"
msgstr ""
-#: sysdeps/names/procsegment.c:62
+#: sysdeps/names/procsegment.c:51
msgid "Stack resident set size"
msgstr ""
-#: sysdeps/names/procsegment.c:63
+#: sysdeps/names/procsegment.c:52
msgid "Total size of dirty pages"
msgstr ""
-#: sysdeps/names/procsegment.c:64
+#: sysdeps/names/procsegment.c:53
msgid "Address of beginning of code segment"
msgstr ""
-#: sysdeps/names/procsegment.c:65
+#: sysdeps/names/procsegment.c:54
msgid "Address of end of code segment"
msgstr ""
-#: sysdeps/names/procsegment.c:66
-msgid "Address of beginning of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:67
-msgid "Address of end of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:68
-msgid "Brk_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:69
-msgid "Brk_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:70
+#: sysdeps/names/procsegment.c:55
msgid "Address of the bottom of stack segment"
msgstr ""
-#: sysdeps/names/procsegment.c:71
-msgid "Start of mmap()ed areas"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
+#: sysdeps/names/procsignal.c:40
msgid "Signal"
msgstr ""
-#: sysdeps/names/procsignal.c:42
+#: sysdeps/names/procsignal.c:40
msgid "Blocked"
msgstr ""
-#: sysdeps/names/procsignal.c:42
+#: sysdeps/names/procsignal.c:40
msgid "SigIgnore"
msgstr ""
-#: sysdeps/names/procsignal.c:42
+#: sysdeps/names/procsignal.c:40
msgid "SigCatch"
msgstr ""
-#: sysdeps/names/procsignal.c:47
+#: sysdeps/names/procsignal.c:45
msgid "Mask of pending signals"
msgstr ""
-#: sysdeps/names/procsignal.c:48
+#: sysdeps/names/procsignal.c:46
msgid "Mask of blocked signals"
msgstr ""
-#: sysdeps/names/procsignal.c:49
+#: sysdeps/names/procsignal.c:47
msgid "Mask of ignored signals"
msgstr ""
-#: sysdeps/names/procsignal.c:50
+#: sysdeps/names/procsignal.c:48
msgid "Mask of caught signals"
msgstr ""
-#: sysdeps/names/procstate.c:45
+#: sysdeps/names/procstate.c:40
msgid "Cmd"
msgstr ""
-#: sysdeps/names/procstate.c:45
+#: sysdeps/names/procstate.c:40
msgid "State"
msgstr ""
-#: sysdeps/names/procstate.c:45
+#: sysdeps/names/procstate.c:40
msgid "UID"
msgstr ""
-#: sysdeps/names/procstate.c:45
+#: sysdeps/names/procstate.c:40
msgid "GID"
msgstr ""
#: sysdeps/names/procstate.c:45
-msgid "RUID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "RGID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Has CPU"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:47
-msgid "Last Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:52
msgid "Basename of executable file in call to exec()"
msgstr ""
-#: sysdeps/names/procstate.c:53
+#: sysdeps/names/procstate.c:46
msgid "Single-Char code for process state (S=sleeping)"
msgstr ""
-#: sysdeps/names/procstate.c:54
-msgid "effective UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:55
-msgid "effective GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:56
-msgid "real UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:57
-msgid "real GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:58
-msgid "has_cpu"
-msgstr ""
-
-#: sysdeps/names/procstate.c:59
-msgid "processor"
+#: sysdeps/names/procstate.c:47
+msgid "UID of process"
msgstr ""
-#: sysdeps/names/procstate.c:60
-msgid "last_processor"
+#: sysdeps/names/procstate.c:48
+msgid "GID of process"
msgstr ""
-#: sysdeps/names/proctime.c:46
+#: sysdeps/names/proctime.c:44
msgid "Start_Time"
msgstr ""
-#: sysdeps/names/proctime.c:46
+#: sysdeps/names/proctime.c:44
msgid "RTime"
msgstr ""
-#: sysdeps/names/proctime.c:46
+#: sysdeps/names/proctime.c:44
msgid "UTime"
msgstr ""
-#: sysdeps/names/proctime.c:46
+#: sysdeps/names/proctime.c:44
msgid "STime"
msgstr ""
-#: sysdeps/names/proctime.c:47
+#: sysdeps/names/proctime.c:45
msgid "CUTime"
msgstr ""
-#: sysdeps/names/proctime.c:47
+#: sysdeps/names/proctime.c:45
msgid "CSTime"
msgstr ""
-#: sysdeps/names/proctime.c:47
+#: sysdeps/names/proctime.c:45
msgid "TimeOut"
msgstr ""
-#: sysdeps/names/proctime.c:47
+#: sysdeps/names/proctime.c:45
msgid "It_Real_Value"
msgstr ""
-#: sysdeps/names/proctime.c:48
+#: sysdeps/names/proctime.c:46
msgid "Frequency"
msgstr ""
-#: sysdeps/names/proctime.c:48
+#: sysdeps/names/proctime.c:46
msgid "XCPU_UTime"
msgstr ""
-#: sysdeps/names/proctime.c:48
+#: sysdeps/names/proctime.c:46
msgid "XCPU_STime"
msgstr ""
-#: sysdeps/names/proctime.c:49
-msgid "XCPU_Flags"
-msgstr ""
-
-#: sysdeps/names/proctime.c:54
+#: sysdeps/names/proctime.c:51
msgid "Start time of process in seconds since the epoch"
msgstr ""
-#: sysdeps/names/proctime.c:55
+#: sysdeps/names/proctime.c:52
msgid "Real time accumulated by process (should be utime + stime)"
msgstr ""
-#: sysdeps/names/proctime.c:56
+#: sysdeps/names/proctime.c:53
msgid "user-mode CPU time accumulated by process"
msgstr ""
-#: sysdeps/names/proctime.c:57
+#: sysdeps/names/proctime.c:54
msgid "kernel-mode CPU time accumulated by process"
msgstr ""
-#: sysdeps/names/proctime.c:58
+#: sysdeps/names/proctime.c:55
msgid "cumulative utime of process and reaped children"
msgstr ""
-#: sysdeps/names/proctime.c:59
+#: sysdeps/names/proctime.c:56
msgid "cumulative stime of process and reaped children"
msgstr ""
-#: sysdeps/names/proctime.c:60
+#: sysdeps/names/proctime.c:57
msgid "The time (in jiffies) of the process's next timeout"
msgstr ""
-#: sysdeps/names/proctime.c:61
+#: 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:63
+#: sysdeps/names/proctime.c:60
msgid "Tick frequency"
msgstr ""
-#: sysdeps/names/proctime.c:64
+#: sysdeps/names/proctime.c:61
msgid "SMP user-mode CPU time accumulated by process"
msgstr ""
-#: sysdeps/names/proctime.c:65
+#: sysdeps/names/proctime.c:62
msgid "SMP kernel-mode CPU time accumulated by process"
msgstr ""
-#: sysdeps/names/procuid.c:48
+#: sysdeps/names/procuid.c:56
msgid "Uid"
msgstr ""
-#: sysdeps/names/procuid.c:48
+#: sysdeps/names/procuid.c:56
msgid "EUid"
msgstr ""
-#: sysdeps/names/procuid.c:48
+#: sysdeps/names/procuid.c:56
msgid "Gid"
msgstr ""
-#: sysdeps/names/procuid.c:48
+#: sysdeps/names/procuid.c:56
msgid "EGid"
msgstr ""
-#: sysdeps/names/procuid.c:48
-msgid "SUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "SGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
+#: sysdeps/names/procuid.c:56
msgid "Pid"
msgstr ""
-#: sysdeps/names/procuid.c:50
+#: sysdeps/names/procuid.c:57
msgid "PPid"
msgstr ""
-#: sysdeps/names/procuid.c:50
+#: sysdeps/names/procuid.c:57
msgid "PGrp"
msgstr ""
-#: sysdeps/names/procuid.c:50
+#: sysdeps/names/procuid.c:57
msgid "Session"
msgstr ""
-#: sysdeps/names/procuid.c:50
+#: sysdeps/names/procuid.c:57
msgid "Tty"
msgstr ""
-#: sysdeps/names/procuid.c:51
+#: sysdeps/names/procuid.c:58
msgid "TPGid"
msgstr ""
-#: sysdeps/names/procuid.c:51
-msgid "Priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Nice"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "NGroups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:52
-msgid "Groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:57
-msgid "User ID"
-msgstr ""
-
#: sysdeps/names/procuid.c:58
-msgid "Effective User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:59
-msgid "Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:60
-msgid "Effective Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:61
-msgid "Saved User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:62
-msgid "Saved Group ID"
+msgid "Priority"
msgstr ""
#: sysdeps/names/procuid.c:63
-msgid "Filesystem User ID"
+msgid "User ID"
msgstr ""
#: sysdeps/names/procuid.c:64
-msgid "Filesystem Group ID"
+msgid "Effective User ID"
msgstr ""
#: sysdeps/names/procuid.c:65
-msgid "Process ID"
+msgid "Group ID"
msgstr ""
#: sysdeps/names/procuid.c:66
-msgid "PID of parent process"
+msgid "Effective Group ID"
msgstr ""
#: sysdeps/names/procuid.c:67
-msgid "Process group ID"
+msgid "Process ID"
msgstr ""
#: sysdeps/names/procuid.c:68
-msgid "Session ID"
+msgid "PID of parent process"
msgstr ""
#: sysdeps/names/procuid.c:69
-msgid "Full device number of controlling terminal"
+msgid "Process group ID"
msgstr ""
#: sysdeps/names/procuid.c:70
-msgid "Terminal process group ID"
+msgid "Session ID"
msgstr ""
#: sysdeps/names/procuid.c:71
-msgid "Kernel scheduling priority"
+msgid "Full device number of controlling terminal"
msgstr ""
#: sysdeps/names/procuid.c:72
-msgid "Standard unix nice level of process"
+msgid "Terminal process group ID"
msgstr ""
#: sysdeps/names/procuid.c:73
-msgid "Number of additional process groups"
+msgid "Kernel scheduling priority"
msgstr ""
#: sysdeps/names/procuid.c:74
-msgid "Additional process groups"
+msgid "Standard unix nice level of process"
msgstr ""
-#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
+#: 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:45 sysdeps/names/sem_limits.c:59
+#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
msgid "Max number of arrays"
msgstr ""
-#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
+#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
msgid "Max semaphores system wide"
msgstr ""
-#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
+#: 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:48 sysdeps/names/sem_limits.c:62
+#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
msgid "Max semaphores per array"
msgstr ""
-#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
+#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
msgid "Max ops per semop call"
msgstr ""
-#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
+#: 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:51 sysdeps/names/sem_limits.c:65
+#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
msgid "sizeof struct sem_undo"
msgstr ""
-#: sysdeps/names/sem_limits.c:52 sysdeps/names/sem_limits.c:66
+#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
msgid "Semaphore max value"
msgstr ""
-#: sysdeps/names/sem_limits.c:53 sysdeps/names/sem_limits.c:67
+#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
msgid "Adjust on exit max value"
msgstr ""
-#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
+#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
msgid "Max segment size"
msgstr ""
-#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
+#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
msgid "Min segment size"
msgstr ""
-#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
+#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
msgid "Max number of segments"
msgstr ""
-#: sysdeps/names/shm_limits.c:44 sysdeps/names/shm_limits.c:53
+#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
msgid "Max shared segments per process"
msgstr ""
-#: sysdeps/names/shm_limits.c:45 sysdeps/names/shm_limits.c:54
+#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
msgid "Max total shared memory"
msgstr ""
-#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
+#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
msgid "Total Swap Space"
msgstr ""
-#: sysdeps/names/swap.c:42 sysdeps/names/swap.c:51
+#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
msgid "Used Swap Space"
msgstr ""
-#: sysdeps/names/swap.c:43 sysdeps/names/swap.c:52
+#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
msgid "Free Swap Space"
msgstr ""
-#: sysdeps/names/swap.c:44
+#: sysdeps/names/swap.c:42
msgid "Page In"
msgstr ""
-#: sysdeps/names/swap.c:45
+#: sysdeps/names/swap.c:43
msgid "Page Out"
msgstr ""
-#: sysdeps/names/swap.c:53
+#: sysdeps/names/swap.c:51
msgid "Total number of swap pages that have been brought in since system boot"
msgstr ""
-#: sysdeps/names/swap.c:55
+#: sysdeps/names/swap.c:53
msgid "Total number of swap pages that have been brought out since system boot"
msgstr ""
-#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:82
+#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
msgid "Server Features"
msgstr ""
-#: sysdeps/names/sysdeps.c:54
-msgid "Pointer Size"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:84
+#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
msgid "CPU Usage"
-msgstr ""
+msgstr "Protsessori koormus"
-#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:85
+#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78
msgid "Memory Usage"
-msgstr ""
+msgstr "Mälukasutus"
-#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:86
+#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79
msgid "Swap Usage"
-msgstr ""
+msgstr "Saale kasutus"
-#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:87
+#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80
msgid "System Uptime"
-msgstr ""
+msgstr "Süsteemi tööaeg"
-#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:88
+#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81
msgid "Load Averange"
-msgstr ""
+msgstr "Keskmine koormus"
-#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:89
+#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82
msgid "Shared Memory Limits"
msgstr ""
-#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:90
+#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83
msgid "Message Queue Limits"
msgstr ""
-#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:91
+#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
msgid "Semaphore Set Limits"
msgstr ""
-#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:92
+#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
msgid "List of running Processes"
msgstr ""
-#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:93
+#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86
msgid "Process Status information"
msgstr ""
-#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:94
+#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87
msgid "Process UID and TTY information"
msgstr ""
-#: sysdeps/names/sysdeps.c:66 sysdeps/names/sysdeps.c:95
+#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88
msgid "Process Memory information"
msgstr ""
-#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:96
+#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
msgid "Process Time information"
msgstr ""
-#: sysdeps/names/sysdeps.c:68 sysdeps/names/sysdeps.c:97
+#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
msgid "Process Signal information"
msgstr ""
-#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:98
+#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
msgid "Process Kernel Data information"
msgstr ""
-#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:99
+#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
msgid "Process Segment information"
msgstr ""
-#: sysdeps/names/sysdeps.c:71
+#: sysdeps/names/sysdeps.c:66
msgid "Process Arguments"
msgstr ""
-#: sysdeps/names/sysdeps.c:72 sysdeps/names/sysdeps.c:101
+#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
msgid "Process Memory Map"
msgstr ""
-#: sysdeps/names/sysdeps.c:73
+#: sysdeps/names/sysdeps.c:68
msgid "Mount List"
msgstr ""
-#: sysdeps/names/sysdeps.c:74 sysdeps/names/sysdeps.c:103
+#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96
msgid "File System Usage"
-msgstr ""
+msgstr "Failisüsteemide kasutus"
-#: sysdeps/names/sysdeps.c:75 sysdeps/names/sysdeps.c:104
+#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
msgid "Network Load"
+msgstr "Võrgu koormus"
+
+#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98
+msgid "PPP Statistics"
msgstr ""
-#: sysdeps/names/sysdeps.c:76 sysdeps/names/sysdeps.c:105
-msgid "Interface Names"
+#: sysdeps/names/sysdeps.c:93
+msgid "Command line arguments of the process"
msgstr ""
-#: sysdeps/names/sysdeps.c:77 sysdeps/names/sysdeps.c:106
-msgid "PPP Statistics"
+#: sysdeps/names/sysdeps.c:95
+msgid "List of currently mounted filesystems"
msgstr ""
-#: sysdeps/names/sysdeps.c:83
-msgid "Pointer Size on the Server (in bits)"
+#: sysdeps/names/uptime.c:38
+msgid "Uptime"
+msgstr "Tööaeg"
+
+#: sysdeps/names/uptime.c:39
+msgid "Idletime"
+msgstr "Puhkeaeg"
+
+#: sysdeps/names/uptime.c:44
+msgid "Time in seconds since system boot"
+msgstr "Aega süsteemi käivitamisest (sekundites)"
+
+#: sysdeps/names/uptime.c:45
+msgid "Time in seconds the system spent in the idle task since system boot"
+msgstr "Kui kaua on protsessor käivitamisest alates jõude seisnud (sekundites)"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
msgstr ""
-#: sysdeps/names/sysdeps.c:100
-msgid "Command line arguments of the process"
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
msgstr ""
-#: sysdeps/names/sysdeps.c:102
-msgid "List of currently mounted filesystems"
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
msgstr ""
-#: sysdeps/names/uptime.c:40
-msgid "Uptime"
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
msgstr ""
-#: sysdeps/names/uptime.c:41
-msgid "Idletime"
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
msgstr ""
-#: sysdeps/names/uptime.c:42
-msgid "Boot time"
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
msgstr ""
-#: sysdeps/names/uptime.c:47
-msgid "Time in seconds since system boot"
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
msgstr ""
-#: sysdeps/names/uptime.c:48
-msgid "Time in seconds the system spent in the idle task since system boot"
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
msgstr ""
-#: sysdeps/names/uptime.c:49
-msgid "Boot time (seconds sice epoch)"
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
msgstr ""
-#: support/error.c:109
-msgid "Unknown system error"
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
msgstr ""
-#: support/getopt.c:669
-#, c-format
-msgid "%s: option `%s' is ambiguous\n"
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
msgstr ""
-#: support/getopt.c:693
-#, c-format
-msgid "%s: option `--%s' doesn't allow an argument\n"
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
msgstr ""
-#: support/getopt.c:698
-#, c-format
-msgid "%s: option `%c%s' doesn't allow an argument\n"
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
msgstr ""
-#: support/getopt.c:715 support/getopt.c:888
-#, c-format
-msgid "%s: option `%s' requires an argument\n"
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
msgstr ""
-#. --option
-#: support/getopt.c:744
-#, c-format
-msgid "%s: unrecognized option `--%s'\n"
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
msgstr ""
-#. +option or -option
-#: support/getopt.c:748
-#, c-format
-msgid "%s: unrecognized option `%c%s'\n"
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
msgstr ""
-#. 1003.2 specifies the format of this message.
-#: support/getopt.c:774
-#, c-format
-msgid "%s: illegal option -- %c\n"
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
msgstr ""
-#: support/getopt.c:777
-#, c-format
-msgid "%s: invalid option -- %c\n"
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
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"
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
msgstr ""
-#: support/getopt.c:854
-#, c-format
-msgid "%s: option `-W %s' is ambiguous\n"
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
msgstr ""
-#: support/getopt.c:872
-#, c-format
-msgid "%s: option `-W %s' doesn't allow an argument\n"
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
msgstr ""
-#: lib/errors.c:31
-msgid "No error"
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
msgstr ""
-#: lib/errors.c:32
-msgid "Unknown error"
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
msgstr ""
-#: lib/errors.c:33
-msgid "Invalid argument"
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
msgstr ""
-#: lib/errors.c:34
-msgid "No such parameter"
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
msgstr ""
-#: lib/errors.c:35
-msgid "Attempted to modify a read-only value"
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
msgstr ""
-#: lib/errors.c:36
-msgid "Parameter size mismatch"
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
msgstr ""
-#: lib/errors.c:37
-msgid "Communication with LibGTop server failed"
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
msgstr ""
-#: lib/errors.c:38
-msgid "No such process"
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
msgstr ""
-#: lib/errors.c:39
-msgid "No kernel support"
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
msgstr ""
-#: lib/errors.c:40
-msgid "Incompatible kernel version"
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
msgstr ""
diff --git a/po/he.po b/po/he.po
new file mode 100644
index 00000000..15b701c9
--- /dev/null
+++ b/po/he.po
@@ -0,0 +1,1333 @@
+# translation of libgtop.libgtop-GNOME-2-0-port.he.po to Hebrew
+# translation of libgtop.libgtop-GNOME-2-0-port.po to Hebrew
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# Gil 'Dolfin' Osher <dolfin@rpg.org.il>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop.libgtop-GNOME-2-0-port.he\n"
+"POT-Creation-Date: 2003-03-18 12:27+0100\n"
+"PO-Revision-Date: 2003-03-18 18:06+0200\n"
+"Last-Translator: Gil 'Dolfin' Osher <dolfin@rpg.org.il>\n"
+"Language-Team: Hebrew <he@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0\n"
+
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "תקתוקים (%ld לשניה):"
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr "סך-הכל"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "משתמש"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr ""
+
+#: examples/smp.c:74
+msgid "Sys"
+msgstr "מערכת"
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "סרק"
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"מעבד (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "מעבד %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "אחוז:"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "סך-הכל (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "משתמש (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr ""
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr "מערכת (%)"
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "סרק (%)"
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"מעבד (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "מעבד %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr "סיבוב:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "קורא %d בתים"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "קורא את גודל המידע"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "קורא את המידע %d בתים"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "כותב %d בתים"
+
+#: src/daemon/gnuserv.c:448
+msgid "Enable debugging"
+msgstr "אפשר ניפוי"
+
+#: src/daemon/gnuserv.c:448
+msgid "DEBUG"
+msgstr "ניפוי"
+
+#: src/daemon/gnuserv.c:450
+msgid "Enable verbose output"
+msgstr "אפשר פלט מפורט"
+
+#: src/daemon/gnuserv.c:450
+msgid "VERBOSE"
+msgstr "מפורט"
+
+#: src/daemon/gnuserv.c:452
+msgid "Don't fork into background"
+msgstr "אל תשכפל לרקע"
+
+#: src/daemon/gnuserv.c:452
+msgid "NO-DAEMON"
+msgstr ""
+
+#: src/daemon/gnuserv.c:454
+msgid "Invoked from inetd"
+msgstr ""
+
+#: src/daemon/gnuserv.c:454
+msgid "INETD"
+msgstr ""
+
+#: src/daemon/gnuserv.c:488
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"שגיאה באפשרות %s: %s.\n"
+"הפעל '%s --help' כדי לראות רשימה מלאה של אפשרויות שורות פקודה זמינות.\n"
+
+#: 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 "%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
+#, fuzzy, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: אפשרות לא מזוהה `%s%c'\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 ""
+
+#: support/getopt.c:872
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: האפשרות `-W %s' איננה מאפשרת ארגומנט\n"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "מציג הודעת עזרה זו"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "מציג הודעת שימוש קצרה"
+
+#: 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 "זמן מעבד במצב משתמש (nice)"
+
+#: 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 "סך הכל זמן מעבד SMP"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "סך הכל זמן מעבד SMP במצב משתמש"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "סך הכל זמן מעבד SMP במצב משתמש (nice)"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "זמן מעבד SMP במצב מערכת"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "זמן מעבד SMP במשימת סרק"
+
+#: 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 "מספר עבודות המופעלות בו-זמנית בממוצע תוך דקה, 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: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 "גודל בקילובתים של בריכת ההודעות"
+
+#: 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/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "דגלי ממשק"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "תת-רשת"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "כתובת"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "חבילות מידע נכנסות"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "חבילות מידע יוצאות"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "סך-כל החבילות"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "בתים נכנסים"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "בתים יוצאים"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "סך-הכל בתים"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "שגיאות נכנסות"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "שגיאות יוצאות"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "סך-הכל שגיאות"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "התנגשויות"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "יחידת העברה מקסימלית"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "מצב PPP"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "בתי קלט"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "בתי פלט"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "מספר בתי הקלט"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "מספר בתי הפלט"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "גודל"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+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 "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 resident 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 "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 ""
+
+#: sysdeps/names/procstate.c:46
+msgid "Single-Char code for process state (S=sleeping)"
+msgstr "קוד תו-בודד למצב התהליך (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 ""
+
+#: 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 "Uid"
+
+#: sysdeps/names/procuid.c:56
+msgid "EUid"
+msgstr ""
+
+#: sysdeps/names/procuid.c:56
+msgid "Gid"
+msgstr "Gid"
+
+#: sysdeps/names/procuid.c:56
+msgid "EGid"
+msgstr ""
+
+#: sysdeps/names/procuid.c:56
+msgid "Pid"
+msgstr "Pid"
+
+#: 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: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 "PID של תהליך הורה"
+
+#: 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 "מידע 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 "הזמן בשניות שהמערכת ביזבזה על משימות סרק מאז איתחול המערכת"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "ניתוק"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "הפרעה"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "יציאה"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "הוראה לא חוקית"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "ביטול"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "שגיאת EMT"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "הרוג"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "שגיאת אפיק"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "הפרעת התחלקות"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "צינור שבור"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "שעון מעורר"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "סיום"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "עצור"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "עצירת מקלדת"
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "המשך"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "מצב הילד השתנה"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "קרית רקע מ tty"
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "כתיבת רקע מ tty"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "קלט/פלט עכשיו אפשרי"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "שעון מעורר וירוטאלי"
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "שינוי גודל חלון"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "בקשת מידע"
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "אות מוגדר משתמש 1"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "אות מוגדר משתמש 2"
+
diff --git a/po/hi.po b/po/hi.po
new file mode 100644
index 00000000..7a62341c
--- /dev/null
+++ b/po/hi.po
@@ -0,0 +1,1331 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Ashutosh Sahu <ashutosh_sahu@rediffmail.com>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Libgtop 2\n"
+"POT-Creation-Date: 2003-08-13 18:18+0530\n"
+"PO-Revision-Date: 2003-08-13 18:19+0530\n"
+"Last-Translator: Ashutosh Sahu <ashutosh_sahu@rediffmail.com>\n"
+"Language-Team: Gnome Hindi Team <indlinux-hindi-gnome@lists.sourceforge."
+"net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "टिक्स (%ld प्रति सेकैंड)"
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr "जोड़"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "उपयोगकर्ता"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "अच्छा"
+
+#: examples/smp.c:74
+msgid "Sys"
+msgstr "सिस"
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "खाली"
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"सी.पी.यू.\t(0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "सी.पी.यू. %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "प्रतिशत :"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "कुल (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "उपयोगकर्ता (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr "नाइस (%)"
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr "सिस (%)"
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "खाली (%)"
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"सी.पी.यू. (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "सी.पी.यू. %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr "स्पिन :"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "%d बाइट्स पढे"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "डाटा आकार पढें"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "%d साइज़ का डाटा पढें"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "%d बाइट्स लिखें"
+
+#: src/daemon/gnuserv.c:453
+msgid "Enable debugging"
+msgstr "डीबिगंग के योग्य बनाना"
+
+#: src/daemon/gnuserv.c:453
+msgid "DEBUG"
+msgstr "डीबग"
+
+#: src/daemon/gnuserv.c:455
+msgid "Enable verbose output"
+msgstr "वाचाल आउटपुट के योग्य बनाना"
+
+#: src/daemon/gnuserv.c:455
+msgid "VERBOSE"
+msgstr "वाचाल"
+
+#: src/daemon/gnuserv.c:457
+msgid "Don't fork into background"
+msgstr "पर्ष्टभूमि में फार्क न करें"
+
+#: src/daemon/gnuserv.c:457
+msgid "NO-DAEMON"
+msgstr "डेमन नहीं"
+
+#: src/daemon/gnuserv.c:459
+msgid "Invoked from inetd"
+msgstr " inetd द्वारा बुलाया गया "
+
+#: src/daemon/gnuserv.c:459
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:493
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+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"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "यह मदद संदेश दिखाएँ"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "संक्षिप्त उपयोग संदेश दिखाएँ "
+
+#: 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 "आखिरी PID"
+
+#: 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: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 "सूचना पूल का आकार (किलो बाइट्स में)"
+
+#: 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/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "इंटरफेस फ्लैग"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "एम.टी.यू."
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "सबनेट"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "पता"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "पैकेट अंदर"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "पैकेट बाहर"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "कुल पैकेट"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "बाइट्स अंदर"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "बाइट्स बाहर"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "कुल बाइट्स"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "त्रुटि अंदर"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "त्रुटि बाहर"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "कुल त्रुटि"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "मुठभेड़"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "सर्वाधिक स्थानांतरण इकाई"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "PPP की अवस्था"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "इनपुट बाइट्स"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "आउटपुट बाइट्स"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "इनपुट बाइट्स की संख्या"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "आउटपुट बाइट्स की संख्या"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "आकार"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "लौटाई स्ट्रिंग की लंबाई (byte में)"
+
+#: 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 ""
+
+#. 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 "सामियक EIP (32-bit निर्देश सूचकांक)"
+
+#. 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 "यह `nwchan' फील्ड का टेक्सट नाम है"
+
+#: 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 resident set (non-swapped) pages"
+msgstr "निवासी सेट पेज (non-swapped) की संख्या"
+
+#: sysdeps/names/procmem.c:56
+msgid "Number of pages of shared (mmap'd) memory"
+msgstr "बँटी मेमोरी (mmap'd) पेजों की संख्या"
+
+#: 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 "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 "Dirty Size"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Code"
+msgstr "Start_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "End_Code"
+msgstr "End_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Stack"
+msgstr "Start_Stack"
+
+#: 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 "Cmd"
+
+# gnome-session/gsm-client-list.c:111
+#: sysdeps/names/procstate.c:40
+msgid "State"
+msgstr "अवस्था"
+
+#: 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 "exec() को काल करने वाली फाइल का बेस नाम"
+
+#: sysdeps/names/procstate.c:46
+msgid "Single-Char code for process state (S=sleeping)"
+msgstr "Single-Char कोड क्रिया अवस्था के लिए (S=sleeping)"
+
+#: 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 "Start_Time"
+
+#: sysdeps/names/proctime.c:44
+msgid "RTime"
+msgstr "RTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "UTime"
+msgstr "UTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "STime"
+msgstr "STime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CUTime"
+msgstr "CUTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CSTime"
+msgstr "CSTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "TimeOut"
+msgstr "समय समाप्त"
+
+#: sysdeps/names/proctime.c:45
+msgid "It_Real_Value"
+msgstr "It_Real_Value"
+
+#: sysdeps/names/proctime.c:46
+msgid "Frequency"
+msgstr "आव्रित"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_UTime"
+msgstr "XCPU_UTime"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_STime"
+msgstr "XCPU_STime"
+
+#: 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 "क्रिया का रियल समय (utime+stime)"
+
+#: 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 "क्रिया और रीपड बच्चों का बढ़ता हुआ 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 "क्रिया के अगले टाइम आउट का समय (जिफीज़ में)"
+
+#: 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 "SMP उपयोगकर्ता-मोड में क्रिया द्वारा एकित्रत सी.पी.यू. समय"
+
+#: sysdeps/names/proctime.c:62
+msgid "SMP kernel-mode CPU time accumulated by process"
+msgstr ""
+
+#: 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 "Session"
+
+#: 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 "प्राथिमकता"
+
+#: 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 "क्रिया का स्टेंडर्ड यूनिक्स नाइस स्तर"
+
+#: 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 "struct 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 "मैक्स वैल्यू exit पर सुधार करना"
+
+#: 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 "क्रिया का 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 "सिस्टम बूट के बाद से सैकेण्ड में खाली समय "
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "हैंग अप"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "इन्टरर्प्ट "
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "बाहर"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "अवैध उपदेश"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "ट्रेस ट्रैप"
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "बंद करें"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "EMT त्रुटी"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "Floating-point अपवाद"
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "किल"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "बस त्रुटी"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "सेगमेंटेशन का उलंघन"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "सिस्टम काल को गलत आर्गुमेंट्स"
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "टूटा पाइप"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "अलार्म घडी"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "बंद"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "रोकें"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "कीबोर्ड रोकें"
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "जारी रखें"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "I/O अब संभव"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "CPU सीमा से बाहर"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "फाइल सीमा से बाहर"
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "विंडो आकार बदलाव"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "उपयोगकर्ता निर्धारित संकेत १"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "उपयोगकर्ता निर्धारित संकेत २"
diff --git a/po/lv.po b/po/lv.po
new file mode 100644
index 00000000..6c8ca347
--- /dev/null
+++ b/po/lv.po
@@ -0,0 +1,1361 @@
+# libgtop for Latvian.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Peteris Krisjanis <peteris.krisjanis@os.lv>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop\n"
+"POT-Creation-Date: 2002-08-26 05:09+0200\n"
+"PO-Revision-Date: 2002-08-31 09:57+0200\n"
+"Last-Translator: Artis Trops <hornet@navigators.lv>\n"
+"Language-Team: Latvian <ll10nt@os.lv>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: examples/smp.c:68
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "Tikšķi (%ld katru sekundi):"
+
+#: examples/smp.c:71
+msgid "Total"
+msgstr "Kopā"
+
+#: examples/smp.c:71 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "Lietotājs"
+
+#: examples/smp.c:71 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "Jauks"
+
+#: examples/smp.c:71
+msgid "Sys"
+msgstr "Sis"
+
+#: examples/smp.c:71
+msgid "Idle"
+msgstr "Dīks"
+
+#: examples/smp.c:73
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:77
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:94
+msgid "Percent:"
+msgstr "Procenti:"
+
+#: examples/smp.c:95
+msgid "Total (%)"
+msgstr "Kopā (%)"
+
+#: examples/smp.c:95
+msgid "User (%)"
+msgstr "Liet (%)"
+
+#: examples/smp.c:95
+msgid "Nice (%)"
+msgstr "Jauks (%)"
+
+#: examples/smp.c:95
+msgid "Sys (%)"
+msgstr "Sis (%)"
+
+#: examples/smp.c:96
+msgid "Idle (%)"
+msgstr "Dīks (%)"
+
+#: examples/smp.c:98
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:114
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:120
+msgid "Spin:"
+msgstr "Griešanās:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "lasīt %d baitus"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "lasīt datu izmēru"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "lasīt datu %d baitus"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "rakstīt %d baitus"
+
+#: src/daemon/gnuserv.c:448
+msgid "Enable debugging"
+msgstr "Aktivizēt atkļūdošanu"
+
+#: src/daemon/gnuserv.c:448
+msgid "DEBUG"
+msgstr "DEBUG"
+
+#: src/daemon/gnuserv.c:450
+msgid "Enable verbose output"
+msgstr "Aktivizēt vārdisku izvadi"
+
+#: src/daemon/gnuserv.c:450
+msgid "VERBOSE"
+msgstr "VERBOSE"
+
+#: src/daemon/gnuserv.c:452
+msgid "Don't fork into background"
+msgstr "Nesadalīties fona"
+
+#: src/daemon/gnuserv.c:452
+msgid "NO-DAEMON"
+msgstr "NO-DAEMON"
+
+#: src/daemon/gnuserv.c:454
+msgid "Invoked from inetd"
+msgstr "Izsaukt no inetd"
+
+#: src/daemon/gnuserv.c:454
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:488
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"Kļūda opcijā %s: %s.\n"
+"Palaidiet '%s --help' lai redzētu pilnu pieejamo komandu rindas opciju "
+"sarakstu.\n"
+
+#: support/error.c:109
+msgid "Unknown system error"
+msgstr "Nezināma sistēmas kļūda"
+
+#: support/getopt.c:669
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: opcija `%s' ir neskaidra\n"
+
+#: support/getopt.c:693
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: opcija `--%s' neatļauj argumentu\n"
+
+#: support/getopt.c:698
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: opcija `%c%s' neatļauj argumentu\n"
+
+#: support/getopt.c:715 support/getopt.c:888
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: opcija `%s' pieprasa argumentu\n"
+
+#. --option
+#: support/getopt.c:744
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: neatpazīta opcija `--%s'\n"
+
+#. +option or -option
+#: support/getopt.c:748
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: neatpazīta opcija `%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: nepareiza opcija -- %c\n"
+
+#: support/getopt.c:777
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: nepareiza opcija -- %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: opcija pieprasa argumentu -- %c\n"
+
+#: support/getopt.c:854
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opcija `-W %s' ir neskaidra\n"
+
+#: support/getopt.c:872
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opcija `-W %s' neatļauj argumentu\n"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "Parādīt šo palīdzības ziņojumu"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "Parādīt īsu lietošanas instrukciju"
+
+#: sysdeps/names/cpu.c:43
+msgid "Total CPU Time"
+msgstr "Kopējais CPU Laiks"
+
+#: sysdeps/names/cpu.c:44
+msgid "CPU Time in User Mode"
+msgstr "CPU Laiks Lietotāja Režīmā"
+
+#: sysdeps/names/cpu.c:45
+msgid "CPU Time in User Mode (nice)"
+msgstr "CPU Laiks Lietotāja Režīmā (jauks)"
+
+#: sysdeps/names/cpu.c:46
+msgid "CPU Time in System Mode"
+msgstr "CPU Laiks Sistēmas Režīmā"
+
+#: sysdeps/names/cpu.c:47
+msgid "CPU Time in the Idle Task"
+msgstr "CPU Laiks Dīkajā Uzdevumā"
+
+#: sysdeps/names/cpu.c:48
+msgid "Tick Frequency"
+msgstr "Tikšķu Frekvence"
+
+#: sysdeps/names/cpu.c:49
+msgid "SMP Total CPU Time"
+msgstr "SMP Kopējais CPU Laiks"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "SMP CPU Laiks Lietotāja Režīmā"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "SMP CPU Laiks Lietotāja Režīmā (jauks)"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "SMP CPU Laiks Sistēmas Režīmā"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "SMP CPU Laiks Dīkajā Uzdevumā"
+
+#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
+msgid "Number of clock ticks since system boot"
+msgstr "Pulksteņa tikšķu skaits kopš sistēmas ielādes"
+
+#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65
+msgid "Number of clock ticks the system spent in user mode"
+msgstr "Pulksteņa tikšķu skaits laikā, ko sistēma pavadījusi lietotāja režīmā"
+
+#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66
+msgid "Number of clock ticks the system spent in user mode (nice)"
+msgstr ""
+"Pulksteņa tikšķu skaits laikā, ko sistēma pavadījusi lietotāja režīmā (jauks)"
+
+#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
+msgid "Number of clock ticks the system spent in system mode"
+msgstr "Pulksteņa tikšķu skaits laikā, ko sistēma pavadījusi sistēmas režīmā"
+
+#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
+msgid "Number of clock ticks the system spent in the idle task"
+msgstr "Pulksteņa tikšķu skaits laikā, ko sistēma pavadījusi dīkajā uzdevumā"
+
+#: sysdeps/names/cpu.c:63
+msgid "Tick frequency (default is 100)"
+msgstr "Tikšķu frekvence (noklusētais ir 100)"
+
+#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
+msgid "Total blocks"
+msgstr "Bloki kopā"
+
+#: sysdeps/names/fsusage.c:40
+msgid "Free blocks"
+msgstr "Brīvie bloki"
+
+#: sysdeps/names/fsusage.c:41
+msgid "Available blocks"
+msgstr "Pieejamie bloki"
+
+#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
+msgid "Total file nodes"
+msgstr "Failu nodes kopā"
+
+#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
+msgid "Free file nodes"
+msgstr "Brīvās failu nodes"
+
+#: sysdeps/names/fsusage.c:49
+msgid "Free blocks available to the superuser"
+msgstr "Superlietotājam (superuser) pieejamie brīvie bloki"
+
+#: sysdeps/names/fsusage.c:50
+msgid "Free blocks available to non-superusers"
+msgstr "Nesuperlietotājiem (non-superusers) pieejamie brīvie bloki"
+
+#: sysdeps/names/loadavg.c:39
+msgid "Load Average"
+msgstr "Vidējā Noslodze"
+
+#: sysdeps/names/loadavg.c:40
+msgid "Running Tasks"
+msgstr "Strādājošie Uzdevumi"
+
+#: sysdeps/names/loadavg.c:41
+msgid "Number of Tasks"
+msgstr "Uzdevumu Skaits"
+
+#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50
+msgid "Last PID"
+msgstr "Pēdējais PID"
+
+#: sysdeps/names/loadavg.c:47
+msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
+msgstr "Vienlaicīgi strādājošo darbu skaits vidēji 1, 5 un 15 minutēs"
+
+#: sysdeps/names/loadavg.c:48
+msgid "Number of tasks currently running"
+msgstr "Pašreiz aktīvo uzdevumu skaits"
+
+#: sysdeps/names/loadavg.c:49
+msgid "Total number of tasks"
+msgstr "Kopējais uzdevumu skaits"
+
+#: sysdeps/names/mem.c:41
+msgid "Total Memory"
+msgstr "Kopējā Atmiņa"
+
+#: sysdeps/names/mem.c:42
+msgid "Used Memory"
+msgstr "Izmant. Atmiņa"
+
+#: sysdeps/names/mem.c:43
+msgid "Free Memory"
+msgstr "Brīvā Atmiņa"
+
+#: sysdeps/names/mem.c:44
+msgid "Shared Memory"
+msgstr "Koplietotā Atmiņa"
+
+#: sysdeps/names/mem.c:45
+msgid "Buffers"
+msgstr "Buferi"
+
+#: sysdeps/names/mem.c:46
+msgid "Cached"
+msgstr "Keišoti"
+
+#: sysdeps/names/mem.c:48
+msgid "Locked"
+msgstr "Noslēgti"
+
+#: sysdeps/names/mem.c:53
+msgid "Total physical memory in kB"
+msgstr "Kopējā fiziskā atmiņa kB"
+
+#: sysdeps/names/mem.c:54
+msgid "Used memory size in kB"
+msgstr "Izmantotais atmiņas apjoms kB"
+
+#: sysdeps/names/mem.c:55
+msgid "Free memory size in kB"
+msgstr "Brīvās atmiņas apjoms kB"
+
+#: sysdeps/names/mem.c:56
+msgid "Shared memory size in kB"
+msgstr "Koplietotās atmiņas izmērs kB"
+
+#: sysdeps/names/mem.c:57
+msgid "Size of buffers kB"
+msgstr "Buferu izmēri kB"
+
+#: sysdeps/names/mem.c:58
+msgid "Size of cached memory in kB"
+msgstr "Keišotās atmiņas izmērs kB"
+
+#: sysdeps/names/mem.c:59
+msgid "Memory used from user processes in kB"
+msgstr "Lietotāju procesos izmantotā atmiņa kB"
+
+#: sysdeps/names/mem.c:60
+msgid "Memory in locked pages in kB"
+msgstr "Atmiņa noslēgtajās lapās 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 "Saraksta elementu skaits"
+
+#: 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 "Saraksta kopējais izmērs"
+
+#: 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 "Viena saraksta elementa izmērs"
+
+#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51
+msgid "Size in kilobytes of message pool"
+msgstr "Ziņas pūla izmērs kilobaitos"
+
+#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
+msgid "Number of entries in message map"
+msgstr "Ierakstu skaits ziņojumu kartē"
+
+#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
+msgid "Max size of message"
+msgstr "Ziņojuma maksimālais izmērs"
+
+#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
+msgid "Default max size of queue"
+msgstr "Rindas noklusētais maksimālais izmērs"
+
+#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
+msgid "Max queues system wide"
+msgstr "Maks. rindu sistēmas mērogā"
+
+#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
+msgid "Message segment size"
+msgstr "Ziņojuma segmenta lielums"
+
+#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
+msgid "Number of system message headers"
+msgstr "Sistēmas ziņojumu galviņu skaits"
+
+#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "Saskarnes Karodziņi"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Apakštīkls"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "Adrese"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "Ien. Paketes"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "Izej. Paketes"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "Paketes Kopā"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "Ien. Baiti"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "Izej. Baiti"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "Baiti Kopā"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "Ien. Kļūdas"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "Izej. Kļūdas"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "Kļūdas Kopā"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "Sadursmes"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "Maksimālā Pārraides Vienība (MTU)"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "PPP Stāvoklis"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "Ienāk. baiti"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "Izej. baiti"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "Ienākošo baitu skaits"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "Izejošo baitu skaits"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "Izmērs"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "Atgrieztās virknes garums baitos."
+
+#: 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 ""
+"Procesa kerneļa karodziņi.\n"
+"\n"
+"Linux uz doto brīdi jebkuram karodziņam ir uzstādīts math bits, tāpēc ka "
+"crt0.s pārbauda math emulāciju, tāpēc tas nav iekļauts izvadē.\n"
+"\n"
+"Tā iespējams ir kļūda, tā kā ne katrs process ir kompilēta C programma.\n"
+"\n"
+"Math bitam jābūt decimālam 4, un novērotais bits ir decimālis 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 ""
+"Blakus kļūdu skaits (tās, kuras nav pieprasījušas ielādēt atmiņas lapu no "
+"diska), ko radījis process."
+
+#. 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 ""
+"Galveno kļūdu skaits (tās, kuras ir pieprasījušas ielādēt atmiņas lapu no "
+"diska), ko radījis process."
+
+#. CMin_Flt
+#: sysdeps/names/prockernel.c:65
+msgid "The number of minor faults that the process and its children have made."
+msgstr "Mazāko bojājumu skaits, kurus izraisījis process un tā bērni."
+
+#. CMaj_Flt
+#: sysdeps/names/prockernel.c:68
+msgid "The number of major faults that the process and its children have made."
+msgstr "Lielāko bojājumu skaits, kurus izraisījis process un tā bērni."
+
+#. 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 ""
+"Pašreizējā esp vērtība (32-bitu steka rādītājs), kā atrasta kernelī procesa "
+"steka lappusē."
+
+#. KStk_EIP
+#: sysdeps/names/prockernel.c:74
+msgid "The current EIP (32-bit instruction pointer)."
+msgstr "Pašreizējais EIP (32-bitu instrukciju rādītājs)."
+
+#. 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 ""
+"Šis ir \"kanāls\", kurā gaida process. Šī ir sistēmas izsaukuma adrese un "
+"var tikt sameklēta nosaukumu sarakstā, ja jums nepieciesams tekstuāls "
+"nosaukumus. (Ja jums ir pēdējā savaiguma /etc/psdatabase, tad pamēģiniet ps "
+"-l, lai redzētu WCHAN lauku darbībā)"
+
+#. WChan
+#: sysdeps/names/prockernel.c:81
+msgid "This is the textual name of the `nwchan' field."
+msgstr "Šis ir `nwchan' lauka tekstuālais nosaukums."
+
+#: sysdeps/names/procmem.c:47
+msgid "Virtual"
+msgstr "Virtuālā"
+
+#: sysdeps/names/procmem.c:47
+msgid "Resident"
+msgstr "Rezident"
+
+#: sysdeps/names/procmem.c:47
+msgid "Share"
+msgstr "Koplietotā"
+
+#: sysdeps/names/procmem.c:48
+msgid "Resident Set Size"
+msgstr "Rezidenta Kopas Izmērs"
+
+#: sysdeps/names/procmem.c:48
+msgid "Resident Set Size Limit"
+msgstr "Rezidenta Kopas Izmēra Ierobežojums"
+
+#: sysdeps/names/procmem.c:53
+msgid "Total # of pages of memory"
+msgstr "Kopējais atmiņas lappušu #"
+
+#: sysdeps/names/procmem.c:54
+msgid "Number of pages of virtual memory"
+msgstr "Virtuālās atmiņas lappušu skaits"
+
+#: sysdeps/names/procmem.c:55
+msgid "Number of resident set (non-swapped) pages"
+msgstr "Rezidenta (ne-pārnestās) kopas lappušu skaits"
+
+#: sysdeps/names/procmem.c:56
+msgid "Number of pages of shared (mmap'd) memory"
+msgstr "Izdalītās (atmkart) atmiņas lappušu skaits"
+
+#: 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 ""
+"Lappušu skaits mīnus 3 administratīviem mērķiem, kāds procesam ir reālajā "
+"atmiņā. Šīs ir tikai lappuses, kas tiek skaitītas teksta, datu, vai steka "
+"laukā. Šis neiekļauj lappuses, kas nav ielādētas pēc pieprasījuma vai arī, "
+"kas ir pārnestas ārā."
+
+#: sysdeps/names/procmem.c:62
+msgid ""
+"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
+msgstr "Pašreizējais ierobežojums baitos procesa rki (parasti 2,147,483,647)."
+
+#: sysdeps/names/procsegment.c:42
+msgid "Text_RSS"
+msgstr "Teksta_RKI"
+
+#: sysdeps/names/procsegment.c:42
+msgid "ShLib_RSS"
+msgstr "IzdBibl_RKI"
+
+#: sysdeps/names/procsegment.c:42
+msgid "Data_RSS"
+msgstr "Datu_RKI"
+
+#: sysdeps/names/procsegment.c:42
+msgid "Stack_RSS"
+msgstr "Steka_RKI"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Dirty Size"
+msgstr "Netīrs Izmērs"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Code"
+msgstr "Sākuma_Kods"
+
+#: sysdeps/names/procsegment.c:43
+msgid "End_Code"
+msgstr "Beigu_Kods"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Stack"
+msgstr "Sākuma_Steks"
+
+#: sysdeps/names/procsegment.c:48
+msgid "Text resident set size"
+msgstr "Teksta rezidenta kopas izmērs"
+
+#: sysdeps/names/procsegment.c:49
+msgid "Shared-Lib resident set size"
+msgstr "Izdalītās-Bibl rezidenta kopas izmērs"
+
+#: sysdeps/names/procsegment.c:50
+msgid "Data resident set size"
+msgstr "Datu rezidenta kopas izmērs"
+
+#: sysdeps/names/procsegment.c:51
+msgid "Stack resident set size"
+msgstr "Steka rezidenta kopas izmērs"
+
+#: sysdeps/names/procsegment.c:52
+msgid "Total size of dirty pages"
+msgstr "Kopējais netīro lappušu izmērs"
+
+#: sysdeps/names/procsegment.c:53
+msgid "Address of beginning of code segment"
+msgstr "Koda segmenta sākuma adrese"
+
+#: sysdeps/names/procsegment.c:54
+msgid "Address of end of code segment"
+msgstr "Koda segmenta beigu adrese"
+
+#: sysdeps/names/procsegment.c:55
+msgid "Address of the bottom of stack segment"
+msgstr "Steka segmenta apakšas adrese"
+
+#: sysdeps/names/procsignal.c:40
+msgid "Signal"
+msgstr "Signāls"
+
+#: sysdeps/names/procsignal.c:40
+msgid "Blocked"
+msgstr "Bloķēts"
+
+#: sysdeps/names/procsignal.c:40
+msgid "SigIgnore"
+msgstr "SigIgnorēšana"
+
+#: sysdeps/names/procsignal.c:40
+msgid "SigCatch"
+msgstr "SigĶēriens"
+
+#: sysdeps/names/procsignal.c:45
+msgid "Mask of pending signals"
+msgstr "Neizlemto signālu maska"
+
+#: sysdeps/names/procsignal.c:46
+msgid "Mask of blocked signals"
+msgstr "Boķēto signālu maska"
+
+#: sysdeps/names/procsignal.c:47
+msgid "Mask of ignored signals"
+msgstr "Ignorēto signālu maska"
+
+#: sysdeps/names/procsignal.c:48
+msgid "Mask of caught signals"
+msgstr "Noķerto signālu maska"
+
+#: sysdeps/names/procstate.c:40
+msgid "Cmd"
+msgstr "Kmd"
+
+#: sysdeps/names/procstate.c:40
+msgid "State"
+msgstr "Stāv."
+
+#: sysdeps/names/procstate.c:40
+msgid "UID"
+msgstr "LID"
+
+#: sysdeps/names/procstate.c:40
+msgid "GID"
+msgstr "GID"
+
+#: sysdeps/names/procstate.c:45
+msgid "Basename of executable file in call to exec()"
+msgstr "Palaižamā faila bāzes nosaukums izsaukumā exec()"
+
+#: sysdeps/names/procstate.c:46
+msgid "Single-Char code for process state (S=sleeping)"
+msgstr "Vienas-Rakstzīmes kods procesa stāvoklim (G=guļ)"
+
+#: sysdeps/names/procstate.c:47
+msgid "UID of process"
+msgstr "Procesa UID"
+
+#: sysdeps/names/procstate.c:48
+msgid "GID of process"
+msgstr "Procesa GID"
+
+#: sysdeps/names/proctime.c:44
+msgid "Start_Time"
+msgstr "Sākuma_Laiks"
+
+#: sysdeps/names/proctime.c:44
+msgid "RTime"
+msgstr "RLaiks"
+
+#: sysdeps/names/proctime.c:44
+msgid "UTime"
+msgstr "ULaiks"
+
+#: sysdeps/names/proctime.c:44
+msgid "STime"
+msgstr "SLaiks"
+
+#: sysdeps/names/proctime.c:45
+msgid "CUTime"
+msgstr "CULaiks"
+
+#: sysdeps/names/proctime.c:45
+msgid "CSTime"
+msgstr "CSLaiks"
+
+#: sysdeps/names/proctime.c:45
+msgid "TimeOut"
+msgstr "Taimauts"
+
+#: sysdeps/names/proctime.c:45
+msgid "It_Real_Value"
+msgstr "Tā_Īstā_Vērtība"
+
+#: sysdeps/names/proctime.c:46
+msgid "Frequency"
+msgstr "Frekvence"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_UTime"
+msgstr "XCPU_LLaiks"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_STime"
+msgstr "XCPU_SLaiks"
+
+#: sysdeps/names/proctime.c:51
+msgid "Start time of process in seconds since the epoch"
+msgstr "Sākuma laiks procesam sekundēs kopš epohas"
+
+#: sysdeps/names/proctime.c:52
+msgid "Real time accumulated by process (should be utime + stime)"
+msgstr "Reālais laiks, kādu process uzkrājis (vajadzētu būt llaiks + glaiks)"
+
+#: sysdeps/names/proctime.c:53
+msgid "user-mode CPU time accumulated by process"
+msgstr "Procesa uzkrātais lietotāja režīma CPU laiks"
+
+#: sysdeps/names/proctime.c:54
+msgid "kernel-mode CPU time accumulated by process"
+msgstr "Procesa uzkrātais kerneļa režīma CPU laiks"
+
+#: sysdeps/names/proctime.c:55
+msgid "cumulative utime of process and reaped children"
+msgstr "procesa un piesaistīto bērnu kopējais llaiks"
+
+#: sysdeps/names/proctime.c:56
+msgid "cumulative stime of process and reaped children"
+msgstr "procesa un piesaistīto bērnu kopējais glaiks"
+
+#: sysdeps/names/proctime.c:57
+msgid "The time (in jiffies) of the process's next timeout"
+msgstr "Procesa nākamā taimauta laiks (acumirkļos)"
+
+#: 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 ""
+"Laiks (acumirkļos) pirms nākamais SIGALARM tiek sūtīts procesam intervālu "
+"taimera dēļ."
+
+#: sysdeps/names/proctime.c:60
+msgid "Tick frequency"
+msgstr "Tikšķu frekvence"
+
+#: sysdeps/names/proctime.c:61
+msgid "SMP user-mode CPU time accumulated by process"
+msgstr "Procesa uzkrātais SMP lietotāja režīma CPU laiks"
+
+#: sysdeps/names/proctime.c:62
+msgid "SMP kernel-mode CPU time accumulated by process"
+msgstr "Procesa uzkrātais SMP kerneļa režīma CPU laiks"
+
+#: sysdeps/names/procuid.c:56
+msgid "Uid"
+msgstr "Lid"
+
+#: sysdeps/names/procuid.c:56
+msgid "EUid"
+msgstr "ELid"
+
+#: 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 "Sesija"
+
+#: 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āte"
+
+#: sysdeps/names/procuid.c:63
+msgid "User ID"
+msgstr "Lietotāja ID"
+
+#: sysdeps/names/procuid.c:64
+msgid "Effective User ID"
+msgstr "Efektīvais Lietotāja ID"
+
+#: sysdeps/names/procuid.c:65
+msgid "Group ID"
+msgstr "Grupas ID"
+
+#: sysdeps/names/procuid.c:66
+msgid "Effective Group ID"
+msgstr "Efektīvais Grupas ID"
+
+#: sysdeps/names/procuid.c:67
+msgid "Process ID"
+msgstr "Procesa ID"
+
+#: sysdeps/names/procuid.c:68
+msgid "PID of parent process"
+msgstr "Vecākprocesa PID"
+
+#: sysdeps/names/procuid.c:69
+msgid "Process group ID"
+msgstr "Procesu grupas ID"
+
+#: sysdeps/names/procuid.c:70
+msgid "Session ID"
+msgstr "Sesijas ID"
+
+#: sysdeps/names/procuid.c:71
+msgid "Full device number of controlling terminal"
+msgstr "Kontrolējošā termināļa iekārtas pilns numurs"
+
+#: sysdeps/names/procuid.c:72
+msgid "Terminal process group ID"
+msgstr "Termināļa procesa grupas ID"
+
+#: sysdeps/names/procuid.c:73
+msgid "Kernel scheduling priority"
+msgstr "Kerneļa plānošanas prioritāte"
+
+#: sysdeps/names/procuid.c:74
+msgid "Standard unix nice level of process"
+msgstr "Standarta unix procesa jaukuma līmenis"
+
+#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
+msgid "Number of entries in semaphore map"
+msgstr "Ierakstu skaits semafora kartē"
+
+#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
+msgid "Max number of arrays"
+msgstr "Maks. masīvu skaits"
+
+#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
+msgid "Max semaphores system wide"
+msgstr "Maks. semaforu sistēmas apmēros"
+
+#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
+msgid "Number of undo structures system wide"
+msgstr "Atcelšanas struktūru skaits sistēmas apmēros"
+
+#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
+msgid "Max semaphores per array"
+msgstr "Maks. semaforu uz masīvu"
+
+#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
+msgid "Max ops per semop call"
+msgstr "Maks. oper. uz semaf. izsaukumu"
+
+#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
+msgid "Max number of undo entries per process"
+msgstr "Atcelšanas ierakstu uz procesu maks. skaits"
+
+#: 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 "Semaforas maks. vērtība"
+
+#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
+msgid "Adjust on exit max value"
+msgstr "Noregulēt pie iziešanas maks. vērtību"
+
+#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
+msgid "Max segment size"
+msgstr "Maks segmenta izmērs"
+
+#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
+msgid "Min segment size"
+msgstr "Min segmenta izmērs"
+
+#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
+msgid "Max number of segments"
+msgstr "Maks. segmentu daudzums"
+
+#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
+msgid "Max shared segments per process"
+msgstr "Maks. koplietoto segmentu uz procesu"
+
+#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
+msgid "Max total shared memory"
+msgstr "Maks. kopējā koplietotā atmiņa"
+
+#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
+msgid "Total Swap Space"
+msgstr "Kopējā Maiņatmiņas Vieta"
+
+#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
+msgid "Used Swap Space"
+msgstr "Izlietotā Maiņatmiņas Vieta"
+
+#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
+msgid "Free Swap Space"
+msgstr "Brīvā Maiņatmiņas Vieta"
+
+#: sysdeps/names/swap.c:42
+msgid "Page In"
+msgstr "Lappuse Iekšā"
+
+#: sysdeps/names/swap.c:43
+msgid "Page Out"
+msgstr "Lappuse Ārā"
+
+#: sysdeps/names/swap.c:51
+msgid "Total number of swap pages that have been brought in since system boot"
+msgstr ""
+"Kopējais maiņatmiņas lappušu skaits, kas ticis ienests kopš sistēmas "
+"sāknēšanas"
+
+#: sysdeps/names/swap.c:53
+msgid "Total number of swap pages that have been brought out since system boot"
+msgstr ""
+"Kopējais maiņatmiņas lappušu skaits, kas ticis iznests kopš sistēmas "
+"sāknēšanas"
+
+#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
+msgid "Server Features"
+msgstr "Servera Iespējas"
+
+#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
+msgid "CPU Usage"
+msgstr "CPU Lietojums"
+
+#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78
+msgid "Memory Usage"
+msgstr "Atmiņas Lietojums"
+
+#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79
+msgid "Swap Usage"
+msgstr "Maiņatmiņas Lietojums"
+
+#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80
+msgid "System Uptime"
+msgstr "Sistēmas Darbalaiks"
+
+#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81
+msgid "Load Averange"
+msgstr "Vidējā noslodze"
+
+#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82
+msgid "Shared Memory Limits"
+msgstr "Koplietotās Atmiņas Ierobežojumi"
+
+#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83
+msgid "Message Queue Limits"
+msgstr "Ziņojumu Rindas Ierobežojumi"
+
+#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
+msgid "Semaphore Set Limits"
+msgstr "Semafora Kopas Ierobežojumi"
+
+#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
+msgid "List of running Processes"
+msgstr "Strādājošo Procesu Saraksts"
+
+#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86
+msgid "Process Status information"
+msgstr "Procesa Statusa informācija"
+
+#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87
+msgid "Process UID and TTY information"
+msgstr "Procesa LID un TTY informācija"
+
+#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88
+msgid "Process Memory information"
+msgstr "Procesa Atmiņas informācija"
+
+#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
+msgid "Process Time information"
+msgstr "Procesa Laika informācija"
+
+#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
+msgid "Process Signal information"
+msgstr "Procesa Signāla informācija"
+
+#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
+msgid "Process Kernel Data information"
+msgstr "Procesa Kerneļa Datu informācija"
+
+#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
+msgid "Process Segment information"
+msgstr "Procesa Segmenta informācija"
+
+#: sysdeps/names/sysdeps.c:66
+msgid "Process Arguments"
+msgstr "Procesa Argumenti"
+
+#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
+msgid "Process Memory Map"
+msgstr "Procesa Atmiņas Karte"
+
+#: sysdeps/names/sysdeps.c:68
+msgid "Mount List"
+msgstr "Montējumu Saraksts"
+
+#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96
+msgid "File System Usage"
+msgstr "Failu Sistēmas Lietojums"
+
+#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
+msgid "Network Load"
+msgstr "Tīkla Noslodze"
+
+#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98
+msgid "PPP Statistics"
+msgstr "PPP Statistika"
+
+#: sysdeps/names/sysdeps.c:93
+msgid "Command line arguments of the process"
+msgstr "Procesa komandrindas argumenti"
+
+#: sysdeps/names/sysdeps.c:95
+msgid "List of currently mounted filesystems"
+msgstr "Pašreiz piemontēto failsistēmu saraksts"
+
+#: sysdeps/names/uptime.c:38
+msgid "Uptime"
+msgstr "Darbalaiks"
+
+#: sysdeps/names/uptime.c:39
+msgid "Idletime"
+msgstr "Dīkais laiks"
+
+#: sysdeps/names/uptime.c:44
+msgid "Time in seconds since system boot"
+msgstr "Laiks sekundēs kopš sistēmas ielādes"
+
+#: sysdeps/names/uptime.c:45
+msgid "Time in seconds the system spent in the idle task since system boot"
+msgstr ""
+"Laiks sekundēs, ko sistēma ir pavadījusi neko nedarot, kopš sistēmas ielādes"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "Iekārt"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "Pātraukt"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "Iziet"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "Neatļauta instrukcija"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "Izsekot slazdu"
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "Pātraukt"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "EMT kļūda"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "Peldošā punkta izņēmums"
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "Nobeigt"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "Šinas kļūda"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "Segmentācijas pārkāpums"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "Slikts arguments sistēmas izsaukumam"
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "Pātraukts kanāls"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "Brīdinājuma pulkstenis"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "Pātraukšana"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr "Steidzama situācija kontaktā"
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "Stop"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "Tastatūra stop"
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "Turpināt"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "Bērna statuss ir izmainījies"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "Fona lasīšana no tty"
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "Fona rakstīšana uz tty"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "I/O tagad iespējams"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "CPU limits pārsniegts"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "Faila izmēra limits pārsniegts"
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "Virtuāls brīdinājuma pulkstenis"
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr "Profilēšanas modinātājs"
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "Loga izmēru maiņa"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "Informācijas pieprasījums"
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "Lietotāja definēts signāls 1"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "Lietotāja definēts signāls 2"
diff --git a/po/mk.po b/po/mk.po
new file mode 100644
index 00000000..e8ec729f
--- /dev/null
+++ b/po/mk.po
@@ -0,0 +1,1363 @@
+# translation of libgtop-GNOME-2-0-port.mk.po to
+# translation of libgtop-GNOME-2-0-port.mk.po to Macedonian
+# translation of libgtop-GNOME-2-0-port.mk.po to
+# translation of mk.po to
+# translation of mk.po to Macedonian
+# translation of libgtop.libgtop-GNOME-2-0-port.po to Macedonian
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# Ivan Stojmirov <stojmir@linux.net.mk>, 2002,2003
+# Jovan Kostovski <chombium@freemail.com.mk>, 2003
+# Глигор Костоски <gigo@ajvar.com.mk>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop-GNOME-2-0-port.mk\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2003-06-13 20:52+0200\n"
+"PO-Revision-Date: 2003-06-15 10:09+0200\n"
+"Last-Translator: Ivan Stojmirov <stojmir@linux.net.mk>\n"
+"Language-Team: Macedonian <lug@lists.linux.net.mk>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0\n"
+
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "Тактови (%ld во секунда):"
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr "Вкупно"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "Корисник"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "Убаво"
+
+#: examples/smp.c:74
+msgid "Sys"
+msgstr "Sys"
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "Неактивно"
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "Проценти:"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "Вкупно (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "Корисник (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr "Убаво (%)"
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr "Sys(%)"
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "Неактивно (%)"
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr "Ротација:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "прочитани %d бајти"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "големина на прочитаните податоци"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "прочитани %d бајти"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "запишани %d бајти"
+
+#: src/daemon/gnuserv.c:453
+msgid "Enable debugging"
+msgstr "Овозможи наоѓање грешки"
+
+#: src/daemon/gnuserv.c:453
+msgid "DEBUG"
+msgstr "Најди грешки"
+
+#: src/daemon/gnuserv.c:455
+msgid "Enable verbose output"
+msgstr "Овозможи опширен излез"
+
+#: src/daemon/gnuserv.c:455
+msgid "VERBOSE"
+msgstr "ОПШИРНО"
+
+#: src/daemon/gnuserv.c:457
+msgid "Don't fork into background"
+msgstr "Не дели процеси во позадина"
+
+#: src/daemon/gnuserv.c:457
+msgid "NO-DAEMON"
+msgstr "БЕЗ ДЕМОНИ"
+
+#: src/daemon/gnuserv.c:459
+msgid "Invoked from inetd"
+msgstr "од"
+
+#: src/daemon/gnuserv.c:459
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:493
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"Грешка на опцијата %s: %s.\n"
+"Види '%s --помош' за целосна листа на достапни опции "
+"за командни линии.\n"
+
+#: 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 %s e премногу општ\n"
+
+#: support/getopt.c:693
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: опцијa. --%s не дозволува аргументи\n"
+
+#: support/getopt.c:698
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: опцијa. --%c%s не дозволува аргументи\n"
+
+#: support/getopt.c:715 support/getopt.c:888
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: опцијa. --%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: опцијaбара аргументи --%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"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "Прикажи ја оваа порака за помош"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "Прикажи помош за користење"
+
+#: 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 "Вкупно процесорско време за SMP"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "Процесорско време за SMP во кориснички режим"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "Процесорско време за SMP во кориснички режим"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "Процесорско време за SMP во системски режим"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "Процесорско време за SMP без задачи"
+
+#: 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 "Фреквенција на такт (стандардно 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: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 "Големина во килобајти на за складот пораки"
+
+#: 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/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "Интерфејс флагови"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Subnet"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "Адреса"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "Примени пакети "
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "Пратени пакети"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "Вкупно пакети"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "Примени бајти"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "Пратени бајти"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "Вкупно бајти"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "Грешно примени"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "Грешно пратени"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "Вкупно грешни"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "Колизии"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "Максимална единица за транфер"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "PPP Состојба"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "Примени бајти"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "Пратени бајти"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "Број на примени бајти"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "Број на пратени бајти"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "Големина"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "Должина на вратената низа во бајти."
+
+#: sysdeps/names/prockernel.c:42
+msgid "K_Flags"
+msgstr "K_Флаг"
+
+#: 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 ""
+"Кернел флагови за процесите.\n"
+"Моментално на Линукс секој флаг има сетиран math бит заради тоа што crt0.s "
+"проверува дали има емулација за математички процесор, па ова не е вклучено "
+"во излезот.\n"
+"\n"
+"Ова најверојатно е бубачка бидејќи секој процес не е компајлирана С програма.\n"
+"Math битот треба да биде 4 децимално, а пронајдената вредност е 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 ""
+"Ова е каналот во кој чека процесот. Ова е адресата на системскиот повик и "
+"може да се најде во листата со имиња ако Ви треба текстуално име.(Ако имате "
+"освежена /etc/psdatabase тогаш пробајте ps -I за да го видите 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 "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 resident 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 ""
+"Број на страници кои процесот ги има во меморијата, минус 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 "Текст 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 "Големина на непотребни "
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Code"
+msgstr "Start_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "End_Code"
+msgstr "End_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Stack"
+msgstr "Start_Stack"
+
+#: 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 "SigIgnore"
+
+#: sysdeps/names/procsignal.c:40
+msgid "SigCatch"
+msgstr "SigCatch"
+
+#: 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 "Cmd"
+
+#: sysdeps/names/procstate.c:40
+msgid "State"
+msgstr "Состојба"
+
+#: 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 "Основно име на извршната датотека во повикот на exec()"
+
+#: 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 "UID на процес"
+
+#: sysdeps/names/procstate.c:48
+msgid "GID of process"
+msgstr "GID на процес"
+
+#: sysdeps/names/proctime.c:44
+msgid "Start_Time"
+msgstr "Start_Time"
+
+#: sysdeps/names/proctime.c:44
+msgid "RTime"
+msgstr "RTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "UTime"
+msgstr "UTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "STime"
+msgstr "STime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CUTime"
+msgstr "CUTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CSTime"
+msgstr "CSTime"
+
+#: 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 "Фреквенција"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_UTime"
+msgstr "XCPU_UTime"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_STime"
+msgstr "XCPU_STime"
+
+#: 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 "Кориснични режим, процесорско време акумулирано од процесот"
+
+#: 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 "Вкупно 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 "Време (во 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 ""
+"Време (во jiffies) пред следниот SIGALRM да биде пратен на процесот според "
+"тајмерот."
+
+#: 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 кориснички режим, процесорско време акумулирано од процесот"
+
+#: sysdeps/names/proctime.c:62
+msgid "SMP kernel-mode CPU time accumulated by process"
+msgstr "SMP кернел режим, процесорско време акумулирано од процесот"
+
+#: 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 "Сесија"
+
+#: 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 "Приоритет"
+
+#: sysdeps/names/procuid.c:63
+msgid "User ID"
+msgstr "ID на Корисник"
+
+#: 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 "ID на ефективна Група"
+
+#: 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 "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 ниво на процеси"
+
+#: 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 "големина на структурата 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 "Подеси ја вредноста на променливата \"exit max\""
+
+#: 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 "Вкупно Swap простор"
+
+#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
+msgid "Used Swap Space"
+msgstr "Искористен Swap простор"
+
+#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
+msgid "Free Swap Space"
+msgstr "Слободен Swap простор"
+
+#: 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 "Вкупен број на swap страници што се внесени од бутирањето на системот"
+
+#: sysdeps/names/swap.c:53
+msgid "Total number of swap pages that have been brought out since system boot"
+msgstr "Вкупен број на swap страници што се изнесени од бутирањето на системот"
+
+#: 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 "Swap искористеност"
+
+#: 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 "Mемориска мапа на процесот"
+
+#: 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 "Време во секунди што поминале за неактивна задача од последното бутирање"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "Спушти"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "Прекин"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "Напушти"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "Нелегална инструкција"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "Следи ја замката"
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "Прекини"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "ЕМТ грешка"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "Грешка во операција со реални броеви"
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "Убиј"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "Грешка во магистралата"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr "Грешка при сегментација"
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "Грешен аргумент при системски повик"
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "Прекината цевка"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "Будилник"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "Прекинување"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr "Итна интервенција врз сокет"
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "Стоп"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr "Стоп на тастатура"
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "Продолжи"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "Статусот на дете-процесот се смени"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "Позадинско читање од терминал"
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "Позадинско запишување на терминал"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "Влезно/Излезната операција сега е возможна"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "Процесорскиот лимит е пречекорен"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "Големината на датотека ги надминува границите"
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "Виртуелен алармен часовник"
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr "Аларм со профили"
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "Промена на големина на прозорец"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "Барање за информации"
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "Сигнал 1 дефиниран од корисникот"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "Сигнал 2 дефиниран од корисникот"
+
diff --git a/po/ms.po b/po/ms.po
new file mode 100644
index 00000000..60ae1355
--- /dev/null
+++ b/po/ms.po
@@ -0,0 +1,1341 @@
+# [ Ruang untuk disewa ]
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Hasbullah Bin Pit (sebol)<sebol@ikhlas.com>, 2002.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop (libgtop-GNOME-2-0-port)\n"
+"POT-Creation-Date: 2002-03-24 13:10+0800\n"
+"PO-Revision-Date: 2002-01-15 04:05+0800\n"
+"Last-Translator: Hasbullah Bin Pit (sebol) <sebol@ikhlas.com>\n"
+"Language-Team: Projek Gabai <gabai-penyumbang@list.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: examples/smp.c:68
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "Denyutan (%ld per saat):"
+
+#: examples/smp.c:71
+msgid "Total"
+msgstr "Jumlah"
+
+#: examples/smp.c:71 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "Pengguna"
+
+#: examples/smp.c:71 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "Elok"
+
+#: examples/smp.c:71
+msgid "Sys"
+msgstr "Sis"
+
+#: examples/smp.c:71
+msgid "Idle"
+msgstr "Leka"
+
+#: examples/smp.c:73
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:77
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:94
+msgid "Percent:"
+msgstr "Peratus:"
+
+#: examples/smp.c:95
+msgid "Total (%)"
+msgstr "Jumlah (%)"
+
+#: examples/smp.c:95
+msgid "User (%)"
+msgstr "Pengguna (%)"
+
+#: examples/smp.c:95
+msgid "Nice (%)"
+msgstr "Elok (%)"
+
+#: examples/smp.c:95
+msgid "Sys (%)"
+msgstr "Sis (%)"
+
+#: examples/smp.c:96
+msgid "Idle (%)"
+msgstr "Leka (%s)"
+
+#: examples/smp.c:98
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:114
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:120
+msgid "Spin:"
+msgstr "Putar:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "dibaca %d byte"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "baca saiz data"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "data dibaca %d byte"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "ditulis %d byte"
+
+#: src/daemon/gnuserv.c:448
+msgid "Enable debugging"
+msgstr "Hidupkan pengnyahpepijatan"
+
+#: src/daemon/gnuserv.c:448
+msgid "DEBUG"
+msgstr "NYAHPEPIJAT"
+
+#: src/daemon/gnuserv.c:450
+msgid "Enable verbose output"
+msgstr "Hidupkan output berjela"
+
+#: src/daemon/gnuserv.c:450
+msgid "VERBOSE"
+msgstr "BERJELA"
+
+#: src/daemon/gnuserv.c:452
+msgid "Don't fork into background"
+msgstr "Jangan sepit ke latarbelakang"
+
+#: src/daemon/gnuserv.c:452
+msgid "NO-DAEMON"
+msgstr "TIADA-DAEMON"
+
+#: src/daemon/gnuserv.c:454
+msgid "Invoked from inetd"
+msgstr "Merujuk pada inetd"
+
+#: src/daemon/gnuserv.c:454
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:488
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"Ralat pada opsyen %s: %s.\n"
+"Laksanakan '%s --help' untuk melihat senarai penuh opsyen arahan baris yang "
+"ada.\n"
+
+#: support/error.c:109
+msgid "Unknown system error"
+msgstr "Ralat sistem tidak diketahui"
+
+#: support/getopt.c:669
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: opsyen `%s' adalah kabur\n"
+
+#: support/getopt.c:693
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: opsyen `--%s' tidak mengizinkan hujah\n"
+
+#: support/getopt.c:698
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: opsyen %c%s' tidak mengizinkan hujah\n"
+
+#: support/getopt.c:715 support/getopt.c:888
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: opsyen `%s' memerlukan hujah\n"
+
+#. --option
+#: support/getopt.c:744
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opsyen tidak dikenali `--%s'\n"
+
+#. +option or -option
+#: support/getopt.c:748
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opsyen tidak dikenali '%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: opsyen salah -- %c\n"
+
+#: support/getopt.c:777
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opsyen tidak sah -- %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: opsyen memerlukan hujah -- %c\n"
+
+#: support/getopt.c:854
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opsyen `-W %s' adalah kabur\n"
+
+#: support/getopt.c:872
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opsyen `-W %s' tidak mengizinkan hujah\n"
+
+#: sysdeps/names/cpu.c:43
+msgid "Total CPU Time"
+msgstr "Jumlah masa CPU"
+
+#: sysdeps/names/cpu.c:44
+msgid "CPU Time in User Mode"
+msgstr "Masa CPU dalam Mod Pengguna"
+
+#: sysdeps/names/cpu.c:45
+msgid "CPU Time in User Mode (nice)"
+msgstr "Masa CPU dalam Mod Pengguna (elok)"
+
+#: sysdeps/names/cpu.c:46
+msgid "CPU Time in System Mode"
+msgstr "Masa CPU dalam Mod Sistem"
+
+#: sysdeps/names/cpu.c:47
+msgid "CPU Time in the Idle Task"
+msgstr "Masa CPU dalam Task Leka"
+
+#: sysdeps/names/cpu.c:48
+msgid "Tick Frequency"
+msgstr "Frekuensi denyutan"
+
+#: sysdeps/names/cpu.c:49
+msgid "SMP Total CPU Time"
+msgstr "Jumlah Masa CPU SMP"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "Masa CPU SMP dalam Mod Pengguna"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "Masa CPU SMP dalam Mod Pengguna (elok)"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "Masa CPU SMP dalam Mod Sistem"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "Masa CPU SMP dalam Task Leka"
+
+#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
+msgid "Number of clock ticks since system boot"
+msgstr "Bilangan denyutan jam sejak boot sistem"
+
+#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65
+msgid "Number of clock ticks the system spent in user mode"
+msgstr "Bilangan denyutan jam diluangkan dalam mod pengguna"
+
+#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66
+msgid "Number of clock ticks the system spent in user mode (nice)"
+msgstr "Bilangan denyutan jam diluangkan dalam mod pengguna (nice)"
+
+#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
+msgid "Number of clock ticks the system spent in system mode"
+msgstr "Bilangan denyutan jam diluangkan dalam mod sistem"
+
+#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
+msgid "Number of clock ticks the system spent in the idle task"
+msgstr "Bilangan denyutan jam diluangkan dalam task leka"
+
+#: sysdeps/names/cpu.c:63
+msgid "Tick frequency (default is 100)"
+msgstr "Frekuensi denyutan (default ialah 100)"
+
+#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
+msgid "Total blocks"
+msgstr "Jumlah blok"
+
+#: sysdeps/names/fsusage.c:40
+msgid "Free blocks"
+msgstr "Blok kosong"
+
+#: sysdeps/names/fsusage.c:41
+msgid "Available blocks"
+msgstr "Blok yang tinggal"
+
+#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
+msgid "Total file nodes"
+msgstr "Jumlah nod fail"
+
+#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
+msgid "Free file nodes"
+msgstr "Nod fail kosong"
+
+#: sysdeps/names/fsusage.c:49
+msgid "Free blocks available to the superuser"
+msgstr "Blok kosong yang ada untuk superuser"
+
+#: sysdeps/names/fsusage.c:50
+msgid "Free blocks available to non-superusers"
+msgstr "block kosong yang ada untuk bukan superuser"
+
+#: sysdeps/names/loadavg.c:39
+msgid "Load Average"
+msgstr "Purata Muatan"
+
+#: sysdeps/names/loadavg.c:40
+msgid "Running Tasks"
+msgstr "Task Terlaksana"
+
+#: sysdeps/names/loadavg.c:41
+msgid "Number of Tasks"
+msgstr "Bilangan Task"
+
+#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50
+msgid "Last PID"
+msgstr "PID Terakhir"
+
+#: sysdeps/names/loadavg.c:47
+msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
+msgstr ""
+"Bilangan job yang dilaksanakan serentak berpurata lebih daripada 1,5 dan 15 "
+"minit"
+
+#: sysdeps/names/loadavg.c:48
+msgid "Number of tasks currently running"
+msgstr "Bilangan task sedang terlaksana"
+
+#: sysdeps/names/loadavg.c:49
+msgid "Total number of tasks"
+msgstr "Jumlah bilangan task"
+
+#: sysdeps/names/mem.c:41
+msgid "Total Memory"
+msgstr "Jumlah Memori"
+
+#: sysdeps/names/mem.c:42
+msgid "Used Memory"
+msgstr "Memori digunakan"
+
+#: sysdeps/names/mem.c:43
+msgid "Free Memory"
+msgstr "Memori Kosong"
+
+#: sysdeps/names/mem.c:44
+msgid "Shared Memory"
+msgstr "Memori Terkongsi"
+
+#: sysdeps/names/mem.c:45
+msgid "Buffers"
+msgstr "Buffer"
+
+#: sysdeps/names/mem.c:46
+msgid "Cached"
+msgstr "Dicache"
+
+#: sysdeps/names/mem.c:48
+msgid "Locked"
+msgstr "Terkunci"
+
+#: sysdeps/names/mem.c:53
+msgid "Total physical memory in kB"
+msgstr "Jumlah memori fizikal dalam kB"
+
+#: sysdeps/names/mem.c:54
+msgid "Used memory size in kB"
+msgstr "Saiz memori digunakan dalam kB"
+
+#: sysdeps/names/mem.c:55
+msgid "Free memory size in kB"
+msgstr "Saiz memori kosong dalam kB"
+
+#: sysdeps/names/mem.c:56
+msgid "Shared memory size in kB"
+msgstr "Saiz Memori Terkongsi dalam kB"
+
+#: sysdeps/names/mem.c:57
+msgid "Size of buffers kB"
+msgstr "Saiz buffer kB"
+
+#: sysdeps/names/mem.c:58
+msgid "Size of cached memory in kB"
+msgstr "Saiz Memori cached dalam kB"
+
+#: sysdeps/names/mem.c:59
+msgid "Memory used from user processes in kB"
+msgstr "Memori yang digunakan untuk proses pengguna dalam kB"
+
+#: sysdeps/names/mem.c:60
+msgid "Memory in locked pages in kB"
+msgstr "Memori dalam page terkunci dalam 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 "Bilangan unsur senarai"
+
+#: 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 "Jumlah saiz senarai"
+
+#: 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 "Saiz unsur senarai tunggal"
+
+#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51
+msgid "Size in kilobytes of message pool"
+msgstr "Saiz dalam kilobyte pool mesej"
+
+#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
+msgid "Number of entries in message map"
+msgstr "Bilangan kemasukan di peta mesej"
+
+#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
+msgid "Max size of message"
+msgstr "Saiz max mesej"
+
+#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
+msgid "Default max size of queue"
+msgstr "Saiz max default untuk queuqe"
+
+#: 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 "Saiz segmen mesej"
+
+#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
+msgid "Number of system message headers"
+msgstr "Bilangan kepala mesej sistem"
+
+#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "Flag Antaramuka"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Subnet"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "Alamat"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "Paket Masuk"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "Paket Keluar"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "Jumlah Paket"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "Byte Masuk"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "Byte Keluar"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "Jumlah Byte"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "Ralat Masuk"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "Ralat Keluar"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "Jumlah Ralat"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "Perlanggaran"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "Unit Pemindahan Maksima"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "Keadaan PPP"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "Byte Input"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "Byte output"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "Bilangan byte input"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "Bilangan byte output"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "Saiz"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "Panjang dalam byte bagi rentetan yang dikembalikan"
+
+#: 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 ""
+"Flag kernel bagi proses.\n"
+"\n"
+"Di dlaam linux, semua flag mempunyai set bit math, kerana crt0.s memeriksa "
+"emulati math, oleh itu ia tidak akan disertakan di dalam output.\n"
+"\n"
+"Ini mungkin pejijat, kerana bukan semua program dikompil oleh C.\n"
+"\n"
+"Bit math sepatutnya desimal 4, dan bit surihan ialah 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 ""
+"Bilangan kesalahan kecil yang proses lakukan, yang mana tidak memerlukan "
+"memuatan page memori daripada cakera."
+
+#. 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 ""
+"Bilangan kesalahan besar yang proses lakukan, yang mana tidak memerlukan "
+"memuatkan page memori daripada cakera."
+
+#. CMin_Flt
+#: sysdeps/names/prockernel.c:65
+msgid "The number of minor faults that the process and its children have made."
+msgstr "Bilangan kesalahan kecil yang proses dan anaknya telah lakukan."
+
+#. CMaj_Flt
+#: sysdeps/names/prockernel.c:68
+msgid "The number of major faults that the process and its children have made."
+msgstr "Bilangan kesalahan besar yang proses dan anaknya telah lakukan."
+
+#. 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 "Ini adalah nama tekstual bagi medan `nwchan'"
+
+#: sysdeps/names/procmem.c:47
+msgid "Virtual"
+msgstr "Maya"
+
+#: sysdeps/names/procmem.c:47
+msgid "Resident"
+msgstr "Mastautin"
+
+#: sysdeps/names/procmem.c:47
+msgid "Share"
+msgstr "Terkongsi"
+
+#: sysdeps/names/procmem.c:48
+msgid "Resident Set Size"
+msgstr "Saiz set mastautin"
+
+#: sysdeps/names/procmem.c:48
+msgid "Resident Set Size Limit"
+msgstr "Had Saiz Set Mastautin"
+
+#: sysdeps/names/procmem.c:53
+msgid "Total # of pages of memory"
+msgstr "Jumlah # page bagi memori"
+
+#: sysdeps/names/procmem.c:54
+msgid "Number of pages of virtual memory"
+msgstr "Bilangan page memori maya"
+
+#: sysdeps/names/procmem.c:55
+msgid "Number of resident set (non-swapped) pages"
+msgstr "Bilangan set mastautin page (tidak-swap)"
+
+#: sysdeps/names/procmem.c:56
+msgid "Number of pages of shared (mmap'd) memory"
+msgstr "Bilangan page bagi memori shared (mmap'd)"
+
+#: 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 ""
+"Bilangan page yang proses ada pada memori sebenar, tolak 3 untuk kegunaan "
+"pentadbiran. Ini hanya page yang mengira teks, data, atak ruang stack "
+
+#: sysdeps/names/procmem.c:62
+msgid ""
+"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
+msgstr "Had semasa dalam byte pada rss proses (usually 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 "Saiz Kotor"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Code"
+msgstr "Start_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "End_Code"
+msgstr "End_Code"
+
+#: sysdeps/names/procsegment.c:43
+msgid "Start_Stack"
+msgstr "Start_Stack"
+
+#: sysdeps/names/procsegment.c:48
+msgid "Text resident set size"
+msgstr "Saiz teks set mastautin"
+
+#: sysdeps/names/procsegment.c:49
+msgid "Shared-Lib resident set size"
+msgstr "Saiz set mastautin Shared-Lib"
+
+#: sysdeps/names/procsegment.c:50
+msgid "Data resident set size"
+msgstr "Saiz set mastautin data"
+
+#: sysdeps/names/procsegment.c:51
+msgid "Stack resident set size"
+msgstr "Saiz set mastautin stack"
+
+#: sysdeps/names/procsegment.c:52
+msgid "Total size of dirty pages"
+msgstr "Jumlah saiz page kotor"
+
+#: sysdeps/names/procsegment.c:53
+msgid "Address of beginning of code segment"
+msgstr "Alamat bagi permulaan segmen kod"
+
+#: sysdeps/names/procsegment.c:54
+msgid "Address of end of code segment"
+msgstr "Alamat bagi hujung segmen kod"
+
+#: sysdeps/names/procsegment.c:55
+msgid "Address of the bottom of stack segment"
+msgstr "Alamat bagi bahagian bawah segmen stack"
+
+#: sysdeps/names/procsignal.c:40
+msgid "Signal"
+msgstr "Isyarat"
+
+#: sysdeps/names/procsignal.c:40
+msgid "Blocked"
+msgstr "diblok"
+
+#: 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 "Topengan isyarat yang tertunda"
+
+#: sysdeps/names/procsignal.c:46
+msgid "Mask of blocked signals"
+msgstr "Topengan isyarat yang diblok"
+
+#: sysdeps/names/procsignal.c:47
+msgid "Mask of ignored signals"
+msgstr "Topengan isyarat yang diabaikan"
+
+#: sysdeps/names/procsignal.c:48
+msgid "Mask of caught signals"
+msgstr "Topengan isyarat yang ditangkap"
+
+#: sysdeps/names/procstate.c:40
+msgid "Cmd"
+msgstr "Cmd"
+
+#: sysdeps/names/procstate.c:40
+msgid "State"
+msgstr "Keadaan"
+
+#: 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 "Nama asas bagi fail bolehlaksanai yang panggil exec()"
+
+#: sysdeps/names/procstate.c:46
+msgid "Single-Char code for process state (S=sleeping)"
+msgstr "Kod Aksara-Tunggal bagi keadaan proses (S=sleeping)"
+
+#: sysdeps/names/procstate.c:47
+msgid "UID of process"
+msgstr "UID bagi proses"
+
+#: sysdeps/names/procstate.c:48
+msgid "GID of process"
+msgstr "GID bagi proses"
+
+#: sysdeps/names/proctime.c:44
+msgid "Start_Time"
+msgstr "Masa_Mula"
+
+#: sysdeps/names/proctime.c:44
+msgid "RTime"
+msgstr "RTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "UTime"
+msgstr "UTime"
+
+#: sysdeps/names/proctime.c:44
+msgid "STime"
+msgstr "STime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CUTime"
+msgstr "CUTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "CSTime"
+msgstr "CSTime"
+
+#: sysdeps/names/proctime.c:45
+msgid "TimeOut"
+msgstr "Hadmasa"
+
+#: sysdeps/names/proctime.c:45
+msgid "It_Real_Value"
+msgstr "It_Real_Value"
+
+#: sysdeps/names/proctime.c:46
+msgid "Frequency"
+msgstr "Kekerapan"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_UTime"
+msgstr "XCPU_UTime"
+
+#: sysdeps/names/proctime.c:46
+msgid "XCPU_STime"
+msgstr "XCPU_STime"
+
+#: sysdeps/names/proctime.c:51
+msgid "Start time of process in seconds since the epoch"
+msgstr "Masa bula bagi proses dalam saat sejak epoch"
+
+#: sysdeps/names/proctime.c:52
+msgid "Real time accumulated by process (should be utime + stime)"
+msgstr "Masa sebenar dikumulasikan oleh proses (sepatutnya utime + stime)"
+
+#: sysdeps/names/proctime.c:53
+msgid "user-mode CPU time accumulated by process"
+msgstr "Masa CPU mod-pengguna dihimpunkan mengikut proses"
+
+#: sysdeps/names/proctime.c:54
+msgid "kernel-mode CPU time accumulated by process"
+msgstr "Masa CPU mod-kernel dihimpunkan mengikut proses"
+
+#: sysdeps/names/proctime.c:55
+msgid "cumulative utime of process and reaped children"
+msgstr "Utime kumulatif bagi proses dan anak pungutnya"
+
+#: sysdeps/names/proctime.c:56
+msgid "cumulative stime of process and reaped children"
+msgstr "stime kumulatif bagi proses dan anak pungutnya"
+
+#: sysdeps/names/proctime.c:57
+msgid "The time (in jiffies) of the process's next timeout"
+msgstr "Masa (dalam jiffies) bagi hadmasa proses seterusnya"
+
+#: 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 ""
+"Masa (dalam jiffies) sebelum SIGALRM seterusnya di hantar ke proses kerana "
+"selangwaktu timer"
+
+#: sysdeps/names/proctime.c:60
+msgid "Tick frequency"
+msgstr "kekerapa denyutan"
+
+#: sysdeps/names/proctime.c:61
+msgid "SMP user-mode CPU time accumulated by process"
+msgstr "Masa CPU mod-pengguna SMP dihimpunkan mengikut proses"
+
+#: sysdeps/names/proctime.c:62
+msgid "SMP kernel-mode CPU time accumulated by process"
+msgstr "Masa CPU mod-kernel SMP dihimpunkan mengikut proses"
+
+#: 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 "Sessi"
+
+#: 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 "Prioriti"
+
+#: sysdeps/names/procuid.c:63
+msgid "User ID"
+msgstr "ID Pengguna"
+
+#: sysdeps/names/procuid.c:64
+msgid "Effective User ID"
+msgstr "ID Pengguna efektif"
+
+#: sysdeps/names/procuid.c:65
+msgid "Group ID"
+msgstr "ID kumpulan"
+
+#: sysdeps/names/procuid.c:66
+msgid "Effective Group ID"
+msgstr "ID kumpulan efektif"
+
+#: sysdeps/names/procuid.c:67
+msgid "Process ID"
+msgstr "ID Proses"
+
+#: sysdeps/names/procuid.c:68
+msgid "PID of parent process"
+msgstr "PID bagi ibu proses"
+
+#: sysdeps/names/procuid.c:69
+msgid "Process group ID"
+msgstr "ID Kumpulan proses"
+
+#: sysdeps/names/procuid.c:70
+msgid "Session ID"
+msgstr "ID Sessi"
+
+#: sysdeps/names/procuid.c:71
+msgid "Full device number of controlling terminal"
+msgstr "Nombor peranti penuh untuk terminal kawalan"
+
+#: sysdeps/names/procuid.c:72
+msgid "Terminal process group ID"
+msgstr "ID kumpulan proses bagi terminal"
+
+#: sysdeps/names/procuid.c:73
+msgid "Kernel scheduling priority"
+msgstr "Penjadualan prioriti kernel"
+
+#: sysdeps/names/procuid.c:74
+msgid "Standard unix nice level of process"
+msgstr "Aras elok unix piawai bagi proses"
+
+#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
+msgid "Number of entries in semaphore map"
+msgstr "Bilangan kemasukan pada peta semaphore"
+
+#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
+msgid "Max number of arrays"
+msgstr "Bilangan maksima array"
+
+#: 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 "Maksima semaphore per array"
+
+#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
+msgid "Max ops per semop call"
+msgstr "Maksima operasi per panggilan semop"
+
+#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
+msgid "Max number of undo entries per process"
+msgstr "Bilangan maksima kemasukan nyahcara per proses"
+
+#: 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 "Nilai maksima Semaphore"
+
+#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
+msgid "Adjust on exit max value"
+msgstr "Sesuaikan pada nilai maksima keluar"
+
+#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
+msgid "Max segment size"
+msgstr "Saiz segmen maksima"
+
+#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
+msgid "Min segment size"
+msgstr "Saiz segmen minima"
+
+#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
+msgid "Max number of segments"
+msgstr "Bilangan segmen maksima"
+
+#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
+msgid "Max shared segments per process"
+msgstr "Segmen terkongsi maksima per proses"
+
+#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
+msgid "Max total shared memory"
+msgstr "Jumlah maksma memori terkongsi"
+
+#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
+msgid "Total Swap Space"
+msgstr "Jumlah Ruang Swap"
+
+#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
+msgid "Used Swap Space"
+msgstr "Ruang Swap Digunakan"
+
+#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
+msgid "Free Swap Space"
+msgstr "Swap Space Bebas"
+
+#: sysdeps/names/swap.c:42
+msgid "Page In"
+msgstr "Page masuk"
+
+#: sysdeps/names/swap.c:43
+msgid "Page Out"
+msgstr "Page Keluar"
+
+#: sysdeps/names/swap.c:51
+msgid "Total number of swap pages that have been brought in since system boot"
+msgstr "Jumlah bilangan page swap yang dibawa masuk sejak sistem dihidupkan"
+
+#: sysdeps/names/swap.c:53
+msgid "Total number of swap pages that have been brought out since system boot"
+msgstr "Jumlah bilangan page swap yang dibawa keluar sejak sistem dihidupkan"
+
+#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
+msgid "Server Features"
+msgstr "Sifat Pelayan"
+
+#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
+msgid "CPU Usage"
+msgstr "Penggunaan CPU"
+
+#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78
+msgid "Memory Usage"
+msgstr "Penggunaan Memori"
+
+#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79
+msgid "Swap Usage"
+msgstr "Penggunaan Swap"
+
+#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80
+msgid "System Uptime"
+msgstr "Uptime Sistem"
+
+#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81
+msgid "Load Averange"
+msgstr "Purata Muatan"
+
+#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82
+msgid "Shared Memory Limits"
+msgstr "Had Memori Terkongsi"
+
+#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83
+msgid "Message Queue Limits"
+msgstr "Had Queue Mesej"
+
+#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
+msgid "Semaphore Set Limits"
+msgstr "Had Set Semaphore"
+
+#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
+msgid "List of running Processes"
+msgstr "Senarai proses terlaksana"
+
+#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86
+msgid "Process Status information"
+msgstr "Maklumat Status proses"
+
+#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87
+msgid "Process UID and TTY information"
+msgstr "Maklumat UID dan TTY proses"
+
+#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88
+msgid "Process Memory information"
+msgstr "Maklumat Memori proses"
+
+#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
+msgid "Process Time information"
+msgstr "Maklumat Masa proses"
+
+#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
+msgid "Process Signal information"
+msgstr "Maklumat Isyarat proses"
+
+#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
+msgid "Process Kernel Data information"
+msgstr "Maklumat Data Kernel proses"
+
+#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
+msgid "Process Segment information"
+msgstr "Makluman Segmen proses"
+
+#: sysdeps/names/sysdeps.c:66
+msgid "Process Arguments"
+msgstr "Hujah Proses"
+
+#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
+msgid "Process Memory Map"
+msgstr "Peta Meori Proses"
+
+#: sysdeps/names/sysdeps.c:68
+msgid "Mount List"
+msgstr "Senarai lekapan"
+
+#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96
+msgid "File System Usage"
+msgstr "Penggunaan Sistem Fail"
+
+#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
+msgid "Network Load"
+msgstr "Muatan Rangkaian"
+
+#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98
+msgid "PPP Statistics"
+msgstr "Statistik PPP"
+
+#: sysdeps/names/sysdeps.c:93
+msgid "Command line arguments of the process"
+msgstr "Hujah arahan baris proses"
+
+#: sysdeps/names/sysdeps.c:95
+msgid "List of currently mounted filesystems"
+msgstr "Senarai sistem fail yang dilekap"
+
+#: sysdeps/names/uptime.c:38
+msgid "Uptime"
+msgstr "Uptime"
+
+#: sysdeps/names/uptime.c:39
+msgid "Idletime"
+msgstr "Masaleka"
+
+#: sysdeps/names/uptime.c:44
+msgid "Time in seconds since system boot"
+msgstr "Masa dalam saat sejak sistem dihidupkan"
+
+#: sysdeps/names/uptime.c:45
+msgid "Time in seconds the system spent in the idle task since system boot"
+msgstr ""
+"Masa dalam saat sistem peruntukkan pada task leka sejak sistem dihidupkan"
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr "Letak"
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr "Gangguan"
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "Keluar"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr "Arahan terlarang"
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr "Jerangkap Surih"
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr "Batal"
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr "Ralat EMT"
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr "Pengecualian Floating-point"
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr "Bunuh"
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr "Ralat Bas"
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr "Hujah teruk ke panggilan sistem"
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr "Paip pecah"
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr "Jam loceng"
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr "Penamatan"
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr "Keadaan segera pada soket"
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "Henti"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr "Teruskan"
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr "Status anak berubah"
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr "Bacaan latar belakang daripada tty"
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr "Penulisan latar belakang daripada tty"
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr "I/O sekarang dibolehkan"
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr "CPU melebihi had"
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr "Saiz fail melebihi had"
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr "Jam loceng maya"
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr "Memprofil jam loceng"
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr "Penukaran saiz tetingkap"
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr "Permintaan maklumat"
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr "Isyarat dinyatakan pengguna 1"
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr "Isyarat dinyatakan pengguna 2"
diff --git a/po/sq.po b/po/sq.po
new file mode 100644
index 00000000..b27a6141
--- /dev/null
+++ b/po/sq.po
@@ -0,0 +1,1335 @@
+# Albanian translation of libgtop
+# This file is distributed under the same license as the libgtop package.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Laurent Dhima <laurenti@alblinux.net>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgtop\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2003-09-25 13:08+0200\n"
+"PO-Revision-Date: 2003-10-01 01:44+0200\n"
+"Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
+"Language-Team: Albanian <gnome-albanian-perkthyesit@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0.2\n"
+
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr "Tick (%ld për sekondë):"
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr "Gjithsej"
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "Përdoruesi"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr "Nice"
+
+#: examples/smp.c:74
+msgid "Sys"
+msgstr "Sys"
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr "Idle"
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr "Përqindja:"
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr "Gjithsej (%)"
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr "Përdoruesi (%)"
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr "Nice (%)"
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr "Sys (%)"
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr "Idle (%)"
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr "Spin:"
+
+#: lib/read.c:75
+#, c-format
+msgid "read %d bytes"
+msgstr "u lexuan %d byte"
+
+#: lib/read_data.c:49
+msgid "read data size"
+msgstr "madhësia e të dhënave të lexuara"
+
+#: lib/read_data.c:66
+#, c-format
+msgid "read data %d bytes"
+msgstr "u lexuan %d byte me të dhëna"
+
+#: lib/write.c:48
+#, c-format
+msgid "write %d bytes"
+msgstr "u shkruan %d të dhëna"
+
+#: src/daemon/gnuserv.c:453
+msgid "Enable debugging"
+msgstr "Aktivo debug"
+
+#: src/daemon/gnuserv.c:453
+msgid "DEBUG"
+msgstr "DEBUG"
+
+#: src/daemon/gnuserv.c:455
+msgid "Enable verbose output"
+msgstr "Aktivo output e hollësishëm"
+
+#: src/daemon/gnuserv.c:455
+msgid "VERBOSE"
+msgstr "VERBOSE"
+
+#: src/daemon/gnuserv.c:457
+msgid "Don't fork into background"
+msgstr "Mos kryej fork në background"
+
+#: src/daemon/gnuserv.c:457
+msgid "NO-DAEMON"
+msgstr "NO-DAEMON"
+
+#: src/daemon/gnuserv.c:459
+msgid "Invoked from inetd"
+msgstr "Thërritur nga inetd"
+
+#: src/daemon/gnuserv.c:459
+msgid "INETD"
+msgstr "INETD"
+
+#: src/daemon/gnuserv.c:493
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+msgstr ""
+"Gabim në opcionin %s: %s.\n"
+"Zbato '%s --help' për të shikuar listën e plotë të opcioneve të komandës.\n"
+
+#: support/error.c:109
+msgid "Unknown system error"
+msgstr "Gabim i panjohur sistemi "
+
+#: support/getopt.c:669
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: opcioni `%s' nuk është i qartë\n"
+
+#: support/getopt.c:693
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: opcioni `--%s' nuk lejon një argument\n"
+
+#: support/getopt.c:698
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: opcioni `%c%s' nuk lejon një argument\n"
+
+#: support/getopt.c:715 support/getopt.c:888
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: opcioni `%s' ka nevojë për një argument\n"
+
+#. --option
+#: support/getopt.c:744
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opcion i panjohur `--%s'\n"
+
+#. +option or -option
+#: support/getopt.c:748
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opcion i panjohur `%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: opcion ilegal -- %c\n"
+
+#: support/getopt.c:777
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opcion i pavlefshëm -- %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: opcioni ka nevojë për një argument -- %c\n"
+
+#: support/getopt.c:854
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opcioni `-W %s' nuk është i qartë\n"
+
+#: support/getopt.c:872
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opcioni `-W %s' nuk lejon një argument\n"
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr "Shfaq këtë mesazh ndihmues"
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr "Shfaq një mesazh të shkurtër përdorimi"
+
+#: sysdeps/names/cpu.c:43
+msgid "Total CPU Time"
+msgstr "Koha totale e CPU"
+
+#: sysdeps/names/cpu.c:44
+msgid "CPU Time in User Mode"
+msgstr "Koha e CPU në modalitet përdoruesi"
+
+#: sysdeps/names/cpu.c:45
+msgid "CPU Time in User Mode (nice)"
+msgstr "Koha e CPU në modalitet përdoruesi (nice)"
+
+#: sysdeps/names/cpu.c:46
+msgid "CPU Time in System Mode"
+msgstr "Koha e CPU në modalitet sistemi"
+
+#: sysdeps/names/cpu.c:47
+msgid "CPU Time in the Idle Task"
+msgstr "Koha e CPU në idle"
+
+#: sysdeps/names/cpu.c:48
+msgid "Tick Frequency"
+msgstr "Frekuenca e tick"
+
+#: sysdeps/names/cpu.c:49
+msgid "SMP Total CPU Time"
+msgstr "Koha totale e CPU SMP"
+
+#: sysdeps/names/cpu.c:50
+msgid "SMP CPU Time in User Mode"
+msgstr "Koha e CPU SMP në modalitet përdoruesi"
+
+#: sysdeps/names/cpu.c:51
+msgid "SMP CPU Time in User Mode (nice)"
+msgstr "Koha e CPU SMP në modalitet përdoruesi (nice)"
+
+#: sysdeps/names/cpu.c:52
+msgid "SMP CPU Time in System Mode"
+msgstr "Koha e CPU SMP në modalitet sistemi"
+
+#: sysdeps/names/cpu.c:53
+msgid "SMP CPU Time in the Idle Task"
+msgstr "Koha e CPU SMP në idle"
+
+#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
+msgid "Number of clock ticks since system boot"
+msgstr "Numri i tick që nga nisja e sistemit"
+
+#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65
+msgid "Number of clock ticks the system spent in user mode"
+msgstr "Numri i tick të shpenzuar në modalitet përdoruesi"
+
+#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66
+msgid "Number of clock ticks the system spent in user mode (nice)"
+msgstr "Numri i tick të shpenzuar në modalitet përdoruesi (nice)"
+
+#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
+msgid "Number of clock ticks the system spent in system mode"
+msgstr "Numri i tick të shpenzuar në modalitet sistemi"
+
+#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
+msgid "Number of clock ticks the system spent in the idle task"
+msgstr "Numri i tick të shpenzuar në idle"
+
+#: sysdeps/names/cpu.c:63
+msgid "Tick frequency (default is 100)"
+msgstr "Frekuenca e tick (e prezgjedhur është 100)"
+
+#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
+msgid "Total blocks"
+msgstr "Gjithsej blloqe"
+
+#: sysdeps/names/fsusage.c:40
+msgid "Free blocks"
+msgstr "Blloqe të lirë"
+
+#: sysdeps/names/fsusage.c:41
+msgid "Available blocks"
+msgstr "Blloqe në dispozicion"
+
+#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
+msgid "Total file nodes"
+msgstr "Gjithsej nyje file"
+
+#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
+msgid "Free file nodes"
+msgstr "Nyje file të lira"
+
+#: sysdeps/names/fsusage.c:49
+msgid "Free blocks available to the superuser"
+msgstr "Blloqe të lirë në dispozicion të super-përdoruesit"
+
+#: sysdeps/names/fsusage.c:50
+msgid "Free blocks available to non-superusers"
+msgstr "Blloqe të lirë në dispozicion të jo super-përdoruesve"
+
+#: sysdeps/names/loadavg.c:39
+msgid "Load Average"
+msgstr "Mesatarja e ngarkesës"
+
+#: sysdeps/names/loadavg.c:40
+msgid "Running Tasks"
+msgstr "Procese në ekzekutim"
+
+#: sysdeps/names/loadavg.c:41
+msgid "Number of Tasks"
+msgstr "Numri i proceseve"
+
+#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50
+msgid "Last PID"
+msgstr "PID i fundit"
+
+#: sysdeps/names/loadavg.c:47
+msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
+msgstr "Numri i job të zbatuar njëkohësisht (mesatarja mbi 1, 5 dhe 15 minuta)"
+
+#: sysdeps/names/loadavg.c:48
+msgid "Number of tasks currently running"
+msgstr "Numri i proceseve aktualisht në ekzekutim"
+
+#: sysdeps/names/loadavg.c:49
+msgid "Total number of tasks"
+msgstr "Numri i plotë i proceseve"
+
+#: sysdeps/names/mem.c:41
+msgid "Total Memory"
+msgstr "Gjithsej kujtesë"
+
+#: sysdeps/names/mem.c:42
+msgid "Used Memory"
+msgstr "Kujtesa e përdorur"
+
+#: sysdeps/names/mem.c:43
+msgid "Free Memory"
+msgstr "Kujtesa e lirë"
+
+#: sysdeps/names/mem.c:44
+msgid "Shared Memory"
+msgstr "Kujtesa e përbashkët"
+
+#: sysdeps/names/mem.c:45
+msgid "Buffers"
+msgstr "Buffers"
+
+#: sysdeps/names/mem.c:46
+msgid "Cached"
+msgstr "Në cache"
+
+#: sysdeps/names/mem.c:48
+msgid "Locked"
+msgstr "E bllokuar"
+
+#: sysdeps/names/mem.c:53
+msgid "Total physical memory in kB"
+msgstr "Kujtesa e plotë fizike në kB"
+
+#: sysdeps/names/mem.c:54
+msgid "Used memory size in kB"
+msgstr "Madhësia e kujtesës së përdorur në kB"
+
+#: sysdeps/names/mem.c:55
+msgid "Free memory size in kB"
+msgstr "Madhësia e kujtesës së lirë në kB"
+
+#: sysdeps/names/mem.c:56
+msgid "Shared memory size in kB"
+msgstr "Madhësia e kujtesës së përbashkët në kB"
+
+#: sysdeps/names/mem.c:57
+msgid "Size of buffers kB"
+msgstr "Madhësia e buffer në kB"
+
+#: sysdeps/names/mem.c:58
+msgid "Size of cached memory in kB"
+msgstr "Madhësia e kujtesës në cache në kB"
+
+#: sysdeps/names/mem.c:59
+msgid "Memory used from user processes in kB"
+msgstr "Kujtesa e përdorur nga proceset e përdoruesit në kB"
+
+#: sysdeps/names/mem.c:60
+msgid "Memory in locked pages in kB"
+msgstr "Kujtesa në faqet e bllokuara në 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 "Numri i elementëve të listës"
+
+#: 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 "Dimensionet e plota të listës"
+
+#: 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 "Madhësia e një elementi të vetëm të listës"
+
+#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51
+msgid "Size in kilobytes of message pool"
+msgstr "Madhësia në kB e mesazhit"
+
+#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
+msgid "Number of entries in message map"
+msgstr "Numri i zërave tek harta e mesazhit"
+
+#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
+msgid "Max size of message"
+msgstr "Madhësia maksimum e mesazhit"
+
+#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
+msgid "Default max size of queue"
+msgstr "Madhësia maksimum e prezgjedhur e pritjes"
+
+#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
+msgid "Max queues system wide"
+msgstr "Numri maksimum i pritjeve në sistem"
+
+#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
+msgid "Message segment size"
+msgstr "Madhësia e segmentit të mesazhit"
+
+#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
+msgid "Number of system message headers"
+msgstr "Numri i headers të mesazheve të sistemit"
+
+#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr "Flag e interfaqes"
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr "MTU"
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr "Nënrrjeti"
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "Adresa"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr "Paketat në hyrje"
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr "Paketat në dalje"
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr "Gjithsej paketa"
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr "Byte në hyrje"
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr "Byte në dalje"
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr "Gjithsej byte"
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr "Gabime në hyrje"
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr "Gabime në dalje"
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr "Gjithsej gabime"
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr "Përplasje"
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr "Njësia maksimum e transferimit"
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr "Gjendja e PPP"
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr "Byte në hyrje"
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr "Byte në dalje"
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr "Numri i byte në hyrje"
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr "Numri i byte në dalje"
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "Madhësia"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr "Gjatësia në byte e stringës së kthyer."
+
+#: 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 ""
+
+#. 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 ""
+"Vlera aktuale e ESP (stack pointer me 32 bit) sikurse dhënë nga faqja e"
+"stack të procesit."
+
+#. KStk_EIP
+#: sysdeps/names/prockernel.c:74
+msgid "The current EIP (32-bit instruction pointer)."
+msgstr "Vlera aktuale e EIP (instruktion pointer me 32 bit)."
+
+#. 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 "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 resident 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: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 ""
+
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
+msgstr ""
+
diff --git a/po/es_HN.po b/po/ta.po
index 45a28ece..e001741a 100644
--- a/po/es_HN.po
+++ b/po/ta.po
@@ -1,276 +1,581 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
+# Tamil translation of Tamil Libgtop 2.4.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Dinesh Nadarajah <n_dinesh@yahoo.com>, 2003.
+#
+#
msgid ""
-msgstr ""
-"Project-Id-Version: glibtop cvs\n"
-"POT-Creation-Date: 2000-02-23 00:23+0100\n"
-"PO-Revision-Date: 1998-12-13 04:38+0100\n"
-"Last-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
-"Language-Team: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
+msgstr "Project-Id-Version: Tamil Libgtop 2.4"
+"POT-Creation-Date: 2003-09-16 17:19-0500\n"
+"PO-Revision-Date: 2003-09-16 17:19-0500\n"
+"Last-Translator: Dinesh Nadarajah <n_dinesh@yahoo.com>\n"
+"Language-Team: Tamil <tamilinix@yahoogroups.com>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+""
-#: sysdeps/names/cpu.c:45
+#: examples/smp.c:71
+#, c-format
+msgid "Ticks (%ld per second):"
+msgstr ""
+
+#: examples/smp.c:74
+msgid "Total"
+msgstr ""
+
+#: examples/smp.c:74 sysdeps/names/mem.c:47
+msgid "User"
+msgstr "பயனர்"
+
+#: examples/smp.c:74 sysdeps/names/procuid.c:58
+msgid "Nice"
+msgstr ""
+
+#: examples/smp.c:74
+msgid "Sys"
+msgstr ""
+
+#: examples/smp.c:74
+msgid "Idle"
+msgstr ""
+
+#: examples/smp.c:76
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
+"\n"
+msgstr ""
+
+#: examples/smp.c:80
+#, c-format
+msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
+msgstr ""
+
+#: examples/smp.c:97
+msgid "Percent:"
+msgstr ""
+
+#: examples/smp.c:98
+msgid "Total (%)"
+msgstr ""
+
+#: examples/smp.c:98
+msgid "User (%)"
+msgstr ""
+
+#: examples/smp.c:98
+msgid "Nice (%)"
+msgstr ""
+
+#: examples/smp.c:98
+msgid "Sys (%)"
+msgstr ""
+
+#: examples/smp.c:99
+msgid "Idle (%)"
+msgstr ""
+
+#: examples/smp.c:101
+#, c-format
+msgid ""
+"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+"\n"
+msgstr ""
+
+#: examples/smp.c:117
+#, c-format
+msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
+msgstr ""
+
+#: examples/smp.c:123
+msgid "Spin:"
+msgstr ""
+
+#: lib/read.c:75
+#, 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:453
+msgid "Enable debugging"
+msgstr ""
+
+#: src/daemon/gnuserv.c:453
+msgid "DEBUG"
+msgstr ""
+
+#: src/daemon/gnuserv.c:455
+msgid "Enable verbose output"
+msgstr ""
+
+#: src/daemon/gnuserv.c:455
+msgid "VERBOSE"
+msgstr ""
+
+#: src/daemon/gnuserv.c:457
+msgid "Don't fork into background"
+msgstr ""
+
+#: src/daemon/gnuserv.c:457
+msgid "NO-DAEMON"
+msgstr ""
+
+#: src/daemon/gnuserv.c:459
+msgid "Invoked from inetd"
+msgstr ""
+
+#: src/daemon/gnuserv.c:459
+msgid "INETD"
+msgstr ""
+
+#: src/daemon/gnuserv.c:493
+#, c-format
+msgid ""
+"Error on option %s: %s.\n"
+"Run '%s --help' to see a full list of available command line options.\n"
+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 ""
+
+#: support/popthelp.c:35
+msgid "Show this help message"
+msgstr ""
+
+#: support/popthelp.c:36
+msgid "Display brief usage message"
+msgstr ""
+
+#: sysdeps/names/cpu.c:43
msgid "Total CPU Time"
msgstr ""
-#: sysdeps/names/cpu.c:46
+#: sysdeps/names/cpu.c:44
msgid "CPU Time in User Mode"
msgstr ""
-#: sysdeps/names/cpu.c:47
+#: sysdeps/names/cpu.c:45
msgid "CPU Time in User Mode (nice)"
msgstr ""
-#: sysdeps/names/cpu.c:48
+#: sysdeps/names/cpu.c:46
msgid "CPU Time in System Mode"
msgstr ""
-#: sysdeps/names/cpu.c:49
+#: sysdeps/names/cpu.c:47
msgid "CPU Time in the Idle Task"
msgstr ""
-#: sysdeps/names/cpu.c:50
+#: sysdeps/names/cpu.c:48
msgid "Tick Frequency"
msgstr ""
-#: sysdeps/names/cpu.c:51
+#: sysdeps/names/cpu.c:49
msgid "SMP Total CPU Time"
msgstr ""
-#: sysdeps/names/cpu.c:52
+#: sysdeps/names/cpu.c:50
msgid "SMP CPU Time in User Mode"
msgstr ""
-#: sysdeps/names/cpu.c:53
+#: sysdeps/names/cpu.c:51
msgid "SMP CPU Time in User Mode (nice)"
msgstr ""
-#: sysdeps/names/cpu.c:54
+#: sysdeps/names/cpu.c:52
msgid "SMP CPU Time in System Mode"
msgstr ""
-#: sysdeps/names/cpu.c:55
+#: sysdeps/names/cpu.c:53
msgid "SMP CPU Time in the Idle Task"
msgstr ""
-#: sysdeps/names/cpu.c:56 sysdeps/names/cpu.c:72 sysdeps/names/proctime.c:66
-msgid "SMP CPU Flags"
-msgstr ""
-
-#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
+#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
msgid "Number of clock ticks since system boot"
msgstr ""
-#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
+#: 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:63 sysdeps/names/cpu.c:69
+#: 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:64 sysdeps/names/cpu.c:70
+#: 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:65 sysdeps/names/cpu.c:71
+#: 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:66
+#: sysdeps/names/cpu.c:63
msgid "Tick frequency (default is 100)"
msgstr ""
-#: sysdeps/names/fsusage.c:41 sysdeps/names/fsusage.c:50
+#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
msgid "Total blocks"
msgstr ""
-#: sysdeps/names/fsusage.c:42
+#: sysdeps/names/fsusage.c:40
msgid "Free blocks"
msgstr ""
-#: sysdeps/names/fsusage.c:43
+#: sysdeps/names/fsusage.c:41
msgid "Available blocks"
msgstr ""
-#: sysdeps/names/fsusage.c:44 sysdeps/names/fsusage.c:53
+#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
msgid "Total file nodes"
msgstr ""
-#: sysdeps/names/fsusage.c:45 sysdeps/names/fsusage.c:54
+#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
msgid "Free file nodes"
msgstr ""
-#: sysdeps/names/fsusage.c:51
+#: sysdeps/names/fsusage.c:49
msgid "Free blocks available to the superuser"
msgstr ""
-#: sysdeps/names/fsusage.c:52
+#: sysdeps/names/fsusage.c:50
msgid "Free blocks available to non-superusers"
msgstr ""
-#: sysdeps/names/loadavg.c:41
+#: sysdeps/names/loadavg.c:39
msgid "Load Average"
-msgstr ""
+msgstr "சுமாராக ஏற்று"
-#: sysdeps/names/loadavg.c:42
+#: sysdeps/names/loadavg.c:40
msgid "Running Tasks"
msgstr ""
-#: sysdeps/names/loadavg.c:43
+#: sysdeps/names/loadavg.c:41
msgid "Number of Tasks"
msgstr ""
-#: sysdeps/names/loadavg.c:44 sysdeps/names/loadavg.c:52
+#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50
msgid "Last PID"
msgstr ""
-#: sysdeps/names/loadavg.c:49
+#: sysdeps/names/loadavg.c:47
msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
msgstr ""
-#: sysdeps/names/loadavg.c:50
+#: sysdeps/names/loadavg.c:48
msgid "Number of tasks currently running"
msgstr ""
-#: sysdeps/names/loadavg.c:51
+#: sysdeps/names/loadavg.c:49
msgid "Total number of tasks"
msgstr ""
-#: sysdeps/names/mem.c:43
+#: sysdeps/names/mem.c:41
msgid "Total Memory"
msgstr ""
-#: sysdeps/names/mem.c:44
+#: sysdeps/names/mem.c:42
msgid "Used Memory"
msgstr ""
-#: sysdeps/names/mem.c:45
+#: sysdeps/names/mem.c:43
msgid "Free Memory"
msgstr ""
-#: sysdeps/names/mem.c:46
+#: sysdeps/names/mem.c:44
msgid "Shared Memory"
msgstr ""
-#: sysdeps/names/mem.c:47
+#: sysdeps/names/mem.c:45
msgid "Buffers"
msgstr ""
-#: sysdeps/names/mem.c:48
+#: sysdeps/names/mem.c:46
msgid "Cached"
msgstr ""
-#: sysdeps/names/mem.c:49
-msgid "User"
-msgstr ""
-
-#: sysdeps/names/mem.c:50
+#: sysdeps/names/mem.c:48
msgid "Locked"
msgstr ""
-#: sysdeps/names/mem.c:55
+#: sysdeps/names/mem.c:53
msgid "Total physical memory in kB"
msgstr ""
-#: sysdeps/names/mem.c:56
+#: sysdeps/names/mem.c:54
msgid "Used memory size in kB"
msgstr ""
-#: sysdeps/names/mem.c:57
+#: sysdeps/names/mem.c:55
msgid "Free memory size in kB"
msgstr ""
-#: sysdeps/names/mem.c:58
+#: sysdeps/names/mem.c:56
msgid "Shared memory size in kB"
msgstr ""
-#: sysdeps/names/mem.c:59
+#: sysdeps/names/mem.c:57
msgid "Size of buffers kB"
msgstr ""
-#: sysdeps/names/mem.c:60
+#: sysdeps/names/mem.c:58
msgid "Size of cached memory in kB"
msgstr ""
-#: sysdeps/names/mem.c:61
+#: sysdeps/names/mem.c:59
msgid "Memory used from user processes in kB"
msgstr ""
-#: sysdeps/names/mem.c:62
+#: sysdeps/names/mem.c:60
msgid "Memory in locked pages in kB"
msgstr ""
-#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
+#: 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:43 sysdeps/names/msg_limits.c:54
+#: 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:44 sysdeps/names/msg_limits.c:55
+#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
msgid "Max size of message"
msgstr ""
-#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
+#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
msgid "Default max size of queue"
msgstr ""
-#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
+#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
msgid "Max queues system wide"
msgstr ""
-#: sysdeps/names/msg_limits.c:47 sysdeps/names/msg_limits.c:58
+#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
msgid "Message segment size"
msgstr ""
-#: sysdeps/names/msg_limits.c:48 sysdeps/names/msg_limits.c:59
+#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
msgid "Number of system message headers"
msgstr ""
-#: sysdeps/names/prockernel.c:44
+#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
+msgid "Interface Flags"
+msgstr ""
+
+#: sysdeps/names/netload.c:46
+msgid "MTU"
+msgstr ""
+
+#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
+msgid "Subnet"
+msgstr ""
+
+#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
+msgid "Address"
+msgstr "_முகவரி"
+
+#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
+msgid "Packets In"
+msgstr ""
+
+#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
+msgid "Packets Out"
+msgstr ""
+
+#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
+msgid "Packets Total"
+msgstr ""
+
+#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
+msgid "Bytes In"
+msgstr ""
+
+#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
+msgid "Bytes Out"
+msgstr ""
+
+#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
+msgid "Bytes Total"
+msgstr ""
+
+#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
+msgid "Errors In"
+msgstr ""
+
+#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
+msgid "Errors Out"
+msgstr ""
+
+#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
+msgid "Errors Total"
+msgstr ""
+
+#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
+msgid "Collisions"
+msgstr ""
+
+#: sysdeps/names/netload.c:64
+msgid "Maximum Transfer Unit"
+msgstr ""
+
+#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
+msgid "PPP State"
+msgstr ""
+
+#: sysdeps/names/ppp.c:39
+msgid "Input bytes"
+msgstr ""
+
+#: sysdeps/names/ppp.c:40
+msgid "Output bytes"
+msgstr ""
+
+#: sysdeps/names/ppp.c:46
+msgid "Number of input bytes"
+msgstr ""
+
+#: sysdeps/names/ppp.c:47
+msgid "Number of output bytes"
+msgstr ""
+
+#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
+msgid "Size"
+msgstr "அளவு"
+
+#: sysdeps/names/procargs.c:43
+msgid "Length in bytes of the returned string."
+msgstr ""
+
+#: sysdeps/names/prockernel.c:42
msgid "K_Flags"
msgstr ""
-#: sysdeps/names/prockernel.c:44
+#: sysdeps/names/prockernel.c:42
msgid "Min_Flt"
msgstr ""
-#: sysdeps/names/prockernel.c:44
+#: sysdeps/names/prockernel.c:42
msgid "Maj_Flt"
msgstr ""
-#: sysdeps/names/prockernel.c:44
+#: sysdeps/names/prockernel.c:42
msgid "CMin_Flt"
msgstr ""
-#: sysdeps/names/prockernel.c:45
+#: sysdeps/names/prockernel.c:43
msgid "CMaj_Flt"
msgstr ""
-#: sysdeps/names/prockernel.c:45
+#: sysdeps/names/prockernel.c:43
msgid "KStk_ESP"
msgstr ""
-#: sysdeps/names/prockernel.c:45
+#: sysdeps/names/prockernel.c:43
msgid "KStk_EIP"
msgstr ""
-#: sysdeps/names/prockernel.c:45
+#: sysdeps/names/prockernel.c:43
msgid "NWChan"
msgstr ""
-#: sysdeps/names/prockernel.c:46
+#: sysdeps/names/prockernel.c:44
msgid "WChan"
msgstr ""
#. K_Flags
-#: sysdeps/names/prockernel.c:52
+#: sysdeps/names/prockernel.c:50
msgid ""
"Kernel flags of the process.\n"
"\n"
@@ -283,43 +588,43 @@ msgid ""
msgstr ""
#. Min_Flt
-#: sysdeps/names/prockernel.c:61
+#: 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:64
+#: 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:67
+#: 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:70
+#: 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:73
+#: 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:76
+#: sysdeps/names/prockernel.c:74
msgid "The current EIP (32-bit instruction pointer)."
msgstr ""
#. NWChan
-#: sysdeps/names/prockernel.c:78
+#: 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 "
@@ -328,51 +633,47 @@ msgid ""
msgstr ""
#. WChan
-#: sysdeps/names/prockernel.c:83
+#: sysdeps/names/prockernel.c:81
msgid "This is the textual name of the `nwchan' field."
msgstr ""
-#: sysdeps/names/procmem.c:49
-msgid "Size"
-msgstr ""
-
-#: sysdeps/names/procmem.c:49
+#: sysdeps/names/procmem.c:47
msgid "Virtual"
msgstr ""
-#: sysdeps/names/procmem.c:49
+#: sysdeps/names/procmem.c:47
msgid "Resident"
msgstr ""
-#: sysdeps/names/procmem.c:49
+#: sysdeps/names/procmem.c:47
msgid "Share"
msgstr ""
-#: sysdeps/names/procmem.c:50
+#: sysdeps/names/procmem.c:48
msgid "Resident Set Size"
msgstr ""
-#: sysdeps/names/procmem.c:50
+#: sysdeps/names/procmem.c:48
msgid "Resident Set Size Limit"
msgstr ""
-#: sysdeps/names/procmem.c:55
+#: sysdeps/names/procmem.c:53
msgid "Total # of pages of memory"
msgstr ""
-#: sysdeps/names/procmem.c:56
+#: sysdeps/names/procmem.c:54
msgid "Number of pages of virtual memory"
msgstr ""
-#: sysdeps/names/procmem.c:57
+#: sysdeps/names/procmem.c:55
msgid "Number of resident set (non-swapped) pages"
msgstr ""
-#: sysdeps/names/procmem.c:58
+#: sysdeps/names/procmem.c:56
msgid "Number of pages of shared (mmap'd) memory"
msgstr ""
-#: sysdeps/names/procmem.c:59
+#: 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 "
@@ -380,807 +681,646 @@ msgid ""
"which are swapped out."
msgstr ""
-#
-# In Mxico, 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:64
+#: 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:50
+#: sysdeps/names/procsegment.c:42
msgid "Text_RSS"
msgstr ""
-#: sysdeps/names/procsegment.c:50
+#: sysdeps/names/procsegment.c:42
msgid "ShLib_RSS"
msgstr ""
-#: sysdeps/names/procsegment.c:50
+#: sysdeps/names/procsegment.c:42
msgid "Data_RSS"
msgstr ""
-#: sysdeps/names/procsegment.c:50
+#: sysdeps/names/procsegment.c:42
msgid "Stack_RSS"
msgstr ""
-#: sysdeps/names/procsegment.c:51
+#: sysdeps/names/procsegment.c:43
msgid "Dirty Size"
msgstr ""
-#: sysdeps/names/procsegment.c:51
+#: sysdeps/names/procsegment.c:43
msgid "Start_Code"
msgstr ""
-#: sysdeps/names/procsegment.c:51
+#: sysdeps/names/procsegment.c:43
msgid "End_Code"
msgstr ""
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "End_Data"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Start_Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:52
-msgid "Brk"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53
+#: sysdeps/names/procsegment.c:43
msgid "Start_Stack"
msgstr ""
-#: sysdeps/names/procsegment.c:53
-msgid "Start_MMap"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:53 sysdeps/names/procsegment.c:72
-msgid "Arg_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:73
-msgid "Arg_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:74
-msgid "Env_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:54 sysdeps/names/procsegment.c:75
-msgid "Env_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:59
+#: sysdeps/names/procsegment.c:48
msgid "Text resident set size"
msgstr ""
-#: sysdeps/names/procsegment.c:60
+#: sysdeps/names/procsegment.c:49
msgid "Shared-Lib resident set size"
msgstr ""
-#: sysdeps/names/procsegment.c:61
+#: sysdeps/names/procsegment.c:50
msgid "Data resident set size"
msgstr ""
-#: sysdeps/names/procsegment.c:62
+#: sysdeps/names/procsegment.c:51
msgid "Stack resident set size"
msgstr ""
-#: sysdeps/names/procsegment.c:63
+#: sysdeps/names/procsegment.c:52
msgid "Total size of dirty pages"
msgstr ""
-#: sysdeps/names/procsegment.c:64
+#: sysdeps/names/procsegment.c:53
msgid "Address of beginning of code segment"
msgstr ""
-#: sysdeps/names/procsegment.c:65
+#: sysdeps/names/procsegment.c:54
msgid "Address of end of code segment"
msgstr ""
-#: sysdeps/names/procsegment.c:66
-msgid "Address of beginning of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:67
-msgid "Address of end of data segment"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:68
-msgid "Brk_Start"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:69
-msgid "Brk_End"
-msgstr ""
-
-#: sysdeps/names/procsegment.c:70
+#: sysdeps/names/procsegment.c:55
msgid "Address of the bottom of stack segment"
msgstr ""
-#: sysdeps/names/procsegment.c:71
-msgid "Start of mmap()ed areas"
-msgstr ""
-
-#: sysdeps/names/procsignal.c:42
+#: sysdeps/names/procsignal.c:40
msgid "Signal"
msgstr ""
-#: sysdeps/names/procsignal.c:42
+#: sysdeps/names/procsignal.c:40
msgid "Blocked"
msgstr ""
-#: sysdeps/names/procsignal.c:42
+#: sysdeps/names/procsignal.c:40
msgid "SigIgnore"
msgstr ""
-#: sysdeps/names/procsignal.c:42
+#: sysdeps/names/procsignal.c:40
msgid "SigCatch"
msgstr ""
-#: sysdeps/names/procsignal.c:47
+#: sysdeps/names/procsignal.c:45
msgid "Mask of pending signals"
msgstr ""
-#: sysdeps/names/procsignal.c:48
+#: sysdeps/names/procsignal.c:46
msgid "Mask of blocked signals"
msgstr ""
-#: sysdeps/names/procsignal.c:49
+#: sysdeps/names/procsignal.c:47
msgid "Mask of ignored signals"
msgstr ""
-#: sysdeps/names/procsignal.c:50
+#: sysdeps/names/procsignal.c:48
msgid "Mask of caught signals"
msgstr ""
-#: sysdeps/names/procstate.c:45
+#: sysdeps/names/procstate.c:40
msgid "Cmd"
msgstr ""
-#: sysdeps/names/procstate.c:45
+#: sysdeps/names/procstate.c:40
msgid "State"
-msgstr ""
+msgstr "நிலமை"
-#: sysdeps/names/procstate.c:45
+#: sysdeps/names/procstate.c:40
msgid "UID"
msgstr ""
-#: sysdeps/names/procstate.c:45
+#: sysdeps/names/procstate.c:40
msgid "GID"
msgstr ""
#: sysdeps/names/procstate.c:45
-msgid "RUID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "RGID"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Has CPU"
-msgstr ""
-
-#: sysdeps/names/procstate.c:46
-msgid "Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:47
-msgid "Last Processor"
-msgstr ""
-
-#: sysdeps/names/procstate.c:52
msgid "Basename of executable file in call to exec()"
msgstr ""
-#: sysdeps/names/procstate.c:53
+#: sysdeps/names/procstate.c:46
msgid "Single-Char code for process state (S=sleeping)"
msgstr ""
-#: sysdeps/names/procstate.c:54
-msgid "effective UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:55
-msgid "effective GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:56
-msgid "real UID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:57
-msgid "real GID of process"
-msgstr ""
-
-#: sysdeps/names/procstate.c:58
-msgid "has_cpu"
-msgstr ""
-
-#: sysdeps/names/procstate.c:59
-msgid "processor"
+#: sysdeps/names/procstate.c:47
+msgid "UID of process"
msgstr ""
-#: sysdeps/names/procstate.c:60
-msgid "last_processor"
+#: sysdeps/names/procstate.c:48
+msgid "GID of process"
msgstr ""
-#: sysdeps/names/proctime.c:46
+#: sysdeps/names/proctime.c:44
msgid "Start_Time"
msgstr ""
-#: sysdeps/names/proctime.c:46
+#: sysdeps/names/proctime.c:44
msgid "RTime"
msgstr ""
-#: sysdeps/names/proctime.c:46
+#: sysdeps/names/proctime.c:44
msgid "UTime"
msgstr ""
-#: sysdeps/names/proctime.c:46
+#: sysdeps/names/proctime.c:44
msgid "STime"
msgstr ""
-#: sysdeps/names/proctime.c:47
+#: sysdeps/names/proctime.c:45
msgid "CUTime"
msgstr ""
-#: sysdeps/names/proctime.c:47
+#: sysdeps/names/proctime.c:45
msgid "CSTime"
msgstr ""
-#: sysdeps/names/proctime.c:47
+#: sysdeps/names/proctime.c:45
msgid "TimeOut"
msgstr ""
-#: sysdeps/names/proctime.c:47
+#: sysdeps/names/proctime.c:45
msgid "It_Real_Value"
msgstr ""
-#: sysdeps/names/proctime.c:48
+#: sysdeps/names/proctime.c:46
msgid "Frequency"
msgstr ""
-#: sysdeps/names/proctime.c:48
+#: sysdeps/names/proctime.c:46
msgid "XCPU_UTime"
msgstr ""
-#: sysdeps/names/proctime.c:48
+#: sysdeps/names/proctime.c:46
msgid "XCPU_STime"
msgstr ""
-#: sysdeps/names/proctime.c:49
-msgid "XCPU_Flags"
-msgstr ""
-
-#: sysdeps/names/proctime.c:54
+#: sysdeps/names/proctime.c:51
msgid "Start time of process in seconds since the epoch"
msgstr ""
-#: sysdeps/names/proctime.c:55
+#: sysdeps/names/proctime.c:52
msgid "Real time accumulated by process (should be utime + stime)"
msgstr ""
-#: sysdeps/names/proctime.c:56
+#: sysdeps/names/proctime.c:53
msgid "user-mode CPU time accumulated by process"
msgstr ""
-#: sysdeps/names/proctime.c:57
+#: sysdeps/names/proctime.c:54
msgid "kernel-mode CPU time accumulated by process"
msgstr ""
-#: sysdeps/names/proctime.c:58
+#: sysdeps/names/proctime.c:55
msgid "cumulative utime of process and reaped children"
msgstr ""
-#: sysdeps/names/proctime.c:59
+#: sysdeps/names/proctime.c:56
msgid "cumulative stime of process and reaped children"
msgstr ""
-#: sysdeps/names/proctime.c:60
+#: sysdeps/names/proctime.c:57
msgid "The time (in jiffies) of the process's next timeout"
msgstr ""
-#: sysdeps/names/proctime.c:61
+#: 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:63
+#: sysdeps/names/proctime.c:60
msgid "Tick frequency"
msgstr ""
-#: sysdeps/names/proctime.c:64
+#: sysdeps/names/proctime.c:61
msgid "SMP user-mode CPU time accumulated by process"
msgstr ""
-#: sysdeps/names/proctime.c:65
+#: sysdeps/names/proctime.c:62
msgid "SMP kernel-mode CPU time accumulated by process"
msgstr ""
-#: sysdeps/names/procuid.c:48
+#: sysdeps/names/procuid.c:56
msgid "Uid"
msgstr ""
-#: sysdeps/names/procuid.c:48
+#: sysdeps/names/procuid.c:56
msgid "EUid"
msgstr ""
-#: sysdeps/names/procuid.c:48
+#: sysdeps/names/procuid.c:56
msgid "Gid"
msgstr ""
-#: sysdeps/names/procuid.c:48
+#: sysdeps/names/procuid.c:56
msgid "EGid"
msgstr ""
-#: sysdeps/names/procuid.c:48
-msgid "SUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "SGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsUid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
-msgid "FsGid"
-msgstr ""
-
-#: sysdeps/names/procuid.c:49
+#: sysdeps/names/procuid.c:56
msgid "Pid"
msgstr ""
-#: sysdeps/names/procuid.c:50
+#: sysdeps/names/procuid.c:57
msgid "PPid"
msgstr ""
-#: sysdeps/names/procuid.c:50
+#: sysdeps/names/procuid.c:57
msgid "PGrp"
msgstr ""
-#: sysdeps/names/procuid.c:50
+#: sysdeps/names/procuid.c:57
msgid "Session"
msgstr ""
-#: sysdeps/names/procuid.c:50
+#: sysdeps/names/procuid.c:57
msgid "Tty"
msgstr ""
-#: sysdeps/names/procuid.c:51
+#: sysdeps/names/procuid.c:58
msgid "TPGid"
msgstr ""
-#: sysdeps/names/procuid.c:51
-msgid "Priority"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "Nice"
-msgstr ""
-
-#: sysdeps/names/procuid.c:51
-msgid "NGroups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:52
-msgid "Groups"
-msgstr ""
-
-#: sysdeps/names/procuid.c:57
-msgid "User ID"
-msgstr ""
-
#: sysdeps/names/procuid.c:58
-msgid "Effective User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:59
-msgid "Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:60
-msgid "Effective Group ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:61
-msgid "Saved User ID"
-msgstr ""
-
-#: sysdeps/names/procuid.c:62
-msgid "Saved Group ID"
+msgid "Priority"
msgstr ""
#: sysdeps/names/procuid.c:63
-msgid "Filesystem User ID"
+msgid "User ID"
msgstr ""
#: sysdeps/names/procuid.c:64
-msgid "Filesystem Group ID"
+msgid "Effective User ID"
msgstr ""
#: sysdeps/names/procuid.c:65
-msgid "Process ID"
+msgid "Group ID"
msgstr ""
#: sysdeps/names/procuid.c:66
-msgid "PID of parent process"
+msgid "Effective Group ID"
msgstr ""
#: sysdeps/names/procuid.c:67
-msgid "Process group ID"
+msgid "Process ID"
msgstr ""
#: sysdeps/names/procuid.c:68
-msgid "Session ID"
+msgid "PID of parent process"
msgstr ""
#: sysdeps/names/procuid.c:69
-msgid "Full device number of controlling terminal"
+msgid "Process group ID"
msgstr ""
#: sysdeps/names/procuid.c:70
-msgid "Terminal process group ID"
+msgid "Session ID"
msgstr ""
#: sysdeps/names/procuid.c:71
-msgid "Kernel scheduling priority"
+msgid "Full device number of controlling terminal"
msgstr ""
#: sysdeps/names/procuid.c:72
-msgid "Standard unix nice level of process"
+msgid "Terminal process group ID"
msgstr ""
#: sysdeps/names/procuid.c:73
-msgid "Number of additional process groups"
+msgid "Kernel scheduling priority"
msgstr ""
#: sysdeps/names/procuid.c:74
-msgid "Additional process groups"
+msgid "Standard unix nice level of process"
msgstr ""
-#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
+#: 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:45 sysdeps/names/sem_limits.c:59
+#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
msgid "Max number of arrays"
msgstr ""
-#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
+#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
msgid "Max semaphores system wide"
msgstr ""
-#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
+#: 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:48 sysdeps/names/sem_limits.c:62
+#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
msgid "Max semaphores per array"
msgstr ""
-#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
+#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
msgid "Max ops per semop call"
msgstr ""
-#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
+#: 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:51 sysdeps/names/sem_limits.c:65
+#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
msgid "sizeof struct sem_undo"
msgstr ""
-#: sysdeps/names/sem_limits.c:52 sysdeps/names/sem_limits.c:66
+#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
msgid "Semaphore max value"
msgstr ""
-#: sysdeps/names/sem_limits.c:53 sysdeps/names/sem_limits.c:67
+#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
msgid "Adjust on exit max value"
msgstr ""
-#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
+#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
msgid "Max segment size"
msgstr ""
-#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
+#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
msgid "Min segment size"
msgstr ""
-#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
+#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
msgid "Max number of segments"
msgstr ""
-#: sysdeps/names/shm_limits.c:44 sysdeps/names/shm_limits.c:53
+#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
msgid "Max shared segments per process"
msgstr ""
-#: sysdeps/names/shm_limits.c:45 sysdeps/names/shm_limits.c:54
+#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
msgid "Max total shared memory"
msgstr ""
-#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
+#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
msgid "Total Swap Space"
msgstr ""
-#: sysdeps/names/swap.c:42 sysdeps/names/swap.c:51
+#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
msgid "Used Swap Space"
msgstr ""
-#: sysdeps/names/swap.c:43 sysdeps/names/swap.c:52
+#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
msgid "Free Swap Space"
msgstr ""
-#: sysdeps/names/swap.c:44
+#: sysdeps/names/swap.c:42
msgid "Page In"
msgstr ""
-#: sysdeps/names/swap.c:45
+#: sysdeps/names/swap.c:43
msgid "Page Out"
msgstr ""
-#: sysdeps/names/swap.c:53
+#: sysdeps/names/swap.c:51
msgid "Total number of swap pages that have been brought in since system boot"
msgstr ""
-#: sysdeps/names/swap.c:55
+#: sysdeps/names/swap.c:53
msgid "Total number of swap pages that have been brought out since system boot"
msgstr ""
-#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:82
+#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
msgid "Server Features"
msgstr ""
-#: sysdeps/names/sysdeps.c:54
-msgid "Pointer Size"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:84
+#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
msgid "CPU Usage"
msgstr ""
-#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:85
+#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78
msgid "Memory Usage"
msgstr ""
-#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:86
+#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79
msgid "Swap Usage"
msgstr ""
-#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:87
+#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80
msgid "System Uptime"
msgstr ""
-#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:88
+#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81
msgid "Load Averange"
msgstr ""
-#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:89
+#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82
msgid "Shared Memory Limits"
msgstr ""
-#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:90
+#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83
msgid "Message Queue Limits"
msgstr ""
-#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:91
+#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
msgid "Semaphore Set Limits"
msgstr ""
-#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:92
+#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
msgid "List of running Processes"
msgstr ""
-#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:93
+#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86
msgid "Process Status information"
msgstr ""
-#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:94
+#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87
msgid "Process UID and TTY information"
msgstr ""
-#: sysdeps/names/sysdeps.c:66 sysdeps/names/sysdeps.c:95
+#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88
msgid "Process Memory information"
msgstr ""
-#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:96
+#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
msgid "Process Time information"
msgstr ""
-#: sysdeps/names/sysdeps.c:68 sysdeps/names/sysdeps.c:97
+#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
msgid "Process Signal information"
msgstr ""
-#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:98
+#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
msgid "Process Kernel Data information"
msgstr ""
-#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:99
+#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
msgid "Process Segment information"
msgstr ""
-#: sysdeps/names/sysdeps.c:71
+#: sysdeps/names/sysdeps.c:66
msgid "Process Arguments"
msgstr ""
-#: sysdeps/names/sysdeps.c:72 sysdeps/names/sysdeps.c:101
+#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
msgid "Process Memory Map"
msgstr ""
-#: sysdeps/names/sysdeps.c:73
+#: sysdeps/names/sysdeps.c:68
msgid "Mount List"
msgstr ""
-#: sysdeps/names/sysdeps.c:74 sysdeps/names/sysdeps.c:103
+#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96
msgid "File System Usage"
msgstr ""
-#: sysdeps/names/sysdeps.c:75 sysdeps/names/sysdeps.c:104
+#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
msgid "Network Load"
msgstr ""
-#: sysdeps/names/sysdeps.c:76 sysdeps/names/sysdeps.c:105
-msgid "Interface Names"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:77 sysdeps/names/sysdeps.c:106
+#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98
msgid "PPP Statistics"
msgstr ""
-#: sysdeps/names/sysdeps.c:83
-msgid "Pointer Size on the Server (in bits)"
-msgstr ""
-
-#: sysdeps/names/sysdeps.c:100
+#: sysdeps/names/sysdeps.c:93
msgid "Command line arguments of the process"
msgstr ""
-#: sysdeps/names/sysdeps.c:102
+#: sysdeps/names/sysdeps.c:95
msgid "List of currently mounted filesystems"
msgstr ""
-#: sysdeps/names/uptime.c:40
+#: sysdeps/names/uptime.c:38
msgid "Uptime"
msgstr ""
-#: sysdeps/names/uptime.c:41
+#: sysdeps/names/uptime.c:39
msgid "Idletime"
msgstr ""
-#: sysdeps/names/uptime.c:42
-msgid "Boot time"
-msgstr ""
-
-#: sysdeps/names/uptime.c:47
+#: sysdeps/names/uptime.c:44
msgid "Time in seconds since system boot"
msgstr ""
-#: sysdeps/names/uptime.c:48
+#: sysdeps/names/uptime.c:45
msgid "Time in seconds the system spent in the idle task since system boot"
msgstr ""
-#: sysdeps/names/uptime.c:49
-msgid "Boot time (seconds sice epoch)"
+#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
+msgid "Hangup"
msgstr ""
-#: support/error.c:109
-msgid "Unknown system error"
+#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
+msgid "Interrupt"
msgstr ""
-#: support/getopt.c:669
-#, c-format
-msgid "%s: option `%s' is ambiguous\n"
+#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
+msgid "Quit"
+msgstr "வெளிச்செல்"
+
+#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
+msgid "Illegal instruction"
msgstr ""
-#: support/getopt.c:693
-#, c-format
-msgid "%s: option `--%s' doesn't allow an argument\n"
+#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
+msgid "Trace trap"
msgstr ""
-#: support/getopt.c:698
-#, c-format
-msgid "%s: option `%c%s' doesn't allow an argument\n"
+#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
+msgid "Abort"
msgstr ""
-#: support/getopt.c:715 support/getopt.c:888
-#, c-format
-msgid "%s: option `%s' requires an argument\n"
+#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
+msgid "EMT error"
msgstr ""
-#. --option
-#: support/getopt.c:744
-#, c-format
-msgid "%s: unrecognized option `--%s'\n"
+#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
+msgid "Floating-point exception"
msgstr ""
-#. +option or -option
-#: support/getopt.c:748
-#, c-format
-msgid "%s: unrecognized option `%c%s'\n"
+#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
+msgid "Kill"
msgstr ""
-#. 1003.2 specifies the format of this message.
-#: support/getopt.c:774
-#, c-format
-msgid "%s: illegal option -- %c\n"
+#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
+msgid "Bus error"
msgstr ""
-#: support/getopt.c:777
-#, c-format
-msgid "%s: invalid option -- %c\n"
+#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
+msgid "Segmentation violation"
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"
+#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
+msgid "Bad argument to system call"
msgstr ""
-#: support/getopt.c:854
-#, c-format
-msgid "%s: option `-W %s' is ambiguous\n"
+#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
+msgid "Broken pipe"
msgstr ""
-#: support/getopt.c:872
-#, c-format
-msgid "%s: option `-W %s' doesn't allow an argument\n"
+#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
+msgid "Alarm clock"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
+msgid "Termination"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
+msgid "Urgent condition on socket"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
+msgid "Stop"
+msgstr "நிறுத்து"
+
+#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
+msgid "Keyboard stop"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
+msgid "Continue"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
+msgid "Child status has changed"
+msgstr ""
+
+#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
+msgid "Background read from tty"
msgstr ""
-#: lib/errors.c:31
-msgid "No error"
+#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
+msgid "Background write to tty"
msgstr ""
-#: lib/errors.c:32
-msgid "Unknown error"
+#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
+msgid "I/O now possible"
msgstr ""
-#: lib/errors.c:33
-msgid "Invalid argument"
+#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
+msgid "CPU limit exceeded"
msgstr ""
-#: lib/errors.c:34
-msgid "No such parameter"
+#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
+msgid "File size limit exceeded"
msgstr ""
-#: lib/errors.c:35
-msgid "Attempted to modify a read-only value"
+#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
+msgid "Virtual alarm clock"
msgstr ""
-#: lib/errors.c:36
-msgid "Parameter size mismatch"
+#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
+msgid "Profiling alarm clock"
msgstr ""
-#: lib/errors.c:37
-msgid "Communication with LibGTop server failed"
+#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
+msgid "Window size change"
msgstr ""
-#: lib/errors.c:38
-msgid "No such process"
+#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
+msgid "Information request"
msgstr ""
-#: lib/errors.c:39
-msgid "No kernel support"
+#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
+msgid "User defined signal 1"
msgstr ""
-#: lib/errors.c:40
-msgid "Incompatible kernel version"
+#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
+msgid "User defined signal 2"
msgstr ""
+
diff --git a/src/daemon/.cvsignore b/src/daemon/.cvsignore
new file mode 100644
index 00000000..ccdb1c11
--- /dev/null
+++ b/src/daemon/.cvsignore
@@ -0,0 +1,7 @@
+Makefile.in
+Makefile
+libgtop_daemon2
+libgtop_server2
+server.conf
+.libs
+.deps
diff --git a/src/daemon/ChangeLog b/src/daemon/ChangeLog
new file mode 100644
index 00000000..2ddb846e
--- /dev/null
+++ b/src/daemon/ChangeLog
@@ -0,0 +1,104 @@
+2003-05-11 Andrew Sobala <aes@gnome.org>
+
+ * gnuserv.c: (permitted): fix buffer overflow vulnerability
+
+2001-02-14 Martin Baulig <baulig@suse.de>
+
+ * Makefile.am (libgtop_server_LDADD): Removed @LIBSUPPORT@.
+
+1999-11-28 Martin Baulig <martin@home-of-linux.org>
+
+ * gnuserv.c (setup_table): Don't dump core when the table of
+ permitted host names contains a NULL pointer.
+
+1999-07-29 Martin Baulig <martin@home-of-linux.org>
+
+ * Makefile.am: Link the `libgtop_daemon' and the `libgtop_server'
+ statically if possible.
+
+1999-05-07 Martin Baulig <martin@home-of-linux.org>
+
+ * server.c (main): There's some problem with uname () - some systems
+ like Solaris or Digital Unix return a nonnegative value on success,
+ some others like Linux return 0. Since all known systems seem to return
+ a negative value on failure, we simply check whether the return value is
+ not negative here.
+
+1999-02-19 Martin Baulig <martin@home-of-linux.org>
+
+ * Makefile.am (LIBGTOP_COMPILE_SYSTEM): Hardcoded system name.
+ (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 <martin@home-of-linux.org>
+
+ * gnuserv.c (program_invocation_*_name): Declare this as `extern'
+ if necessary.
+
+1998-12-17 Martin Baulig <baulig@merkur.uni-trier.de>
+
+ * gnuserv.c: Don't include <gnome-argp.h>.
+ (program_invocation_name, program_invocation_short_name): Define
+ this here.
+
+1998-12-09 Martin Baulig <martin@home-of-linux.org>
+
+ 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 <martin@home-of-linux.org>
+
+ * 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 <marc@tasmanian.redhat.com>
+
+ * Makefile.am: Added $(GLIB_LIBS) to libs. Not sure
+ how it ever built without it.
+
+1998-10-20 Martin Baulig <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * 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
new file mode 100644
index 00000000..7b1e457a
--- /dev/null
+++ b/src/daemon/Makefile.am
@@ -0,0 +1,53 @@
+## 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 <martin@home-of-linux.org>
+##
+
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = $(LIBGTOP_CFLAGS) @INCLUDES@ -D_BSD \
+ -DLIBGTOP_COMPILE_SYSTEM="\"`uname -s`\"" \
+ -DLIBGTOP_COMPILE_RELEASE="\"`uname -r`\"" \
+ -DLIBGTOP_COMPILE_VERSION="\"`uname -v`\"" \
+ -DLIBGTOP_COMPILE_MACHINE="\"`uname -m`\""
+
+if NEED_LIBGTOP
+suid_sysdeps = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid-2.0.la
+suid_common = $(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la
+else
+suid_sysdeps =
+suid_common =
+endif
+
+bin_PROGRAMS = libgtop_daemon2 @server_programs@
+
+EXTRA_PROGRAMS = libgtop_server2
+
+libgtop_daemon2_SOURCES = gnuserv.c slave.c main.c io.c version.c \
+ daemon.h server_config.h
+libgtop_daemon2_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \
+ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \
+ @sysdeps_suid_lib@ \
+ $(suid_sysdeps) $(suid_common)\
+ $(LIBGTOP_LIBS)\
+ @LIBSUPPORT@ @INTLLIBS@ @libs_xauth@
+
+libgtop_server2_SOURCES = server.c slave.c io.c version.c daemon.h
+libgtop_server2_LDADD = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid-2.0.la \
+ $(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la
+
+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
new file mode 100644
index 00000000..9539db37
--- /dev/null
+++ b/src/daemon/daemon.h
@@ -0,0 +1,81 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_DAEMON_H__
+#define __GLIBTOP_DAEMON_H__
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/gnuserv.h>
+
+#include <glibtop/open.h>
+#include <glibtop/union.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/version.h>
+#include <glibtop/command.h>
+#include <glibtop/parameter.h>
+
+#include <fcntl.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <syslog.h>
+
+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
new file mode 100644
index 00000000..2be6659e
--- /dev/null
+++ b/src/daemon/gnuserv.c
@@ -0,0 +1,643 @@
+/* -*-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 <weiner@mot.com>,
+ * Darrell Kindred <dkindred@cmu.edu> and Arup Mukherjee <arup@cmu.edu>.
+ * 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 <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+#include <glibtop/command.h>
+#include <glibtop/xmalloc.h>
+
+#include <glibtop/parameter.h>
+
+#include "server_config.h"
+
+#include <glibtop/gnuserv.h>
+
+#include <errno.h>
+#include <popt-gnome.h>
+
+#include "daemon.h"
+
+#ifdef AIX
+#include <sys/select.h>
+#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 <X11/X.h>
+#include <X11/Xauth.h>
+
+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, "%s", 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, "%s", 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 (auth_data_len < 1 || auth_data_len > sizeof(buf)) {
+ syslog_message(LOG_WARNING, "Invalid data length supplied by client");
+ return FALSE;
+ }
+
+ 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] == 0L)
+ 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 (!permitted_host_names [i])
+ continue;
+ 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
new file mode 100644
index 00000000..aa38dd40
--- /dev/null
+++ b/src/daemon/io.c
@@ -0,0 +1,98 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "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;
+ char *tmp_ptr;
+ 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; */
+ tmp_ptr = ptr;
+ tmp_ptr += nread;
+ ptr = tmp_ptr;
+
+#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
new file mode 100644
index 00000000..36154cfe
--- /dev/null
+++ b/src/daemon/main.c
@@ -0,0 +1,237 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "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
new file mode 100644
index 00000000..0657d5e9
--- /dev/null
+++ b/src/daemon/server.c
@@ -0,0 +1,110 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "daemon.h"
+
+static glibtop _glibtop_global_server;
+glibtop *glibtop_global_server = &_glibtop_global_server;
+
+#include <glibtop.h>
+#include <glibtop/union.h>
+#include <glibtop/sysdeps.h>
+
+#include <sys/utsname.h>
+
+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 <fcntl.h>
+#include <locale.h>
+
+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) < 0) _exit (1);
+
+#ifdef _AIX
+ /*
+ * [FIXME]: should be in sysdeps part ?
+ */
+
+ if ((strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) != 0) ||
+ ((atol(uts.version) < atol(LIBGTOP_COMPILE_VERSION)) &&
+ (atol(uts.release) < atol(LIBGTOP_COMPILE_RELEASE))) ) {
+ fprintf (stderr, "Can only run on %s %s.%s and upper\n",
+ LIBGTOP_COMPILE_SYSTEM,
+ LIBGTOP_COMPILE_VERSION,
+ LIBGTOP_COMPILE_RELEASE);
+ _exit (1);
+ }
+#else
+ 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);
+ }
+#endif
+
+ 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
new file mode 100644
index 00000000..09ae9ae8
--- /dev/null
+++ b/src/daemon/server_config.h
@@ -0,0 +1,11 @@
+#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
new file mode 100644
index 00000000..f7884c8d
--- /dev/null
+++ b/src/daemon/server_config.h.in
@@ -0,0 +1,44 @@
+/* -*-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
new file mode 100755
index 00000000..3e78ca8f
--- /dev/null
+++ b/src/daemon/server_config.pl
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+
+require 5.004;
+use strict;
+
+print "Enter port the server should listen on [42800]: ";
+
+my $port = <stdin>; chop $port;
+$port = 42800 unless $port =~ /^\d+$/;
+
+print "\nUser name or UID to run as [nobody]: ";
+
+my $user = <stdin>; 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 = <stdin>; 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 = <stdin>; 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 = <stdin>; 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
new file mode 100644
index 00000000..f8d5a492
--- /dev/null
+++ b/src/daemon/slave.c
@@ -0,0 +1,256 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "daemon.h"
+
+void
+handle_slave_connection (int input, int output)
+{
+ glibtop *server G_GNUC_UNUSED = glibtop_global_server;
+ int64_t *param_ptr G_GNUC_UNUSED;
+ const void *ptr G_GNUC_UNUSED;
+
+ unsigned short max_len G_GNUC_UNUSED;
+ pid_t pid G_GNUC_UNUSED;
+
+ 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 G_GNUC_UNUSED;
+ pid_t pid G_GNUC_UNUSED;
+
+ 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 |
+ (1L << 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
new file mode 100644
index 00000000..d80d6412
--- /dev/null
+++ b/src/daemon/version.c
@@ -0,0 +1,62 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/version.h>
+
+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/file_by_inode.c b/src/inodedb/file_by_inode2.c
index 5d87c7b1..8e4370fe 100644
--- a/src/inodedb/file_by_inode.c
+++ b/src/inodedb/file_by_inode2.c
@@ -1,5 +1,3 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -35,33 +33,33 @@
int
main (int argc, const char *argv [])
{
- glibtop_inodedb *inodedb;
- const char *filename;
- unsigned device, inode;
+ glibtop_inodedb *inodedb;
+ const char *filename;
+ unsigned device, inode;
- if (argc != 3) {
- fprintf (stderr, "Usage: %s device inode\n", argv [0]);
- exit (1);
- }
+ 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 [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);
- }
+ 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);
+ inodedb = glibtop_inodedb_open (0, 0);
+ if (!inodedb) exit (1);
- filename = glibtop_inodedb_lookup (inodedb, device, inode);
- if (!filename) exit (2);
+ filename = glibtop_inodedb_lookup (inodedb, device, inode);
+ if (!filename) exit (2);
- fprintf (stderr, "FILENAME: %d - %d - '%s'\n",
- (int) device, (int) inode, filename);
+ fprintf (stderr, "FILENAME: %d - %d - '%s'\n",
+ (int) device, (int) inode, filename);
- exit (0);
+ exit (0);
}
diff --git a/src/inodedb/mkinodedb.c b/src/inodedb/mkinodedb.c
deleted file mode 100644
index 678b5ce7..00000000
--- a/src/inodedb/mkinodedb.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-
-/* $Id$ */
-
-/* Copyright (C) 1998-99 Martin Baulig
- This file is part of LibGTop 1.0.
-
- Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
-
- LibGTop is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License,
- or (at your option) any later version.
-
- LibGTop is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with LibGTop; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-#include <glibtop.h>
-#include <glibtop/error.h>
-#include <glibtop/inodedb.h>
-
-#include <pwd.h>
-#include <dirent.h>
-
-#include <sys/stat.h>
-
-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/src/inodedb/mkinodedb2.c b/src/inodedb/mkinodedb2.c
new file mode 100644
index 00000000..a338d322
--- /dev/null
+++ b/src/inodedb/mkinodedb2.c
@@ -0,0 +1,135 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/inodedb.h>
+
+#include <pwd.h>
+#include <dirent.h>
+
+#include <sys/stat.h>
+
+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/sysdeps/aix/ChangeLog b/sysdeps/aix/ChangeLog
new file mode 100644
index 00000000..0b61ebd3
--- /dev/null
+++ b/sysdeps/aix/ChangeLog
@@ -0,0 +1,3 @@
+2002-09-24 Laurent Vivier <Laurent.Vivier@bull.net>
+
+ * Create sysdeps/aix (from stub)
diff --git a/sysdeps/aix/Makefile.am b/sysdeps/aix/Makefile.am
new file mode 100644
index 00000000..e0c6c2f6
--- /dev/null
+++ b/sysdeps/aix/Makefile.am
@@ -0,0 +1,23 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
+
+libgtop_sysdeps_2_0_la_SOURCES = siglist.c nosuid.c
+
+libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
+ uptime.c loadavg.c shm_limits.c msg_limits.c \
+ sem_limits.c proclist.c procstate.c procuid.c \
+ proctime.c procmem.c procsignal.c prockernel.c \
+ procsegment.c procargs.c procmap.c netload.c \
+ ppp.c utils.c utils.h sysinfo.c
+
+libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+libgtop_sysdeps_suid_2_0_la_LIBADD = $(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la $(GLIB_LIBS)
+
+libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h glibtop_suid.h
+
+libgtopincludedir = $(includedir)/libgtop-2.0
diff --git a/sysdeps/aix/close.c b/sysdeps/aix/close.c
new file mode 100644
index 00000000..4262d2f0
--- /dev/null
+++ b/sysdeps/aix/close.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/aix/cpu.c b/sysdeps/aix/cpu.c
new file mode 100644
index 00000000..81fb5c04
--- /dev/null
+++ b/sysdeps/aix/cpu.c
@@ -0,0 +1,125 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <stdlib.h>
+#include <sys/systemcfg.h>
+#include <sys/sysinfo.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/cpu.h>
+
+#include <utils.h>
+
+static const unsigned long _glibtop_sysdeps_cpu =
+(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
+(1L << GLIBTOP_CPU_SYS) + (1L << GLIBTOP_CPU_IDLE) +
+(1L << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_FREQUENCY) +
+(1L << GLIBTOP_XCPU_TOTAL) + (1L << GLIBTOP_XCPU_USER) +
+(1L << GLIBTOP_XCPU_SYS) + (1L << GLIBTOP_XCPU_IDLE) +
+(1L << GLIBTOP_XCPU_NICE);
+
+/* Init function. */
+
+void
+glibtop_init_cpu_p (glibtop *server)
+{
+ off_t result;
+
+ server->ncpu = _system_configuration.ncpus;
+ if (server->ncpu == 1)
+ {
+ server->ncpu = 0; /* means single-processor, see glibtop.h */
+ }
+
+ result = _glibtop_get_kmem_offset(server, "cpuinfo");
+ if (result == -1)
+ {
+ server->sysdeps.cpu = 0;
+
+ return;
+ }
+ server->machine.cpuinfo_offset = result;
+
+ server->machine.cpuinfo = (struct cpuinfo*)calloc(_system_configuration.ncpus, sizeof(struct cpuinfo));
+
+ server->sysdeps.cpu = _glibtop_sysdeps_cpu;
+}
+
+/* Provides information about cpu usage. */
+
+void
+glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
+{
+ int result;
+ int cpu;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_CPU), 0);
+
+ memset (buf, 0, sizeof (glibtop_cpu));
+
+ result = _glibtop_get_kmem_info(server, server->machine.cpuinfo_offset,
+ server->machine.cpuinfo,
+ _system_configuration.ncpus
+ * sizeof(struct cpuinfo));
+
+ if (result <= 0)
+ {
+ glibtop_error_io_r (server, "Cannot read cpuinfo");
+ return;
+ }
+
+ buf->idle = 0;
+ buf->user = 0;
+ buf->sys = 0;
+ buf->nice = 0;
+ for (cpu = 0; cpu < _system_configuration.ncpus; cpu++)
+ {
+ if (cpu < GLIBTOP_NCPU)
+ {
+ buf->xcpu_idle[cpu] =
+ server->machine.cpuinfo[cpu].cpu[CPU_IDLE];
+ buf->xcpu_user[cpu] =
+ server->machine.cpuinfo[cpu].cpu[CPU_USER];
+ buf->xcpu_sys[cpu] =
+ server->machine.cpuinfo[cpu].cpu[CPU_KERNEL];
+ buf->xcpu_nice[cpu] =
+ server->machine.cpuinfo[cpu].cpu[CPU_WAIT];
+
+ buf->xcpu_total[cpu] = buf->xcpu_idle[cpu] +
+ buf->xcpu_user[cpu] +
+ buf->xcpu_sys[cpu] +
+ buf->xcpu_nice[cpu];
+ }
+
+ buf->idle += server->machine.cpuinfo[cpu].cpu[CPU_IDLE];
+ buf->user += server->machine.cpuinfo[cpu].cpu[CPU_USER];
+ buf->sys += server->machine.cpuinfo[cpu].cpu[CPU_KERNEL];
+ buf->nice += server->machine.cpuinfo[cpu].cpu[CPU_WAIT];
+
+ buf->total = buf->idle + buf->user + buf->sys + buf->nice ;
+ }
+
+ buf->frequency = sysconf(_SC_CLK_TCK);
+ buf->flags = _glibtop_sysdeps_cpu;
+}
diff --git a/sysdeps/aix/glibtop_machine.h b/sysdeps/aix/glibtop_machine.h
new file mode 100644
index 00000000..508d6c21
--- /dev/null
+++ b/sysdeps/aix/glibtop_machine.h
@@ -0,0 +1,53 @@
+/* $Id$ */
+
+/*
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_MACHINE_H__
+#define __GLIBTOP_MACHINE_H__
+
+#include <procinfo.h>
+
+BEGIN_LIBGTOP_DECLS
+
+typedef struct _glibtop_machine glibtop_machine;
+
+struct _glibtop_machine
+{
+ uid_t uid, euid;
+ gid_t gid, egid;
+
+ int kmem_fd;
+
+ off_t cpuinfo_offset;
+ off_t ifnet_offset;
+ off_t loadavg_offset;
+ off_t shminfo_offset;
+ off_t seminfo_offset;
+ off_t msginfo_offset;
+
+ struct cpuinfo *cpuinfo;
+ struct procsinfo last_pinfo;
+};
+
+END_LIBGTOP_DECLS
+
+#endif /* __GLIBTOP_MACHINE_H__ */
diff --git a/sysdeps/aix/glibtop_server.h b/sysdeps/aix/glibtop_server.h
new file mode 100644
index 00000000..ca57af36
--- /dev/null
+++ b/sysdeps/aix/glibtop_server.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#define GLIBTOP_SUID_CPU (1 << GLIBTOP_SYSDEPS_CPU)
+#define GLIBTOP_SUID_MEM 0
+#define GLIBTOP_SUID_SWAP 0
+#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 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 (1 << GLIBTOP_SYSDEPS_NETLOAD)
+#define GLIBTOP_SUID_PPP 0
+
+END_LIBGTOP_DECLS
+
+#endif
diff --git a/sysdeps/aix/glibtop_suid.h b/sysdeps/aix/glibtop_suid.h
new file mode 100644
index 00000000..0d971143
--- /dev/null
+++ b/sysdeps/aix/glibtop_suid.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SUID_H__
+#define __GLIBTOP_SUID_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#if _IN_LIBGTOP
+#include <sys/param.h>
+#endif
+
+static inline void glibtop_suid_enter (glibtop *server) {
+ setegid (server->machine.egid);
+}
+
+static inline void glibtop_suid_leave (glibtop *server) {
+ if (setegid (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/aix/loadavg.c b/sysdeps/aix/loadavg.c
new file mode 100644
index 00000000..67913413
--- /dev/null
+++ b/sysdeps/aix/loadavg.c
@@ -0,0 +1,78 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <nlist.h>
+#include <glibtop.h>
+#include <glibtop/loadavg.h>
+#include <glibtop/error.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_loadavg =
+(1 << GLIBTOP_LOADAVG_LOADAVG);
+
+/* Init function. */
+
+void
+glibtop_init_loadavg_p (glibtop *server)
+{
+ int result;
+
+ result = _glibtop_get_kmem_offset(server, "avenrun");
+ if (result == -1)
+ {
+ server->sysdeps.loadavg = 0;
+ return;
+ }
+
+ server->machine.loadavg_offset = result;
+
+ server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
+}
+
+/* Provides load averange. */
+
+void
+glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
+{
+ int result;
+ int loadavg[3];
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_LOADAVG), 0);
+
+ memset (buf, 0, sizeof (glibtop_loadavg));
+
+ result = _glibtop_get_kmem_info(server, server->machine.loadavg_offset,
+ loadavg, sizeof(loadavg));
+ if (result <= 0)
+ {
+ glibtop_error_io_r (server, "Cannot read loadavg");
+ return;
+ }
+
+ buf->loadavg[0] = loadavg[0] / 65536.0;
+ buf->loadavg[1] = loadavg[1] / 65536.0;
+ buf->loadavg[2] = loadavg[2] / 65536.0;
+
+ buf->flags = _glibtop_sysdeps_loadavg;
+}
diff --git a/sysdeps/aix/mem.c b/sysdeps/aix/mem.c
new file mode 100644
index 00000000..c2811fd5
--- /dev/null
+++ b/sysdeps/aix/mem.c
@@ -0,0 +1,76 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <unistd.h>
+#include <sys/vminfo.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/mem.h>
+
+static const unsigned long _glibtop_sysdeps_mem =
+(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) +
+(1 << GLIBTOP_MEM_FREE) + (1 << GLIBTOP_MEM_LOCKED);
+
+/* 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)
+{
+ struct vminfo vminfo;
+ int pagesize;
+ int result;
+
+ memset (buf, 0, sizeof (glibtop_mem));
+
+ pagesize = sysconf(_SC_PAGESIZE);
+
+#ifdef HAVE_VMGETINFO
+ result = vmgetinfo((void*)&vminfo, VMINFO, sizeof(vminfo));
+#else
+ result = _glibtop_vmgetinfo((void*)&vminfo, VMINFO, sizeof(vminfo));
+#endif
+ if (result == -1)
+ {
+ glibtop_error_io_r (server, "Cannot read vminfo");
+ return;
+ }
+
+
+ buf->total = vminfo.memsizepgs * pagesize;
+ buf->used = (vminfo.numwseguse + vminfo.numpseguse +
+ vminfo.numclseguse) * pagesize;
+ buf->free = vminfo.numfrb * pagesize;
+ buf->locked = (vminfo.numwsegpin + vminfo.numpsegpin +
+ vminfo.numclsegpin) * pagesize;
+
+ buf->flags = _glibtop_sysdeps_mem;
+}
diff --git a/sysdeps/aix/msg_limits.c b/sysdeps/aix/msg_limits.c
new file mode 100644
index 00000000..94bf4446
--- /dev/null
+++ b/sysdeps/aix/msg_limits.c
@@ -0,0 +1,81 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <sys/msg.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/msg_limits.h>
+
+static const unsigned long _glibtop_sysdeps_msg_limits =
+(1 << GLIBTOP_IPC_MSGMAX) + (1 << GLIBTOP_IPC_MSGMNB) +
+(1 << GLIBTOP_IPC_MSGMNI) + (1 << GLIBTOP_IPC_MSGTQL);
+
+/* Init function. */
+
+void
+glibtop_init_msg_limits_p (glibtop *server)
+{
+ off_t result;
+
+ result = _glibtop_get_kmem_offset(server, "msginfo");
+ if (result <= 0)
+ {
+ server->sysdeps.sem_limits = 0;
+ return;
+ }
+
+ server->machine.msginfo_offset = result;
+
+ 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)
+{
+ int result;
+ struct msginfo msginfo;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_msg_limits));
+
+ result = _glibtop_get_kmem_info(server, server->machine.msginfo_offset,
+ &msginfo, sizeof(msginfo));
+
+ if (result <= 0)
+ {
+ glibtop_error_io_r (server, "Cannot read seminfo");
+
+ return;
+ }
+
+ buf->msgmax = msginfo.msgmax;
+ buf->msgmnb = msginfo.msgmnb;
+ buf->msgmni = msginfo.msgmni;
+ buf->msgtql = msginfo.msgmnm;
+
+ buf->flags = _glibtop_sysdeps_msg_limits;
+}
diff --git a/sysdeps/aix/netload.c b/sysdeps/aix/netload.c
new file mode 100644
index 00000000..ffad1c66
--- /dev/null
+++ b/sysdeps/aix/netload.c
@@ -0,0 +1,207 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <sys/socket.h>
+#include <net/if.h>
+#include <netinet/in.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/netload.h>
+
+#include "utils.h"
+
+static const unsigned long _glibtop_sysdeps_netload =
+(1 << GLIBTOP_NETLOAD_IF_FLAGS) + (1 << GLIBTOP_NETLOAD_MTU) +
+(1 << GLIBTOP_NETLOAD_SUBNET) + (1 << GLIBTOP_NETLOAD_ADDRESS) +
+(1 << GLIBTOP_NETLOAD_PACKETS_IN) + (1 << GLIBTOP_NETLOAD_PACKETS_OUT) +
+(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) + (1 << GLIBTOP_NETLOAD_BYTES_IN) +
+(1 << GLIBTOP_NETLOAD_BYTES_OUT) + (1 << GLIBTOP_NETLOAD_BYTES_TOTAL) +
+(1 << GLIBTOP_NETLOAD_ERRORS_IN) + (1 << GLIBTOP_NETLOAD_ERRORS_OUT) +
+(1 << GLIBTOP_NETLOAD_ERRORS_TOTAL) + (1 << GLIBTOP_NETLOAD_COLLISIONS);
+
+static void get_ifaddr(glibtop* server, struct ifaddr* next, long* addr, long* mask)
+{
+ struct ifaddr ifaddr;
+ struct sockaddr_in sockaddr;
+
+ *addr = 0;
+ *mask = 0;
+
+ while (next)
+ {
+ /* get interface ifaddr structure */
+
+ _glibtop_get_kmem_info(server, (off_t)next, &ifaddr, sizeof(ifaddr));
+
+ /* get socket addr information */
+
+ _glibtop_get_kmem_info( server, (off_t)ifaddr.ifa_addr
+ , &sockaddr, sizeof(sockaddr));
+
+ /* if valid family : UDP, TCP, ...*/
+
+ if (sockaddr.sin_family == AF_INET)
+ {
+ *addr = sockaddr.sin_addr.s_addr;
+
+ _glibtop_get_kmem_info( server, (off_t)ifaddr.ifa_netmask
+ , &sockaddr, sizeof(sockaddr));
+
+ *mask = sockaddr.sin_addr.s_addr;
+
+ /* address found */
+
+ return;
+ }
+
+ next = ifaddr.ifa_next;
+ }
+}
+
+/* Init function. */
+
+void
+glibtop_init_netload_p (glibtop *server)
+{
+ off_t result;
+ off_t addr;
+
+ result = _glibtop_get_kmem_offset(server, "ifnet");
+ if (result <= 0)
+ {
+ server->sysdeps.netload = 0;
+ return;
+ }
+
+ result = _glibtop_get_kmem_info(server, result, &addr, sizeof(addr));
+ if (result <= 0)
+ {
+ server->sysdeps.netload = 0;
+ return;
+ }
+
+ server->machine.ifnet_offset = addr;
+
+ server->sysdeps.netload = _glibtop_sysdeps_netload;
+}
+
+/* Provides network statistics. */
+
+void
+glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
+ const char *interface)
+{
+ int result;
+ off_t offset;
+ struct ifnet ifnet;
+ long addr;
+ long mask;
+ char name[16];
+
+ memset (buf, 0, sizeof (glibtop_netload));
+
+ for ( offset = server->machine.ifnet_offset;
+ offset != 0;
+ offset = (off_t)ifnet.if_next
+ )
+ {
+ result = _glibtop_get_kmem_info(server, offset,
+ &ifnet, sizeof(ifnet));
+ if (result <= 0)
+ {
+ glibtop_error_io_r (server, "Cannot read ifnet");
+
+ return;
+ }
+
+ result = _glibtop_get_kmem_info(server, (off_t)ifnet.if_name,
+ name, sizeof(name));
+ if (result <= 0)
+ {
+ glibtop_error_io_r (server, "Cannot read if_name");
+
+ return;
+ }
+
+ sprintf(name+strlen(name), "%d", ifnet.if_unit);
+ if (strcmp(name, interface) != 0)
+ {
+ continue;
+ }
+
+ if (ifnet.if_flags & IFF_UP)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_UP);
+ if (ifnet.if_flags & IFF_BROADCAST)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_BROADCAST);
+ if (ifnet.if_flags & IFF_LOOPBACK)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_LOOPBACK);
+ if (ifnet.if_flags & IFF_POINTOPOINT)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_POINTOPOINT);
+ if (ifnet.if_flags & IFF_RUNNING)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_RUNNING);
+ if (ifnet.if_flags & IFF_NOARP)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_NOARP);
+ if (ifnet.if_flags & IFF_PROMISC)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_PROMISC);
+ if (ifnet.if_flags & IFF_ALLMULTI)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_ALLMULTI);
+ if (ifnet.if_flags & IFF_OACTIVE)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_OACTIVE);
+ if (ifnet.if_flags & IFF_SIMPLEX)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_SIMPLEX);
+ if (ifnet.if_flags & IFF_LINK0)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_LINK0);
+ if (ifnet.if_flags & IFF_LINK1)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_LINK1);
+ if (ifnet.if_flags & IFF_LINK2)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_LINK2);
+ if (ifnet.if_flags & IFF_LINK2)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_LINK2);
+ if (ifnet.if_flags & 0x80000)
+ buf->if_flags |= (1 << GLIBTOP_IF_FLAGS_MULTICAST);
+
+ buf->mtu = ifnet.if_mtu;
+
+ get_ifaddr(server, ifnet.if_addrlist, &addr, &mask);
+
+ buf->subnet = addr & mask;
+ buf->address = addr;
+
+ 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 = ifnet.if_ierrors + ifnet.if_oerrors;
+
+ buf->collisions = ifnet.if_collisions;
+ }
+
+ buf->flags = _glibtop_sysdeps_netload;
+}
diff --git a/sysdeps/aix/nosuid.c b/sysdeps/aix/nosuid.c
new file mode 100644
index 00000000..c904a3a5
--- /dev/null
+++ b/sysdeps/aix/nosuid.c
@@ -0,0 +1,46 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <sys/systemcfg.h>
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+
+void
+glibtop_open_s (glibtop *server,
+ const char *program_name,
+ const unsigned long features,
+ const unsigned flags)
+{
+ server->ncpu = _system_configuration.ncpus;
+
+ if (server->ncpu == 1)
+ {
+ server->ncpu = 0; /* means single-processor, see glibtop.h */
+ }
+}
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/aix/open.c b/sysdeps/aix/open.c
new file mode 100644
index 00000000..8a0757fa
--- /dev/null
+++ b/sysdeps/aix/open.c
@@ -0,0 +1,82 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/open.h>
+
+#include "glibtop_suid.h"
+
+/* !!! 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)");
+
+ 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;
+ }
+}
+
+/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
+
+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->machine.uid = getuid ();
+ server->machine.euid = geteuid ();
+ server->machine.gid = getgid ();
+ server->machine.egid = getegid ();
+
+ /* open kmem */
+
+ server->machine.kmem_fd = open("/dev/kmem", O_RDONLY);
+ if (server->machine.kmem_fd == -1)
+ glibtop_error_io_r (server, "Cannot open /dev/kmem");
+
+ /* Drop priviledges. */
+
+ if (seteuid (server->machine.uid))
+ _exit (1);
+
+ if (setegid (server->machine.gid))
+ _exit (1);
+
+ /* !!! END OF SUID ROOT PART !!! */
+
+ server->name = program_name;
+}
diff --git a/sysdeps/aix/ppp.c b/sysdeps/aix/ppp.c
new file mode 100644
index 00000000..6d0905d5
--- /dev/null
+++ b/sysdeps/aix/ppp.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/aix/procargs.c b/sysdeps/aix/procargs.c
new file mode 100644
index 00000000..97bf0b34
--- /dev/null
+++ b/sysdeps/aix/procargs.c
@@ -0,0 +1,132 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <procinfo.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procargs.h>
+
+#include "utils.h"
+
+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. */
+
+static void _glibtop_remove_non_ascii(char* string)
+{
+ for (;*string != 0;string++)
+ {
+ if (!isascii(*string))
+ *string = '?';
+ }
+}
+
+char *
+glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
+ pid_t pid, unsigned max_len)
+{
+ struct procsinfo *pinfo;
+ char *args_buffer;
+ char* args = NULL;
+ int size;
+ int result;
+ int len;
+
+ memset (buf, 0, sizeof (glibtop_proc_args));
+
+ pinfo = _glibtop_get_procinfo(server, pid);
+ if (pinfo == NULL)
+ {
+ glibtop_error_io_r (server, "Cannot read procsinfo");
+
+ return NULL;
+ }
+
+ size = max_len != 0 ? max_len : 4096;
+ args_buffer = glibtop_malloc_r (server, size);
+ if (args_buffer == NULL)
+ {
+ glibtop_error_io_r (server, "Cannot malloc procsinfo");
+
+ return NULL;
+
+ }
+
+ result = getargs(pinfo, sizeof(struct procsinfo), args_buffer, size);
+ if (result == -1)
+ {
+ glibtop_error_io_r (server, "Cannot malloc getargs");
+
+ glibtop_free_r(server, args_buffer);
+
+ return NULL;
+ }
+
+ /* look if empty string */
+
+ if (args_buffer[0] == 0)
+ {
+ glibtop_free_r(server, args_buffer);
+
+ return NULL;
+ }
+
+ /* compute length of args and realloc */
+
+ len = 0;
+ while ((args_buffer[len] != 0) && (len < size))
+ {
+ _glibtop_remove_non_ascii(args_buffer + len);
+
+ len += strlen(args_buffer + len) + 1;
+ }
+
+ args = glibtop_malloc_r (server, len);
+ if (args == NULL)
+ {
+ glibtop_error_io_r (server, "Cannot malloc procsinfo");
+
+ glibtop_free_r(server, args_buffer);
+
+ return NULL;
+ }
+ memcpy(args, args_buffer, len);
+ glibtop_free_r(server, args_buffer);
+
+ buf->size = len - 1;
+
+ buf->flags = _glibtop_sysdeps_proc_args;
+
+ return args;
+}
diff --git a/sysdeps/aix/prockernel.c b/sysdeps/aix/prockernel.c
new file mode 100644
index 00000000..e8885994
--- /dev/null
+++ b/sysdeps/aix/prockernel.c
@@ -0,0 +1,98 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <procinfo.h>
+#include <sys/proc.h>
+
+#include <glibtop.h>
+#include <glibtop/prockernel.h>
+#include <glibtop/error.h>
+
+#include "utils.h"
+
+static const unsigned long _glibtop_sysdeps_proc_kernel =
+(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)
+{
+ struct thrdsinfo thinfo;
+ struct procsinfo *pinfo;
+ tid_t thid;
+ int result;
+
+ memset (buf, 0, sizeof (glibtop_proc_kernel));
+
+ pinfo = _glibtop_get_procinfo(server, pid);
+ if (pinfo == NULL)
+ {
+ glibtop_error_io_r(server, "Cannot read procsinfo");
+
+ return;
+ }
+
+ if (!(pinfo->pi_flags | SKPROC))
+ {
+ /* not a kernel process */
+
+ return;
+ }
+
+ buf->min_flt = pinfo->pi_ru.ru_minflt;
+ buf->maj_flt = pinfo->pi_ru.ru_majflt;
+
+ buf->cmin_flt = pinfo->pi_cru.ru_minflt;
+ buf->cmaj_flt = pinfo->pi_cru.ru_majflt;
+
+ thid = 0;
+ result = getthrds(pid, &thinfo, sizeof(thinfo), &thid, 1);
+ if (result != 1)
+ {
+ glibtop_error_io_r(server, "Cannot read thrdsinfo");
+
+ return;
+ }
+
+ buf->kstk_esp = thinfo.ti_ustk;
+ buf->kstk_eip = thinfo.ti_code;
+
+ buf->nwchan = thinfo.ti_wchan;
+
+ buf->flags = _glibtop_sysdeps_proc_kernel;
+}
diff --git a/sysdeps/aix/proclist.c b/sysdeps/aix/proclist.c
new file mode 100644
index 00000000..b92c5669
--- /dev/null
+++ b/sysdeps/aix/proclist.c
@@ -0,0 +1,247 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <procinfo.h>
+
+#include <glibtop.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/proclist.h>
+
+static const unsigned long _glibtop_sysdeps_proclist =
+(1 << GLIBTOP_PROCLIST_NUMBER) + (1 << GLIBTOP_PROCLIST_TOTAL) +
+(1 << GLIBTOP_PROCLIST_SIZE);
+
+#define BLOCK_COUNT 256
+#define BLOCK_SIZE (BLOCK_COUNT * sizeof (unsigned int))
+
+/* 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)
+{
+ struct procsinfo pinfo;
+ int count, total;
+ unsigned pids [BLOCK_COUNT], *pids_chain = NULL;
+ int pids_size = 0, pids_offset = 0, new_size;
+ pid_t current;
+ int result;
+
+ memset (buf, 0, sizeof (glibtop_proclist));
+
+ for( count = total = 0, current = 0
+ , result = getprocs(&pinfo, sizeof(pinfo), NULL, 0, &current, 1);
+ result == 1;
+ result = getprocs(&pinfo, sizeof(pinfo), NULL, 0, &current, 1))
+ {
+ if (which & GLIBTOP_EXCLUDE_IDLE)
+ {
+ if (pinfo.pi_state & SIDL)
+ {
+ /* exclude idle processes */
+
+ continue;
+ }
+ }
+
+ if (which & GLIBTOP_EXCLUDE_SYSTEM)
+ {
+ if (pinfo.pi_flags & SKPROC)
+ {
+ /* exclude Kernel processes */
+
+ continue;
+ }
+ }
+
+ if (which & GLIBTOP_EXCLUDE_NOTTY)
+ {
+ if (!pinfo.pi_ttyp)
+ {
+ /* exclude processes without tty */
+
+ continue;
+ }
+ }
+
+ switch(which & GLIBTOP_KERN_PROC_MASK)
+ {
+ case GLIBTOP_KERN_PROC_ALL:
+
+ /* return information about all processes
+ * so, let's go ahead
+ */
+
+ break;
+
+ case GLIBTOP_KERN_PROC_PID:
+
+ /* return information about all processes with
+ * pid passed in arg
+ */
+
+ if (pinfo.pi_pid != arg)
+ {
+ continue;
+ }
+
+ break;
+
+ case GLIBTOP_KERN_PROC_PGRP:
+
+ /* return information about all processes in
+ * process group passed in arg
+ */
+
+ if (pinfo.pi_pgrp != arg)
+ {
+ continue;
+ }
+
+ break;
+
+ case GLIBTOP_KERN_PROC_SESSION:
+
+ /* return information about all processes in
+ * session passed in arg
+ */
+
+ if (pinfo.pi_sid != arg)
+ {
+ continue;
+ }
+
+ break;
+
+ case GLIBTOP_KERN_PROC_TTY:
+
+ /* return information about all processes with
+ * tty device number passed in arg
+ */
+
+ if (pinfo.pi_ttyd != arg)
+ {
+ continue;
+ }
+
+ break;
+
+ case GLIBTOP_KERN_PROC_UID:
+
+ /* return information about all processes with
+ * effective uid passed in arg
+ */
+
+ if (pinfo.pi_cred.cr_uid != arg)
+ {
+ continue;
+ }
+
+ break;
+
+ case GLIBTOP_KERN_PROC_RUID:
+
+ /* return information about all processes with
+ * real uid passed in arg
+ */
+
+ if (pinfo.pi_cred.cr_ruid != arg)
+ {
+ continue;
+ }
+
+ break;
+ }
+
+ 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++] = pinfo.pi_pid;
+
+ total++;
+ }
+
+ if (result == -1)
+ {
+ glibtop_error_io_r(server, "Cannot read procsinfo");
+ }
+
+ /* 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;
+
+ /* Since everything is ok now, we can set buf->flags, fill in the
+ * remaining fields and return the `pids_chain'. */
+
+ buf->size = sizeof(unsigned int);
+ buf->number = total;
+ buf->total = total * buf->size;
+
+ buf->flags = _glibtop_sysdeps_proclist;
+
+ return pids_chain;
+}
diff --git a/sysdeps/aix/procmap.c b/sysdeps/aix/procmap.c
new file mode 100644
index 00000000..2ed372aa
--- /dev/null
+++ b/sysdeps/aix/procmap.c
@@ -0,0 +1,50 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procmap.h>
+
+static const unsigned long _glibtop_sysdeps_proc_map = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_map_s (glibtop *server)
+{
+ server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
+}
+
+/* Provides detailed information about a process. */
+
+glibtop_map_entry *
+glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
+{
+ glibtop_init_p (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_map));
+
+ return NULL;
+}
diff --git a/sysdeps/aix/procmem.c b/sysdeps/aix/procmem.c
new file mode 100644
index 00000000..2e7738d3
--- /dev/null
+++ b/sysdeps/aix/procmem.c
@@ -0,0 +1,73 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <unistd.h>
+#include <sys/vminfo.h>
+#include <sys/resource.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procmem.h>
+
+#include "utils.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_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)
+{
+ struct procsinfo *pinfo;
+ int pagesize;
+
+ memset (buf, 0, sizeof (glibtop_proc_mem));
+
+ pinfo = _glibtop_get_procinfo(server, pid);
+ if (pinfo == NULL)
+ {
+ glibtop_error_io_r (server, "Cannot read procsinfo");
+
+ return;
+ }
+
+ pagesize = sysconf(_SC_PAGESIZE);
+
+ buf->vsize = buf->size = pinfo->pi_size * pagesize;
+ buf->resident = buf->rss = (pinfo->pi_drss + pinfo->pi_trss) * pagesize;
+ buf->rss_rlim = pinfo->pi_rlimit[RLIMIT_RSS].rlim_cur;
+
+ buf->flags = _glibtop_sysdeps_proc_mem;
+}
diff --git a/sysdeps/aix/procsegment.c b/sysdeps/aix/procsegment.c
new file mode 100644
index 00000000..b1cf02a1
--- /dev/null
+++ b/sysdeps/aix/procsegment.c
@@ -0,0 +1,74 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <unistd.h>
+#include <sys/vminfo.h>
+#include <sys/resource.h>
+
+#include <glibtop.h>
+#include <glibtop/procsegment.h>
+#include <glibtop/error.h>
+
+#include "utils.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);
+
+
+/* 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)
+{
+ struct procsinfo *pinfo;
+ int pagesize;
+
+ memset (buf, 0, sizeof (glibtop_proc_segment));
+
+ pinfo = _glibtop_get_procinfo(server, pid);
+ if (pinfo == NULL)
+ {
+ glibtop_error_io_r (server, "Cannot read procsinfo");
+
+ return;
+ }
+
+ pagesize = sysconf(_SC_PAGESIZE);
+
+ buf->text_rss = pinfo->pi_trss * pagesize;
+ buf->data_rss = pinfo->pi_drss * pagesize;
+ buf->shlib_rss = pinfo->pi_ru.ru_ixrss * pagesize;
+ buf->stack_rss = pinfo->pi_ru.ru_isrss * pagesize;
+
+ buf->flags = _glibtop_sysdeps_proc_segment;
+}
diff --git a/sysdeps/aix/procsignal.c b/sysdeps/aix/procsignal.c
new file mode 100644
index 00000000..dbcb7829
--- /dev/null
+++ b/sysdeps/aix/procsignal.c
@@ -0,0 +1,89 @@
+/* $Id$ */
+
+/* Copyright (C)) +998-99 Martin Baulig
+ This file is part of LibGTop) +.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April) +998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version) + of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite) +30,
+ Boston, MA) +2111-1307, USA.
+*/
+
+#include <unistd.h>
+#include <sys/vminfo.h>
+#include <sys/resource.h>
+#include <sys/signal.h>
+
+#include <glibtop.h>
+#include <glibtop/procsignal.h>
+#include <glibtop/error.h>
+
+#include "utils.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)
+{
+ struct procsinfo *pinfo;
+ int i;
+ long bit;
+
+ memset (buf, 0, sizeof (glibtop_proc_signal));
+
+ pinfo = _glibtop_get_procinfo(server, pid);
+ if (pinfo == NULL)
+ {
+ glibtop_error_io_r (server, "Cannot read procsinfo");
+
+ return;
+ }
+
+ /* pending signals */
+
+#define NB_BITS (8 * sizeof(u_int64_t))
+
+ for (i = 0; (i < NSIG) && (i < 2 * NB_BITS); i++)
+ {
+ bit = 1 << (NB_BITS - 1 - (i % NB_BITS));
+
+ if (sigismember(&pinfo->pi_sig, i))
+ buf->signal[i / NB_BITS] |= bit;
+
+ if (pinfo->pi_signal[i] == (long)SIG_HOLD)
+ buf->blocked[i / NB_BITS] |= bit;
+
+ if (pinfo->pi_signal[i] == (long)SIG_IGN)
+ buf->sigignore[i / NB_BITS] |= bit;
+
+ if (pinfo->pi_signal[i] == (long)SIG_CATCH)
+ buf->sigcatch[i / NB_BITS] |= bit;
+ }
+
+ buf->flags = _glibtop_sysdeps_proc_signal;
+}
diff --git a/sysdeps/aix/procstate.c b/sysdeps/aix/procstate.c
new file mode 100644
index 00000000..b0a9c814
--- /dev/null
+++ b/sysdeps/aix/procstate.c
@@ -0,0 +1,127 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <procinfo.h>
+#include <sys/thread.h>
+
+#include <glibtop.h>
+#include <glibtop/procstate.h>
+#include <glibtop/error.h>
+
+#include "utils.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. */
+
+void
+glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf,
+ pid_t pid)
+{
+ struct procsinfo *pinfo;
+ struct thrdsinfo thinfo;
+ tid_t thid;
+ int result;
+
+ memset (buf, 0, sizeof (glibtop_proc_state));
+
+ pinfo = _glibtop_get_procinfo(server, pid);
+ if (pinfo == NULL)
+ {
+ glibtop_error_io_r(server, "Cannot read procsinfo");
+
+ return;
+ }
+
+ if (pinfo->pi_pid == 0)
+ {
+ strcpy(buf->cmd, "swapper");
+ }
+
+ if (pinfo->pi_comm[0] == 0)
+ {
+ strcpy(buf->cmd, "<unknown>");
+ }
+ else
+ {
+ strncpy(buf->cmd, pinfo->pi_comm, 39);
+ }
+
+ buf->uid = pinfo->pi_uid;
+ buf->gid = pinfo->pi_cred.cr_gid;
+
+ if (pinfo->pi_state == SZOMB)
+ {
+ buf->state = 'Z';
+ strcpy(buf->cmd, "<defunct>");
+ }
+ else
+ {
+ /* get state of first thread */
+
+ thid = 0;
+ result = getthrds(pid, &thinfo, sizeof(thinfo), &thid, 1);
+ if (result != 1)
+ {
+ glibtop_error_io_r(server, "Cannot read threadinfo");
+ }
+
+ switch (thinfo.ti_state)
+ {
+ case TSIDL:
+ buf->state = 'D';
+ break;
+ case TSRUN:
+ buf->state = 'R';
+ break;
+ case TSSLEEP:
+ buf->state = 'S';
+ break;
+ case TSZOMB:
+ buf->state = 'Z';
+ strcpy(buf->cmd, "<defunct>");
+ break;
+ case TSSTOP:
+ buf->state = 'T';
+ break;
+ case TSSWAP:
+ buf->state = 'W';
+ break;
+ default:
+ buf->state = 0;
+ break;
+ }
+ }
+
+ buf->flags = _glibtop_sysdeps_proc_state;
+}
diff --git a/sysdeps/aix/proctime.c b/sysdeps/aix/proctime.c
new file mode 100644
index 00000000..4526a889
--- /dev/null
+++ b/sysdeps/aix/proctime.c
@@ -0,0 +1,72 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <unistd.h>
+
+#include <glibtop.h>
+#include <glibtop/proctime.h>
+#include <glibtop/error.h>
+
+#include "utils.h"
+
+static const unsigned long _glibtop_sysdeps_proc_time =
+(1 << GLIBTOP_PROC_TIME_START_TIME) + (1 << GLIBTOP_PROC_TIME_RTIME) +
+(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_STIME) +
+(1 << GLIBTOP_PROC_TIME_CUTIME) + (1 << GLIBTOP_PROC_TIME_CSTIME) +
+(1 << GLIBTOP_PROC_TIME_FREQUENCY);
+
+/* Init function. */
+
+void
+glibtop_init_proc_time_s (glibtop *server)
+{
+ server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
+ pid_t pid)
+{
+ struct procsinfo *pinfo;
+
+ memset (buf, 0, sizeof (glibtop_proc_time));
+
+ pinfo = _glibtop_get_procinfo(server, pid);
+ if (pinfo == NULL)
+ {
+ glibtop_error_io_r (server, "Cannot read procsinfo");
+ return;
+ }
+
+ buf->start_time = pinfo->pi_start;
+ buf->utime = pinfo->pi_ru.ru_utime.tv_sec + (double)pinfo->pi_ru.ru_utime.tv_usec/1000000.0;
+ buf->stime = pinfo->pi_ru.ru_stime.tv_sec + (double)pinfo->pi_ru.ru_stime.tv_usec/1000000.0;
+ buf->rtime = buf->utime + buf->stime;
+ buf->cutime = pinfo->pi_cru.ru_utime.tv_sec + (double)pinfo->pi_cru.ru_utime.tv_usec/1000000.0;
+ buf->cstime = pinfo->pi_cru.ru_stime.tv_sec + (double)pinfo->pi_cru.ru_stime.tv_usec/1000000.0;
+ buf->frequency = sysconf(_SC_CLK_TCK);
+
+ buf->flags = _glibtop_sysdeps_proc_time;
+}
diff --git a/sysdeps/aix/procuid.c b/sysdeps/aix/procuid.c
new file mode 100644
index 00000000..c5fe476f
--- /dev/null
+++ b/sysdeps/aix/procuid.c
@@ -0,0 +1,101 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <unistd.h>
+#include <sys/vminfo.h>
+#include <sys/resource.h>
+
+#include <glibtop.h>
+#include <glibtop/procuid.h>
+#include <glibtop/error.h>
+
+#include "utils.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_PRIORITY) +
+(1 << GLIBTOP_PROC_UID_NICE);
+
+
+/* Init function. */
+
+void
+glibtop_init_proc_uid_s (glibtop *server)
+{
+ server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf,
+ pid_t pid)
+{
+ struct procsinfo *pinfo;
+ struct thrdsinfo thinfo;
+ tid_t thid;
+ int result;
+
+ memset (buf, 0, sizeof (glibtop_proc_uid));
+
+ pinfo = _glibtop_get_procinfo(server, pid);
+ if (pinfo == NULL)
+ {
+ glibtop_error_io_r (server, "Cannot read procsinfo");
+
+ return;
+ }
+
+ buf->uid = pinfo->pi_cred.cr_ruid;
+ buf->euid = pinfo->pi_cred.cr_uid;
+ buf->gid = pinfo->pi_cred.cr_rgid;
+ buf->egid = pinfo->pi_cred.cr_gid;
+
+ buf->pid = pinfo->pi_pid;
+ buf->ppid = pinfo->pi_ppid;
+
+ buf->pgrp = pinfo->pi_pgrp;
+ buf->session = pinfo->pi_sid;
+
+ buf->tty = pinfo->pi_ttyd;
+
+ buf->nice = pinfo->pi_nice;
+
+ buf->flags = _glibtop_sysdeps_proc_uid;
+
+ thid = 0;
+ result = getthrds(pid, &thinfo, sizeof(thinfo), &thid, 1);
+ if (result != 1)
+ {
+ buf->flags &= ~(1 << GLIBTOP_PROC_UID_PRIORITY);
+
+ glibtop_error_io_r(server, "Cannot read thrdsinfo");
+ }
+
+ /* priority of first thread */
+
+ buf->priority = thinfo.ti_pri;
+}
diff --git a/sysdeps/aix/sem_limits.c b/sysdeps/aix/sem_limits.c
new file mode 100644
index 00000000..f3fce8d5
--- /dev/null
+++ b/sysdeps/aix/sem_limits.c
@@ -0,0 +1,86 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/sem_limits.h>
+#include <glibtop/error.h>
+
+#include "utils.h"
+
+static const unsigned long _glibtop_sysdeps_sem_limits =
+(1 << GLIBTOP_IPC_SEMMNI) + (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_p (glibtop *server)
+{
+ off_t result;
+
+ result = _glibtop_get_kmem_offset(server, "seminfo");
+ if (result <= 0)
+ {
+ server->sysdeps.sem_limits = 0;
+ return;
+ }
+
+ server->machine.seminfo_offset = result;
+
+ 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)
+{
+ int result;
+ struct seminfo seminfo;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_sem_limits));
+
+ result = _glibtop_get_kmem_info(server, server->machine.seminfo_offset,
+ &seminfo, sizeof(seminfo));
+
+ if (result <= 0)
+ {
+ glibtop_error_io_r (server, "Cannot read seminfo");
+
+ return;
+ }
+
+ buf->semmni = seminfo.semmni;
+ 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/aix/shm_limits.c b/sysdeps/aix/shm_limits.c
new file mode 100644
index 00000000..67d20517
--- /dev/null
+++ b/sysdeps/aix/shm_limits.c
@@ -0,0 +1,79 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <sys/shm.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/shm_limits.h>
+
+static const unsigned long _glibtop_sysdeps_shm_limits =
+(1L << GLIBTOP_IPC_SHMMAX) + (1L << GLIBTOP_IPC_SHMMIN) +
+(1L << GLIBTOP_IPC_SHMMNI);
+
+/* Init function. */
+
+void
+glibtop_init_shm_limits_p (glibtop *server)
+{
+ int result;
+
+ result = _glibtop_get_kmem_offset(server, "shminfo");
+ if (result == -1)
+ {
+ server->sysdeps.shm_limits = 0;
+ return;
+ }
+
+ server->machine.shminfo_offset = result;
+
+ 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)
+{
+ int result;
+ struct shminfo shminfo;
+ int s;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_shm_limits));
+
+ result = _glibtop_get_kmem_info(server, server->machine.shminfo_offset,
+ &shminfo, sizeof(struct shminfo));
+ if (result <= 0)
+ {
+ glibtop_error_io_r (server, "Cannot read shminfo");
+ return;
+ }
+
+ buf->shmmax = shminfo.shmmax;
+ buf->shmmin = shminfo.shmmin;
+ buf->shmmni = shminfo.shmmni;
+
+ buf->flags = _glibtop_sysdeps_shm_limits;
+}
diff --git a/sysdeps/aix/siglist.c b/sysdeps/aix/siglist.c
new file mode 100644
index 00000000..9778c0f8
--- /dev/null
+++ b/sysdeps/aix/siglist.c
@@ -0,0 +1,72 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 1, "SIGHUP", "Hangup" },
+ { 2, "SIGINT", "Interrupt" },
+ { 3, "SIGQUIT", "Quit" },
+ { 4, "SIGILL", "Illegal Instruction" },
+ { 5, "SIGTRAP", "Trace/Breakpoint Trap" },
+ { 6, "SIGABRT", "Abort" },
+ { 7, "SIGEMT", "Emulation Trap" },
+ { 8, "SIGFPE", "Arithmetic Exception" },
+ { 9, "SIGKILL", "Killed" },
+ { 10, "SIGBUS", "Bus Error" },
+ { 11, "SIGSEGV", "Segmentation Fault" },
+ { 12, "SIGSYS", "Bad System Call" },
+ { 13, "SIGPIPE", "Broken Pipe" },
+ { 14, "SIGALRM", "Alarm Clock" },
+ { 15, "SIGTERM", "Terminated" },
+ { 16, "SIGURG", "Urgent Socket Condition" },
+ { 17, "SIGSTOP", "Stop (signal)" },
+ { 18, "SIGSTP", "Stop (user)" },
+ { 19, "SIGCONT", "Continue" },
+ { 20, "SIGCHLD", "Child Status Changed" },
+ { 21, "SIGTTIN", "Stopped (tty input)" },
+ { 22, "SIGTTOU", "Stopped (tty output)" },
+ { 23, "SIGIO", "I/O completed" },
+ { 24, "SIGXCPU", "Cpu Limit Exceeded" },
+ { 25, "SIGXFSZ", "File Size Limit Exceeded" },
+ { 27, "SIGMSG", "Message" },
+ { 28, "SIGWINCH","Window Size Change" },
+ { 29, "SIGPWR", "Power-Fail/Restart" },
+ { 30, "SIGUSR1", "User Signal 1" },
+ { 31, "SIGUSR2", "User Signal 2" },
+ { 32, "SIGPROF", "Profiling Timer Expired" },
+ { 33, "SIGDANGER","System Crash Imminent" },
+ { 34, "SIGVTALRM","Virtual Timer Expired" },
+ { 35, "SIGMIGRATE","Migrate Process" },
+ { 36, "SIGPRE", "Programming Exception" },
+ { 37, "SIGVIRT", "AIX Virtual Time Alarm" },
+ { 38, "SIGALRM1", "m:n Condition Variables" },
+ { 39, "SIGWAITING","Scheduling" },
+ { 59, "SIGCPUFAIL","Predictive De-configuration of Processors" },
+ { 60, "SIGKAP", "Keep Alive" },
+ { 61, "SIGRETRACT","Monitor Mode Relinguish" },
+ { 62, "SIGSOUND", "Sound Control Completed" },
+ { 63, "SIGSAK", "Secure Attention Key" },
+ { 0, NULL, NULL }
+};
diff --git a/sysdeps/aix/swap.c b/sysdeps/aix/swap.c
new file mode 100644
index 00000000..7e4db97c
--- /dev/null
+++ b/sysdeps/aix/swap.c
@@ -0,0 +1,128 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <sys/vminfo.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/swap.h>
+
+static const unsigned long _glibtop_sysdeps_swap =
+(1 << GLIBTOP_SWAP_TOTAL) + (1 << GLIBTOP_SWAP_USED) +
+(1 << GLIBTOP_SWAP_FREE) + (1 << GLIBTOP_SWAP_PAGEIN) +
+(1 << GLIBTOP_SWAP_PAGEOUT);
+
+#define FILENAME "/etc/swapspaces"
+
+/* 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 vminfo vminfo;
+ struct pginfo pginfo;
+ int pagesize;
+ int result;
+ FILE* fd;
+ char device_name[128];
+ int c;
+ int comment = 0;
+ int pos = 0;
+
+ memset (buf, 0, sizeof (glibtop_swap));
+
+ pagesize = sysconf(_SC_PAGESIZE);
+
+ fd = fopen(FILENAME, "r");
+ if (fd == NULL)
+ {
+ glibtop_error_io_r (server, "open (%s)", FILENAME);
+ }
+
+ buf->total = 0;
+ buf->free = 0;
+ while((c = getc(fd)) != EOF)
+ {
+ if (comment)
+ {
+ /* skip comments */
+ if (c == '\n') comment = 0;
+ continue;
+ }
+ switch(c)
+ {
+ case '*':
+ comment = 1;
+ break;
+ case '\n':
+ device_name[pos] = 0;
+ pos = 0;
+
+ if (strncmp("dev=", device_name, 4) == 0)
+ {
+ result = swapqry(device_name+4, &pginfo);
+ if (result == -1)
+ {
+ glibtop_error_io_r (server, "Cannot read pginfo");
+ break;
+ }
+
+ buf->total += pginfo.size * pagesize;
+ buf->free += pginfo.free * pagesize;;
+ }
+ break;
+ case ' ':
+ case '\t':
+ break;
+ default:
+ device_name[pos++] = c;
+ break;
+ }
+ }
+
+ buf->used = buf->total - buf->free;
+ fclose(fd);
+#ifdef HAVE_VMGETINFO
+ result = vmgetinfo((void*)&vminfo, VMINFO, sizeof(vminfo));
+#else
+ result = _glibtop_vmgetinfo((void*)&vminfo, VMINFO, sizeof(vminfo));
+#endif
+ if (result == -1)
+ {
+ glibtop_error_io_r (server, "Cannot read vminfo");
+ return;
+ }
+
+ buf->pagein = vminfo.pageins;
+ buf->pageout = vminfo.pageouts;
+
+ buf->flags = _glibtop_sysdeps_swap;
+}
diff --git a/sysdeps/aix/sysinfo.c b/sysdeps/aix/sysinfo.c
new file mode 100644
index 00000000..8185c6cc
--- /dev/null
+++ b/sysdeps/aix/sysinfo.c
@@ -0,0 +1,194 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <sys/systemcfg.h>
+
+#include <config.h>
+#include <glibtop/sysinfo.h>
+
+static const unsigned long _glibtop_sysdeps_sysinfo =
+(1L << GLIBTOP_SYSINFO_CPUINFO);
+
+static glibtop_sysinfo sysinfo;
+
+static void add_info(glibtop_entry* entry, char* label, char* value)
+{
+ g_ptr_array_add(entry->labels, g_strdup(label));
+ g_hash_table_insert(entry->values, label, g_strdup(value));
+}
+
+static void init_sysinfo(void)
+{
+ int cpu;
+ char buf[64];
+
+ memset (&sysinfo, 0, sizeof (glibtop_sysinfo));
+
+ sysinfo.ncpu = MIN(_system_configuration.ncpus, GLIBTOP_NCPU);
+
+ for (cpu = 0; cpu < sysinfo.ncpu ; cpu++)
+ {
+ /* init cpu data structure */
+
+ sysinfo.cpuinfo[cpu].labels = g_ptr_array_new();
+ sysinfo.cpuinfo[cpu].values = g_hash_table_new (NULL, NULL);
+
+ /* add properties */
+
+ switch(_system_configuration.architecture)
+ {
+ case POWER_RS:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "architecture"
+ , "Power Classic architecture");
+ break;
+ case POWER_PC:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "architecture"
+ , "Power PC architecture");
+ break;
+ case IA64:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "architecture"
+ , "Intel IA64 architecture");
+ break;
+ default:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "architecture"
+ , "Unknown architecture");
+ break;
+ }
+
+ if ( (_system_configuration.architecture == POWER_RS) ||
+ (_system_configuration.architecture == POWER_PC) )
+ {
+ switch(_system_configuration.implementation)
+ {
+ case POWER_RS1:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "RS1");
+ break;
+ case POWER_RSC:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "RSC");
+ break;
+ case POWER_RS2:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "RS2");
+ break;
+ case POWER_601:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "601");
+ break;
+ case POWER_603:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "603");
+ break;
+ case POWER_604:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "604");
+ break;
+ case POWER_620:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "620");
+ break;
+ case POWER_630:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "630");
+ break;
+ case POWER_A35:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "A35");
+ break;
+ case POWER_RS64II:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "RS64II");
+ break;
+ case POWER_RS64III:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "RS64III");
+ break;
+ }
+ }
+ else if (_system_configuration.architecture == IA64)
+ {
+ switch(_system_configuration.implementation)
+ {
+ case IA64_M1:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "IA64 M1");
+ break;
+ case IA64_M2:
+ add_info( &sysinfo.cpuinfo[cpu]
+ , "implementation"
+ , "IA64 M2");
+ break;
+ }
+ }
+
+ sprintf(buf,"%d", _system_configuration.width);
+ add_info( &sysinfo.cpuinfo[cpu], "width", buf);
+
+ if (_system_configuration.cache_attrib & (1 << 31))
+ {
+ /* L1 cache is present */
+
+ sprintf(buf,"%d", _system_configuration.icache_size);
+ add_info( &sysinfo.cpuinfo[cpu], "L1 instruction cache size", buf);
+
+ sprintf(buf,"%d", _system_configuration.dcache_size);
+ add_info( &sysinfo.cpuinfo[cpu], "L1 data cache size", buf);
+ }
+
+ sprintf(buf,"%d", _system_configuration.L2_cache_size);
+ add_info( &sysinfo.cpuinfo[cpu], "L2 cache size", buf);
+ }
+
+ sysinfo.flags = _glibtop_sysdeps_sysinfo;
+}
+
+glibtop_sysinfo *
+glibtop_get_sysinfo_s (glibtop *server)
+{
+ static int first_time = 1;
+
+ if (first_time)
+ {
+ init_sysinfo();
+ first_time = 0;
+ }
+
+ return &sysinfo;
+}
diff --git a/sysdeps/aix/uptime.c b/sysdeps/aix/uptime.c
new file mode 100644
index 00000000..250a72d1
--- /dev/null
+++ b/sysdeps/aix/uptime.c
@@ -0,0 +1,73 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/uptime.h>
+
+#include <glibtop/cpu.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_uptime =
+(1L << GLIBTOP_UPTIME_UPTIME) + (1L << GLIBTOP_UPTIME_IDLETIME);
+
+static const unsigned long _required_cpu_flags =
+(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_IDLE) +
+(1L << GLIBTOP_CPU_FREQUENCY);
+
+/* Init function. */
+
+void
+glibtop_init_uptime_p (glibtop *server)
+{
+ server->sysdeps.uptime = _glibtop_sysdeps_uptime;
+}
+
+/* Provides uptime and idle time. */
+
+void
+glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
+{
+ glibtop_cpu cpu;
+
+ glibtop_init_p (server, (1L << 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/aix/utils.c b/sysdeps/aix/utils.c
new file mode 100644
index 00000000..e230eb77
--- /dev/null
+++ b/sysdeps/aix/utils.c
@@ -0,0 +1,141 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <nlist.h>
+
+#include <procinfo.h>
+#include <sys/proc.h>
+#include <sys/vminfo.h>
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include "glibtop_suid.h"
+#include "utils.h"
+
+#ifndef HAVE_VMGETINFO
+#include <dlfcn.h>
+typedef int (*vmgetinfo_proto)(void *out, int command, int arg);
+#endif
+
+off_t
+_glibtop_get_kmem_offset(glibtop* server, char* kname)
+{
+ int result;
+ struct nlist kernelnames[] =
+ { {NULL, 0, 0, 0, 0, 0},
+ {NULL, 0, 0, 0, 0, 0},
+ };
+
+ kernelnames[0]._n._n_name = kname;
+
+ glibtop_suid_enter(server);
+
+ result = knlist(kernelnames, 1, sizeof(struct nlist));
+
+ glibtop_suid_leave(server);
+
+ if (result == -1)
+ {
+ return -1;
+ }
+
+ return kernelnames[0].n_value;
+}
+
+int
+_glibtop_get_kmem_info(glibtop* server, off_t offset, void* buf, size_t len)
+{
+ int result;
+
+ glibtop_suid_enter(server);
+
+ lseek(server->machine.kmem_fd, offset, SEEK_SET);
+
+ result = read(server->machine.kmem_fd, buf, len);
+
+ glibtop_suid_leave(server);
+
+ return result;
+}
+
+struct procsinfo*
+_glibtop_get_procinfo (glibtop *server, pid_t pid)
+{
+ int result;
+ pid_t current;
+ static int first_time = 1;
+
+ /* test if procsinfo already found */
+
+ if ((server->machine.last_pinfo.pi_pid == pid) && (!first_time))
+ {
+ return &server->machine.last_pinfo;
+ }
+
+ /* seek procsinfo if given pid */
+
+ first_time = 0;
+ current = 0;
+ while ((result = getprocs( &server->machine.last_pinfo
+ , sizeof(struct procsinfo)
+ , NULL, 0, &current, 1)) == 1)
+ {
+
+ if (pid == server->machine.last_pinfo.pi_pid)
+ {
+ return &server->machine.last_pinfo;
+ }
+ }
+ return NULL;
+}
+
+#ifndef HAVE_VMGETINFO
+int
+_glibtop_vmgetinfo (void *out, int command, int arg)
+{
+ void* handle;
+
+ static vmgetinfo_proto kern_vmgetinfo = NULL;
+
+ if (kern_vmgetinfo == NULL)
+ {
+ handle = dlopen("/unix", RTLD_NOW | RTLD_GLOBAL);
+ if (handle == NULL)
+ {
+ return -1;
+ }
+
+ kern_vmgetinfo = dlsym( handle, "vmgetinfo");
+
+ dlclose(handle);
+
+ if (kern_vmgetinfo == NULL)
+ {
+ return -1;
+ }
+ }
+
+ return kern_vmgetinfo(out, command, arg);
+}
+#endif
diff --git a/sysdeps/aix/utils.h b/sysdeps/aix/utils.h
new file mode 100644
index 00000000..f845f61a
--- /dev/null
+++ b/sysdeps/aix/utils.h
@@ -0,0 +1,45 @@
+/* $Id$ */
+
+/*
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __UTILS_H__
+#define __UTILS_H__
+
+BEGIN_LIBGTOP_DECLS
+
+extern off_t
+_glibtop_get_kmem_offset(glibtop* server, char* kname);
+
+extern int
+_glibtop_get_kmem_info(glibtop* server, off_t offset, void* buf, size_t len);
+
+extern struct procsinfo*
+_glibtop_get_procinfo (glibtop *server, pid_t pid);
+
+#ifndef HAVE_VMGETINFO
+extern int
+_glibtop_vmgetinfo (void *out, int command, int arg);
+#endif
+
+END_LIBGTOP_DECLS
+
+#endif /* __UTILS_H__ */
diff --git a/sysdeps/common/error.c b/sysdeps/common/error.c
new file mode 100644
index 00000000..f334ec50
--- /dev/null
+++ b/sysdeps/common/error.c
@@ -0,0 +1,88 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/error.h>
+
+#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/gnuslib.c b/sysdeps/common/gnuslib.c
new file mode 100644
index 00000000..67abf508
--- /dev/null
+++ b/sysdeps/common/gnuslib.c
@@ -0,0 +1,375 @@
+/* -*-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 <weiner@mot.com>,
+ * Darrell Kindred <dkindred@cmu.edu> and Arup Mukherjee <arup@cmu.edu>.
+ * 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 <glibtop.h>
+#include <glibtop/gnuserv.h>
+
+#include <fcntl.h>
+
+#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 <arpa/inet.h>
+
+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 <X11/X.h>
+#include <X11/Xauth.h>
+
+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
new file mode 100644
index 00000000..d78d3905
--- /dev/null
+++ b/sysdeps/common/inodedb.c
@@ -0,0 +1,117 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/inodedb.h>
+
+#include <pwd.h>
+#include <gdbm.h>
+
+#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/xmalloc.c b/sysdeps/common/xmalloc.c
new file mode 100644
index 00000000..d8d0080f
--- /dev/null
+++ b/sysdeps/common/xmalloc.c
@@ -0,0 +1,72 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/xmalloc.h>
+
+/* 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
new file mode 100644
index 00000000..09980ae6
--- /dev/null
+++ b/sysdeps/freebsd/.cvsignore
@@ -0,0 +1,6 @@
+.deps
+.libs
+Makefile
+Makefile.in
+*.lo
+*.la
diff --git a/sysdeps/freebsd/AUTHORS b/sysdeps/freebsd/AUTHORS
new file mode 100644
index 00000000..9da8aceb
--- /dev/null
+++ b/sysdeps/freebsd/AUTHORS
@@ -0,0 +1,2 @@
+Martin Baulig (martin@home-of-linux.org)
+Josh Sled (jsled@scam.XCF.Berkeley.EDU)
diff --git a/sysdeps/freebsd/ChangeLog b/sysdeps/freebsd/ChangeLog
new file mode 100644
index 00000000..72a89fa7
--- /dev/null
+++ b/sysdeps/freebsd/ChangeLog
@@ -0,0 +1,188 @@
+2001-10-17 Abel Cheung <maddog@linux.org.hk>
+
+ * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
+
+2001-02-27 Martin Baulig <baulig@suse.de>
+
+ * netload.c: Comment out the `subnet' field on BSDI; this should
+ make it compile. Bug #13345.
+
+ * shm_limits.c, msg_limits.c, sem_limits.c: Applied a patch
+ from Rolf Grossmann (grossman@securitas.net) for FreeBSD 4.2.
+ Fixes #51334.
+
+2001-02-14 Martin Baulig <baulig@suse.de>
+
+ * proctime.c (glibtop_get_proc_time_p): Make things work on
+ OpenBSD 2.6; this is basically the same than on NetBSD.
+
+2000-02-13 Martin Baulig <martin@home-of-linux.org>
+
+ * *.c: kvm_nlist () returns -1 on error, but a positive return value
+ does not necessarily mean failure. Fixes #3302 which was reported by
+ Matthias Scheler some time ago.
+
+1999-10-16 Martin Baulig <martin@home-of-linux.org>
+
+ Applied all patches from the FreeBSD 3.3 ports collection.
+
+ * swap.c: Only #include <rlist.h> for __FreeBSD_version < 400005.
+
+ * prockernel.c: Make it compile on FreeBSD / alpha.
+
+ * procsignal.c: Some fixes for FreeBSD-current.
+
+1999-10-16 Martin Baulig <martin@home-of-linux.org>
+
+ * procstate.c (glibtop_get_proc_state_p): Don't use the
+ `GLIBTOP_PROCESS_*' constants for process states for
+ LibGTop 1.0.x.
+
+1999-07-29 Martin Baulig <martin@home-of-linux.org>
+
+ * proctime.c (glibtop_get_proc_time_p): Fix bug reported by
+ Takis Psarogiannakopoulos: `start_time' are seconds since the
+ epoch as it is stated in the manual.
+
+Tue Jun 15 16:04:10 1999 Timur Bakeyev <mc@bat.ru>
+
+ * procuid.c: A fix to a ommitted case, when nor NetBSD, nor
+ LibGTop >= 1.1.0. This should be investigated closely to cover
+ more cases....
+
+1999-05-26 Martin Baulig <martin@home-of-linux.org>
+
+ More NetBSD 1.4 fixes.
+
+ * mem.c, procmap.c, procmem.c: Make this work with the new UVM code.
+
+ [FIXME: This following most likely works on all BSD systems, but
+ this needs to be tested; I made it conditional to NetBSD 1.4 at
+ the moment. Please extend the conditionals to any other systems
+ where this works ...]
+
+ * procstate.c: Added `ruid' and `rgid' for LibGTop >= 1.1.0.
+ * procuid.c: Added `ngroups' and `groups' for LibGTop >= 1.1.0.
+
+1999-05-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: Make this work on NetBSD.
+
+Thu Apr 8 23:47:29 1999 Timur Bakeyev <timur@gnu.org>
+
+ * cpu.c, mem.c, netload.c, procargs.c, procstate.c, proctime.c,
+ sem_limits.c, shm_limits.c, swap.c: Added initial port for BSD/OS
+ (aka BSDI) 2.x and 3.x. 4.x should also(?) work.
+
+ Still, this port require more close look and extended check.
+
+1999-03-19 Martin Baulig <martin@home-of-linux.org>
+
+ Added basic support for BSDI. It compiles without problems on
+ BSDI 2.1 and 3.1, but it is *untested* - I'm neither root on
+ the machine nor have I access to /dev/kmem, so I don't know
+ whether it will work.
+
+ You need to give configure the `--enable-hacker-mode' parameter
+ to use the code.
+
+ If someone can verify whether it actually works, please let me
+ know.
+
+1999-03-18 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: Don't use `sppp.pp_phase' if we don't HAVE_I4B_ACCT.
+ This is an ugly hack until someone tells me which versions have
+ this field and which not.
+
+1999-02-25 Martin Baulig <martin@home-of-linux.org>
+
+ * prockernel.c, proctime.c: Applied patch Stanislav Grozev for
+ OpenBSD: only include <osreldate.h> for FreeBSD.
+
+1999-02-24 Martin Baulig <martin@home-of-linux.org>
+
+ * swap.c: Applied another patch from Jeremy Lea to
+ make it work with FreeBSD-current.
+
+1999-02-21 Martin Baulig <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * Make it work with OpenBSD 2.4.
+
+1998-12-05 Martin Baulig <martin@home-of-linux.org>
+
+ * Make it work with NetBSD 1.3.2.
+
+1998-11-17 Martin Baulig <martin@home-of-linux.org>
+
+ * Make it work with FreeBSD 3.0.
+
+1998-11-11 Martin Baulig <martin@home-of-linux.org>
+
+ * *.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 <martin@home-of-linux.org>
+
+ * *.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 <martin@home-of-linux.org>
+
+ * netload.c: New file to get network load.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * procargs.c: New file to get command line arguments.
+
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * *.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 <martin@home-of-linux.org>
+
+ * swap.c: Added swap usage based upton the source code
+ of `pinfo'.
+
+1998-08-07 Martin Baulig <martin@home-of-linux.org>
+
+ * *: Imported FreeBSD port of libgtop from Josh Sled.
+
+ * ChangeLog: New file.
diff --git a/sysdeps/freebsd/Makefile.am b/sysdeps/freebsd/Makefile.am
new file mode 100644
index 00000000..b955e6ff
--- /dev/null
+++ b/sysdeps/freebsd/Makefile.am
@@ -0,0 +1,23 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
+
+libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c
+
+libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtop_sysdeps_suid_2_0_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_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h \
+ glibtop_suid.h
+
+libgtopincludedir = $(includedir)/libgtop-2.0
diff --git a/sysdeps/freebsd/NOTES b/sysdeps/freebsd/NOTES
new file mode 100644
index 00000000..82bbbc4b
--- /dev/null
+++ b/sysdeps/freebsd/NOTES
@@ -0,0 +1,10 @@
+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
new file mode 100644
index 00000000..b887a914
--- /dev/null
+++ b/sysdeps/freebsd/close.c
@@ -0,0 +1,31 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_p (glibtop *server)
+{ }
diff --git a/sysdeps/freebsd/cpu.c b/sysdeps/freebsd/cpu.c
new file mode 100644
index 00000000..5fdce7ad
--- /dev/null
+++ b/sysdeps/freebsd/cpu.c
@@ -0,0 +1,117 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/cpu.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_cpu =
+(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
+(1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) +
+(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY);
+
+/* nlist structure for kernel access */
+static struct nlist nlst [] = {
+#ifdef __bsdi__
+ { "_cpustats" },
+#else
+ { "_cp_time" },
+#endif
+ { 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, (1L << GLIBTOP_SYSDEPS_CPU), 0);
+
+ memset (buf, 0, sizeof (glibtop_cpu));
+
+ /* If this fails, the nlist may not be valid. */
+ if (server->sysdeps.cpu == 0)
+ return;
+
+ 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
new file mode 100644
index 00000000..192c3b7f
--- /dev/null
+++ b/sysdeps/freebsd/glibtop_machine.h
@@ -0,0 +1,59 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_MACHINE_H__
+#define __GLIBTOP_MACHINE_H__
+
+#include <sys/param.h>
+#include <nlist.h>
+#include <kvm.h>
+#include <sys/dkstat.h>
+#include <time.h>
+#include <sys/user.h>
+#include <sys/types.h>
+#include <sys/sysctl.h>
+
+#include <fcntl.h>
+
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#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
new file mode 100644
index 00000000..ccf3d29d
--- /dev/null
+++ b/sysdeps/freebsd/glibtop_server.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#define GLIBTOP_SUID_CPU (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
new file mode 100644
index 00000000..18ad4b76
--- /dev/null
+++ b/sysdeps/freebsd/glibtop_suid.h
@@ -0,0 +1,58 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SUID_H__
+#define __GLIBTOP_SUID_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#if _IN_LIBGTOP
+#include <sys/param.h>
+#endif
+
+#define KI_PROC(ki) (&(ki))->kp_proc)
+#define KI_EPROC(ki) (&(ki))->kp_eproc)
+
+#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
new file mode 100644
index 00000000..11d89342
--- /dev/null
+++ b/sysdeps/freebsd/init.c
@@ -0,0 +1,45 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+
+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
new file mode 100644
index 00000000..b0530e8a
--- /dev/null
+++ b/sysdeps/freebsd/loadavg.c
@@ -0,0 +1,60 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/loadavg.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_loadavg =
+(1L << GLIBTOP_LOADAVG_LOADAVG);
+
+/* Init function. */
+
+void
+glibtop_init_loadavg_p (glibtop *server)
+{
+ server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
+}
+
+/* Provides load averange. */
+
+void
+glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
+{
+ double ldavg[3];
+ int i;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_LOADAVG), 0);
+
+ memset (buf, 0, sizeof (glibtop_loadavg));
+
+ getloadavg (ldavg, 3);
+
+ /* fill in the struct */
+ buf->flags = _glibtop_sysdeps_loadavg;
+ for (i = 0; i < 3; i++) {
+ buf->loadavg [i] = ldavg [i];
+ } /* end for */
+}
diff --git a/sysdeps/freebsd/mem.c b/sysdeps/freebsd/mem.c
new file mode 100644
index 00000000..1b96fe7f
--- /dev/null
+++ b/sysdeps/freebsd/mem.c
@@ -0,0 +1,222 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/mem.h>
+
+#include <glibtop_suid.h>
+
+#include <sys/sysctl.h>
+#include <sys/vmmeter.h>
+#include <vm/vm_param.h>
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+#include <uvm/uvm_extern.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_mem =
+(1L << GLIBTOP_MEM_TOTAL) + (1L << GLIBTOP_MEM_USED) +
+(1L << GLIBTOP_MEM_FREE) +
+(1L << GLIBTOP_MEM_SHARED) +
+(1L << GLIBTOP_MEM_BUFFER) +
+#ifdef __FreeBSD__
+(1L << GLIBTOP_MEM_CACHED) +
+#endif
+(1L << GLIBTOP_MEM_USER) + (1L << GLIBTOP_MEM_LOCKED);
+
+#ifndef LOG1024
+#define LOG1024 10
+#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 [] = {
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ { "_bufpages" },
+ { 0 }
+#else
+#if defined(__bsdi__)
+ { "_bufcachemem" },
+#elif defined(__FreeBSD__)
+ { "_bufspace" },
+#else
+ { "_bufpages" },
+#endif
+ { "_cnt" },
+ { 0 }
+#endif
+};
+
+/* MIB array for sysctl */
+static int mib_length=2;
+#ifdef __bsdi__
+static int mib [] = { CTL_VM, VM_TOTAL };
+#else
+static int mib [] = { CTL_VM, VM_METER };
+#endif
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
+#endif
+
+/* Init function. */
+
+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;
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ struct uvmexp uvmexp;
+ size_t length_uvmexp;
+#else
+ struct vmmeter vmm;
+#endif
+ u_int v_used_count;
+ u_int v_total_count;
+ u_int v_free_count;
+ int bufspace;
+
+ glibtop_init_p (server, (1L << 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 (vmt)");
+ return;
+ }
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ length_uvmexp = sizeof (uvmexp);
+ if (sysctl (mib_uvmexp, 2, &uvmexp, &length_uvmexp, NULL, 0)) {
+ glibtop_warn_io_r (server, "sysctl (uvmexp)");
+ return;
+ }
+#else
+ /* Get the data from kvm_* */
+ if (kvm_read (server->machine.kd, nlst[1].n_value,
+ &vmm, sizeof (vmm)) != sizeof (vmm)) {
+ glibtop_warn_io_r (server, "kvm_read (cnt)");
+ return;
+ }
+#endif
+
+ if (kvm_read (server->machine.kd, nlst[0].n_value,
+ &bufspace, sizeof (bufspace)) != sizeof (bufspace)) {
+ glibtop_warn_io_r (server, "kvm_read (bufspace)");
+ return;
+ }
+
+ /* convert memory stats to Kbytes */
+
+#if defined(__FreeBSD__)
+ v_total_count = vmm.v_page_count;
+#else
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ v_total_count = uvmexp.reserve_kernel +
+ uvmexp.reserve_pagedaemon +
+ uvmexp.free + uvmexp.wired + uvmexp.active +
+ uvmexp.inactive;
+#else
+ v_total_count = vmm.v_kernel_pages +
+ vmm.v_free_count + vmm.v_wire_count +
+ vmm.v_active_count + vmm.v_inactive_count;
+#endif
+#endif
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ v_used_count = uvmexp.active + uvmexp.inactive;
+ v_free_count = uvmexp.free;
+#else
+ v_used_count = vmm.v_active_count + vmm.v_inactive_count;
+ v_free_count = vmm.v_free_count;
+#endif
+
+ buf->total = (u_int64_t) pagetok (v_total_count) << LOG1024;
+ buf->used = (u_int64_t) pagetok (v_used_count) << LOG1024;
+ buf->free = (u_int64_t) pagetok (v_free_count) << LOG1024;
+
+#ifdef __FreeBSD__
+ buf->cached = (u_int64_t) pagetok (vmm.v_cache_count) << LOG1024;
+#endif
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ buf->locked = (u_int64_t) pagetok (uvmexp.wired) << LOG1024;
+#else
+ buf->locked = (u_int64_t) pagetok (vmm.v_wire_count) << LOG1024;
+#endif
+
+ buf->shared = (u_int64_t) pagetok (vmt.t_rmshr) << LOG1024;
+
+#if __FreeBSD__
+ 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
new file mode 100644
index 00000000..e4752bf3
--- /dev/null
+++ b/sysdeps/freebsd/msg_limits.c
@@ -0,0 +1,115 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, August 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/msg_limits.h>
+
+#include <glibtop_suid.h>
+
+#if (defined __bsdi__) && (_BSDI_VERSION < 199700)
+/* Older versions of BSDI don't seem to have this. */
+
+void
+glibtop_init_msg_limits_p (glibtop *server)
+{ }
+
+void
+glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
+{
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_msg_limits));
+}
+
+#else
+
+/* #define KERNEL to get declaration of `struct msginfo'. */
+
+#if (defined(__FreeBSD__) && (__FreeBSD_version < 410000)) || (defined __bsdi__)
+#define KERNEL 1
+#else
+#define _KERNEL 1
+#endif
+
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+static const unsigned long _glibtop_sysdeps_msg_limits =
+(1L << GLIBTOP_IPC_MSGMAX) + (1L << GLIBTOP_IPC_MSGMNI) +
+(1L << GLIBTOP_IPC_MSGMNB) + (1L << GLIBTOP_IPC_MSGTQL) +
+(1L << GLIBTOP_IPC_MSGSSZ);
+
+/* The values in this structure never change at runtime, so we only
+ * read it once during initialization. We have to use the name `_msginfo'
+ * since `msginfo' is already declared external in <sys/msg.h>. */
+static struct msginfo _msginfo;
+
+/* nlist structure for kernel access */
+static struct nlist nlst [] = {
+ { "_msginfo" },
+ { 0 }
+};
+
+/* Init function. */
+
+void
+glibtop_init_msg_limits_p (glibtop *server)
+{
+ if (kvm_nlist (server->machine.kd, nlst) < 0) {
+ glibtop_warn_io_r (server, "kvm_nlist (msg_limits)");
+ return;
+ }
+
+ if (kvm_read (server->machine.kd, nlst [0].n_value,
+ &_msginfo, sizeof (_msginfo)) != sizeof (_msginfo)) {
+ glibtop_warn_io_r (server, "kvm_read (msginfo)");
+ return;
+ }
+
+ server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
+}
+
+/* Provides information about sysv ipc limits. */
+
+void
+glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
+{
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_msg_limits));
+
+ if (server->sysdeps.msg_limits == 0)
+ return;
+
+ buf->msgmax = _msginfo.msgmax;
+ buf->msgmni = _msginfo.msgmni;
+ buf->msgmnb = _msginfo.msgmnb;
+ buf->msgtql = _msginfo.msgtql;
+ buf->msgssz = _msginfo.msgtql;
+
+ buf->flags = _glibtop_sysdeps_msg_limits;
+}
+
+#endif /* either a newer BSDI or no BSDI at all. */
+
diff --git a/sysdeps/freebsd/netload.c b/sysdeps/freebsd/netload.c
new file mode 100644
index 00000000..4062dfe2
--- /dev/null
+++ b/sysdeps/freebsd/netload.c
@@ -0,0 +1,219 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/netload.h>
+
+#include <glibtop_suid.h>
+
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <net/if_types.h>
+
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+
+static const unsigned long _glibtop_sysdeps_netload =
+(1L << GLIBTOP_NETLOAD_IF_FLAGS) +
+(1L << GLIBTOP_NETLOAD_MTU) +
+#if !defined(__bsdi__)
+(1L << GLIBTOP_NETLOAD_SUBNET) +
+#endif
+(1L << GLIBTOP_NETLOAD_ADDRESS) +
+(1L << GLIBTOP_NETLOAD_PACKETS_IN) +
+(1L << GLIBTOP_NETLOAD_PACKETS_OUT) +
+(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
+(1L << GLIBTOP_NETLOAD_BYTES_IN) +
+(1L << GLIBTOP_NETLOAD_BYTES_OUT) +
+(1L << GLIBTOP_NETLOAD_BYTES_TOTAL) +
+(1L << GLIBTOP_NETLOAD_ERRORS_IN) +
+(1L << GLIBTOP_NETLOAD_ERRORS_OUT) +
+(1L << GLIBTOP_NETLOAD_ERRORS_TOTAL) +
+(1L << GLIBTOP_NETLOAD_COLLISIONS);
+
+/* nlist structure for kernel access */
+static struct nlist nlst [] = {
+ { "_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, (1L << GLIBTOP_SYSDEPS_NETLOAD), 0);
+
+ memset (buf, 0, sizeof (glibtop_netload));
+
+ if (kvm_read (server->machine.kd, nlst [0].n_value,
+ &ifnetaddr, sizeof (ifnetaddr)) != sizeof (ifnetaddr))
+ glibtop_error_io_r (server, "kvm_read (ifnet)");
+
+ 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)");
+
+#if defined(__FreeBSD__) || defined(__bsdi__)
+ if (kvm_read (server->machine.kd, (u_long) ifnet.if_name,
+ tname, 16) != 16)
+ glibtop_error_io_r (server, "kvm_read (if_name)");
+#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__) || defined(__bsdi__)
+ 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;
+
+#if !defined(__bsdi__)
+ /* Commenting out to "fix" #13345. */
+ buf->subnet = htonl (ifaddr.in.ia_subnet);
+#endif
+ 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__) || defined(__bsdi__)
+ ifaddraddr = (u_long)ifaddr.ifa.ifa_next;
+#else
+ ifaddraddr = (u_long)ifaddr.ifa.ifa_list.tqe_next;
+#endif
+ }
+
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 300000)
+ ifnetaddr = (u_long) ifnet.if_link.tqe_next;
+#elif defined(__FreeBSD__) || defined(__bsdi__)
+ 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
new file mode 100644
index 00000000..15edf79a
--- /dev/null
+++ b/sysdeps/freebsd/nosuid.c
@@ -0,0 +1,37 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+
+void
+glibtop_open_s (glibtop *server,
+ const char *program_name,
+ const unsigned long features,
+ const unsigned flags)
+{ }
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/freebsd/open.c b/sysdeps/freebsd/open.c
new file mode 100644
index 00000000..ea95d16f
--- /dev/null
+++ b/sysdeps/freebsd/open.c
@@ -0,0 +1,95 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/xmalloc.h>
+
+/* !!! 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
new file mode 100644
index 00000000..41ab1b36
--- /dev/null
+++ b/sysdeps/freebsd/ppp.c
@@ -0,0 +1,144 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/ppp.h>
+
+#include <glibtop_suid.h>
+
+#ifdef HAVE_I4B
+
+#include <net/if.h>
+#include <net/if_types.h>
+
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+
+#include <net/netisr.h>
+#include <net/route.h>
+
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+#include <net/if_sppp.h>
+#else
+#include <i4b/sppp/if_sppp.h>
+#endif
+
+/* Read `misc/i4b_acct.txt' for details ... */
+#ifdef HAVE_I4B_ACCT
+#include <machine/i4b_acct.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_ppp =
+(1L << GLIBTOP_PPP_STATE);
+
+#ifdef HAVE_I4B_ACCT
+static const unsigned long _glibtop_sysdeps_ppp_acct =
+(1L << GLIBTOP_PPP_BYTES_IN) + (1L << GLIBTOP_PPP_BYTES_OUT);
+#endif
+
+#endif /* HAVE_I4B */
+
+/* nlist structure for kernel access */
+static struct nlist nlst [] = {
+#ifdef HAVE_I4B
+ { "_i4bisppp_softc" },
+#endif
+ { 0 }
+};
+
+/* Init function. */
+
+void
+glibtop_init_ppp_p (glibtop *server)
+{
+#ifdef HAVE_I4B
+#ifdef HAVE_I4B_ACCT
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp |
+ _glibtop_sysdeps_ppp_acct;
+#else
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+#endif
+#endif /* HAVE_I4B */
+
+ if (kvm_nlist (server->machine.kd, nlst) < 0)
+ glibtop_error_io_r (server, "kvm_nlist");
+}
+
+/* Provides information about ppp usage. */
+
+void
+glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+#ifdef HAVE_I4B
+#ifdef HAVE_I4B_ACCT
+ struct i4bisppp_softc data;
+#else
+ struct sppp data;
+#endif
+ int phase;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PPP), 0);
+
+ memset (buf, 0, sizeof (glibtop_ppp));
+
+ if (kvm_read (server->machine.kd, nlst [0].n_value,
+ &data, sizeof (data)) != sizeof (data))
+ glibtop_error_io_r (server, "kvm_read (i4bisppp_softc)");
+
+#ifdef HAVE_I4B_ACCT
+ phase = data.sc_if_un.scu_sp.pp_phase;
+#else
+ /* FIXME: Which FreeBSD version have this field and
+ * which not. */
+#if 0
+ phase = data.pp_phase;
+#endif
+#endif
+
+ switch (phase) {
+#ifdef HAVE_I4B_ACCT
+ case PHASE_DEAD:
+ case PHASE_TERMINATE:
+ buf->state = GLIBTOP_PPP_STATE_HANGUP;
+ break;
+ case PHASE_ESTABLISH:
+ case PHASE_NETWORK:
+ buf->state = GLIBTOP_PPP_STATE_ONLINE;
+ break;
+#endif
+ default:
+ buf->state = GLIBTOP_PPP_STATE_UNKNOWN;
+ break;
+ }
+
+ buf->flags = _glibtop_sysdeps_ppp;
+
+#ifdef HAVE_I4B_ACCT
+ buf->bytes_in = data.sc_inb;
+ buf->bytes_out = data.sc_outb;
+ buf->flags |= _glibtop_sysdeps_ppp_acct;
+#endif
+#endif /* HAVE_I4B */
+}
diff --git a/sysdeps/freebsd/procargs.c b/sysdeps/freebsd/procargs.c
new file mode 100644
index 00000000..83b6a78b
--- /dev/null
+++ b/sysdeps/freebsd/procargs.c
@@ -0,0 +1,111 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procargs.h>
+
+#include <glibtop_suid.h>
+
+#include <kvm.h>
+#include <sys/param.h>
+#include <sys/proc.h>
+
+static const unsigned long _glibtop_sysdeps_proc_args =
+(1L << GLIBTOP_PROC_ARGS_SIZE);
+
+/* Init function. */
+
+void
+glibtop_init_proc_args_p (glibtop *server)
+{
+ server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
+}
+
+/* Provides detailed information about a process. */
+
+char *
+glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
+ pid_t pid, unsigned max_len)
+{
+ struct kinfo_proc *pinfo;
+ char *retval, **args, **ptr;
+ unsigned size = 0, pos = 0;
+ int count;
+
+#ifndef __bsdi__
+ char filename [BUFSIZ];
+ struct stat statb;
+#endif
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_ARGS), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_args));
+
+ /* swapper, init, pagedaemon, vmdaemon, update - this doen't work. */
+ if (pid < 5) return NULL;
+
+#ifndef __bsdi__
+ sprintf (filename, "/proc/%d/mem", pid);
+ if (stat (filename, &statb)) return NULL;
+#endif
+
+ glibtop_suid_enter (server);
+
+ /* 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
new file mode 100644
index 00000000..65ec6822
--- /dev/null
+++ b/sysdeps/freebsd/procdata.c
@@ -0,0 +1,180 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/procdata.h>
+
+#include <sys/stat.h>
+
+#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z)
+
+#define BIT_SHIFT(x) (1L << (x % 64))
+
+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 "<rest>" */
+ 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
new file mode 100644
index 00000000..0dd97ab4
--- /dev/null
+++ b/sysdeps/freebsd/prockernel.c
@@ -0,0 +1,184 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/prockernel.h>
+
+#include <glibtop_suid.h>
+
+#include <kvm.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/proc.h>
+#if (!defined __OpenBSD__) && (!defined __bsdi__)
+#include <sys/user.h>
+#endif
+#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__))
+#include <machine/pcb.h>
+#endif
+#if defined(__FreeBSD__) && !defined(__alpha__)
+#include <machine/tss.h>
+#endif
+
+#include <unistd.h>
+#include <fcntl.h>
+
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_proc_kernel_pstats =
+(1L << GLIBTOP_PROC_KERNEL_MIN_FLT) +
+(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) +
+(1L << GLIBTOP_PROC_KERNEL_CMIN_FLT) +
+(1L << GLIBTOP_PROC_KERNEL_CMAJ_FLT);
+
+static const unsigned long _glibtop_sysdeps_proc_kernel_pcb =
+(1L << GLIBTOP_PROC_KERNEL_KSTK_EIP) +
+(1L << GLIBTOP_PROC_KERNEL_KSTK_ESP);
+
+static const unsigned long _glibtop_sysdeps_proc_kernel_wchan =
+(1L << GLIBTOP_PROC_KERNEL_NWCHAN) +
+(1L << GLIBTOP_PROC_KERNEL_WCHAN);
+
+/* Init function. */
+
+void
+glibtop_init_proc_kernel_p (glibtop *server)
+{
+ server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel_pstats |
+ _glibtop_sysdeps_proc_kernel_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, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_kernel));
+
+ if (server->sysdeps.proc_time == 0)
+ return;
+
+ /* It does not work for the swapper task. */
+ if (pid == 0) return;
+
+ /* Get the process information */
+ pinfo = kvm_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 |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN);
+
+ if (pinfo [0].kp_proc.p_wchan && pinfo [0].kp_proc.p_wmesg) {
+ strncpy (buf->wchan, pinfo [0].kp_eproc.e_wmesg,
+ sizeof (buf->wchan) - 1);
+ buf->wchan [sizeof (buf->wchan) - 1] = 0;
+ buf->flags |= (1L << 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", (int) 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__
+#ifndef __alpha__
+#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
+ /*xxx FreeBSD/Alpha? */
+#endif
+#else
+ buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0;
+#ifdef __bsdi__
+ buf->kstk_eip = (u_int64_t) pcb.pcb_tss.tss_eip;
+#else
+ buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip;
+#endif
+
+ buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;
+#endif
+ }
+
+ /* 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
new file mode 100644
index 00000000..20353ec5
--- /dev/null
+++ b/sysdeps/freebsd/proclist.c
@@ -0,0 +1,103 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/proclist.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_proclist =
+(1L << GLIBTOP_PROCLIST_TOTAL) + (1L << GLIBTOP_PROCLIST_NUMBER) +
+(1L << GLIBTOP_PROCLIST_SIZE);
+
+/* Fetch list of currently running processes.
+ * The interface of this function is a little bit different from the others:
+ * buf->flags is only set if the call succeeded, in this case pids_chain,
+ * a list of the pids of all currently running processes is returned,
+ * buf->number is the number of elements of this list and buf->size is
+ * the size of one single element (sizeof (unsigned)). The total size is
+ * stored in buf->total.
+ *
+ * The calling function has to free the memory to which a pointer is returned.
+ *
+ * IMPORTANT NOTE:
+ * On error, this function MUST return NULL and set buf->flags to zero !
+ * On success, it returnes a pointer to a list of buf->number elements
+ * each buf->size big. The total size is stored in buf->total.
+ * The calling function has to free the memory to which a pointer is returned.
+ *
+ * On error, NULL is returned and buf->flags is zero. */
+
+/* Init function. */
+
+void
+glibtop_init_proclist_p (glibtop *server)
+{
+ server->sysdeps.proclist = _glibtop_sysdeps_proclist;
+}
+
+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, (1L << GLIBTOP_SYSDEPS_PROCLIST), 0);
+
+ memset (buf, 0, sizeof (glibtop_proclist));
+
+ which = (int)(real_which & GLIBTOP_KERN_PROC_MASK);
+
+ /* Get the process data */
+ pinfo = kvm_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
new file mode 100644
index 00000000..f29445b5
--- /dev/null
+++ b/sysdeps/freebsd/procmap.c
@@ -0,0 +1,266 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procmap.h>
+
+#include <glibtop_suid.h>
+
+#include <kvm.h>
+#include <sys/param.h>
+#include <sys/proc.h>
+#include <sys/resource.h>
+#include <vm/vm_object.h>
+#include <vm/vm_prot.h>
+#include <vm/vm_map.h>
+
+#include <sys/vnode.h>
+#include <sys/mount.h>
+#include <ufs/ufs/quota.h>
+#include <ufs/ufs/inode.h>
+
+#include <sys/ucred.h>
+#if (!defined __OpenBSD__) && (!defined __bsdi__)
+#include <sys/user.h>
+#endif
+#include <sys/sysctl.h>
+#include <vm/vm.h>
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+/* Fixme ... */
+#undef _KERNEL
+#define _UVM_UVM_AMAP_I_H_ 1
+#define _UVM_UVM_MAP_I_H_ 1
+#include <uvm/uvm.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_proc_map =
+(1L << GLIBTOP_PROC_MAP_TOTAL) + (1L << GLIBTOP_PROC_MAP_NUMBER) +
+(1L << GLIBTOP_PROC_MAP_SIZE);
+
+static const unsigned long _glibtop_sysdeps_map_entry =
+(1L << GLIBTOP_MAP_ENTRY_START) + (1L << GLIBTOP_MAP_ENTRY_END) +
+(1L << GLIBTOP_MAP_ENTRY_OFFSET) + (1L << GLIBTOP_MAP_ENTRY_PERM) +
+(1L << GLIBTOP_MAP_ENTRY_INODE) + (1L << GLIBTOP_MAP_ENTRY_DEVICE);
+
+/* Init function. */
+
+void
+glibtop_init_proc_map_p (glibtop *server)
+{
+ server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
+}
+
+/* Provides detailed information about a process. */
+
+glibtop_map_entry *
+glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
+ pid_t pid)
+{
+ struct kinfo_proc *pinfo;
+ struct vm_map_entry entry, *first;
+ struct vmspace vmspace;
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ struct vnode vnode;
+ struct inode inode;
+#else
+ struct vm_object object;
+#endif
+ glibtop_map_entry *maps;
+#if defined __FreeBSD__
+ struct vnode vnode;
+ struct inode inode;
+ struct mount mount;
+#endif
+ int count, i = 0;
+ int update = 0;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MAP), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_map));
+
+ /* It does not work for the swapper task. */
+ if (pid == 0) return 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 defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ if (UVM_ET_ISSUBMAP (&entry))
+ continue;
+#else
+ if (entry.is_a_map || entry.is_sub_map)
+ continue;
+#endif
+#endif
+
+ maps [i].flags = _glibtop_sysdeps_map_entry;
+
+ 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 defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ if (!entry.object.uvm_obj)
+ continue;
+
+ /* We're only interested in vnodes */
+
+ if (kvm_read (server->machine.kd,
+ (unsigned long) entry.object.uvm_obj,
+ &vnode, sizeof (vnode)) != sizeof (vnode)) {
+ glibtop_warn_io_r (server, "kvm_read (vnode)");
+ return NULL;
+ }
+#else
+ if (!entry.object.vm_object)
+ continue;
+
+ /* 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)");
+#endif
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID)
+ continue;
+
+ if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) ||
+ !vnode.v_data) continue;
+
+ if (kvm_read (server->machine.kd,
+ (unsigned long) vnode.v_data,
+ &inode, sizeof (inode)) != sizeof (inode))
+ glibtop_error_io_r (server, "kvm_read (inode)");
+
+ maps [i-1].inode = inode.i_number;
+ maps [i-1].device = inode.i_dev;
+#endif
+
+
+#ifdef __FreeBSD__
+ /* If the object is of type vnode, add its size */
+
+ 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
new file mode 100644
index 00000000..05f66001
--- /dev/null
+++ b/sysdeps/freebsd/procmem.c
@@ -0,0 +1,259 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procmem.h>
+
+#include <glibtop_suid.h>
+
+#include <kvm.h>
+#include <sys/param.h>
+#include <sys/proc.h>
+#include <sys/resource.h>
+#include <vm/vm_object.h>
+#include <vm/vm_map.h>
+
+#include <sys/vnode.h>
+#include <ufs/ufs/quota.h>
+#include <ufs/ufs/inode.h>
+
+#include <sys/ucred.h>
+#if (!defined __OpenBSD__) && (!defined __bsdi__)
+#include <sys/user.h>
+#endif
+#include <sys/sysctl.h>
+#include <vm/vm.h>
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+/* Fixme ... */
+#undef _KERNEL
+#define _UVM_UVM_AMAP_I_H_ 1
+#define _UVM_UVM_MAP_I_H_ 1
+#include <uvm/uvm.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_proc_mem =
+(1L << GLIBTOP_PROC_MEM_SIZE) +
+(1L << GLIBTOP_PROC_MEM_VSIZE) +
+(1L << GLIBTOP_PROC_MEM_RESIDENT) +
+(1L << GLIBTOP_PROC_MEM_RSS) +
+(1L << GLIBTOP_PROC_MEM_RSS_RLIM);
+
+static const unsigned long _glibtop_sysdeps_proc_mem_share =
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+(1L << GLIBTOP_PROC_MEM_SHARE);
+#elif defined(__FreeBSD__)
+(1L << GLIBTOP_PROC_MEM_SHARE);
+#else
+0;
+#endif
+
+#ifndef LOG1024
+#define LOG1024 10
+#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 |
+ _glibtop_sysdeps_proc_mem_share;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
+ pid_t pid)
+{
+ struct kinfo_proc *pinfo;
+ struct vm_map_entry entry, *first;
+ struct vmspace *vms, vmspace;
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ struct vnode vnode;
+ struct inode inode;
+#else
+ struct vm_object object;
+#endif
+ struct plimit plimit;
+ int count;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MEM), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_mem));
+
+ if (server->sysdeps.proc_mem == 0)
+ return;
+
+ /* It does not work for the swapper task. */
+ if (pid == 0) return;
+
+ /* Get the process data */
+ pinfo = kvm_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 defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ if (UVM_ET_ISSUBMAP (&entry))
+ continue;
+#else
+ if (entry.is_a_map || entry.is_sub_map)
+ continue;
+#endif
+#endif
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ if (!entry.object.uvm_obj)
+ continue;
+
+ /* We're only interested in vnodes */
+
+ if (kvm_read (server->machine.kd,
+ (unsigned long) entry.object.uvm_obj,
+ &vnode, sizeof (vnode)) != sizeof (vnode)) {
+ glibtop_warn_io_r (server, "kvm_read (vnode)");
+ return;
+ }
+#else
+ if (!entry.object.vm_object)
+ continue;
+
+ /* 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;
+ }
+#endif
+ /* If the object is of type vnode, add its size */
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID)
+ continue;
+
+ if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) ||
+ !vnode.v_data) continue;
+
+ /* Reference count must be at least two. */
+ if (vnode.v_uvm.u_obj.uo_refs <= 1)
+ continue;
+
+ buf->share += pagetok (vnode.v_uvm.u_obj.uo_npages) << LOG1024;
+#endif
+
+#ifdef __FreeBSD__
+ if (object.type != OBJT_VNODE)
+ continue;
+
+ buf->share += object.un_pager.vnp.vnp_size;
+#endif
+ }
+
+ buf->flags = _glibtop_sysdeps_proc_mem |
+ _glibtop_sysdeps_proc_mem_share;
+}
diff --git a/sysdeps/freebsd/procsegment.c b/sysdeps/freebsd/procsegment.c
new file mode 100644
index 00000000..915472ef
--- /dev/null
+++ b/sysdeps/freebsd/procsegment.c
@@ -0,0 +1,82 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procsegment.h>
+
+#include <glibtop_suid.h>
+
+#include <kvm.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
+
+static const unsigned long _glibtop_sysdeps_proc_segment = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_segment_p (glibtop *server)
+{
+ server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_segment_p (glibtop *server,
+ glibtop_proc_segment *buf,
+ pid_t pid)
+{
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_segment));
+
+#if 0
+ /* Get the process info from the kernel */
+ kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, count);
+ if (*count != 1) {
+ return; /* the zeroed-out buffer indicating no data */
+ }
+
+ /* trs: text resident set size
+ pinfo[0]->kp_eproc.e_xrssize;
+ */
+ /* buf->trs = pinfo[0]->kp_eproc.e_xrssize; */
+ /* lrs: shared-lib resident set size
+ ? */
+ /* drs: data resident set size
+ pinfo[0]->kp_eproc.e_vm.vm_map.vm_dsize;
+ */
+ /* dt: dirty pages
+ */
+ /* start_code: address of beginning of code segment
+
+ */
+ /* end_code: address of end of code segment
+ */
+ /* start_stack: address of the bottom of stack segment
+ */
+#endif
+}
+
diff --git a/sysdeps/freebsd/procsignal.c b/sysdeps/freebsd/procsignal.c
new file mode 100644
index 00000000..6ee36cab
--- /dev/null
+++ b/sysdeps/freebsd/procsignal.c
@@ -0,0 +1,107 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procsignal.h>
+
+#include <glibtop_suid.h>
+
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_proc_signal =
+(1L << GLIBTOP_PROC_SIGNAL_SIGNAL) +
+(1L << GLIBTOP_PROC_SIGNAL_BLOCKED) +
+(1L << GLIBTOP_PROC_SIGNAL_SIGIGNORE) +
+(1L << GLIBTOP_PROC_SIGNAL_SIGCATCH);
+
+/* Init function. */
+
+void
+glibtop_init_proc_signal_p (glibtop *server)
+{
+ server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
+}
+
+void
+glibtop_get_proc_signal_p (glibtop *server,
+ glibtop_proc_signal *buf,
+ pid_t pid)
+{
+ struct kinfo_proc *pinfo;
+ int count = 0;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_signal));
+
+ /* It does not work for the swapper task. */
+ if (pid == 0) return;
+
+ /* Get the process information */
+ pinfo = kvm_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)) || (__FreeBSD_version >= 400011)
+ 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)) || (__FreeBSD_version >= 400011)
+ 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)) || (__FreeBSD_version >= 400011)
+ 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)) || (__FreeBSD_version >= 400011)
+ 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
new file mode 100644
index 00000000..2357b393
--- /dev/null
+++ b/sysdeps/freebsd/procstate.c
@@ -0,0 +1,137 @@
+/* $Id$ */
+
+/* Copyright (C) 1998 Joshua Sled
+ This file is part of LibGTop 1.0.
+
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procstate.h>
+
+#include <glibtop_suid.h>
+
+#if !defined(__OpenBSD__)
+//&& (!defined __bsdi__)
+#include <sys/user.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_proc_state =
+(1L << GLIBTOP_PROC_STATE_CMD) + (1L << GLIBTOP_PROC_STATE_UID) +
+(1L << GLIBTOP_PROC_STATE_GID);
+
+static const unsigned long _glibtop_sysdeps_proc_state_new =
+#if LIBGTOP_VERSION_CODE >= 1001000
+(1L << GLIBTOP_PROC_STATE_RUID) + (1L << GLIBTOP_PROC_STATE_RGID);
+#else
+0;
+#endif
+
+/* Init function. */
+
+void
+glibtop_init_proc_state_p (glibtop *server)
+{
+ server->sysdeps.proc_state = _glibtop_sysdeps_proc_state |
+ _glibtop_sysdeps_proc_state_new;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_state_p (glibtop *server,
+ glibtop_proc_state *buf,
+ pid_t pid)
+{
+ struct kinfo_proc *pinfo;
+ int count = 0;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_STATE), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_state));
+
+ /* It does not work for the swapper task. */
+ if (pid == 0) return;
+
+ /* Get the process information */
+ pinfo = kvm_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;
+
+#if LIBGTOP_VERSION_CODE >= 1001000
+ buf->ruid = pinfo [0].kp_eproc.e_pcred.p_ruid;
+ buf->rgid = pinfo [0].kp_eproc.e_pcred.p_rgid;
+#endif
+
+ /* Set the flags for the data we're about to return*/
+ buf->flags = _glibtop_sysdeps_proc_state |
+ _glibtop_sysdeps_proc_state_new;
+
+#if LIBGTOP_VERSION_CODE >= 1001000
+ switch (pinfo [0].kp_proc.p_stat) {
+ case SIDL:
+ buf->state = 0;
+ break;
+ case SRUN:
+ buf->state = GLIBTOP_PROCESS_RUNNING;
+ break;
+ case SSLEEP:
+ buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
+ break;
+ case SSTOP:
+ buf->state = GLIBTOP_PROCESS_STOPPED;
+ break;
+ case SZOMB:
+ buf->state = GLIBTOP_PROCESS_ZOMBIE;
+ break;
+ default:
+ return;
+ }
+#else
+ switch (pinfo [0].kp_proc.p_stat) {
+ case SIDL:
+ buf->state = 'S';
+ 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:
+ return;
+ }
+#endif
+
+ buf->flags |= (1L << GLIBTOP_PROC_STATE_STATE);
+}
diff --git a/sysdeps/freebsd/proctime.c b/sysdeps/freebsd/proctime.c
new file mode 100644
index 00000000..0c71c593
--- /dev/null
+++ b/sysdeps/freebsd/proctime.c
@@ -0,0 +1,229 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/proctime.h>
+
+#include <glibtop_suid.h>
+
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_proc_time =
+(1L << GLIBTOP_PROC_TIME_RTIME) + (1L << GLIBTOP_PROC_TIME_FREQUENCY);
+
+static const unsigned long _glibtop_sysdeps_proc_time_user =
+(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_STIME) +
+(1L << GLIBTOP_PROC_TIME_CUTIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) +
+(1L << GLIBTOP_PROC_TIME_START_TIME);
+
+#define tv2sec(tv) (((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;
+#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)) || (defined(OpenBSD) && (OpenBSD >= 199912))
+ register struct rusage *rup;
+#else
+ struct user *u_addr = (struct user *)USRSTACK;
+#endif
+ struct pstats pstats;
+ int count;
+
+ char filename [BUFSIZ];
+ struct stat statb;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_TIME), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_time));
+
+ /* It does not work for the swapper task. */
+ if (pid == 0) return;
+
+#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
+ if (server->sysdeps.proc_time == 0)
+ return;
+
+#ifndef __bsdi__
+ sprintf (filename, "/proc/%d/mem", (int) pid);
+ if (stat (filename, &statb)) return;
+#endif
+#endif
+
+ /* Get the process information */
+ pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
+ if ((pinfo == NULL) || (count != 1))
+ glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
+
+#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003)
+ buf->rtime = pinfo [0].kp_proc.p_runtime;
+#else
+ buf->rtime = tv2sec (pinfo [0].kp_proc.p_rtime);
+#endif
+
+ buf->frequency = 1000000;
+ buf->flags = _glibtop_sysdeps_proc_time;
+
+#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)) || (defined(OpenBSD) && (OpenBSD >= 199912))
+ glibtop_suid_enter (server);
+
+ if (kvm_read (server->machine.kd,
+ (unsigned long) pinfo [0].kp_proc.p_stats,
+ &pstats, sizeof (pstats)) != sizeof (pstats)) {
+ glibtop_warn_io_r (server, "kvm_read (pstats)");
+ return;
+ }
+
+ glibtop_suid_leave (server);
+
+ rup = &pstats.p_ru;
+ calcru(&(pinfo [0]).kp_proc,
+ &rup->ru_utime, &rup->ru_stime, NULL);
+
+ buf->utime = tv2sec (pstats.p_ru.ru_utime);
+ buf->stime = tv2sec (pstats.p_ru.ru_stime);
+
+ buf->cutime = tv2sec (pstats.p_cru.ru_utime);
+ buf->cstime = tv2sec (pstats.p_cru.ru_stime);
+
+ buf->start_time = (u_int64_t) pstats.p_start.tv_sec;
+
+ buf->flags |= _glibtop_sysdeps_proc_time_user;
+#else
+ glibtop_suid_enter (server);
+
+ if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
+ 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);
+#endif
+}
+
diff --git a/sysdeps/freebsd/procuid.c b/sysdeps/freebsd/procuid.c
new file mode 100644
index 00000000..03c4598a
--- /dev/null
+++ b/sysdeps/freebsd/procuid.c
@@ -0,0 +1,128 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procuid.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_proc_uid =
+(1L << GLIBTOP_PROC_UID_UID) + (1L << GLIBTOP_PROC_UID_EUID) +
+(1L << GLIBTOP_PROC_UID_EGID) + (1L << GLIBTOP_PROC_UID_PID) +
+(1L << GLIBTOP_PROC_UID_PPID) + (1L << GLIBTOP_PROC_UID_PGRP) +
+(1L << GLIBTOP_PROC_UID_TPGID) + (1L << GLIBTOP_PROC_UID_PRIORITY) +
+(1L << GLIBTOP_PROC_UID_NICE);
+
+static const unsigned long _glibtop_sysdeps_proc_uid_groups =
+#if LIBGTOP_VERSION_CODE >= 1001000
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+(1L << GLIBTOP_PROC_UID_NGROUPS) + (1L << GLIBTOP_PROC_UID_GROUPS);
+#else
+0L;
+#endif
+#else /* LIBGTOP_VERSION_CODE < 1001000 */
+0L;
+#endif
+
+/* Init function. */
+
+void
+glibtop_init_proc_uid_p (glibtop *server)
+{
+ server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid |
+ _glibtop_sysdeps_proc_uid_groups;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
+ pid_t pid)
+{
+ struct kinfo_proc *pinfo;
+ int count = 0;
+
+#if LIBGTOP_VERSION_CODE >= 1001000
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ struct ucred ucred;
+ void *ucred_ptr;
+#endif
+#endif
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_UID), 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_uid));
+
+ /* 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;
+
+ /* Use LibGTop conditionals here so we can more easily merge this
+ * code into the LIBGTOP_STABLE_1_0 branch. */
+#if LIBGTOP_VERSION_CODE >= 1001000
+ /* This probably also works with other versions, but not yet
+ * tested. Please remove the conditional if this is true. */
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ ucred_ptr = (void *) pinfo [0].kp_eproc.e_pcred.pc_ucred;
+
+ if (ucred_ptr) {
+ if (kvm_read (server->machine.kd, (unsigned long) ucred_ptr,
+ &ucred, sizeof (ucred)) != sizeof (ucred)) {
+ glibtop_warn_io_r (server, "kvm_read (ucred)");
+ } else {
+ int count = (ucred.cr_ngroups < GLIBTOP_MAX_GROUPS) ?
+ ucred.cr_ngroups : GLIBTOP_MAX_GROUPS;
+ int i;
+
+ for (i = 0; i < count; i++)
+ buf->groups [i] = ucred.cr_groups [i];
+ buf->ngroups = count;
+
+ buf->flags |= _glibtop_sysdeps_proc_uid_groups;
+ }
+ }
+#endif
+#endif
+}
diff --git a/sysdeps/freebsd/sem_limits.c b/sysdeps/freebsd/sem_limits.c
new file mode 100644
index 00000000..c9a177de
--- /dev/null
+++ b/sysdeps/freebsd/sem_limits.c
@@ -0,0 +1,120 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, August 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/sem_limits.h>
+
+#include <glibtop_suid.h>
+
+#if defined(__bsdi__) && (_BSDI_VERSION < 199700)
+/* Older versions of BSDI don't seem to have this. */
+
+void
+glibtop_init_sem_limits_p (glibtop *server)
+{ }
+
+void
+glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
+{
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_sem_limits));
+}
+
+#else
+
+/* #define KERNEL to get declaration of `struct seminfo'. */
+
+#if (defined(__FreeBSD__) && (__FreeBSD_version < 410000)) || defined(__bsdi__)
+#define KERNEL 1
+#else
+#define _KERNEL 1
+#endif
+
+#include <sys/ipc.h>
+#include <sys/sem.h>
+
+static unsigned long _glibtop_sysdeps_sem_limits =
+(1L << GLIBTOP_IPC_SEMMAP) + (1L << GLIBTOP_IPC_SEMMNI) +
+(1L << GLIBTOP_IPC_SEMMNS) + (1L << GLIBTOP_IPC_SEMMNU) +
+(1L << GLIBTOP_IPC_SEMMSL) + (1L << GLIBTOP_IPC_SEMOPM) +
+(1L << GLIBTOP_IPC_SEMUME) + (1L << GLIBTOP_IPC_SEMUSZ) +
+(1L << GLIBTOP_IPC_SEMVMX) + (1L << GLIBTOP_IPC_SEMAEM);
+
+/* The values in this structure never change at runtime, so we only
+ * read it once during initialization. We have to use the name `_seminfo'
+ * since `seminfo' is already declared external in <sys/sem.h>. */
+static struct seminfo _seminfo;
+
+/* nlist structure for kernel access */
+static struct nlist nlst [] = {
+ { "_seminfo" },
+ { 0 }
+};
+
+/* Init function. */
+
+void
+glibtop_init_sem_limits_p (glibtop *server)
+{
+ if (kvm_nlist (server->machine.kd, nlst) < 0) {
+ glibtop_warn_io_r (server, "kvm_nlist (sem_limits)");
+ return;
+ }
+
+ if (kvm_read (server->machine.kd, nlst [0].n_value,
+ &_seminfo, sizeof (_seminfo)) != sizeof (_seminfo)) {
+ glibtop_warn_io_r (server, "kvm_read (seminfo)");
+ return;
+ }
+
+ server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
+}
+
+/* Provides information about sysv sem limits. */
+
+void
+glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
+{
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_sem_limits));
+
+ if (server->sysdeps.sem_limits == 0)
+ return;
+
+ buf->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;
+}
+
+#endif /* either a newer BSDI or no BSDI at all. */
+
diff --git a/sysdeps/freebsd/shm_limits.c b/sysdeps/freebsd/shm_limits.c
new file mode 100644
index 00000000..5abe88e8
--- /dev/null
+++ b/sysdeps/freebsd/shm_limits.c
@@ -0,0 +1,115 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, August 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/shm_limits.h>
+
+#include <glibtop_suid.h>
+
+#if defined(__bsdi__) && (_BSDI_VERSION < 199700)
+/* Older versions of BSDI don't seem to have this. */
+
+void
+glibtop_init_shm_limits_p (glibtop *server)
+{ }
+
+void
+glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
+{
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_shm_limits));
+}
+
+#else
+
+/* #define KERNEL to get declaration of `struct shminfo'. */
+
+#if (defined(__FreeBSD__) && (__FreeBSD_version < 410000)) || defined(__bsdi__)
+#define KERNEL 1
+#else
+#define _KERNEL 1
+#endif
+
+#include <sys/ipc.h>
+#include <sys/shm.h>
+
+static unsigned long _glibtop_sysdeps_shm_limits =
+(1L << GLIBTOP_IPC_SHMMAX) + (1L << GLIBTOP_IPC_SHMMIN) +
+(1L << GLIBTOP_IPC_SHMMNI) + (1L << GLIBTOP_IPC_SHMSEG) +
+(1L << GLIBTOP_IPC_SHMALL);
+
+/* The values in this structure never change at runtime, so we only
+ * read it once during initialization. We have to use the name `_shminfo'
+ * since `shminfo' is already declared external in <sys/shm.h>. */
+static struct shminfo _shminfo;
+
+/* nlist structure for kernel access */
+static struct nlist nlst [] = {
+ { "_shminfo" },
+ { 0 }
+};
+
+/* Init function. */
+
+void
+glibtop_init_shm_limits_p (glibtop *server)
+{
+ if (kvm_nlist (server->machine.kd, nlst) < 0) {
+ glibtop_warn_io_r (server, "kvm_nlist (shm_limits)");
+ return;
+ }
+
+ if (kvm_read (server->machine.kd, nlst [0].n_value,
+ &_shminfo, sizeof (_shminfo)) != sizeof (_shminfo)) {
+ glibtop_warn_io_r (server, "kvm_read (shminfo)");
+ return;
+ }
+
+ server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
+}
+
+/* Provides information about sysv ipc limits. */
+
+void
+glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
+{
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_shm_limits));
+
+ if (server->sysdeps.shm_limits == 0)
+ return;
+
+ buf->shmmax = _shminfo.shmmax;
+ buf->shmmin = _shminfo.shmmin;
+ buf->shmmni = _shminfo.shmmni;
+ buf->shmseg = _shminfo.shmseg;
+ buf->shmall = _shminfo.shmall;
+
+ buf->flags = _glibtop_sysdeps_shm_limits;
+}
+
+#endif /* either a newer BSDI or no BSDI at all. */
+
diff --git a/sysdeps/freebsd/siglist.c b/sysdeps/freebsd/siglist.c
new file mode 100644
index 00000000..94abfdc6
--- /dev/null
+++ b/sysdeps/freebsd/siglist.c
@@ -0,0 +1,28 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 0, NULL, NULL } };
diff --git a/sysdeps/freebsd/swap.c b/sysdeps/freebsd/swap.c
new file mode 100644
index 00000000..d9669fa6
--- /dev/null
+++ b/sysdeps/freebsd/swap.c
@@ -0,0 +1,426 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/swap.h>
+
+#include <glibtop/xmalloc.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_swap =
+(1L << GLIBTOP_SWAP_TOTAL) + (1L << GLIBTOP_SWAP_USED) +
+(1L << GLIBTOP_SWAP_FREE) + (1L << GLIBTOP_SWAP_PAGEIN) +
+(1L << GLIBTOP_SWAP_PAGEOUT);
+
+#if defined(__FreeBSD__) || defined(__bsdi__)
+
+#include <sys/conf.h>
+#ifdef __bsdi__
+#include <vm/swap_pager.h>
+#else
+#if __FreeBSD_version < 400005
+#include <sys/rlist.h>
+#endif
+#endif
+#include <sys/vmmeter.h>
+
+/* nlist structure for kernel access */
+
+#if defined(__bsdi__)
+static struct nlist nlst [] = {
+ { "_swapstats" }, /* general swap info */
+ { 0 }
+};
+#elif __FreeBSD__ < 4
+static struct nlist nlst [] = {
+#define VM_SWAPLIST 0
+ { "_swaplist" },/* list of free swap areas */
+#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__)
+
+#if (__NetBSD_Version__ >= 104000000)
+#include <uvm/uvm_extern.h>
+#include <sys/swap.h>
+#else
+#include <vm/vm_swap.h>
+#endif
+
+#endif
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
+#else
+/* nlist structure for kernel access */
+static struct nlist nlst2 [] = {
+ { "_cnt" },
+ { 0 }
+};
+#endif
+
+/* Init function. */
+
+void
+glibtop_init_swap_p (glibtop *server)
+{
+#if defined(__FreeBSD__) || defined(__bsdi__)
+#if __FreeBSD__ < 4 || defined(__bsdi__)
+ if (kvm_nlist (server->machine.kd, nlst) < 0) {
+ glibtop_warn_io_r (server, "kvm_nlist (swap)");
+ return;
+ }
+#else
+ struct kvm_swap dummy;
+
+ if (kvm_getswapinfo (server->machine.kd, &dummy, 1, 0) != 0) {
+ glibtop_warn_io_r (server, "kvm_swap (swap)");
+ return;
+ }
+#endif
+#endif
+
+#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
+ if (kvm_nlist (server->machine.kd, nlst2) < 0) {
+ glibtop_warn_io_r (server, "kvm_nlist (cnt)");
+ return;
+ }
+#endif
+
+ server->sysdeps.swap = _glibtop_sysdeps_swap;
+}
+
+/* Provides information about swap usage. */
+
+/*
+ * This function is based on a program called swapinfo written
+ * by Kevin Lahey <kml@rokkaku.atl.ga.us>.
+ */
+
+void
+glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
+{
+#if defined(__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(__bsdi__)
+ struct swapstats swap;
+#elif defined(__NetBSD__)
+ struct swapent *swaplist;
+#endif
+
+ int nswap, i;
+ int avail = 0, inuse = 0;
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ struct uvmexp uvmexp;
+ size_t length_uvmexp;
+#else
+ /* To get `pagein' and `pageout'. */
+ struct vmmeter vmm;
+#endif
+ static int swappgsin = -1;
+ static int swappgsout = -1;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SWAP), 0);
+
+ memset (buf, 0, sizeof (glibtop_swap));
+
+ if (server->sysdeps.swap == 0)
+ return;
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ length_uvmexp = sizeof (uvmexp);
+ if (sysctl (mib_uvmexp, 2, &uvmexp, &length_uvmexp, NULL, 0)) {
+ glibtop_warn_io_r (server, "sysctl (uvmexp)");
+ return;
+ }
+#else
+ /* This is used to get the `pagein' and `pageout' members. */
+
+ if (kvm_read (server->machine.kd, nlst2[0].n_value,
+ &vmm, sizeof (vmm)) != sizeof (vmm)) {
+ glibtop_warn_io_r (server, "kvm_read (cnt)");
+ return;
+ }
+#endif
+
+ 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
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ buf->pagein = uvmexp.swapins - swappgsin;
+ buf->pageout = uvmexp.swapouts - swappgsout;
+#else
+ buf->pagein = vmm.v_swpin - swappgsin;
+ buf->pageout = vmm.v_swpout - swappgsout;
+#endif
+#endif
+ }
+
+#ifdef __FreeBSD__
+ swappgsin = vmm.v_swappgsin;
+ swappgsout = vmm.v_swappgsout;
+#else
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ swappgsin = uvmexp.swapins;
+ swappgsout = uvmexp.swapouts;
+#else
+ swappgsin = vmm.v_swpin;
+ swappgsout = vmm.v_swpout;
+#endif
+#endif
+
+#if defined(__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 (swdevt)");
+ 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(__bsdi__)
+
+ /* General info about swap devices. */
+
+ if (kvm_read (server->machine.kd, nlst[0].n_value,
+ &swap, sizeof (swap)) != sizeof (swap)) {
+ glibtop_warn_io_r (server, "kvm_read (swap)");
+ return;
+ }
+
+ buf->flags = _glibtop_sysdeps_swap;
+
+ buf->used = swap.swap_total - swap.swap_free;
+ buf->free = swap.swap_free;
+
+ buf->total = swap.swap_total;
+
+#elif defined(__NetBSD__)
+
+ nswap = swapctl (SWAP_NSWAP, NULL, 0);
+ if (nswap < 0) {
+ 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
new file mode 100644
index 00000000..250a72d1
--- /dev/null
+++ b/sysdeps/freebsd/uptime.c
@@ -0,0 +1,73 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/uptime.h>
+
+#include <glibtop/cpu.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_uptime =
+(1L << GLIBTOP_UPTIME_UPTIME) + (1L << GLIBTOP_UPTIME_IDLETIME);
+
+static const unsigned long _required_cpu_flags =
+(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_IDLE) +
+(1L << GLIBTOP_CPU_FREQUENCY);
+
+/* Init function. */
+
+void
+glibtop_init_uptime_p (glibtop *server)
+{
+ server->sysdeps.uptime = _glibtop_sysdeps_uptime;
+}
+
+/* Provides uptime and idle time. */
+
+void
+glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
+{
+ glibtop_cpu cpu;
+
+ glibtop_init_p (server, (1L << 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
new file mode 100644
index 00000000..db2bb60f
--- /dev/null
+++ b/sysdeps/guile/.cvsignore
@@ -0,0 +1,9 @@
+.deps
+.libs
+Makefile
+Makefile.in
+guile.c
+so_locations
+libgtop_guile.la
+*.lo
+*.x
diff --git a/sysdeps/guile/ChangeLog b/sysdeps/guile/ChangeLog
new file mode 100644
index 00000000..7e59c460
--- /dev/null
+++ b/sysdeps/guile/ChangeLog
@@ -0,0 +1,50 @@
+1999-02-04 Martin Baulig <martin@home-of-linux.org>
+
+ * names/guile-names.awk: Use `_' instead of `gettext'.
+
+1999-01-22 Martin Baulig <martin@home-of-linux.org>
+
+ * names/guile-names.awk: Use a `(TYPE . DIMENSION)' pair for
+ array types in `glibtop-types-*'.
+
+1998-12-09 Martin Baulig <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ * 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
new file mode 100644
index 00000000..518180e9
--- /dev/null
+++ b/sysdeps/guile/Makefile.am
@@ -0,0 +1,27 @@
+SUBDIRS = names
+
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+BUILT_SOURCES = guile.c guile.x
+
+lib_LTLIBRARIES = libgtop_guile-2.0.la
+
+libgtop_guile_2_0_la_SOURCES = $(BUILT_SOURCES)
+
+libgtop_guile_2_0_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
new file mode 100644
index 00000000..7a272ebc
--- /dev/null
+++ b/sysdeps/guile/guile.pl
@@ -0,0 +1,274 @@
+#!/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 <glibtop.h>';
+print '#include <glibtop/xmalloc.h>';
+print '#include <glibtop/sysdeps.h>';
+print '#include <glibtop/union.h>';
+print '';
+print '#include <guile/gh.h>';
+
+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
new file mode 100644
index 00000000..f2bf91eb
--- /dev/null
+++ b/sysdeps/guile/names/.cvsignore
@@ -0,0 +1,10 @@
+.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
new file mode 100644
index 00000000..a5dcf077
--- /dev/null
+++ b/sysdeps/guile/names/Makefile.am
@@ -0,0 +1,25 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_guile_names-2.0.la
+
+BUILT_SOURCES = guile-names.c guile-names.x
+
+libgtop_guile_names_2_0_la_SOURCES = $(BUILT_SOURCES)
+
+libgtop_guile_names_2_0_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
new file mode 100644
index 00000000..bdfb2941
--- /dev/null
+++ b/sysdeps/guile/names/guile-names.pl
@@ -0,0 +1,197 @@
+#!/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 <glibtop.h>';
+print '#include <glibtop/sysdeps.h>';
+print '#include <glibtop/union.h>';
+print '';
+print '#include <guile/gh.h>';
+
+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 "\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
new file mode 100644
index 00000000..b851d091
--- /dev/null
+++ b/sysdeps/kernel/.cvsignore
@@ -0,0 +1,28 @@
+.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
new file mode 100644
index 00000000..e833f0aa
--- /dev/null
+++ b/sysdeps/kernel/ChangeLog
@@ -0,0 +1,27 @@
+2001-10-17 Abel Cheung <maddog@linux.org.hk>
+
+ * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * netload.c: New file. Currently empty.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * procargs.c: New file. Currently empty.
+
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file. Currently empty.
+
+1998-06-14 Martin Baulig <martin@home-of-linux.org>
+
+ * 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 <martin@home-of-linux.org>
+
+ 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
new file mode 100644
index 00000000..d632d1d0
--- /dev/null
+++ b/sysdeps/kernel/Makefile.am
@@ -0,0 +1,25 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la
+
+libgtop_sysdeps_2_0_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_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtopinclude_HEADERS = glibtop_server.h
+libgtopincludedir = $(includedir)/libgtop-2.0
+
+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
new file mode 100644
index 00000000..4262d2f0
--- /dev/null
+++ b/sysdeps/kernel/close.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/kernel/cpu.c b/sysdeps/kernel/cpu.c
new file mode 100644
index 00000000..1a7127ba
--- /dev/null
+++ b/sysdeps/kernel/cpu.c
@@ -0,0 +1,65 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/cpu.h>
+
+#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_private.h b/sysdeps/kernel/glibtop_private.h
new file mode 100644
index 00000000..dd8f47ea
--- /dev/null
+++ b/sysdeps/kernel/glibtop_private.h
@@ -0,0 +1,89 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_PRIVATE_H__
+#define __GLIBTOP_PRIVATE_H__
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/user.h>
+
+#undef LIBGTOP_VERSION
+#include <linux/libgtop.h>
+
+BEGIN_LIBGTOP_DECLS
+
+int
+glibtop_get_proc_data_stat_s (glibtop *server, libgtop_stat_t *stat);
+
+int
+glibtop_get_proc_data_mem_s (glibtop *server, libgtop_mem_t *mem);
+
+int
+glibtop_get_proc_data_swap_s (glibtop *server, libgtop_swap_t *swap);
+
+int
+glibtop_get_proc_data_proclist_s (glibtop *server,
+ libgtop_proclist_t *proclist,
+ u_int64_t which, u_int64_t arg);
+
+int
+glibtop_get_proc_data_proc_state_s (glibtop *server,
+ libgtop_proc_state_t *proc_state,
+ pid_t pid);
+
+int
+glibtop_get_proc_data_proc_mem_s (glibtop *server,
+ libgtop_proc_mem_t *proc_mem,
+ pid_t pid);
+
+int
+glibtop_get_proc_data_proc_signal_s (glibtop *server,
+ libgtop_proc_signal_t *proc_signal,
+ pid_t pid);
+
+int
+glibtop_get_proc_data_proc_kernel_s (glibtop *server,
+ libgtop_proc_kernel_t *proc_kernel,
+ pid_t pid);
+
+int
+glibtop_get_proc_data_proc_args_s (glibtop *server, pid_t pid,
+ char *result, size_t max_len);
+
+int
+glibtop_get_proc_data_proc_maps_s (glibtop *server, pid_t pid,
+ libgtop_proc_maps_t *result,
+ size_t max_len);
+
+int
+glibtop_get_proc_data_netload_s (glibtop *server,
+ libgtop_netload_t *netload,
+ const char *device);
+
+END_LIBGTOP_DECLS
+
+#endif /* __GLIBTOP_PRIVATE_H__ */
diff --git a/sysdeps/kernel/glibtop_server.h b/sysdeps/kernel/glibtop_server.h
new file mode 100644
index 00000000..b3822d47
--- /dev/null
+++ b/sysdeps/kernel/glibtop_server.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#define GLIBTOP_SUID_CPU 0
+#define GLIBTOP_SUID_MEM 0
+#define GLIBTOP_SUID_SWAP 0
+#define GLIBTOP_SUID_UPTIME 0
+#define GLIBTOP_SUID_LOADAVG 0
+#define GLIBTOP_SUID_SHM_LIMITS 0
+#define GLIBTOP_SUID_MSG_LIMITS 0
+#define GLIBTOP_SUID_SEM_LIMITS 0
+#define GLIBTOP_SUID_PROCLIST 0
+#define GLIBTOP_SUID_PROC_STATE 0
+#define GLIBTOP_SUID_PROC_UID 0
+#define GLIBTOP_SUID_PROC_MEM 0
+#define GLIBTOP_SUID_PROC_TIME 0
+#define GLIBTOP_SUID_PROC_SIGNAL 0
+#define GLIBTOP_SUID_PROC_KERNEL 0
+#define GLIBTOP_SUID_PROC_SEGMENT 0
+#define GLIBTOP_SUID_PROC_ARGS 0
+#define GLIBTOP_SUID_PROC_MAP 0
+#define GLIBTOP_SUID_NETLOAD 0
+#define GLIBTOP_SUID_PPP 0
+
+END_LIBGTOP_DECLS
+
+#endif
diff --git a/sysdeps/kernel/kernel.h b/sysdeps/kernel/kernel.h
new file mode 100644
index 00000000..bfa8ac9f
--- /dev/null
+++ b/sysdeps/kernel/kernel.h
@@ -0,0 +1,40 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_KERNEL_KERNEL_H__
+#define __GLIBTOP_KERNEL_KERNEL_H__
+
+#include <linux/unistd.h>
+#include <linux/table.h>
+
+#include <sys/param.h>
+
+#include <syscall.h>
+
+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
new file mode 100644
index 00000000..d6b368c1
--- /dev/null
+++ b/sysdeps/kernel/kernel.s
@@ -0,0 +1,42 @@
+ .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
new file mode 100644
index 00000000..a31712d9
--- /dev/null
+++ b/sysdeps/kernel/loadavg.c
@@ -0,0 +1,65 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/loadavg.h>
+
+#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
new file mode 100644
index 00000000..6e7e74d6
--- /dev/null
+++ b/sysdeps/kernel/mem.c
@@ -0,0 +1,68 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/mem.h>
+
+#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
new file mode 100644
index 00000000..2ebd1b05
--- /dev/null
+++ b/sysdeps/kernel/msg_limits.c
@@ -0,0 +1,65 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/msg_limits.h>
+
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+static const unsigned long _glibtop_sysdeps_msg_limits =
+(1 << GLIBTOP_IPC_MSGPOOL) + (1 << GLIBTOP_IPC_MSGMAP) +
+(1 << GLIBTOP_IPC_MSGMAX) + (1 << GLIBTOP_IPC_MSGMNB) +
+(1 << GLIBTOP_IPC_MSGMNI) + (1 << GLIBTOP_IPC_MSGSSZ) +
+(1 << GLIBTOP_IPC_MSGTQL);
+
+/* 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
new file mode 100644
index 00000000..beebedba
--- /dev/null
+++ b/sysdeps/kernel/netload.c
@@ -0,0 +1,45 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/netload.h>
+
+static const unsigned long _glibtop_sysdeps_netload = 0;
+
+/* Init function. */
+
+void
+glibtop_init_netload_s (glibtop *server)
+{
+ server->sysdeps.netload = _glibtop_sysdeps_netload;
+}
+
+/* Provides network statistics. */
+
+void
+glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
+ const char *interface)
+{
+ memset (buf, 0, sizeof (glibtop_netload));
+}
diff --git a/sysdeps/kernel/open.c b/sysdeps/kernel/open.c
new file mode 100644
index 00000000..bd4bf34b
--- /dev/null
+++ b/sysdeps/kernel/open.c
@@ -0,0 +1,63 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/open.h>
+
+/* =====================================================
+ * Linux kernel version information for procps utilities
+ * Copyright (c) 1996 Charles Blake <cblake@bbn.com>
+ */
+#include <sys/utsname.h>
+
+#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
new file mode 100644
index 00000000..6d0905d5
--- /dev/null
+++ b/sysdeps/kernel/ppp.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/kernel/procargs.c b/sysdeps/kernel/procargs.c
new file mode 100644
index 00000000..7bf1b682
--- /dev/null
+++ b/sysdeps/kernel/procargs.c
@@ -0,0 +1,47 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procargs.h>
+
+static const unsigned long _glibtop_sysdeps_proc_args = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_args_s (glibtop *server)
+{
+ server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
+}
+
+/* Provides detailed information about a process. */
+
+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
new file mode 100644
index 00000000..64fa1583
--- /dev/null
+++ b/sysdeps/kernel/procdata.c
@@ -0,0 +1,180 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/procdata.h>
+
+#include <sys/stat.h>
+
+#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 "<rest>" */
+ 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
new file mode 100644
index 00000000..4380d681
--- /dev/null
+++ b/sysdeps/kernel/prockernel.c
@@ -0,0 +1,68 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/prockernel.h>
+
+#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
new file mode 100644
index 00000000..9b527aaf
--- /dev/null
+++ b/sysdeps/kernel/proclist.c
@@ -0,0 +1,86 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/proclist.h>
+
+#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
new file mode 100644
index 00000000..48a99400
--- /dev/null
+++ b/sysdeps/kernel/procmap.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procmap.h>
+
+static const unsigned long _glibtop_sysdeps_proc_map = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_map_s (glibtop *server)
+{
+ server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
+}
+
+/* Provides detailed information about a process. */
+
+glibtop_map_entry *
+glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
+{
+ glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_map));
+
+ return NULL;
+}
diff --git a/sysdeps/kernel/procmem.c b/sysdeps/kernel/procmem.c
new file mode 100644
index 00000000..de65f654
--- /dev/null
+++ b/sysdeps/kernel/procmem.c
@@ -0,0 +1,70 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procmem.h>
+
+#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
new file mode 100644
index 00000000..2e6d3930
--- /dev/null
+++ b/sysdeps/kernel/procsegment.c
@@ -0,0 +1,77 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/procsegment.h>
+
+#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
new file mode 100644
index 00000000..3e3829c2
--- /dev/null
+++ b/sysdeps/kernel/procsignal.c
@@ -0,0 +1,63 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procsignal.h>
+
+#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
new file mode 100644
index 00000000..59217a5e
--- /dev/null
+++ b/sysdeps/kernel/procstate.c
@@ -0,0 +1,75 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procstate.h>
+
+#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
new file mode 100644
index 00000000..5e5f455a
--- /dev/null
+++ b/sysdeps/kernel/proctime.c
@@ -0,0 +1,73 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/proctime.h>
+
+#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
new file mode 100644
index 00000000..25012916
--- /dev/null
+++ b/sysdeps/kernel/procuid.c
@@ -0,0 +1,105 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procuid.h>
+
+#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
new file mode 100644
index 00000000..bdb566d4
--- /dev/null
+++ b/sysdeps/kernel/sem_limits.c
@@ -0,0 +1,86 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/sem_limits.h>
+
+#include <sys/ipc.h>
+#include <sys/sem.h>
+
+#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 <avatar@deva.net>. */
+
+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
new file mode 100644
index 00000000..da6ec92d
--- /dev/null
+++ b/sysdeps/kernel/shm_limits.c
@@ -0,0 +1,62 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/shm_limits.h>
+
+#include <sys/ipc.h>
+#include <sys/shm.h>
+
+static unsigned long _glibtop_sysdeps_shm_limits =
+(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) +
+(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) +
+(1 << GLIBTOP_IPC_SHMALL);
+
+/* 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
new file mode 100644
index 00000000..d00223c0
--- /dev/null
+++ b/sysdeps/kernel/siglist.c
@@ -0,0 +1,60 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 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
new file mode 100644
index 00000000..81f13aa0
--- /dev/null
+++ b/sysdeps/kernel/swap.c
@@ -0,0 +1,65 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/swap.h>
+
+#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/sysinfo.c b/sysdeps/kernel/sysinfo.c
new file mode 100644
index 00000000..49f374c4
--- /dev/null
+++ b/sysdeps/kernel/sysinfo.c
@@ -0,0 +1,94 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/cpu.h>
+#include <glibtop/sysinfo.h>
+
+static const unsigned long _glibtop_sysdeps_sysinfo =
+(1 << GLIBTOP_SYSINFO_CPUINFO);
+
+static glibtop_sysinfo sysinfo;
+
+static void
+init_sysinfo (glibtop *server)
+{
+ char buffer [BUFSIZ];
+ static int init = 0;
+ glibtop_entry *cpuinfo = NULL;
+ FILE *f;
+
+ if (init) return;
+
+ init = TRUE;
+
+ glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
+
+ memset (&sysinfo, 0, sizeof (glibtop_sysinfo));
+
+ g_return_if_fail (f = fopen ("/proc/cpuinfo", "r"));
+
+ while (fgets (buffer, BUFSIZ, f)) {
+ char *p, *start, *key, *value;
+
+ if (cpuinfo == NULL) {
+ cpuinfo = &sysinfo.cpuinfo [sysinfo.ncpu++];
+
+ cpuinfo->labels = g_ptr_array_new ();
+
+ cpuinfo->values = g_hash_table_new (NULL, NULL);
+
+ if (sysinfo.ncpu > GLIBTOP_NCPU)
+ sysinfo.ncpu = GLIBTOP_NCPU;
+ }
+
+ p = strchr (buffer, ':');
+ if (!p) continue;
+
+ /* Remove leading spaces from `p'. */
+ *p = '\0'; start = p; p++;
+ while (isspace (*p)) p++;
+
+ /* Remove trailing spaces from `buffer'. */
+ while ((start > buffer) && (*start) && isspace (*start))
+ *start-- = '\0';
+
+ key = g_strdup (buffer);
+ value = g_strdup (p);
+
+ g_ptr_array_add (cpuinfo->labels, key);
+
+ g_hash_table_insert (cpuinfo->values, key, value);
+ }
+
+ fclose (f);
+
+ sysinfo.flags = _glibtop_sysdeps_sysinfo;
+}
+
+glibtop_sysinfo *
+glibtop_get_sysinfo_s (glibtop *server)
+{
+ init_sysinfo (server);
+ return &sysinfo;
+}
diff --git a/sysdeps/kernel/uptime.c b/sysdeps/kernel/uptime.c
new file mode 100644
index 00000000..844dfb5e
--- /dev/null
+++ b/sysdeps/kernel/uptime.c
@@ -0,0 +1,64 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/uptime.h>
+
+#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
new file mode 100644
index 00000000..635816db
--- /dev/null
+++ b/sysdeps/linux/.cvsignore
@@ -0,0 +1,6 @@
+.deps
+.libs
+Makefile
+Makefile.in
+libgtop_sysdeps.la
+*.lo
diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog
new file mode 100644
index 00000000..006529a2
--- /dev/null
+++ b/sysdeps/linux/ChangeLog
@@ -0,0 +1,140 @@
+2001-10-17 Abel Cheung <maddog@linux.org.hk>
+
+ * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
+
+2001-02-13 Martin Baulig <baulig@suse.de>
+
+ Fix bug #14076.
+
+ * open.c (glibtop_open_s): Check whether /proc/1/cpu exists to
+ detect SMP support rather than reading /proc/stat; on Linux 2.4.x,
+ /proc/stat has "cpu" and "cpu0" entries even for non-SMP systems.
+
+2000-01-22 Martin Baulig <martin@home-of-linux.org>
+
+ * procargs.c (glibtop_get_proc_args_s): Set correct `buf->size' and
+ `buf->flags' fields when `max_length' was given. Fixes #5183.
+
+1999-11-28 Martin Baulig <martin@home-of-linux.org>
+
+ * procstate.c (glibtop_get_procstate_s): Stat "/proc/<pid>" instead
+ of "/proc/<pid>/state" to get `uid' and `gid'. Thanks to Jason Becker
+ for pointing out that GTop reported wrong uid's.
+
+1999-10-19 Martin Baulig <martin@home-of-linux.org>
+
+ * uptime.c (glibtop_get_uptime_s): Don't cast uptime and idletime
+ to float as suggested by John Kodis.
+
+1999-07-29 Martin Baulig <martin@home-of-linux.org>
+
+ * proctime.c (glibtop_get_proctime_s): Don't provide `rtime'
+ any longer since we must not use `rtime = utime + stime'.
+
+1999-02-20 Martin Baulig <martin@home-of-linux.org>
+
+ * netload.c: Don't include <linux/ip_fw.h> for libc5 systems
+ since it is no longer required and makes trouble on Slakware.
+
+1999-01-06 Martin Baulig <martin@home-of-linux.org>
+
+ * netload.c (glibtop_get_netload_s): Use `server->os_version_code'
+ instead of GLIBTOP_LINUX_VERSION_CODE.
+
+1999-01-06 Martin Baulig <martin@home-of-linux.org>
+
+ 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 <martin@home-of-linux.org>
+
+ * netload.c: When using glibc, don't include <netinet/ip_fw.h>
+ any longer but all headers that were included there; we only
+ needed this file to get those headers.
+
+1998-12-09 Martin Baulig <martin@home-of-linux.org>
+
+ * procargs.c (glibtop_get_proc_args_s): Added implementation
+ for this function.
+
+1998-12-03 Martin Baulig <martin@home-of-linux.org>
+
+ * netload.c: No longer include <linux/version.h>, 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 <martin@home-of-linux.org>
+
+ * 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 <baulig@merkur.uni-trier.de>
+
+ * 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 <martin@home-of-linux.org>
+
+ * ppp.c: Added code for ISDN here.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * netload.c: New file. Currently empty.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * procargs.c: New file. Currently empty.
+
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file. Currently empty.
+
+1998-10-11 Martin Baulig <martin@home-of-linux.org>
+
+ * procdata.c: Removed this obsolete file.
+
+1998-10-02 Martin Baulig <martin@home-of-linux.org>
+
+ * proclist.c (glibtop_init_proclist_s): You can now also use the
+ `GLIBTOP_EXCLUDE_*' flags for the `which' parameter.
+
+1998-10-01 Martin Baulig <baulig@Stud.Informatik.uni-trier.de>
+
+ * proclist.c (glibtop_init_proclist_s): Honor the `which' parameter
+ to select which processes to fetch.
+
+1998-09-12 Martin Baulig <martin@home-of-linux.org>
+
+ * sysinfo.c: New file.
+
+1998-09-09 Martin Baulig <baulig@Stud.Informatik.uni-trier.de>
+
+ * 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
new file mode 100644
index 00000000..8ce5fee7
--- /dev/null
+++ b/sysdeps/linux/Makefile.am
@@ -0,0 +1,18 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la
+
+libgtop_sysdeps_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
+ uptime.c loadavg.c shm_limits.c msg_limits.c \
+ 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_2_0_la_LIBADD = @GLIB_LIBS@
+
+libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
+libgtopincludedir = $(includedir)/libgtop-2.0
diff --git a/sysdeps/linux/close.c b/sysdeps/linux/close.c
new file mode 100644
index 00000000..4262d2f0
--- /dev/null
+++ b/sysdeps/linux/close.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c
new file mode 100644
index 00000000..012670ad
--- /dev/null
+++ b/sysdeps/linux/cpu.c
@@ -0,0 +1,111 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/cpu.h>
+
+static const unsigned long _glibtop_sysdeps_cpu =
+(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
+(1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) +
+(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY);
+
+static const unsigned long _glibtop_sysdeps_cpu_smp =
+(1L << GLIBTOP_XCPU_TOTAL) + (1L << GLIBTOP_XCPU_USER) +
+(1L << GLIBTOP_XCPU_NICE) + (1L << GLIBTOP_XCPU_SYS) +
+(1L << 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;
+ u_int64_t total;
+
+ 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);
+
+ total = buf->user;
+ total += buf->nice;
+ total += buf->sys;
+ total += buf->idle;
+ buf->total = total;
+
+ 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);
+
+ total = buf->xcpu_user [i];
+ total += buf->xcpu_nice [i];
+ total += buf->xcpu_sys [i];
+ total += buf->xcpu_idle [i];
+
+ buf->xcpu_total [i] = total;
+ }
+
+ buf->flags |= _glibtop_sysdeps_cpu_smp;
+}
diff --git a/sysdeps/linux/glibtop_machine.h b/sysdeps/linux/glibtop_machine.h
new file mode 100644
index 00000000..9386b1b4
--- /dev/null
+++ b/sysdeps/linux/glibtop_machine.h
@@ -0,0 +1,58 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_MACHINE_H__
+#define __GLIBTOP_MACHINE_H__
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+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
new file mode 100644
index 00000000..e96b1169
--- /dev/null
+++ b/sysdeps/linux/glibtop_server.h
@@ -0,0 +1,135 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+#include <fcntl.h>
+#include <ctype.h>
+
+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);
+ close (fd);
+
+ if (len < 0)
+ return -1;
+
+ 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/loadavg.c b/sysdeps/linux/loadavg.c
new file mode 100644
index 00000000..aedff8ca
--- /dev/null
+++ b/sysdeps/linux/loadavg.c
@@ -0,0 +1,94 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/loadavg.h>
+
+static const unsigned long _glibtop_sysdeps_loadavg =
+(1L << GLIBTOP_LOADAVG_LOADAVG);
+
+static const unsigned long _glibtop_sysdeps_loadavg_tasks =
+(1L << GLIBTOP_LOADAVG_NR_RUNNING) +
+(1L << GLIBTOP_LOADAVG_NR_TASKS) +
+(1L << 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
new file mode 100644
index 00000000..53b0f6a8
--- /dev/null
+++ b/sysdeps/linux/mem.c
@@ -0,0 +1,81 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/mem.h>
+
+static const unsigned long _glibtop_sysdeps_mem =
+(1L << GLIBTOP_MEM_TOTAL) + (1L << GLIBTOP_MEM_USED) +
+(1L << GLIBTOP_MEM_FREE) + (1L << GLIBTOP_MEM_SHARED) +
+(1L << GLIBTOP_MEM_BUFFER) + (1L << GLIBTOP_MEM_CACHED) +
+(1L << GLIBTOP_MEM_USER);
+
+/* 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->cached - buf->buffer;
+
+ buf->flags = _glibtop_sysdeps_mem;
+}
diff --git a/sysdeps/linux/msg_limits.c b/sysdeps/linux/msg_limits.c
new file mode 100644
index 00000000..81d19c1f
--- /dev/null
+++ b/sysdeps/linux/msg_limits.c
@@ -0,0 +1,65 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/msg_limits.h>
+
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+static const unsigned long _glibtop_sysdeps_msg_limits =
+(1L << GLIBTOP_IPC_MSGPOOL) + (1L << GLIBTOP_IPC_MSGMAP) +
+(1L << GLIBTOP_IPC_MSGMAX) + (1L << GLIBTOP_IPC_MSGMNB) +
+(1L << GLIBTOP_IPC_MSGMNI) + (1L << GLIBTOP_IPC_MSGSSZ) +
+(1L << GLIBTOP_IPC_MSGTQL);
+
+/* Init function. */
+
+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
new file mode 100644
index 00000000..75cd1ab6
--- /dev/null
+++ b/sysdeps/linux/netload.c
@@ -0,0 +1,354 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/netload.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+
+#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
+/* GNU LibC */
+#include <net/if.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/tcp.h>
+#include <netinet/udp.h>
+#include <net/if.h>
+#else /* Libc 5 */
+#include <linux/if.h>
+#include <linux/in.h>
+#include <linux/ip.h>
+#include <linux/icmp.h>
+#include <linux/tcp.h>
+#include <linux/udp.h>
+#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 =
+(1L << GLIBTOP_NETLOAD_ERRORS_IN) +
+(1L << GLIBTOP_NETLOAD_ERRORS_OUT) +
+(1L << GLIBTOP_NETLOAD_COLLISIONS);
+
+static const unsigned long _glibtop_sysdeps_netload_data =
+(1L << GLIBTOP_NETLOAD_ADDRESS) +
+(1L << GLIBTOP_NETLOAD_SUBNET) +
+(1L << GLIBTOP_NETLOAD_MTU);
+
+static const unsigned long _glibtop_sysdeps_netload_bytes =
+(1L << GLIBTOP_NETLOAD_BYTES_IN) +
+(1L << GLIBTOP_NETLOAD_BYTES_OUT) +
+(1L << GLIBTOP_NETLOAD_BYTES_TOTAL);
+
+static const unsigned long _glibtop_sysdeps_netload_packets =
+(1L << GLIBTOP_NETLOAD_PACKETS_IN) +
+(1L << GLIBTOP_NETLOAD_PACKETS_OUT) +
+(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL);
+
+static const unsigned long _glibtop_sysdeps_netload_total =
+(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
+(1L << GLIBTOP_NETLOAD_BYTES_TOTAL);
+
+static const unsigned long _glibtop_sysdeps_netload_in =
+(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
+(1L << GLIBTOP_NETLOAD_BYTES_TOTAL) +
+(1L << GLIBTOP_NETLOAD_PACKETS_IN) +
+(1L << GLIBTOP_NETLOAD_BYTES_IN);
+
+static const unsigned long _glibtop_sysdeps_netload_out =
+(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) +
+(1L << GLIBTOP_NETLOAD_BYTES_TOTAL) +
+(1L << GLIBTOP_NETLOAD_PACKETS_OUT) +
+(1L << 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;
+ unsigned flags;
+
+ strcpy (ifr.ifr_name, interface);
+ if (!ioctl (skfd, SIOCGIFFLAGS, &ifr)) {
+ buf->flags |= (1L << GLIBTOP_NETLOAD_IF_FLAGS);
+ flags = ifr.ifr_flags;
+ } else
+ flags = 0;
+
+ if (flags & IFF_UP)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
+
+ if (flags & IFF_BROADCAST)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
+
+ if (flags & IFF_DEBUG)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
+
+ if (flags & IFF_LOOPBACK)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
+
+ if (flags & IFF_POINTOPOINT)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
+
+ if (flags & IFF_RUNNING)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
+
+ if (flags & IFF_NOARP)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
+
+ if (flags & IFF_PROMISC)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
+
+ if (flags & IFF_ALLMULTI)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
+
+ if (flags & IFF_MULTICAST)
+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
+
+ strcpy (ifr.ifr_name, interface);
+ if (!ioctl (skfd, SIOCGIFADDR, &ifr)) {
+ struct sockaddr_in addr =
+ *(struct sockaddr_in *) &ifr.ifr_addr;
+ buf->address = addr.sin_addr.s_addr;
+ buf->flags |= (1L << 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 |= (1L << GLIBTOP_NETLOAD_SUBNET);
+ }
+
+ strcpy (ifr.ifr_name, interface);
+ if (!ioctl (skfd, SIOCGIFMTU, &ifr)) {
+ buf->mtu = ifr.ifr_mtu;
+ buf->flags |= (1L << 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) {
+ fclose (f);
+ 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
new file mode 100644
index 00000000..08bfa379
--- /dev/null
+++ b/sysdeps/linux/open.c
@@ -0,0 +1,109 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/cpu.h>
+#include <glibtop/open.h>
+
+/* =====================================================
+ * Linux kernel version information for procps utilities
+ * Copyright (c) 1996 Charles Blake <cblake@bbn.com>
+ */
+#include <sys/utsname.h>
+
+#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;
+ struct stat statb;
+ int fd, len, i;
+
+ server->name = program_name;
+
+ set_linux_version ();
+ server->os_version_code = (unsigned long) linux_version_code;
+
+ server->ncpu = 0;
+
+ /* On Linux 2.4.x, /proc/stat has "cpu" and "cpu0" entries even
+ * for non-SMP systems. Checking whether /proc/<pid>/cpu exists
+ * is a much better way to detect SMP. */
+
+ if (stat ("/proc/1/cpu", &statb))
+ return;
+
+ 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
new file mode 100644
index 00000000..ca476f8e
--- /dev/null
+++ b/sysdeps/linux/ppp.c
@@ -0,0 +1,201 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/ppp.h>
+
+#include <linux/isdn.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <ctype.h>
+
+#include <glib.h>
+
+static const unsigned long _glibtop_sysdeps_ppp =
+(1L << GLIBTOP_PPP_STATE) + (1L << GLIBTOP_PPP_BYTES_IN) +
+(1L << 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 |= (1L << GLIBTOP_PPP_STATE);
+ }
+
+ if (get_ISDN_stats (server, &in, &out)) {
+ buf->bytes_in = in;
+ buf->bytes_out = out;
+ buf->flags |= (1L << GLIBTOP_PPP_BYTES_IN) |
+ (1L << GLIBTOP_PPP_BYTES_OUT);
+ }
+}
diff --git a/sysdeps/linux/procargs.c b/sysdeps/linux/procargs.c
new file mode 100644
index 00000000..5436bbdb
--- /dev/null
+++ b/sysdeps/linux/procargs.c
@@ -0,0 +1,101 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procargs.h>
+
+static const unsigned long _glibtop_sysdeps_proc_args =
+(1L << 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);
+ close (cmdline);
+
+ if (len < 0) {
+ glibtop_free_r (server, retval);
+ return NULL;
+ }
+
+ *(retval+len) = 0;
+
+ buf->size = len;
+ buf->flags = _glibtop_sysdeps_proc_args;
+
+ return retval;
+ }
+
+ while (1) {
+ len = read (cmdline, buffer, BUFSIZ-1);
+ if (len < 0) {
+ close (cmdline);
+ 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
new file mode 100644
index 00000000..46a82ec6
--- /dev/null
+++ b/sysdeps/linux/prockernel.c
@@ -0,0 +1,77 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/prockernel.h>
+
+static const unsigned long _glibtop_sysdeps_proc_kernel =
+(1L << GLIBTOP_PROC_KERNEL_K_FLAGS) + (1L << GLIBTOP_PROC_KERNEL_MIN_FLT) +
+(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) + (1L << GLIBTOP_PROC_KERNEL_CMIN_FLT) +
+(1L << GLIBTOP_PROC_KERNEL_CMAJ_FLT) + (1L << GLIBTOP_PROC_KERNEL_KSTK_ESP) +
+(1L << GLIBTOP_PROC_KERNEL_KSTK_EIP) + (1L << GLIBTOP_PROC_KERNEL_WCHAN);
+
+/* Init function. */
+
+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
new file mode 100644
index 00000000..cb6a664d
--- /dev/null
+++ b/sysdeps/linux/proclist.c
@@ -0,0 +1,233 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/proclist.h>
+
+#include <glibtop/procuid.h>
+#include <glibtop/procstate.h>
+
+#include <sys/stat.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <ctype.h>
+
+static const unsigned long _glibtop_sysdeps_proclist =
+(1L << GLIBTOP_PROCLIST_TOTAL) + (1L << GLIBTOP_PROCLIST_NUMBER) +
+(1L << 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 & (1L << GLIBTOP_PROC_UID_PGRP))
+ if ((int) arg != procuid.pgrp)
+ continue;
+ break;
+ case GLIBTOP_KERN_PROC_SESSION:
+ /* Do you really, really need this ? */
+ glibtop_get_proc_uid_s (server, &procuid, pid);
+ if (procuid.flags & (1L << GLIBTOP_PROC_UID_SESSION))
+ if ((int) arg != procuid.session)
+ continue;
+ break;
+ case GLIBTOP_KERN_PROC_TTY:
+ /* Do you really, really need this ? */
+ glibtop_get_proc_uid_s (server, &procuid, pid);
+ if (procuid.flags & (1L << GLIBTOP_PROC_UID_TTY))
+ if ((int) arg != procuid.tty)
+ continue;
+ break;
+ case GLIBTOP_KERN_PROC_RUID:
+ /* Do you really, really need this ? */
+ glibtop_get_proc_uid_s (server, &procuid, pid);
+ if (procuid.flags & (1L << 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 & (1L << GLIBTOP_PROC_UID_TTY))
+ if (procuid.tty == -1) continue;
+ }
+
+ if (which & GLIBTOP_EXCLUDE_IDLE) {
+ glibtop_get_proc_state_s (server, &procstate, pid);
+ if (procstate.flags & (1L << GLIBTOP_PROC_STATE_STATE))
+ if (procstate.state != 'R') continue;
+ }
+
+ if (which & GLIBTOP_EXCLUDE_SYSTEM) {
+ glibtop_get_proc_uid_s (server, &procuid, pid);
+ if (procuid.flags & (1L << 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
new file mode 100644
index 00000000..9052c84a
--- /dev/null
+++ b/sysdeps/linux/procmap.c
@@ -0,0 +1,138 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procmap.h>
+
+static const unsigned long _glibtop_sysdeps_proc_map =
+(1L << GLIBTOP_PROC_MAP_NUMBER) + (1L << GLIBTOP_PROC_MAP_TOTAL) +
+(1L << GLIBTOP_PROC_MAP_SIZE);
+
+static const unsigned long _glibtop_sysdeps_map_entry =
+(1L << GLIBTOP_MAP_ENTRY_START) + (1L << GLIBTOP_MAP_ENTRY_END) +
+(1L << GLIBTOP_MAP_ENTRY_OFFSET) + (1L << GLIBTOP_MAP_ENTRY_PERM) +
+(1L << GLIBTOP_MAP_ENTRY_INODE) + (1L << GLIBTOP_MAP_ENTRY_DEVICE) +
+(1L << 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], *format;
+ size_t size;
+
+ if (sizeof (void*) == 8)
+ format = "%16lx-%16lx %4c\n %16lx %02hx:%02hx %ld";
+ else
+ format = "%08lx-%08lx %4c\n %08lx %02hx:%02hx %ld";
+
+ rv = fscanf (maps, format,
+ &start, &end, flags, &offset,
+ &dev_major, &dev_minor, &inode);
+
+ 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
new file mode 100644
index 00000000..3e868ee8
--- /dev/null
+++ b/sysdeps/linux/procmem.c
@@ -0,0 +1,104 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procmem.h>
+
+static const unsigned long _glibtop_sysdeps_proc_mem =
+(1L << GLIBTOP_PROC_MEM_VSIZE) + (1L << GLIBTOP_PROC_MEM_RSS) +
+(1L << GLIBTOP_PROC_MEM_RSS_RLIM);
+
+static const unsigned long _glibtop_sysdeps_proc_mem_statm =
+(1L << GLIBTOP_PROC_MEM_SIZE) + (1L << GLIBTOP_PROC_MEM_RESIDENT) +
+(1L << GLIBTOP_PROC_MEM_SHARE);
+
+#ifndef LOG1024
+#define LOG1024 10
+#endif
+
+/* these are for getting the memory statistics */
+static int pageshift; /* log base 2 of the pagesize */
+
+/* define pagetok in terms of pageshift */
+#define pagetok(size) ((size) << pageshift)
+
+/* Init function. */
+
+void
+glibtop_init_proc_mem_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
new file mode 100644
index 00000000..3179ae40
--- /dev/null
+++ b/sysdeps/linux/procsegment.c
@@ -0,0 +1,115 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/procsegment.h>
+
+static const unsigned long _glibtop_sysdeps_proc_segment =
+(1L << GLIBTOP_PROC_SEGMENT_START_CODE) +
+(1L << GLIBTOP_PROC_SEGMENT_END_CODE) +
+(1L << GLIBTOP_PROC_SEGMENT_START_STACK);
+
+static const unsigned long _glibtop_sysdeps_proc_segment_statm =
+(1L << GLIBTOP_PROC_SEGMENT_TEXT_RSS) +
+/* Disabled due to bug in the Linux Kernel. */
+/* (1L << GLIBTOP_PROC_SEGMENT_SHLIB_RSS) + */
+(1L << GLIBTOP_PROC_SEGMENT_DATA_RSS) +
+(1L << 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
new file mode 100644
index 00000000..7d8fa56c
--- /dev/null
+++ b/sysdeps/linux/procsignal.c
@@ -0,0 +1,65 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procsignal.h>
+
+static const unsigned long _glibtop_sysdeps_proc_signal =
+(1L << GLIBTOP_PROC_SIGNAL_SIGNAL) + (1L << GLIBTOP_PROC_SIGNAL_BLOCKED) +
+(1L << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + (1L << GLIBTOP_PROC_SIGNAL_SIGCATCH);
+
+/* Init function. */
+
+void
+glibtop_init_proc_signal_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
new file mode 100644
index 00000000..39d93319
--- /dev/null
+++ b/sysdeps/linux/procstate.c
@@ -0,0 +1,93 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procstate.h>
+
+#include <sys/stat.h>
+
+static const unsigned long _glibtop_sysdeps_proc_state =
+(1L << GLIBTOP_PROC_STATE_CMD) + (1L << GLIBTOP_PROC_STATE_STATE);
+
+static const unsigned long _glibtop_sysdeps_proc_state_uid =
+(1L << GLIBTOP_PROC_STATE_UID) + (1L << 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", 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;
+
+ sprintf (buffer, "/proc/%d", pid);
+
+ /* 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
new file mode 100644
index 00000000..83ea92b8
--- /dev/null
+++ b/sysdeps/linux/proctime.c
@@ -0,0 +1,103 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/proctime.h>
+
+static const unsigned long _glibtop_sysdeps_proc_time =
+(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_CUTIME) +
+(1L << GLIBTOP_PROC_TIME_STIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) +
+(1L << GLIBTOP_PROC_TIME_FREQUENCY) + (1L << GLIBTOP_PROC_TIME_TIMEOUT) +
+(1L << GLIBTOP_PROC_TIME_IT_REAL_VALUE) + (1L << GLIBTOP_PROC_TIME_START_TIME);
+
+static const unsigned long _glibtop_sysdeps_proc_time_smp =
+(1L << GLIBTOP_PROC_TIME_XCPU_UTIME) + (1L << 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);
+
+ 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
new file mode 100644
index 00000000..a7585dcc
--- /dev/null
+++ b/sysdeps/linux/procuid.c
@@ -0,0 +1,126 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procuid.h>
+
+static const unsigned long _glibtop_sysdeps_proc_uid =
+(1L << GLIBTOP_PROC_UID_UID) + (1L << GLIBTOP_PROC_UID_EUID) +
+(1L << GLIBTOP_PROC_UID_GID) + (1L << GLIBTOP_PROC_UID_EGID);
+
+static const unsigned long _glibtop_sysdeps_proc_uid_stat =
+(1L << GLIBTOP_PROC_UID_PID) + (1L << GLIBTOP_PROC_UID_PPID) +
+(1L << GLIBTOP_PROC_UID_PGRP) + (1L << GLIBTOP_PROC_UID_SESSION) +
+(1L << GLIBTOP_PROC_UID_TTY) + (1L << GLIBTOP_PROC_UID_TPGID) +
+(1L << GLIBTOP_PROC_UID_PRIORITY) + (1L << 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
new file mode 100644
index 00000000..531b5f17
--- /dev/null
+++ b/sysdeps/linux/sem_limits.c
@@ -0,0 +1,86 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/sem_limits.h>
+
+#include <sys/ipc.h>
+#include <sys/sem.h>
+
+#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 <avatar@deva.net>. */
+
+union semun
+{
+ int val;
+ struct semid_ds *buf;
+ unsigned short int *array;
+ struct seminfo *__buf;
+};
+#endif
+
+static unsigned long _glibtop_sysdeps_sem_limits =
+(1L << GLIBTOP_IPC_SEMMAP) + (1L << GLIBTOP_IPC_SEMMNI) +
+(1L << GLIBTOP_IPC_SEMMNS) + (1L << GLIBTOP_IPC_SEMMNU) +
+(1L << GLIBTOP_IPC_SEMMSL) + (1L << GLIBTOP_IPC_SEMOPM) +
+(1L << GLIBTOP_IPC_SEMUME) + (1L << GLIBTOP_IPC_SEMUSZ) +
+(1L << GLIBTOP_IPC_SEMVMX) + (1L << GLIBTOP_IPC_SEMAEM);
+
+/* 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
new file mode 100644
index 00000000..859160f1
--- /dev/null
+++ b/sysdeps/linux/shm_limits.c
@@ -0,0 +1,62 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/shm_limits.h>
+
+#include <sys/ipc.h>
+#include <sys/shm.h>
+
+static unsigned long _glibtop_sysdeps_shm_limits =
+(1L << GLIBTOP_IPC_SHMMAX) + (1L << GLIBTOP_IPC_SHMMIN) +
+(1L << GLIBTOP_IPC_SHMMNI) + (1L << GLIBTOP_IPC_SHMSEG) +
+(1L << GLIBTOP_IPC_SHMALL);
+
+/* 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
new file mode 100644
index 00000000..d00223c0
--- /dev/null
+++ b/sysdeps/linux/siglist.c
@@ -0,0 +1,60 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 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
new file mode 100644
index 00000000..2a7d639b
--- /dev/null
+++ b/sysdeps/linux/swap.c
@@ -0,0 +1,104 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/swap.h>
+
+#include <fcntl.h>
+
+static unsigned long _glibtop_sysdeps_swap =
+(1L << GLIBTOP_SWAP_TOTAL) + (1L << GLIBTOP_SWAP_USED) +
+(1L << GLIBTOP_SWAP_FREE);
+
+static unsigned long _glibtop_sysdeps_swap_paging =
+(1L << GLIBTOP_SWAP_PAGEIN) + (1L << 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
new file mode 100644
index 00000000..d4a19bf3
--- /dev/null
+++ b/sysdeps/linux/sysinfo.c
@@ -0,0 +1,94 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/cpu.h>
+#include <glibtop/sysinfo.h>
+
+static const unsigned long _glibtop_sysdeps_sysinfo =
+(1L << GLIBTOP_SYSINFO_CPUINFO);
+
+static glibtop_sysinfo sysinfo;
+
+static void
+init_sysinfo (glibtop *server)
+{
+ char buffer [BUFSIZ];
+ static int init = 0;
+ glibtop_entry *cpuinfo = NULL;
+ FILE *f;
+
+ if (init) return;
+
+ init = TRUE;
+
+ glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
+
+ memset (&sysinfo, 0, sizeof (glibtop_sysinfo));
+
+ g_return_if_fail (f = fopen ("/proc/cpuinfo", "r"));
+
+ while (fgets (buffer, BUFSIZ, f)) {
+ char *p, *start, *key, *value;
+
+ if (cpuinfo == NULL) {
+ cpuinfo = &sysinfo.cpuinfo [sysinfo.ncpu++];
+
+ cpuinfo->labels = g_ptr_array_new ();
+
+ cpuinfo->values = g_hash_table_new (NULL, NULL);
+
+ if (sysinfo.ncpu > GLIBTOP_NCPU)
+ sysinfo.ncpu = GLIBTOP_NCPU;
+ }
+
+ p = strchr (buffer, ':');
+ if (!p) continue;
+
+ /* Remove leading spaces from `p'. */
+ *p = '\0'; start = p; p++;
+ while (isspace (*p)) p++;
+
+ /* Remove trailing spaces from `buffer'. */
+ while ((start > buffer) && (*start) && isspace (*start))
+ *start-- = '\0';
+
+ key = g_strdup (buffer);
+ value = g_strdup (p);
+
+ g_ptr_array_add (cpuinfo->labels, key);
+
+ g_hash_table_insert (cpuinfo->values, key, value);
+ }
+
+ fclose (f);
+
+ sysinfo.flags = _glibtop_sysdeps_sysinfo;
+}
+
+glibtop_sysinfo *
+glibtop_get_sysinfo_s (glibtop *server)
+{
+ init_sysinfo (server);
+ return &sysinfo;
+}
diff --git a/sysdeps/linux/uptime.c b/sysdeps/linux/uptime.c
new file mode 100644
index 00000000..f54dd1c8
--- /dev/null
+++ b/sysdeps/linux/uptime.c
@@ -0,0 +1,69 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/uptime.h>
+
+static unsigned long _glibtop_sysdeps_uptime =
+(1L << GLIBTOP_UPTIME_UPTIME) + (1L << 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 = strtod (buffer, &p);
+ buf->idletime = strtod (p, &p);
+
+ buf->flags = _glibtop_sysdeps_uptime;
+}
diff --git a/sysdeps/osf1/.cvsignore b/sysdeps/osf1/.cvsignore
new file mode 100644
index 00000000..ee69efbb
--- /dev/null
+++ b/sysdeps/osf1/.cvsignore
@@ -0,0 +1,21 @@
+.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
new file mode 100644
index 00000000..76846805
--- /dev/null
+++ b/sysdeps/osf1/ChangeLog
@@ -0,0 +1,20 @@
+2001-10-17 Abel Cheung <maddog@linux.org.hk>
+
+ * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
+
+1999-05-11 Martin Baulig <martin@home-of-linux.org>
+
+ * procstate.c: Fixed implementation of the `state' field; added
+ `ruid' and `rgid' fields.
+
+1999-02-19 Martin Baulig <martin@home-of-linux.org>
+
+ * procmap.c, procargs.c, netload.c: Copied from stub_suid.
+
+ * proclist.c, procsegment.c: Make them compile again.
+
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ChangeLog: New file.
+ * ppp.c: New file.
+
diff --git a/sysdeps/osf1/Makefile.am b/sysdeps/osf1/Makefile.am
new file mode 100644
index 00000000..2cccd0aa
--- /dev/null
+++ b/sysdeps/osf1/Makefile.am
@@ -0,0 +1,23 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
+
+libgtop_sysdeps_2_0_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_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+libgtop_sysdeps_2_0_la_LIBADD = -lmach
+
+libgtop_sysdeps_suid_2_0_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_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+libgtop_sysdeps_suid_2_0_la_LIBADD = -lmach
+
+libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
+libgtopincludedir = $(includedir)/libgtop-2.0
+
+noinst_HEADERS = glibtop_suid.h
diff --git a/sysdeps/osf1/close.c b/sysdeps/osf1/close.c
new file mode 100644
index 00000000..4262d2f0
--- /dev/null
+++ b/sysdeps/osf1/close.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/osf1/close_suid.c b/sysdeps/osf1/close_suid.c
new file mode 100644
index 00000000..a8733f0f
--- /dev/null
+++ b/sysdeps/osf1/close_suid.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_p (glibtop *server)
+{ }
diff --git a/sysdeps/osf1/cpu.c b/sysdeps/osf1/cpu.c
new file mode 100644
index 00000000..680c11f8
--- /dev/null
+++ b/sysdeps/osf1/cpu.c
@@ -0,0 +1,69 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/cpu.h>
+
+static const unsigned long _glibtop_sysdeps_cpu =
+(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
+(1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) +
+(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY);
+
+/* 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
new file mode 100644
index 00000000..a4424818
--- /dev/null
+++ b/sysdeps/osf1/glibtop_machine.h
@@ -0,0 +1,50 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_MACHINE_H__
+#define __GLIBTOP_MACHINE_H__
+
+#include <sys/table.h>
+
+/* The following are defined in <sys/table.h>. */
+
+#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
new file mode 100644
index 00000000..47d69199
--- /dev/null
+++ b/sysdeps/osf1/glibtop_server.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#define GLIBTOP_SUID_CPU 0
+#define GLIBTOP_SUID_MEM 0
+#define GLIBTOP_SUID_SWAP 0
+#define GLIBTOP_SUID_UPTIME 0
+#define GLIBTOP_SUID_LOADAVG 0
+#define GLIBTOP_SUID_SHM_LIMITS 0
+#define GLIBTOP_SUID_MSG_LIMITS 0
+#define GLIBTOP_SUID_SEM_LIMITS 0
+#define GLIBTOP_SUID_PROCLIST (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
new file mode 100644
index 00000000..a83fd3cc
--- /dev/null
+++ b/sysdeps/osf1/glibtop_suid.h
@@ -0,0 +1,50 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SUID_H__
+#define __GLIBTOP_SUID_H__
+
+#include <sys/table.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/osf1/loadavg.c b/sysdeps/osf1/loadavg.c
new file mode 100644
index 00000000..abf88ec7
--- /dev/null
+++ b/sysdeps/osf1/loadavg.c
@@ -0,0 +1,73 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/error.h>
+#include <glibtop/loadavg.h>
+
+static const unsigned long _glibtop_sysdeps_loadavg =
+(1L << 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
new file mode 100644
index 00000000..d76e595c
--- /dev/null
+++ b/sysdeps/osf1/mem.c
@@ -0,0 +1,69 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/mem.h>
+
+#include <sys/vm.h>
+
+#include <mach.h>
+#include <mach/mach_types.h>
+#include <mach/vm_statistics.h>
+
+static const unsigned long _glibtop_sysdeps_mem =
+(1L << GLIBTOP_MEM_TOTAL) + (1L << GLIBTOP_MEM_USED) +
+(1L << 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
new file mode 100644
index 00000000..2b198963
--- /dev/null
+++ b/sysdeps/osf1/msg_limits.c
@@ -0,0 +1,87 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/msg_limits.h>
+
+static const unsigned long _glibtop_sysdeps_msg_limits =
+(1L << GLIBTOP_IPC_MSGMAP) + (1L << GLIBTOP_IPC_MSGMAX) +
+(1L << GLIBTOP_IPC_MSGMNB) + (1L << GLIBTOP_IPC_MSGMNI) +
+(1L << 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 += (1L << GLIBTOP_IPC_MSGMAX);
+
+ buf->msgmax = value;
+
+ ret = table (TBL_MSGINFO, MSGINFO_MNB, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_MSGMNB);
+
+ buf->msgmnb = value;
+
+ ret = table (TBL_MSGINFO, MSGINFO_MNI, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_MSGMNI);
+
+ buf->msgmni = value;
+
+ ret = table (TBL_MSGINFO, MSGINFO_TQL, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_MSGTQL);
+
+ buf->msgtql = value;
+}
diff --git a/sysdeps/osf1/netload.c b/sysdeps/osf1/netload.c
new file mode 100644
index 00000000..bb1226ed
--- /dev/null
+++ b/sysdeps/osf1/netload.c
@@ -0,0 +1,45 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/netload.h>
+
+static const unsigned long _glibtop_sysdeps_netload = 0;
+
+/* Init function. */
+
+void
+glibtop_init_netload_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
new file mode 100644
index 00000000..645e22d8
--- /dev/null
+++ b/sysdeps/osf1/open.c
@@ -0,0 +1,35 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+
+#include <unistd.h>
+#include <sys/types.h>
+
+/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
+
+void
+glibtop_open_s (glibtop *server, const char *program_name,
+ const unsigned long features, const unsigned flags)
+{ }
diff --git a/sysdeps/osf1/open_suid.c b/sysdeps/osf1/open_suid.c
new file mode 100644
index 00000000..d593556a
--- /dev/null
+++ b/sysdeps/osf1/open_suid.c
@@ -0,0 +1,91 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+
+#include <glibtop_suid.h>
+
+#include <unistd.h>
+#include <sys/types.h>
+
+/* !!! 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
new file mode 100644
index 00000000..6d0905d5
--- /dev/null
+++ b/sysdeps/osf1/ppp.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/osf1/procargs.c b/sysdeps/osf1/procargs.c
new file mode 100644
index 00000000..67c183e8
--- /dev/null
+++ b/sysdeps/osf1/procargs.c
@@ -0,0 +1,47 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procargs.h>
+
+static const unsigned long _glibtop_sysdeps_proc_args = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_args_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
new file mode 100644
index 00000000..96bb1430
--- /dev/null
+++ b/sysdeps/osf1/procdata.c
@@ -0,0 +1,150 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/procdata.h>
+
+#include <sys/user.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#include <mach.h>
+#include <mach/mach_types.h>
+#include <mach/task_info.h>
+
+/* Provides detailed information about a process. */
+
+#define BIT_SHIFT(x) (1L << (x % 64))
+
+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
new file mode 100644
index 00000000..e7d961a1
--- /dev/null
+++ b/sysdeps/osf1/prockernel.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/prockernel.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..607aeeae
--- /dev/null
+++ b/sysdeps/osf1/proclist.c
@@ -0,0 +1,172 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/proclist.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_proclist =
+(1L << GLIBTOP_PROCLIST_TOTAL) + (1L << GLIBTOP_PROCLIST_NUMBER) +
+(1L << GLIBTOP_PROCLIST_SIZE);
+
+/* 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
new file mode 100644
index 00000000..0b9bd6e0
--- /dev/null
+++ b/sysdeps/osf1/procmap.c
@@ -0,0 +1,46 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procmap.h>
+
+static const unsigned long _glibtop_sysdeps_proc_map = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_map_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
new file mode 100644
index 00000000..05038c5b
--- /dev/null
+++ b/sysdeps/osf1/procmem.c
@@ -0,0 +1,103 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procmem.h>
+
+#include <glibtop_suid.h>
+
+#include <sys/user.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#include <mach.h>
+#include <mach/mach_types.h>
+#include <mach/task_info.h>
+
+static const unsigned long _glibtop_sysdeps_proc_mem =
+(1L << GLIBTOP_PROC_MEM_VSIZE) + (1L << GLIBTOP_PROC_MEM_RESIDENT) +
+(1L << 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 |= (1L << GLIBTOP_PROC_MEM_RSS_RLIM) |
+ (1L << GLIBTOP_PROC_MEM_SHARE);
+}
diff --git a/sysdeps/osf1/procsegment.c b/sysdeps/osf1/procsegment.c
new file mode 100644
index 00000000..935a1b0b
--- /dev/null
+++ b/sysdeps/osf1/procsegment.c
@@ -0,0 +1,80 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procsegment.h>
+
+#include <glibtop_suid.h>
+
+#include <sys/user.h>
+
+static const unsigned long _glibtop_sysdeps_proc_segment =
+(1L << GLIBTOP_PROC_SEGMENT_TEXT_RSS) +
+(1L << GLIBTOP_PROC_SEGMENT_DATA_RSS) +
+(1L << GLIBTOP_PROC_SEGMENT_START_CODE) +
+(1L << GLIBTOP_PROC_SEGMENT_END_CODE) +
+(1L << 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
new file mode 100644
index 00000000..36e1e2b9
--- /dev/null
+++ b/sysdeps/osf1/procsignal.c
@@ -0,0 +1,74 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procsignal.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_proc_signal =
+(1L << GLIBTOP_PROC_SIGNAL_SIGNAL) + (1L << GLIBTOP_PROC_SIGNAL_BLOCKED) +
+(1L << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + (1L << GLIBTOP_PROC_SIGNAL_SIGCATCH);
+
+/* Init function. */
+
+void
+glibtop_init_proc_signal_p (glibtop *server)
+{
+ server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
+}
+
+/* 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
new file mode 100644
index 00000000..108291c7
--- /dev/null
+++ b/sysdeps/osf1/procstate.c
@@ -0,0 +1,155 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procstate.h>
+
+#include <glibtop_suid.h>
+
+#include <mach.h>
+#include <mach/mach_types.h>
+#include <mach/task_info.h>
+
+static const unsigned long _glibtop_sysdeps_proc_state =
+(1L << GLIBTOP_PROC_STATE_CMD) +
+(1L << GLIBTOP_PROC_STATE_UID) + (1L << GLIBTOP_PROC_STATE_GID) +
+(1L << GLIBTOP_PROC_STATE_RUID) + (1L << GLIBTOP_PROC_STATE_RGID);
+
+/* 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 minim_state = 99, ret;
+ task_t thistask;
+
+ 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;
+
+ /* Check whether the process actually exists. */
+ if (procinfo.pi_status == PI_EMPTY) return;
+
+ /* Check whether it is not a zombie. */
+ if (procinfo.pi_status == PI_ZOMBIE) {
+ buf->state = GLIBTOP_PROCESS_ZOMBIE;
+ buf->flags = (1L << GLIBTOP_PROC_STATE_STATE);
+ return;
+ }
+
+ strncpy (buf->cmd, procinfo.pi_comm, sizeof (buf->cmd)-1);
+
+ buf->cmd [sizeof (buf->cmd)-1] = 0;
+
+ buf->uid = procinfo.pi_svuid;
+ buf->gid = procinfo.pi_svgid;
+ buf->ruid = procinfo.pi_ruid;
+ buf->rgid = procinfo.pi_rgid;
+
+ buf->flags = _glibtop_sysdeps_proc_state;
+
+ /* !!! 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) {
+ thread_array_t threadarr;
+ unsigned int threadarr_l;
+ thread_basic_info_t threadinfo;
+ thread_basic_info_data_t threadinfodata;
+ int j;
+
+ /* Get thread array. */
+ (void) task_threads (thistask, &threadarr, &threadarr_l);
+
+ threadinfo = &threadinfodata;
+ for (j = 0; j < threadarr_l; j++) {
+ unsigned int threadinfo_l = THREAD_BASIC_INFO_COUNT;
+ int tret;
+
+ tret = thread_info (threadarr [j], THREAD_BASIC_INFO,
+ (thread_info_t) threadinfo, &threadinfo_l);
+
+ if (tret == KERN_SUCCESS) {
+ if (minim_state > threadinfo->run_state)
+ minim_state=threadinfo->run_state;
+ }
+ }
+ }
+
+ glibtop_suid_leave (server);
+
+ /* !!! END OF SUID ROOT PART !!! */
+
+ if (ret != KERN_SUCCESS) return;
+
+ switch (minim_state) {
+ case TH_STATE_RUNNING:
+ buf->state = GLIBTOP_PROCESS_RUNNING;
+ break;
+ case TH_STATE_UNINTERRUPTIBLE:
+ buf->state = GLIBTOP_PROCESS_UNINTERRUPTIBLE;
+ break;
+ case TH_STATE_WAITING:
+ buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
+ break;
+ case TH_STATE_STOPPED:
+ case TH_STATE_HALTED:
+ buf->state = GLIBTOP_PROCESS_STOPPED;
+ break;
+ default:
+ if (ret != KERN_SUCCESS)
+ buf->state = GLIBTOP_PROCESS_ZOMBIE;
+ break;
+ }
+
+ if (buf->state)
+ buf->flags |= (1L << GLIBTOP_PROC_STATE_STATE);
+}
diff --git a/sysdeps/osf1/proctime.c b/sysdeps/osf1/proctime.c
new file mode 100644
index 00000000..dc06da42
--- /dev/null
+++ b/sysdeps/osf1/proctime.c
@@ -0,0 +1,79 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/proctime.h>
+
+#include <glibtop_suid.h>
+
+#include <sys/user.h>
+#include <sys/time.h>
+
+static const unsigned long _glibtop_sysdeps_proc_time =
+(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_CUTIME) +
+(1L << GLIBTOP_PROC_TIME_STIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) +
+(1L << 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
new file mode 100644
index 00000000..f5ca4636
--- /dev/null
+++ b/sysdeps/osf1/procuid.c
@@ -0,0 +1,132 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procuid.h>
+
+#include <glibtop_suid.h>
+
+#include <sys/table.h>
+#include <sys/resource.h>
+
+#include <mach.h>
+#include <mach/mach_types.h>
+#include <mach/task_info.h>
+
+/* Provides detailed information about a process. */
+
+static const unsigned long _glibtop_sysdeps_proc_uid =
+(1L << GLIBTOP_PROC_UID_UID) + (1L << GLIBTOP_PROC_UID_EUID) +
+(1L << GLIBTOP_PROC_UID_GID) + (1L << GLIBTOP_PROC_UID_EGID) +
+(1L << GLIBTOP_PROC_UID_PID) + (1L << GLIBTOP_PROC_UID_PPID) +
+(1L << GLIBTOP_PROC_UID_PGRP) + (1L << GLIBTOP_PROC_UID_SESSION) +
+(1L << GLIBTOP_PROC_UID_TTY) + (1L << 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 += (1L << GLIBTOP_PROC_UID_PRIORITY);
+
+ errno = 0;
+
+ ret = getpriority (PRIO_PROCESS, pid);
+
+ if ((ret == -1) && (errno != 0)) return;
+
+ buf->nice = ret;
+
+ buf->flags += (1L << GLIBTOP_PROC_UID_NICE);
+}
diff --git a/sysdeps/osf1/sem_limits.c b/sysdeps/osf1/sem_limits.c
new file mode 100644
index 00000000..c054c3c2
--- /dev/null
+++ b/sysdeps/osf1/sem_limits.c
@@ -0,0 +1,110 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/sem_limits.h>
+
+static unsigned long _glibtop_sysdeps_sem_limits =
+(1L << GLIBTOP_IPC_SEMMNI) + (1L << GLIBTOP_IPC_SEMMSL) +
+(1L << GLIBTOP_IPC_SEMOPM) + (1L << GLIBTOP_IPC_SEMVMX) +
+(1L << 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 += (1L << GLIBTOP_IPC_SEMMNI);
+
+ buf->semmni = value;
+
+
+ ret = table (TBL_SEMINFO, SEMINFO_MSL, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_SEMMSL);
+
+ buf->semmsl = value;
+
+
+ ret = table (TBL_SEMINFO, SEMINFO_OPM, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_SEMOPM);
+
+ buf->semopm = value;
+
+
+ ret = table (TBL_SEMINFO, SEMINFO_UME, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_SEMUME);
+
+ buf->semume = value;
+
+
+ ret = table (TBL_SEMINFO, SEMINFO_VMX, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_SEMVMX);
+
+ buf->semvmx = value;
+
+
+ ret = table (TBL_SEMINFO, SEMINFO_AEM, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_SEMAEM);
+
+ buf->semaem = value;
+}
diff --git a/sysdeps/osf1/shm_limits.c b/sysdeps/osf1/shm_limits.c
new file mode 100644
index 00000000..03069205
--- /dev/null
+++ b/sysdeps/osf1/shm_limits.c
@@ -0,0 +1,89 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/shm_limits.h>
+
+static unsigned long _glibtop_sysdeps_shm_limits =
+(1L << GLIBTOP_IPC_SHMMAX) + (1L << GLIBTOP_IPC_SHMMIN) +
+(1L << GLIBTOP_IPC_SHMMNI) + (1L << 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 += (1L << GLIBTOP_IPC_SHMMAX);
+
+ buf->shmmax = value;
+
+
+ ret = table (TBL_SHMINFO, SHMINFO_MIN, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_SHMMIN);
+
+ buf->shmmin = value;
+
+
+ ret = table (TBL_SHMINFO, SHMINFO_MNI, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_SHMMNI);
+
+ buf->shmmni = value;
+
+
+ ret = table (TBL_SHMINFO, SHMINFO_SEG, (char *) &value, 1,
+ sizeof (value));
+
+ if (ret != 1) return;
+
+ buf->flags += (1L << GLIBTOP_IPC_SHMSEG);
+
+ buf->shmseg = value;
+}
diff --git a/sysdeps/osf1/siglist.c b/sysdeps/osf1/siglist.c
new file mode 100644
index 00000000..c5bd59c0
--- /dev/null
+++ b/sysdeps/osf1/siglist.c
@@ -0,0 +1,60 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 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
new file mode 100644
index 00000000..db322413
--- /dev/null
+++ b/sysdeps/osf1/swap.c
@@ -0,0 +1,64 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/swap.h>
+
+static unsigned long _glibtop_sysdeps_swap =
+(1L << GLIBTOP_SWAP_TOTAL) + (1L << GLIBTOP_SWAP_USED) +
+(1L << 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
new file mode 100644
index 00000000..4e968a1b
--- /dev/null
+++ b/sysdeps/osf1/uptime.c
@@ -0,0 +1,61 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/uptime.h>
+
+#include <time.h>
+
+static unsigned long _glibtop_sysdeps_uptime =
+(1L << 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/solaris/.cvsignore b/sysdeps/solaris/.cvsignore
new file mode 100644
index 00000000..facaec43
--- /dev/null
+++ b/sysdeps/solaris/.cvsignore
@@ -0,0 +1,7 @@
+.deps
+.libs
+Makefile
+Makefile.in
+libgtop_sysdeps.la
+*.lo
+libgtop_sysdeps_suid.la
diff --git a/sysdeps/solaris/AUTHORS b/sysdeps/solaris/AUTHORS
new file mode 100644
index 00000000..37b903af
--- /dev/null
+++ b/sysdeps/solaris/AUTHORS
@@ -0,0 +1,2 @@
+Drazen Kacar (dave@srce.hr)
+Martin Baulig (martin@home-of-linux.org)
diff --git a/sysdeps/solaris/ChangeLog b/sysdeps/solaris/ChangeLog
new file mode 100644
index 00000000..16c829a7
--- /dev/null
+++ b/sysdeps/solaris/ChangeLog
@@ -0,0 +1,284 @@
+2001-10-17 Abel Cheung <maddog@linux.org.hk>
+
+ * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
+
+2001-02-18 Martin Baulig <baulig@suse.de>
+
+ Applied a patch from Laszlo PETER <Laszlo.Peter@ireland.sun.com>
+ for Solaris 8.
+
+ * msg_limits.c: `struct msginfo' no longer has msgmap and msgssz.
+ * sem_limits.c: `struct seminfo' no longer has a semmap field.
+
+1999-10-17 Martin Baulig <martin@home-of-linux.org>
+
+ * Makefile.am (libgtop_sysdeps_la_LIBADD): Added `@DL_LIB@'.
+
+1999-09-28 Drazen Kacar <dave@srce.hr>
+
+ * proclist.c (glibtop_get_proclist_s): Bugfix. It wasn't
+ excluding system, non-tty or idle processes if that was
+ requested.
+
+1999-07-29 Martin Baulig <martin@home-of-linux.org>
+
+ * proctime.c (glibtop_get_proc_time_p): Fix bug reported by
+ Takis Psarogiannakopoulos: `start_time' are seconds since the
+ epoch as it is stated in the manual.
+
+1999-07-16 Drazen Kacar <dave@srce.hr>
+
+ * proclist.c: Bug fix. All Solaris versions have RUID and
+ RGID in /proc.
+
+1999-06-07 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_machine.h, open.c, procargs.c, proclist.c, procmap.c:
+ Solaris 2.5 & 2.5.1 portability fixes, based on patches
+ from Steve Murphy <murf@e-tools.com>.
+
+1999-05-30 Drazen Kacar <dave@srce.hr>
+
+ * procargs.c: Fixed bug in calculation of process argument list.
+
+1999-05-27 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_machine.h, open.c, procmap.c: Get the file name
+ from inode number.
+
+1999-05-17 Drazen Kacar <dave@srce.hr>
+
+ * procargs.c: Implemented what Solaris has to offer cheaply.
+ It sucks, but digging in process address space would be
+ too slow.
+
+1999-05-11 Drazen Kacar <dave@srce.hr>
+
+ * proctime.c: Return 0 usage times for scheaduler (PID 0).
+
+1999-05-10 Drazen Kacar <dave@srce.hr>
+
+ * proclist.c: Added process selection mechanism. It's not
+ included in Solaris 2.5 build, since we first have to decide
+ what will be dispatched to daemon.
+
+1999-05-10 Drazen Kacar <dave@srce.hr>
+
+ There be some useful documentation now. Syncing...
+
+ * mem.c: Output values in bytes, as the documentation requires.
+ It was a bit odd when gtop reported 256K of total memory.
+
+1999-05-09 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_machine.h, procdata.c, proclist.c, procmap.c, procmem.c,
+ procsignal.c, procstate.c, procuid.c, open.c, mem.c: Initial
+ Solaris 2.5 port. It's far from being complete and hasn't been
+ tested properly. We'll need setuid root daemon, which is
+ currently not implemented. #ifdef symbols to check are
+ HAVE_PROCFS_H and KSTAT_DATA_UINT32. These will be defined on
+ Solaris 2.6 and later, but not on earlier releases.
+
+1999-05-08 Drazen Kacar <dave@srce.hr>
+
+ * safeio.c, safeio.h: Added s_open(), s_close() etc. with EINTR
+ wrappers.
+
+ * procdata.c, procmap.c, proclist.c: Use them.
+
+1999-05-08 Drazen Kacar <dave@srce.hr>
+
+ * procmem.c: Use bytes as units for memory consumption.
+
+1999-05-08 Drazen Kacar <dave@srce.hr>
+
+ * procuid.c: Fixed nice value.
+
+1999-05-08 Martin Baulig <martin@home-of-linux.org>
+
+ Use the setgid server for IPC Limits.
+
+ * shm_limits.c, msg_limits.c, sem_limits.c: Moved them into the
+ setgid server since they need to access kvm data.
+
+ * open_suid.c, close_suid.c: New file. We do the initialization and cleanup
+ for the setgid server here.
+
+ * glibtop_suid.h: New file. We include this in the setgid files.
+
+ * open.c: Moved kvm opening code into open_suid.c.
+
+1999-05-07 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_machine.h, open.c, mem.c, procmem.c: machine.pagesize
+ is now number of bits we need for shifting, ie. 2^pagesize
+ will give pagesize in Kb.
+
+1999-05-07 Drazen Kacar <dave@srce.hr>
+
+ * procmem.c: Implemented size, vsize, resident and rss.
+
+1999-05-06 Drazen Kacar <dave@srce.hr>
+
+ * siglist.c: Fixed, valid for Solaris 2.6 & 7.
+
+1999-05-06 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_private.h, procuid.c, procdata.c: List of supplementary
+ groups was not correct. Fixed.
+
+1999-05-04 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_machine.h: Changed boot time to unsigned long long.
+
+ * open.c: Added proper type checking for boot value. There's
+ no point in saving a few nanoseconds in init function. And
+ one day it will become 64-bit value.
+
+ In glibtop_get_kstats(): Don't reread vminfo_snaptime when
+ reinitializing kstats.
+
+1999-05-03 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_private.h: Fixed typoo.
+
+ * procmap.c (glibtop_get_proc_map_s): Implemented start, end,
+ offset and perm for mapped segments. File name and inode
+ should be accessible from bunyip kstat data. The only
+ obstacle is that the data format is undocumented and
+ possibly not the same accross releases.
+
+1999-05-03 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_private.h, procdata.c (glibtop_get_proc_status_s):
+ Read pstatus info from /proc
+
+ * procsignal.c (glibtop_get_proc_signal_s): Implemented
+ set of pending and blocked signals. The rest should probably
+ be read from /proc/<pid>/sigact, but I'm not sure it's
+ worth implementing before thread API comes into place.
+
+ * siglist.c: Added Solaris 7 signals. Someone will gettextize
+ it eventually. Besides, signal list should become a pointer
+ instead of being fixed field. We need some run time initializations.
+ The code is written, but commented out.
+
+1999-05-03 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_private.h: Ups, forgot to put prototypes in.
+
+1999-05-02 Drazen Kacar <dave@srce.hr>
+
+ * open.c (glibtop_get_kstats): Yet another kstat_chain_update
+ check. Added machine.cpu_stat_kstat[x] = NULL when processor
+ x is not configured.
+
+ * procdata.c (glibtop_get_proc_credentials_s): Read prcred
+ structure from /proc.
+
+ * procstate.c (glibtop_get_proc_state_s): Added ruid, rgid,
+ has_cpu, processor and last_processor.
+
+ * procuid.c (glibtop_get_proc_uid_s): Added priority, nice,
+ suid, sgid, ngroups and groups. The last four will be
+ filled only if our process has the authority to read prcred
+ structure of another process.
+
+1999-05-02 Drazen Kacar <dave@srce.hr>
+
+ procdata.c: Use pread() instead of read().
+
+1999-05-02 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_machine.h: added fields for page size, clock ticks and
+ boot time. These are constants. Also added three new kstats.
+
+ * open.c (glibtop_get_kstats): Initialize kstats in *server.
+ We need to call this at init time (obviously) and each time
+ kstat_chain_update() says that kstat chain has changed. In this
+ case all kstat pointers and data are invalid, so we need to
+ reinitialize everything.
+
+ (glibtop_open_s): Made it call glibtop_get_kstats(). Added
+ initialization for run time constants in struct machine.
+
+ * cpu.c (glibtop_get_cpu_s): Call kstat_chain_update().
+ See if processor is on-line and set bits in xcpu_flags.
+ Added frequency (bad name, should have been ticks).
+
+ * swap.c (glibtop_get_swap_s): Call kstat_chain_update().
+ I probably broke vminfo_snaptime consistency. Fix later.
+
+ * uptime.c (glibtop_get_uptime_s): Implemented uptime and boot_time.
+ Still looking for a sane way to get idletime.
+
+ * mem.c (glibtop_get_mem_s): Implemented. Will use bunyip
+ module if it's loaded. Or when it gets loaded. kstat_chain_update()
+ is our friend. And with a friends like that...
+
+ * loadavg.c (glibtop_get_loadavg_s): Solaris 2.6 code brought
+ into sync with everything else.
+
+ * msg_limits.c (glibtop_init_msg_limits_s): Implemented.
+
+ * sem_limits.c (glibtop_get_sem_limits_s): Implemented.
+
+ Solaris takes kernel modularity too seriously. We can't get
+ IPC configuration data if the kernel module is not loaded and
+ it won't be loaded until some process actually asks for a
+ particular IPC resource. There's no way to tell our applications
+ about this. Possible API additions?
+
+ All three IPC functions should go into daemon, but I'm keeping
+ them in the normal library because I can't build daemon yet. All
+ praise 64 bits!
+
+1999-04-29 Drazen Kacar <dave@srce.hr>
+
+ * glibtop_machine.h: added field for kvm descriptor.
+
+ * open.c: added code for opening kernel name space.
+
+ * shm_limits.c: implemented.
+
+1999-03-31 Drazen Kacar <dave@srce.hr>
+
+ * loadavg.c: make it work with Solaris 2.6 and older. A part
+ of it should be moved to open.c.
+
+1999-03-19 Martin Baulig <martin@home-of-linux.org>
+
+ Added first kstat based implementation for Solaris 7.
+
+ * open.c (glibtop_open_s): Walk kstat list and save interesting
+ kstats in the `server->machine'.
+
+ * cpu.c: This can already provide `idle', `user' and `sys' with
+ full SMP support.
+
+ * swap.c: This can already provide `total', `used' and `free'.
+
+1999-03-17 Martin Baulig <martin@home-of-linux.org>
+
+ Initial import of my Solaris 7 port.
+
+ * loadavg.c: We use getloadavg () to get the `loadavg' field.
+
+ * procdata.c: This file will handle all interaction with the
+ /proc filesystem.
+ (glibtop_get_proc_data_psinfo_s): Read `/proc/<pid>/psinfo' and
+ return the resulting `struct psinfo'.
+ (glibtop_get_proc_data_usage_s): Read `/proc/<pid>/usage' and
+ return the resulting `struct prusage'.
+
+ * proclist.c: We use readdir () on /proc to get the list of
+ all pids.
+
+ * procstate.c: Read `uid' and `gid' from the `struct psinfo'.
+
+ * proctime.c: Read `start_time', `rtime', `utime' and `stime'
+ from the `struct prusage'.
+
+ * procuid.c: Read `euid', `uid', `egid', `gid', `pid', `ppid',
+ `pgrp', `session' and `tty' from the `struct psinfo'.
+
diff --git a/sysdeps/solaris/Makefile.am b/sysdeps/solaris/Makefile.am
new file mode 100644
index 00000000..1459140e
--- /dev/null
+++ b/sysdeps/solaris/Makefile.am
@@ -0,0 +1,28 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
+
+libgtop_sysdeps_2_0_la_SOURCES = open.c close.c siglist.c cpu.c mem.c \
+ safeio.c swap.c uptime.c loadavg.c \
+ proclist.c procstate.c procuid.c \
+ proctime.c procmem.c procsignal.c \
+ prockernel.c procsegment.c procargs.c \
+ procmap.c netload.c ppp.c procdata.c
+
+libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtop_sysdeps_2_0_la_LIBADD = @DL_LIB@
+
+libgtop_sysdeps_suid_2_0_la_SOURCES = open_suid.c close_suid.c \
+ shm_limits.c msg_limits.c sem_limits.c
+
+libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+
+libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
+libgtopincludedir = $(includedir)/libgtop-2.0
+
+noinst_HEADERS = glibtop_private.h glibtop_suid.h safeio.h
+
diff --git a/sysdeps/solaris/close.c b/sysdeps/solaris/close.c
new file mode 100644
index 00000000..4262d2f0
--- /dev/null
+++ b/sysdeps/solaris/close.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/solaris/close_suid.c b/sysdeps/solaris/close_suid.c
new file mode 100644
index 00000000..a8733f0f
--- /dev/null
+++ b/sysdeps/solaris/close_suid.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_p (glibtop *server)
+{ }
diff --git a/sysdeps/solaris/cpu.c b/sysdeps/solaris/cpu.c
new file mode 100644
index 00000000..3ecb3503
--- /dev/null
+++ b/sysdeps/solaris/cpu.c
@@ -0,0 +1,113 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/cpu.h>
+
+#include <assert.h>
+#include <sys/processor.h>
+
+#include <glibtop_private.h>
+
+static const unsigned long _glibtop_sysdeps_cpu =
+(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
+(1L << GLIBTOP_CPU_SYS) + (1L << GLIBTOP_CPU_IDLE) +
+(1L << GLIBTOP_XCPU_TOTAL) + (1L << GLIBTOP_XCPU_USER) +
+(1L << GLIBTOP_XCPU_SYS) + (1L << GLIBTOP_XCPU_IDLE) +
+#if LIBGTOP_VERSION_CODE >= 1001002
+(1L << GLIBTOP_XCPU_FLAGS) +
+#endif
+(1L << 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)
+{
+ kstat_ctl_t *kc = server->machine.kc;
+ cpu_stat_t cpu_stat;
+ processorid_t cpu;
+ int ncpu, found;
+ kid_t ret;
+
+ memset (buf, 0, sizeof (glibtop_cpu));
+
+ if(!kc)
+ return;
+ switch(kstat_chain_update(kc))
+ {
+ case -1: assert(0); /* Debugging purposes, shouldn't happen */
+ case 0: break;
+ default: glibtop_get_kstats(server);
+ }
+ ncpu = server->ncpu;
+ if (ncpu > GLIBTOP_NCPU)
+ ncpu = GLIBTOP_NCPU;
+
+ for (cpu = 0, found = 0; cpu < GLIBTOP_NCPU && found != ncpu; cpu++)
+ {
+ kstat_t *ksp = server->machine.cpu_stat_kstat [cpu];
+ if (!ksp) continue;
+
+ ++found;
+ if(p_online(cpu, P_STATUS) == P_ONLINE)
+#if LIBGTOP_VERSION_CODE >= 1001002
+ buf->xcpu_flags |= (1L << cpu);
+#else
+ ;
+#endif
+ else
+ continue;
+ ret = kstat_read (kc, ksp, &cpu_stat);
+
+ if (ret == -1) {
+ glibtop_warn_io_r (server, "kstat_read (cpu_stat%d)", cpu);
+ continue;
+ }
+
+ buf->xcpu_idle [cpu] = cpu_stat.cpu_sysinfo.cpu [CPU_IDLE];
+ buf->xcpu_user [cpu] = cpu_stat.cpu_sysinfo.cpu [CPU_USER];
+ buf->xcpu_sys [cpu] = cpu_stat.cpu_sysinfo.cpu [CPU_KERNEL];
+
+ buf->xcpu_total [cpu] = buf->xcpu_idle [cpu] + buf->xcpu_user [cpu] +
+ buf->xcpu_sys [cpu];
+
+ buf->idle += cpu_stat.cpu_sysinfo.cpu [CPU_IDLE];
+ buf->user += cpu_stat.cpu_sysinfo.cpu [CPU_USER];
+ buf->sys += cpu_stat.cpu_sysinfo.cpu [CPU_KERNEL];
+ }
+
+ buf->total = buf->idle + buf->user + buf->sys;
+ buf->frequency = server->machine.ticks;
+
+ buf->flags = _glibtop_sysdeps_cpu;
+}
diff --git a/sysdeps/solaris/glibtop_machine.h b/sysdeps/solaris/glibtop_machine.h
new file mode 100644
index 00000000..26a80de4
--- /dev/null
+++ b/sysdeps/solaris/glibtop_machine.h
@@ -0,0 +1,78 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_MACHINE_H__
+#define __GLIBTOP_MACHINE_H__
+
+#include <sys/param.h>
+#ifdef HAVE_PROCFS_H
+#include <procfs.h>
+#else
+#include <sys/procfs.h>
+#endif
+#include <fcntl.h>
+
+#include <kstat.h>
+#include <kvm.h>
+#include <sys/sysinfo.h>
+
+BEGIN_LIBGTOP_DECLS
+
+typedef struct _glibtop_machine glibtop_machine;
+
+struct _glibtop_machine
+{
+ uid_t uid, euid;
+ gid_t gid, egid;
+ pid_t me; /* Don't ask why we need this */
+
+ kvm_t *kd;
+
+ kstat_ctl_t *kc;
+
+ kstat_t *vminfo_kstat;
+ hrtime_t vminfo_snaptime;
+ vminfo_t vminfo;
+
+ kstat_t *cpu_stat_kstat [64];
+
+ kstat_t *system; /* boot_time & avenrun* where needed */
+ kstat_t *syspages; /* memory usage */
+ kstat_t *bunyip; /* more memory usage */
+
+ int pagesize; /* in bits to shift, ie. 2^pagesize gives Kb */
+ int ticks; /* clock ticks, as returned by sysconf() */
+ unsigned long long boot; /* boot time, although it's ui32 in kstat */
+ void *libproc; /* libproc handle */
+#if GLIBTOP_SOLARIS_RELEASE >= 560
+ void (*objname)(void *, uintptr_t, const char *, size_t);
+ struct ps_prochandle *(*pgrab)(pid_t, int, int *);
+ void (*pfree)(void *);
+#else
+ void *filler[3];
+#endif
+};
+
+END_LIBGTOP_DECLS
+
+#endif /* __GLIBTOP_MACHINE_H__ */
diff --git a/sysdeps/solaris/glibtop_private.h b/sysdeps/solaris/glibtop_private.h
new file mode 100644
index 00000000..7d921daf
--- /dev/null
+++ b/sysdeps/solaris/glibtop_private.h
@@ -0,0 +1,68 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_PRIVATE_H__
+#define __GLIBTOP_PRIVATE_H__
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+
+#include <sys/param.h>
+#include <kstat.h>
+#include <fcntl.h>
+#if defined(HAVE_PROCFS_H)
+# include <procfs.h>
+#elif defined(HAVE_SYS_PROCFS_H)
+# include <sys/procfs.h>
+#else
+# error Cannot compile without <procfs.h> or <sys/procfs.h>
+#endif
+
+BEGIN_LIBGTOP_DECLS
+
+#ifdef HAVE_PROCFS_H
+
+/* Read /proc/<pid>/psinfo */
+int glibtop_get_proc_data_psinfo_s(glibtop *, struct psinfo *, pid_t pid);
+
+/* Read /proc/<pid>/status */
+int glibtop_get_proc_status_s(glibtop *, struct pstatus *, pid_t);
+#else
+int glibtop_get_proc_data_psinfo_s(glibtop *, struct prpsinfo *, pid_t);
+int glibtop_get_proc_status_s(glibtop *, struct prstatus *, pid_t);
+#endif
+
+/* Read /proc/<pid>/usage */
+int glibtop_get_proc_data_usage_s(glibtop *, struct prusage *, pid_t);
+
+#if LIBGTOP_VERSION_CODE >= 1001002
+/* Read /proc/<pid>/cred */
+int glibtop_get_proc_credentials_s(glibtop *, struct prcred *, gid_t *, pid_t);
+#endif
+
+/* Reread kstat chains */
+void glibtop_get_kstats(glibtop *);
+
+END_LIBGTOP_DECLS
+
+#endif /* __GLIBTOP_PRIVATE_H__ */
diff --git a/sysdeps/solaris/glibtop_server.h b/sysdeps/solaris/glibtop_server.h
new file mode 100644
index 00000000..0a13e6d4
--- /dev/null
+++ b/sysdeps/solaris/glibtop_server.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#define GLIBTOP_SUID_CPU 0
+#define GLIBTOP_SUID_MEM 0
+#define GLIBTOP_SUID_SWAP 0
+#define GLIBTOP_SUID_UPTIME 0
+#define GLIBTOP_SUID_LOADAVG 0
+#define GLIBTOP_SUID_SHM_LIMITS (1L << GLIBTOP_SYSDEPS_SHM_LIMITS)
+#define GLIBTOP_SUID_MSG_LIMITS (1L << GLIBTOP_SYSDEPS_MSG_LIMITS)
+#define GLIBTOP_SUID_SEM_LIMITS (1L << GLIBTOP_SYSDEPS_SEM_LIMITS)
+#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/solaris/glibtop_suid.h b/sysdeps/solaris/glibtop_suid.h
new file mode 100644
index 00000000..b88421ff
--- /dev/null
+++ b/sysdeps/solaris/glibtop_suid.h
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_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/solaris/loadavg.c b/sysdeps/solaris/loadavg.c
new file mode 100644
index 00000000..9f4d4a37
--- /dev/null
+++ b/sysdeps/solaris/loadavg.c
@@ -0,0 +1,87 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, March 1999.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/loadavg.h>
+
+#ifdef HAVE_GETLOADAVG
+#include <sys/loadavg.h>
+#else
+#include <assert.h>
+#include <sys/param.h>
+#include <kstat.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_loadavg =
+(1L << GLIBTOP_LOADAVG_LOADAVG);
+
+/* Init function. */
+
+void
+glibtop_init_loadavg_s (glibtop *server)
+{
+ server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
+}
+
+/* Provides load average. */
+
+void
+glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
+{
+#ifndef HAVE_GETLOADAVG
+ kstat_ctl_t *kc;
+ kstat_t *ksp;
+ int i;
+ static char *avestrings[] = { "avenrun_1min",
+ "avenrun_5min",
+ "avenrun_15min" };
+#endif
+ memset (buf, 0, sizeof (glibtop_loadavg));
+
+#ifdef HAVE_GETLOADAVG
+ if (getloadavg (buf->loadavg, 3))
+ return;
+#else
+ if(!(kc = server->machine.kc))
+ return;
+ switch(kstat_chain_update(kc))
+ {
+ case -1: assert(0); /* Debugging, shouldn't happen */
+ case 0: break;
+ default: glibtop_get_kstats(server);
+ }
+ if(!(ksp = server->machine.system))
+ return;
+ if(kstat_read(kc, ksp, NULL) < 0)
+ return;
+ for(i = 0; i < 3; ++i) /* Do we have a countof macro? */
+ {
+ kstat_named_t *kn;
+
+ kn = (kstat_named_t *)kstat_data_lookup(ksp, avestrings[i]);
+ if(kn)
+ buf->loadavg[i] = (double)kn->value.ul / FSCALE;
+ }
+#endif
+ buf->flags = _glibtop_sysdeps_loadavg;
+}
diff --git a/sysdeps/solaris/mem.c b/sysdeps/solaris/mem.c
new file mode 100644
index 00000000..50461992
--- /dev/null
+++ b/sysdeps/solaris/mem.c
@@ -0,0 +1,127 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/mem.h>
+
+#include <assert.h>
+#include <unistd.h>
+
+#include <glibtop_private.h>
+
+static const unsigned long _glibtop_sysdeps_mem_os_sysconf =
+(1L << GLIBTOP_MEM_TOTAL);
+static const unsigned long _glibtop_sysdeps_mem_os_kstat =
+(1L << GLIBTOP_MEM_FREE) + (1L << GLIBTOP_MEM_USED) +
+(1L << GLIBTOP_MEM_LOCKED);
+static const unsigned long _glibtop_sysdeps_mem_bunyip =
+(1L << GLIBTOP_MEM_SHARED) + (1L << GLIBTOP_MEM_BUFFER) +
+(1L << GLIBTOP_MEM_USER);
+
+/* Init function. */
+
+void
+glibtop_init_mem_s (glibtop *server)
+{
+ server->sysdeps.mem = _glibtop_sysdeps_mem_os_sysconf +
+ _glibtop_sysdeps_mem_os_kstat + _glibtop_sysdeps_mem_bunyip;
+}
+
+/* Provides information about memory usage. */
+
+void
+glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
+{
+ kstat_ctl_t *kc = server->machine.kc;
+ kstat_t *ksp;
+ kstat_named_t *kn;
+ int pagesize = server->machine.pagesize;
+
+#ifndef KSTAT_DATA_UINT32
+#define ui32 ul
+#endif
+
+ memset (buf, 0, sizeof (glibtop_mem));
+
+ buf->total = (u_int64_t)sysconf(_SC_PHYS_PAGES) << pagesize << 10;
+ buf->flags = _glibtop_sysdeps_mem_os_sysconf;
+
+ if(!kc)
+ return;
+ switch(kstat_chain_update(kc))
+ {
+ case -1: assert(0); /* Debugging purposes, shouldn't happen */
+ case 0: break;
+ default: glibtop_get_kstats(server);
+ }
+
+ if((ksp = server->machine.syspages) && kstat_read(kc, ksp, NULL) >= 0)
+ {
+ kn = (kstat_named_t *)kstat_data_lookup(ksp, "pagesfree");
+ if(kn)
+ {
+#ifdef _LP64
+ buf->free = kn->value.ui64 << pagesize << 10;
+#else
+ buf->free = kn->value.ui32 << pagesize << 10;
+#endif
+ buf->used = buf->total - buf->free;
+ }
+ kn = (kstat_named_t *)kstat_data_lookup(ksp, "pageslocked");
+ if(kn)
+#ifdef _LP64
+ buf->locked = kn->value.ui64 << pagesize;
+#else
+ buf->locked = kn->value.ui32 << pagesize;
+#endif
+ buf->flags += _glibtop_sysdeps_mem_os_kstat;
+ }
+
+ /* Bunyip module provides data in multiples of system page size */
+
+ if((ksp = server->machine.bunyip) && kstat_read(kc, ksp, NULL) >= 0)
+ {
+ kn = (kstat_named_t *)kstat_data_lookup(ksp, "pages_anon");
+ if(kn)
+#ifdef _LP64
+ buf->user = kn->value.ui64 << pagesize << 10;
+#else
+ buf->user = kn->value.ui32 << pagesize << 10;
+#endif
+ kn = (kstat_named_t *)kstat_data_lookup(ksp, "pages_exec");
+ if(kn)
+#ifdef _LP64
+ buf->shared = kn->value.ui64 << pagesize << 10;
+#else
+ buf->shared = kn->value.ui32 << pagesize << 10;
+#endif
+ kn = (kstat_named_t *)kstat_data_lookup(ksp, "pages_vnode");
+ if(kn)
+#ifdef _LP64
+ buf->buffer = kn->value.ui64 << pagesize << 10;
+#else
+ buf->buffer = kn->value.ui32 << pagesize << 10;
+#endif
+ buf->flags += _glibtop_sysdeps_mem_bunyip;
+ }
+}
diff --git a/sysdeps/solaris/msg_limits.c b/sysdeps/solaris/msg_limits.c
new file mode 100644
index 00000000..b38d8303
--- /dev/null
+++ b/sysdeps/solaris/msg_limits.c
@@ -0,0 +1,80 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/msg_limits.h>
+
+#include <kvm.h>
+#include <sys/msg.h>
+
+static struct nlist nlst[] = { {"msginfo"}, {NULL} };
+static const unsigned long _glibtop_sysdeps_msg_limits =
+#if GLIBTOP_SOLARIS_RELEASE <= 570
+(1L << GLIBTOP_IPC_MSGMAP) + (1L << GLIBTOP_IPC_MSGSSZ) +
+#endif
+(1L << GLIBTOP_IPC_MSGPOOL) + (1L << GLIBTOP_IPC_MSGMAX) +
+(1L << GLIBTOP_IPC_MSGMNB) + (1L << GLIBTOP_IPC_MSGMNI) +
+(1L << GLIBTOP_IPC_MSGTQL);
+
+/* Init function. */
+
+void
+glibtop_init_msg_limits_p (glibtop *server)
+{
+ kvm_t *kd = server->machine.kd;
+
+ if(kd && !kvm_nlist(kd, nlst))
+ server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
+ else
+ server->sysdeps.msg_limits = 0;
+}
+
+/* Provides information about sysv ipc limits. */
+
+void
+glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
+{
+ kvm_t *kd = server->machine.kd;
+ struct msginfo minfo;
+
+ memset (buf, 0, sizeof (glibtop_msg_limits));
+
+ if(!(server->sysdeps.msg_limits))
+ return;
+ if(kvm_read(kd, nlst[0].n_value, (void *)&minfo,
+ sizeof(struct msginfo)) != sizeof(struct msginfo))
+ return;
+
+#if GLIBTOP_SOLARIS_RELEASE <= 570
+ /* These fields don't exist anymore in Solaris 8.
+ * Thanks to Laszlo PETER <Laszlo.Peter@ireland.sun.com>. */
+ buf->msgmap = minfo.msgmap;
+ buf->msgssz = minfo.msgssz;
+#endif
+ buf->msgmax = minfo.msgmax;
+ buf->msgmnb = minfo.msgmnb;
+ buf->msgmni = minfo.msgmni;
+ buf->msgtql = minfo.msgtql;
+ buf->msgpool = minfo.msgmni * minfo.msgmnb >> 10;
+ buf->flags = _glibtop_sysdeps_msg_limits;
+}
diff --git a/sysdeps/solaris/netload.c b/sysdeps/solaris/netload.c
new file mode 100644
index 00000000..beebedba
--- /dev/null
+++ b/sysdeps/solaris/netload.c
@@ -0,0 +1,45 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/netload.h>
+
+static const unsigned long _glibtop_sysdeps_netload = 0;
+
+/* Init function. */
+
+void
+glibtop_init_netload_s (glibtop *server)
+{
+ server->sysdeps.netload = _glibtop_sysdeps_netload;
+}
+
+/* Provides network statistics. */
+
+void
+glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
+ const char *interface)
+{
+ memset (buf, 0, sizeof (glibtop_netload));
+}
diff --git a/sysdeps/solaris/open.c b/sysdeps/solaris/open.c
new file mode 100644
index 00000000..7df43ca2
--- /dev/null
+++ b/sysdeps/solaris/open.c
@@ -0,0 +1,234 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/open.h>
+#include <glibtop/cpu.h>
+
+#include <unistd.h>
+#include <dlfcn.h>
+#include <sys/types.h>
+#include <sys/processor.h>
+
+#include <glibtop_private.h>
+
+/* We need to call this when kstat_chain_update() returns new KID.
+ * In that case all kstat pointers and data are invalid, so we
+ * need to reread everything. The condition shouldn't happen very
+ * often.
+ */
+
+void
+glibtop_get_kstats(glibtop *server)
+{
+ kstat_ctl_t *kc = server->machine.kc;
+ kstat_t *ksp;
+ int nproc_same, new_ncpu;
+
+ new_ncpu = sysconf(_SC_NPROCESSORS_CONF);
+
+ if(!kc)
+ {
+ server->ncpu = new_ncpu;
+ server->machine.vminfo_kstat = NULL;
+ server->machine.system = NULL;
+ server->machine.syspages = NULL;
+ server->machine.bunyip = NULL;
+ return;
+ }
+
+ do {
+ ksp = kstat_lookup(kc, "unix", -1, "vminfo");
+ server->machine.vminfo_kstat = ksp;
+ if(ksp)
+ {
+ kstat_read(kc, ksp, &server->machine.vminfo);
+ /* Don't change snaptime if we only need to reinitialize kstats */
+ if(!(server->machine.vminfo_snaptime))
+ server->machine.vminfo_snaptime = ksp->ks_snaptime;
+ }
+
+ /* We don't know why was kstat chain invalidated. It could have
+ been because the number of processors changed. The sysconf()
+ man page says that values returned won't change during the
+ life time of a process, but let's hope that's just an error in
+ the documentation. */
+
+ if((nproc_same = new_ncpu) == server->ncpu)
+ {
+ int checked, i;
+ char cpu[20];
+
+ for(i = 0, checked = 0; i < GLIBTOP_NCPU || checked == new_ncpu; ++i)
+ if(server->machine.cpu_stat_kstat[i])
+ {
+ sprintf(cpu, "cpu_stat%d", i);
+ if(!(server->machine.cpu_stat_kstat[i] =
+ kstat_lookup(kc, "cpu_stat", -1, cpu)))
+ {
+ nproc_same = 0;
+ break;
+ }
+ ++checked;
+ }
+ }
+ if(!nproc_same)
+ {
+ processorid_t p;
+ int found;
+ char cpu[20];
+
+ if(new_ncpu > GLIBTOP_NCPU)
+ new_ncpu = GLIBTOP_NCPU;
+ server->ncpu = new_ncpu;
+ for(p = 0, found = 0; p < GLIBTOP_NCPU && found != new_ncpu; ++p)
+ {
+ if(p_online(p, P_STATUS) < 0)
+ {
+ server->machine.cpu_stat_kstat[p] = NULL;
+ continue;
+ }
+ sprintf(cpu, "cpu_stat%d", (int)p);
+ server->machine.cpu_stat_kstat[p] =
+ kstat_lookup(kc, "cpu_stat", -1, cpu);
+ ++found;
+ }
+ }
+
+ server->machine.system = kstat_lookup(kc, "unix", -1, "system_misc");
+ server->machine.syspages = kstat_lookup(kc, "unix", -1, "system_pages");
+ server->machine.bunyip = kstat_lookup(kc, "bunyip", -1, "mempages");
+
+ } while(kstat_chain_update(kc) > 0 &&
+ (new_ncpu = sysconf(_SC_NPROCESSORS_CONF)));
+
+ /* We'll ignore -1 from kstat_chain_update here, since it really
+ shouldn't happen */
+}
+
+void
+glibtop_open_s (glibtop *server, const char *program_name,
+ const unsigned long features, const unsigned flags)
+{
+ kstat_ctl_t *kc;
+ kstat_t *ksp;
+ kstat_named_t *kn;
+ int i, page;
+ void *dl;
+
+ server->name = program_name;
+
+ page = sysconf(_SC_PAGESIZE) >> 10;
+ for(i = 0; page; ++i, page >>= 1);
+ server->machine.pagesize = i - 1;
+ server->machine.ticks = sysconf(_SC_CLK_TCK);
+ server->machine.kc = kc = kstat_open ();
+
+#if 0
+ for (ksp = server->machine.kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) {
+ if (!strcmp (ksp->ks_class, "vm") && !strcmp (ksp->ks_name, "vminfo")) {
+ server->machine.vminfo_kstat = ksp;
+ kstat_read (server->machine.kc, ksp, &server->machine.vminfo);
+ server->machine.vminfo_snaptime = ksp->ks_snaptime;
+ continue;
+ }
+
+ if (!strcmp (ksp->ks_class, "misc") && !strncmp (ksp->ks_name, "cpu_stat", 8)) {
+ int cpu;
+
+ if ((sscanf (ksp->ks_name+8, "%d", &cpu) != 1) || (cpu > 63))
+ continue;
+
+ if (cpu >= server->ncpu)
+ server->ncpu = cpu+1;
+
+ server->machine.cpu_stat_kstat [cpu] = ksp;
+ continue;
+ }
+ }
+
+#endif
+
+ if (!kc)
+ glibtop_warn_io_r (server, "kstat_open ()");
+
+ server->ncpu = -1; /* Force processor detection */
+ server->machine.vminfo_snaptime = 0; /* Force snaptime read */
+ glibtop_get_kstats(server);
+
+ server->machine.boot = 0;
+ if((ksp = server->machine.system) && kstat_read(kc, ksp, NULL) >= 0)
+ {
+ kn = (kstat_named_t *)kstat_data_lookup(ksp, "boot_time");
+ if(kn)
+ switch(kn->data_type)
+ {
+#ifdef KSTAT_DATA_INT32
+ case KSTAT_DATA_INT32: server->machine.boot = kn->value.i32;
+ break;
+ case KSTAT_DATA_UINT32: server->machine.boot = kn->value.ui32;
+ break;
+ case KSTAT_DATA_INT64: server->machine.boot = kn->value.i64;
+ break;
+ case KSTAT_DATA_UINT64: server->machine.boot = kn->value.ui64;
+ break;
+#else
+ case KSTAT_DATA_LONG: server->machine.boot = kn->value.l;
+ break;
+ case KSTAT_DATA_ULONG: server->machine.boot = kn->value.ul;
+ break;
+ case KSTAT_DATA_LONGLONG: server->machine.boot = kn->value.ll;
+ break;
+ case KSTAT_DATA_ULONGLONG: server->machine.boot = kn->value.ull;
+ break;
+#endif
+ }
+ }
+
+ /* Now let's have a bit of magic dust... */
+
+#if GLIBTOP_SOLARIS_RELEASE >= 560
+
+ dl = dlopen("/usr/lib/libproc.so", RTLD_LAZY);
+ server->machine.libproc = dl;
+ if(dl)
+ {
+ void *func;
+
+ func = dlsym(dl, "Pobjname"); /* Solaris 8 */
+ if(!func)
+ func = dlsym(dl, "proc_objname"); /* Solaris 7 */
+ server->machine.objname = (void (*)
+ (void *, uintptr_t, const char *, size_t))func;
+ server->machine.pgrab = (struct ps_prochandle *(*)(pid_t, int, int *))
+ dlsym(dl, "Pgrab");
+ server->machine.pfree = (void (*)(void *))dlsym(dl, "Pfree");
+ }
+ else
+ {
+ server->machine.objname = NULL;
+ server->machine.pgrab = NULL;
+ server->machine.pfree = NULL;
+ }
+#endif
+ server->machine.me = getpid();
+}
diff --git a/sysdeps/solaris/open_suid.c b/sysdeps/solaris/open_suid.c
new file mode 100644
index 00000000..502e7215
--- /dev/null
+++ b/sysdeps/solaris/open_suid.c
@@ -0,0 +1,92 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+
+#include <glibtop_suid.h>
+
+#include <unistd.h>
+#include <sys/types.h>
+
+/* !!! 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.kd = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
+ if(!server->machine.kd)
+ glibtop_warn_io_r(server, "kvm_open()");
+
+ /* 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/solaris/ppp.c b/sysdeps/solaris/ppp.c
new file mode 100644
index 00000000..6d0905d5
--- /dev/null
+++ b/sysdeps/solaris/ppp.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/solaris/procargs.c b/sysdeps/solaris/procargs.c
new file mode 100644
index 00000000..ac2721d3
--- /dev/null
+++ b/sysdeps/solaris/procargs.c
@@ -0,0 +1,83 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procargs.h>
+
+static const unsigned long _glibtop_sysdeps_proc_args =
+(1L << 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)
+{
+#ifdef HAVE_PROCFS_H
+ struct psinfo pinfo;
+#else
+ struct prpsinfo pinfo;
+#endif
+ int len, i;
+ char *ret, *p;
+
+ memset (buf, 0, sizeof (glibtop_proc_args));
+
+ if(glibtop_get_proc_data_psinfo_s(server, &pinfo, pid))
+ return NULL;
+
+ for(len = 0; len < PRARGSZ; ++len)
+ if(!(pinfo.pr_psargs[len]))
+ break;
+ if(max_len)
+ {
+ ret = glibtop_malloc_r(server, max_len + 1);
+ if(max_len < len)
+ len = max_len;
+ memcpy(ret, pinfo.pr_psargs, len);
+ ret[len] = 0;
+ }
+ else
+ {
+ ret = glibtop_malloc_r(server, len + 1);
+ memcpy(ret, pinfo.pr_psargs, len);
+ ret[len] = 0;
+
+ buf->size = len;
+ buf->flags = _glibtop_sysdeps_proc_args;
+ }
+ for(p = ret; *p; ++p)
+ if(*p == ' ')
+ *p = 0;
+ return ret;
+}
diff --git a/sysdeps/solaris/procdata.c b/sysdeps/solaris/procdata.c
new file mode 100644
index 00000000..e8353d00
--- /dev/null
+++ b/sysdeps/solaris/procdata.c
@@ -0,0 +1,268 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop_private.h>
+#include <glibtop/procuid.h>
+
+#include <errno.h>
+
+#include "safeio.h"
+
+/*
+ * The differences between old and new procfs API are:
+ * - old has /proc/<pid> file and ioctl() is used to obtain the data.
+ * - new has /proc/<pid>/* files and read() & friends are used to
+ * obtain the data.
+ * - names of structures and members are different. It's mostly the
+ * prefix. Old uses `pr' and new uses `ps'.
+ *
+ * Since almost every line would be in #ifdef, I think it would
+ * be more readable to just copy everything twice. This is not a big
+ * file, after all.
+ */
+
+#ifdef HAVE_PROCFS_H
+
+/* Read /proc/<pid>/psinfo. */
+
+int
+glibtop_get_proc_data_psinfo_s (glibtop *server, struct psinfo *psinfo, pid_t pid)
+{
+ int fd;
+ char buffer [BUFSIZ];
+
+ sprintf (buffer, "/proc/%d/psinfo", (int) pid);
+ fd = s_open (buffer, O_RDONLY);
+ if (fd < 0) {
+ glibtop_warn_io_r (server, "open (%s)", buffer);
+ return -1;
+ }
+
+ if (s_pread (fd, psinfo, sizeof (struct psinfo), 0) !=
+ sizeof (struct psinfo))
+ {
+ s_close (fd);
+ glibtop_warn_io_r (server, "pread (%s)", buffer);
+ return -1;
+ }
+
+ s_close (fd);
+ return 0;
+}
+
+int
+glibtop_get_proc_data_usage_s (glibtop *server, struct prusage *prusage, pid_t pid)
+{
+ int fd;
+ char buffer [BUFSIZ];
+
+ sprintf (buffer, "/proc/%d/usage", (int) pid);
+ fd = s_open (buffer, O_RDONLY);
+ if (fd < 0) {
+ glibtop_warn_io_r (server, "open (%s)", buffer);
+ return -1;
+ }
+
+ if (s_pread (fd, prusage, sizeof (struct prusage), 0) !=
+ sizeof (struct prusage))
+ {
+ s_close (fd);
+ glibtop_warn_io_r (server, "pread (%s)", buffer);
+ return -1;
+ }
+
+ s_close (fd);
+ return 0;
+}
+
+#if LIBGTOP_VERSION_CODE >= 1001002
+int
+glibtop_get_proc_credentials_s(glibtop *server,
+ struct prcred *prcred,
+ gid_t *groups,
+ pid_t pid)
+{
+ int fd;
+ size_t toread;
+ char buffer[BUFSIZ];
+
+ sprintf(buffer, "/proc/%d/cred", (int)pid);
+ if((fd = s_open(buffer, O_RDONLY)) < 0)
+ {
+ if(errno != EPERM && errno != EACCES)
+ glibtop_warn_io_r(server, "open (%s)", buffer);
+ return -1;
+ }
+ if(s_pread(fd, prcred, sizeof(struct prcred), 0) !=
+ sizeof(struct prcred))
+ {
+ s_close(fd);
+ glibtop_warn_io_r(server, "pread (%s)", buffer);
+ return -1;
+ }
+ if(prcred->pr_ngroups >= 0)
+ {
+ if(prcred->pr_ngroups <= GLIBTOP_MAX_GROUPS)
+ toread = prcred->pr_ngroups * sizeof(gid_t);
+ else
+ toread = GLIBTOP_MAX_GROUPS * sizeof(gid_t);
+ if(s_pread(fd, groups, toread,
+ &(((struct prcred *)0)->pr_groups[0])) != toread)
+ prcred->pr_ngroups = 0;
+ }
+ s_close(fd);
+ return 0;
+}
+#endif
+
+int
+glibtop_get_proc_status_s(glibtop *server, struct pstatus *pstatus, pid_t pid)
+{
+ int fd;
+ char buffer[BUFSIZ];
+
+ sprintf(buffer, "/proc/%d/status", (int)pid);
+ if((fd = s_open(buffer, O_RDONLY)) < 0)
+ {
+ if(errno != EPERM && errno != EACCES)
+ glibtop_warn_io_r(server, "open (%s)", buffer);
+ return -1;
+ }
+ if(s_pread(fd, pstatus, sizeof(struct pstatus), 0) !=
+ sizeof(struct pstatus))
+ {
+ s_close(fd);
+ glibtop_warn_io_r(server, "pread (%s)", buffer);
+ return -1;
+ }
+ s_close(fd);
+ return 0;
+}
+
+#else /* old API */
+
+int
+glibtop_get_proc_data_psinfo_s (glibtop *server,
+ struct prpsinfo *psinfo,
+ pid_t pid)
+{
+ int fd;
+ char buffer [BUFSIZ];
+
+ sprintf (buffer, "/proc/%d", (int) pid);
+ fd = s_open (buffer, O_RDONLY);
+ if (fd < 0) {
+ if(errno != EPERM && errno != EACCES)
+ glibtop_warn_io_r (server, "open (%s)", buffer);
+ return -1;
+ }
+
+ if(ioctl(fd, PIOCPSINFO, psinfo) < 0)
+ {
+ s_close (fd);
+ glibtop_warn_io_r (server, "ioctl(%s, PIOCPSINFO)", buffer);
+ return -1;
+ }
+
+ s_close (fd);
+ return 0;
+}
+
+int
+glibtop_get_proc_data_usage_s (glibtop *server,
+ struct prusage *prusage,
+ pid_t pid)
+{
+ int fd;
+ char buffer [BUFSIZ];
+
+ sprintf (buffer, "/proc/%d", (int) pid);
+ fd = s_open (buffer, O_RDONLY);
+ if (fd < 0) {
+ if(errno != EPERM && errno != EACCES)
+ glibtop_warn_io_r (server, "open (%s)", buffer);
+ return -1;
+ }
+
+ if(ioctl(fd, PIOCUSAGE, prusage) < 0)
+ {
+ s_close (fd);
+ glibtop_warn_io_r (server, "ioctl(%s, PIOCUSAGE)", buffer);
+ return -1;
+ }
+
+ s_close (fd);
+ return 0;
+}
+
+int
+glibtop_get_proc_credentials_s(glibtop *server,
+ struct prcred *prcred,
+ gid_t *groups,
+ pid_t pid)
+{
+ int fd;
+ size_t toread;
+ char buffer[BUFSIZ];
+
+ sprintf(buffer, "/proc/%d", (int)pid);
+ if((fd = s_open(buffer, O_RDONLY)) < 0)
+ {
+ if(errno != EPERM && errno != EACCES)
+ glibtop_warn_io_r(server, "open (%s)", buffer);
+ return -1;
+ }
+ if(ioctl(fd, PIOCCRED, prcred) < 0)
+ {
+ s_close(fd);
+ glibtop_warn_io_r(server, "ioctl(%s, PIOCCRED)", buffer);
+ return -1;
+ }
+ s_close(fd);
+ return 0;
+}
+
+int
+glibtop_get_proc_status_s(glibtop *server, struct prstatus *pstatus, pid_t pid)
+{
+ int fd;
+ char buffer[BUFSIZ];
+
+ sprintf(buffer, "/proc/%d", (int)pid);
+ if((fd = s_open(buffer, O_RDONLY)) < 0)
+ {
+ if(errno != EPERM && errno != EACCES)
+ glibtop_warn_io_r(server, "open (%s)", buffer);
+ return -1;
+ }
+ if(ioctl(fd, PIOCSTATUS, pstatus) < 0)
+ {
+ s_close(fd);
+ glibtop_warn_io_r(server, "ioctl(%s, PIOCSTATUS)", buffer);
+ return -1;
+ }
+ s_close(fd);
+ return 0;
+}
+#endif
diff --git a/sysdeps/solaris/prockernel.c b/sysdeps/solaris/prockernel.c
new file mode 100644
index 00000000..d06f6cab
--- /dev/null
+++ b/sysdeps/solaris/prockernel.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/prockernel.h>
+
+static const unsigned long _glibtop_sysdeps_proc_kernel = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_kernel_s (glibtop *server)
+{
+ server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
+ pid_t pid)
+{
+ memset (buf, 0, sizeof (glibtop_proc_kernel));
+}
diff --git a/sysdeps/solaris/proclist.c b/sysdeps/solaris/proclist.c
new file mode 100644
index 00000000..956ab0a0
--- /dev/null
+++ b/sysdeps/solaris/proclist.c
@@ -0,0 +1,251 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/proclist.h>
+#include <glibtop/xmalloc.h>
+
+#include <sys/stat.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <ctype.h>
+
+#define GLIBTOP_PROCLIST_FLAGS 3
+
+static const unsigned long _glibtop_sysdeps_proclist =
+(1L << GLIBTOP_PROCLIST_TOTAL) + (1L << GLIBTOP_PROCLIST_NUMBER) +
+(1L << GLIBTOP_PROCLIST_SIZE);
+
+/* Init function. */
+
+void
+glibtop_init_proclist_s (glibtop *server)
+{
+ server->sysdeps.proclist = _glibtop_sysdeps_proclist;
+}
+
+#define BLOCK_COUNT 256
+#define BLOCK_SIZE (BLOCK_COUNT * sizeof (unsigned))
+
+/* Fetch list of currently running processes.
+ *
+ * IMPORTANT NOTE:
+ * On error, this function MUST return NULL and set buf->flags to zero !
+ * On success, it returnes a pointer to a list of buf->number elements
+ * each buf->size big. The total size is stored in buf->total. */
+
+unsigned *
+glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
+ int64_t which, int64_t arg)
+{
+ DIR *proc;
+ struct dirent *entry;
+ char buffer [BUFSIZ];
+ unsigned count, total, pid, mask;
+ unsigned pids [BLOCK_COUNT], *pids_chain = NULL;
+ unsigned pids_size = 0, pids_offset = 0, new_size;
+ struct stat statb;
+ int len, i, ok;
+
+ memset (buf, 0, sizeof (glibtop_proclist));
+ mask = which & ~GLIBTOP_KERN_PROC_MASK;
+ which &= GLIBTOP_KERN_PROC_MASK;
+
+ /* Check if the user wanted only one process */
+
+ if(which == GLIBTOP_KERN_PROC_PID)
+ {
+ if(mask)
+ {
+#ifdef HAVE_PROCFS_H
+ struct psinfo psinfo;
+#else
+ struct prpsinfo psinfo;
+#endif
+ if(glibtop_get_proc_data_psinfo_s(server, &psinfo, pid))
+ return NULL;
+ if(mask & GLIBTOP_EXCLUDE_IDLE && !psinfo.pr_pctcpu)
+ return NULL;
+ if(mask & GLIBTOP_EXCLUDE_SYSTEM && psinfo.pr_flag & SSYS)
+ return NULL;
+ if(mask & GLIBTOP_EXCLUDE_NOTTY && psinfo.pr_ttydev == PRNODEV)
+ return NULL;
+ }
+ else
+ {
+ sprintf(buffer, "/proc/%d", arg);
+ if(s_stat(buffer, &statb) < 0)
+ return NULL;
+ }
+ if(!(pids_chain = glibtop_malloc(sizeof(unsigned))))
+ return NULL;
+ *pids_chain = pid;
+ return pids_chain;
+ }
+
+ 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? */
+#if 0
+ /* It does, except for "." and "..". Let's speed up */
+
+ for (i = 0; i < len; i++)
+ if (!isdigit (entry->d_name [i])) ok = 0;
+ if (!ok) continue;
+#else
+ if(entry->d_name[0] == '.')
+ continue;
+#endif
+
+ /* convert it in a number */
+#if 0
+ if (sscanf (entry->d_name, "%u", &pid) != 1) continue;
+#else
+ pid = (unsigned)atol(entry->d_name);
+#endif
+
+#ifdef HAVE_PROCFS_H
+
+ /* Can we skip it based on the request? We have
+ RUID and RGID in struct stat. But we can't do it
+ like this for LP64 process, because stat() will fail.
+ XXX Unimplemented for now */
+
+ if(!mask && which == GLIBTOP_KERN_PROC_RUID)
+ {
+ sprintf (buffer, "/proc/%d", pid);
+ if (s_stat (buffer, &statb)) continue;
+
+ if (!S_ISDIR (statb.st_mode)) continue;
+
+ if(statb.st_uid != arg) continue;
+ }
+
+ if(mask || which != GLIBTOP_KERN_PROC_ALL)
+ {
+ struct psinfo psinfo;
+
+ if(glibtop_get_proc_data_psinfo_s(server, &psinfo, pid))
+ continue;
+ if(mask)
+ {
+ if(mask & GLIBTOP_EXCLUDE_IDLE && !psinfo.pr_pctcpu)
+ continue;
+ if(mask & GLIBTOP_EXCLUDE_SYSTEM && psinfo.pr_flag & SSYS)
+ continue;
+ if(mask & GLIBTOP_EXCLUDE_NOTTY
+ && psinfo.pr_ttydev == PRNODEV)
+ continue;
+ }
+ switch(which)
+ {
+ case GLIBTOP_KERN_PROC_PGRP: if(psinfo.pr_pgid != arg)
+ continue;
+ break;
+ case GLIBTOP_KERN_PROC_SESSION: if(psinfo.pr_sid != arg)
+ continue;
+ break;
+ case GLIBTOP_KERN_PROC_TTY: if(psinfo.pr_ttydev != arg)
+ continue;
+ break;
+ case GLIBTOP_KERN_PROC_UID: if(psinfo.pr_euid != arg)
+ continue;
+ break;
+ case GLIBTOP_KERN_PROC_RUID: if(psinfo.pr_uid != arg)
+ continue;
+ break;
+ default: break;
+ }
+ }
+#endif
+ /* 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++;
+ }
+
+ s_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/solaris/procmap.c b/sysdeps/solaris/procmap.c
new file mode 100644
index 00000000..daa2ba00
--- /dev/null
+++ b/sysdeps/solaris/procmap.c
@@ -0,0 +1,207 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procmap.h>
+
+#include <errno.h>
+#include <alloca.h>
+
+#include "safeio.h"
+
+
+static const unsigned long _glibtop_sysdeps_proc_map =
+(1L << GLIBTOP_PROC_MAP_NUMBER) + (1L << GLIBTOP_PROC_MAP_TOTAL) +
+(1L << GLIBTOP_PROC_MAP_SIZE);
+static const unsigned long _glibtop_sysdeps_map_entry =
+(1L << GLIBTOP_MAP_ENTRY_START) + (1L << GLIBTOP_MAP_ENTRY_END) +
+(1L << GLIBTOP_MAP_ENTRY_OFFSET) + (1L << GLIBTOP_MAP_ENTRY_PERM);
+static const unsigned long _glibtop_sysdeps_map_device =
+(1L << GLIBTOP_MAP_ENTRY_DEVICE) + (1L << GLIBTOP_MAP_ENTRY_INODE);
+
+
+/* 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)
+{
+ int fd, i, nmaps, pr_err, heap;
+#if GLIBTOP_SOLARIS_RELEASE >= 560
+ prxmap_t *maps;
+ struct ps_prochandle *Pr;
+#else
+ prmap_t *maps;
+#endif
+
+ /* A few defines, to make it shorter down there */
+
+#ifdef HAVE_PROCFS_H
+# define OFFSET pr_offset
+#else
+# define OFFSET pr_off
+#endif
+
+ glibtop_map_entry *entry;
+ struct stat inode;
+ char buffer[BUFSIZ];
+
+ memset (buf, 0, sizeof (glibtop_proc_map));
+
+#ifdef HAVE_PROCFS_H
+ sprintf(buffer, "/proc/%d/xmap", (int)pid);
+#else
+ sprintf(buffer, "/proc/%d", (int)pid);
+#endif
+ if((fd = s_open(buffer, O_RDONLY)) < 0)
+ {
+ if(errno != EPERM && errno != EACCES)
+ glibtop_warn_io_r(server, "open (%s)", buffer);
+ return NULL;
+ }
+#ifdef HAVE_PROCFS_H
+ if(fstat(fd, &inode) < 0)
+ {
+ if(errno != EOVERFLOW)
+ glibtop_warn_io_r(server, "fstat (%s)", buffer);
+ /* else call daemon for 64-bit support */
+ s_close(fd);
+ return NULL;
+ }
+ maps = alloca(inode.st_size);
+ nmaps = inode.st_size / sizeof(prxmap_t);
+ if(s_pread(fd, maps, inode.st_size, 0) != inode.st_size)
+ {
+ glibtop_warn_io_r(server, "pread (%s)", buffer);
+ s_close(fd);
+ return NULL;
+ }
+#else
+ if(ioctl(fd, PIOCNMAP, &nmaps) < 0)
+ {
+ glibtop_warn_io_r(server, "ioctl(%s, PIOCNMAP)", buffer);
+ s_close(fd);
+ return NULL;
+ }
+ maps = alloca((nmaps + 1) * sizeof(prmap_t));
+ if(ioctl(fd, PIOCMAP, maps) < 0)
+ {
+ glibtop_warn_io_r(server, "ioctl(%s, PIOCMAP)", buffer);
+ s_close(fd);
+ return NULL;
+ }
+#endif
+ if(!(entry = glibtop_malloc_r(server,
+ nmaps * sizeof(glibtop_map_entry))))
+ return NULL;
+ buf->number = nmaps;
+ buf->size = sizeof(glibtop_map_entry);
+ buf->total = nmaps * sizeof(glibtop_map_entry);
+
+ memset(entry, 0, nmaps * sizeof(glibtop_map_entry));
+
+#if GLIBTOP_SOLARIS_RELEASE >= 560
+
+ if(server->machine.objname && server->machine.pgrab &&
+ server->machine.pfree)
+ Pr = (server->machine.pgrab)(pid, 1, &pr_err);
+#endif
+ for(heap = 0,i = 0; i < nmaps; ++i)
+ {
+ int len;
+
+ entry[i].start = maps[i].pr_vaddr;
+ entry[i].end = maps[i].pr_vaddr + maps[i].pr_size;
+
+#if GLIBTOP_SOLARIS_RELEASE >= 560
+
+ if(maps[i].pr_dev != PRNODEV)
+ {
+ entry[i].device = maps[i].pr_dev;
+ entry[i].inode = maps[i].pr_ino;
+ entry[i].flags |= _glibtop_sysdeps_map_device;
+ }
+#endif
+ entry[i].offset = maps[i].OFFSET;
+ if(maps[i].pr_mflags & MA_READ)
+ entry[i].perm |= GLIBTOP_MAP_PERM_READ;
+ if(maps[i].pr_mflags & MA_WRITE)
+ entry[i].perm |= GLIBTOP_MAP_PERM_WRITE;
+ if(maps[i].pr_mflags & MA_EXEC)
+ entry[i].perm |= GLIBTOP_MAP_PERM_EXECUTE;
+ if(maps[i].pr_mflags & MA_SHARED)
+ entry[i].perm |= GLIBTOP_MAP_PERM_SHARED;
+ else
+ entry[i].perm |= GLIBTOP_MAP_PERM_PRIVATE;
+ entry[i].flags = _glibtop_sysdeps_map_entry;
+
+#if GLIBTOP_SOLARIS_RELEASE >= 560
+
+ if(maps[i].pr_mflags & MA_ANON)
+ {
+ if(!heap)
+ {
+ ++heap;
+ strcpy(entry[i].filename, "[ heap ]");
+ }
+ else
+ if(i == nmaps - 1)
+ strcpy(entry[i].filename, "[ stack ]");
+ else
+ strcpy(entry[i].filename, "[ anon ]");
+ entry[i].flags |= (1L << GLIBTOP_MAP_ENTRY_FILENAME);
+ }
+ else
+ if(Pr)
+ {
+ server->machine.objname(Pr, maps[i].pr_vaddr, buffer,
+ BUFSIZ);
+ if((len = resolvepath(buffer, entry[i].filename,
+ GLIBTOP_MAP_FILENAME_LEN)) > 0)
+ {
+ entry[i].filename[len] = 0;
+ entry[i].flags |= (1L << GLIBTOP_MAP_ENTRY_FILENAME);
+ }
+ }
+#endif
+ }
+
+#if GLIBTOP_SOLARIS_RELEASE >= 560
+
+ if(Pr)
+ server->machine.pfree(Pr);
+#endif
+ buf->flags = _glibtop_sysdeps_proc_map;
+ s_close(fd);
+ return entry;
+}
diff --git a/sysdeps/solaris/procmem.c b/sysdeps/solaris/procmem.c
new file mode 100644
index 00000000..6452f0f7
--- /dev/null
+++ b/sysdeps/solaris/procmem.c
@@ -0,0 +1,64 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procmem.h>
+
+static const unsigned long _glibtop_sysdeps_proc_mem =
+(1L << GLIBTOP_PROC_MEM_SIZE) + (1L << GLIBTOP_PROC_MEM_VSIZE) +
+(1L << GLIBTOP_PROC_MEM_RESIDENT) + (1L << GLIBTOP_PROC_MEM_RSS);
+
+/* 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)
+{
+#ifdef HAVE_PROCFS_H
+ struct psinfo psinfo;
+#else
+ struct prpsinfo psinfo;
+ int pagesize = server->machine.pagesize;
+#endif
+
+ memset (buf, 0, sizeof (glibtop_proc_mem));
+
+ if(glibtop_get_proc_data_psinfo_s(server, &psinfo, pid))
+ return;
+
+#ifdef HAVE_PROCFS_H
+ buf->size = buf->vsize = psinfo.pr_size << 10;
+ buf->resident = buf->rss = psinfo.pr_rssize << 10;
+#else
+ buf->size = buf->vsize = psinfo.pr_size << pagesize << 10;
+ buf->resident = buf->rss = psinfo.pr_rssize << pagesize << 10;
+#endif
+ buf->flags = _glibtop_sysdeps_proc_mem;
+}
diff --git a/sysdeps/solaris/procsegment.c b/sysdeps/solaris/procsegment.c
new file mode 100644
index 00000000..b03709d4
--- /dev/null
+++ b/sysdeps/solaris/procsegment.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procsegment.h>
+
+static const unsigned long _glibtop_sysdeps_proc_segment = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_segment_s (glibtop *server)
+{
+ server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
+ pid_t pid)
+{
+ memset (buf, 0, sizeof (glibtop_proc_segment));
+}
diff --git a/sysdeps/solaris/procsignal.c b/sysdeps/solaris/procsignal.c
new file mode 100644
index 00000000..5b4d06a7
--- /dev/null
+++ b/sysdeps/solaris/procsignal.c
@@ -0,0 +1,74 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procsignal.h>
+
+#include <glibtop_private.h>
+
+static const unsigned long _glibtop_sysdeps_proc_signal =
+(1L << GLIBTOP_PROC_SIGNAL_SIGNAL) + (1L << GLIBTOP_PROC_SIGNAL_BLOCKED);
+
+/* 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)
+{
+#ifdef HAVE_PROCFS_H
+ struct pstatus pstatus;
+#else
+ struct prstatus pstatus;
+#endif
+ int size;
+
+ memset (buf, 0, sizeof (glibtop_proc_signal));
+
+ if(glibtop_get_proc_status_s(server, &pstatus, pid))
+ return;
+
+ if(sizeof(buf->signal) < sizeof(sigset_t))
+ size = sizeof(buf->signal);
+ else
+ size = sizeof(sigset_t);
+
+ memcpy(buf->signal, &pstatus.pr_sigpend, size);
+#ifdef HAVE_PROCFS_H
+ memcpy(buf->blocked, &pstatus.pr_lwp.pr_lwphold, size);
+#else
+ memcpy(buf->blocked, &pstatus.pr_lwppend, size);
+#endif
+
+ /* Technically, most of this is meaningless on a process level,
+ but this should be a good enough approximation. */
+
+ buf->flags = _glibtop_sysdeps_proc_signal;
+}
diff --git a/sysdeps/solaris/procstate.c b/sysdeps/solaris/procstate.c
new file mode 100644
index 00000000..89647d22
--- /dev/null
+++ b/sysdeps/solaris/procstate.c
@@ -0,0 +1,122 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procstate.h>
+
+#include <glibtop_private.h>
+
+static const unsigned long _glibtop_sysdeps_proc_state =
+#if (LIBGTOP_VERSION_CODE >= 1001002) && defined(HAVE_PROCFS_H)
+(1L << GLIBTOP_PROC_STATE_HAS_CPU) + (1L << GLIBTOP_PROC_STATE_PROCESSOR) +
+(1L << GLIBTOP_PROC_STATE_LAST_PROCESSOR) +
+#endif
+#if LIBGTOP_VERSION_CODE >= 1001002
+(1L << GLIBTOP_PROC_STATE_RUID) + (1L << GLIBTOP_PROC_STATE_RGID) +
+#endif
+(1L << GLIBTOP_PROC_STATE_CMD) + (1L << GLIBTOP_PROC_STATE_STATE) +
+(1L << GLIBTOP_PROC_STATE_UID) + (1L << 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. */
+
+void
+glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
+{
+#ifdef HAVE_PROCFS_H
+ struct psinfo psinfo;
+#else
+ struct prpsinfo psinfo;
+#endif
+
+ memset (buf, 0, sizeof (glibtop_proc_state));
+
+ if (glibtop_get_proc_data_psinfo_s (server, &psinfo, pid))
+ return;
+
+ buf->uid = psinfo.pr_euid;
+ buf->gid = psinfo.pr_egid;
+#if LIBGTOP_VERSION_CODE >= 1001002
+ buf->ruid = psinfo.pr_uid;
+ buf->rgid = psinfo.pr_gid;
+#endif
+#ifdef HAVE_PROCFS_H
+ switch(psinfo.pr_lwp.pr_state)
+#else
+ switch(psinfo.pr_state)
+#endif
+ {
+ case SONPROC:
+#if (LIBGTOP_VERSION_CODE >= 1001002) && defined(HAVE_PROCFS_H)
+ buf->has_cpu = 1;
+ buf->processor = psinfo.pr_lwp.pr_onpro;
+#endif
+ case SRUN:
+#if LIBGTOP_VERSION_CODE >= 1001002
+ buf->state = GLIBTOP_PROCESS_RUNNING;
+#else
+ buf->state = 'R';
+#endif
+ break;
+ case SZOMB:
+#if LIBGTOP_VERSION_CODE >= 1001002
+ buf->state = GLIBTOP_PROCESS_ZOMBIE;
+#else
+ buf->state = 'Z';
+#endif
+ break;
+ case SSLEEP:
+#if LIBGTOP_VERSION_CODE >= 1001002
+ buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
+#else
+ buf->state = 'S';
+#endif
+ break;
+ case SSTOP:
+#if LIBGTOP_VERSION_CODE >= 1001002
+ buf->state = GLIBTOP_PROCESS_STOPPED;
+#else
+ buf->state = 'T';
+#endif
+ break;
+ case SIDL:
+#if LIBGTOP_VERSION_CODE >= 1001002
+ buf->state = GLIBTOP_PROCESS_UNINTERRUPTIBLE;
+#else
+ buf->state = 'D';
+#endif
+ }
+#if (LIBGTOP_VERSION_CODE >= 1001002) && defined(HAVE_PROCFS_H)
+ buf->last_processor = psinfo.pr_lwp.pr_onpro;
+#endif
+ strncpy (buf->cmd, psinfo.pr_fname, 39);
+
+ buf->flags = _glibtop_sysdeps_proc_state;
+}
diff --git a/sysdeps/solaris/proctime.c b/sysdeps/solaris/proctime.c
new file mode 100644
index 00000000..6fef5169
--- /dev/null
+++ b/sysdeps/solaris/proctime.c
@@ -0,0 +1,69 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/proctime.h>
+
+#include <glibtop_private.h>
+
+static const unsigned long _glibtop_sysdeps_proc_time =
+(1L << GLIBTOP_PROC_TIME_START_TIME) + (1L << GLIBTOP_PROC_TIME_RTIME) +
+(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_STIME);
+
+/* Init function. */
+
+void
+glibtop_init_proc_time_s (glibtop *server)
+{
+ server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
+ pid_t pid)
+{
+ struct prusage prusage;
+
+ memset (buf, 0, sizeof (glibtop_proc_time));
+
+ /* Don't do it for scheduler, we don't want to frighten our users */
+
+ if(pid)
+ {
+ if (glibtop_get_proc_data_usage_s (server, &prusage, pid))
+ return;
+
+ buf->start_time = prusage.pr_create.tv_sec;
+
+ buf->rtime = prusage.pr_rtime.tv_sec * 1E+6 +
+ prusage.pr_rtime.tv_nsec / 1E+3;
+ buf->utime = prusage.pr_utime.tv_sec * 1E+6 +
+ prusage.pr_utime.tv_nsec / 1E+3;
+ buf->stime = prusage.pr_stime.tv_sec * 1E+6 +
+ prusage.pr_stime.tv_nsec / 1E+3;
+ }
+
+ buf->flags = _glibtop_sysdeps_proc_time;
+}
diff --git a/sysdeps/solaris/procuid.c b/sysdeps/solaris/procuid.c
new file mode 100644
index 00000000..f763757d
--- /dev/null
+++ b/sysdeps/solaris/procuid.c
@@ -0,0 +1,127 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procuid.h>
+
+#include <glibtop_private.h>
+
+static const unsigned long _glibtop_sysdeps_proc_uid_psinfo =
+(1L << GLIBTOP_PROC_UID_EUID) + (1L << GLIBTOP_PROC_UID_UID) +
+(1L << GLIBTOP_PROC_UID_EGID) + (1L << GLIBTOP_PROC_UID_GID) +
+(1L << GLIBTOP_PROC_UID_PID) + (1L << GLIBTOP_PROC_UID_PPID) +
+(1L << GLIBTOP_PROC_UID_PGRP) + (1L << GLIBTOP_PROC_UID_SESSION) +
+(1L << GLIBTOP_PROC_UID_TTY) + (1L << GLIBTOP_PROC_UID_PRIORITY) +
+(1L << GLIBTOP_PROC_UID_NICE);
+static const unsigned long _glibtop_sysdeps_proc_uid_prcred =
+#if LIBGTOP_VERSION_CODE >= 1001002
+#ifdef HAVE_PROCFS_H
+(1L << GLIBTOP_PROC_UID_GROUPS) +
+#endif
+(1L << GLIBTOP_PROC_UID_SUID) + (1L << GLIBTOP_PROC_UID_SGID) +
+(1L << GLIBTOP_PROC_UID_NGROUPS);
+#else
+0;
+#endif
+/* Init function. */
+
+void
+glibtop_init_proc_uid_s (glibtop *server)
+{
+ server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid_psinfo +
+ _glibtop_sysdeps_proc_uid_prcred;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid)
+{
+#if LIBGTOP_VERSION_CODE >= 1001002
+ struct prcred prcred;
+#endif
+#ifdef HAVE_PROCFS_H
+ struct psinfo psinfo;
+#if LIBGTOP_VERSION_CODE >= 1001002
+ gid_t groups[GLIBTOP_MAX_GROUPS];
+#endif
+#else
+ struct prpsinfo psinfo;
+ gid_t groups[1]; /* dummy for consistent function prototype */
+#endif
+
+ memset (buf, 0, sizeof (glibtop_proc_uid));
+
+ if (glibtop_get_proc_data_psinfo_s (server, &psinfo, pid))
+ return;
+
+ buf->euid = psinfo.pr_euid;
+ buf->uid = psinfo.pr_uid;
+ buf->egid = psinfo.pr_egid;
+ buf->gid = psinfo.pr_gid;
+
+ buf->pid = psinfo.pr_pid;
+ buf->ppid = psinfo.pr_ppid;
+#ifdef HAVE_PROCFS_H
+ buf->pgrp = psinfo.pr_pgid;
+#else
+ buf->pgrp = psinfo.pr_pgrp;
+#endif
+
+ buf->session = psinfo.pr_sid;
+ buf->tty = psinfo.pr_ttydev;
+
+#ifdef HAVE_PROCFS_H
+ buf->priority = psinfo.pr_lwp.pr_pri;
+ buf->nice = psinfo.pr_lwp.pr_nice - NZERO;
+#else
+ buf->priority = psinfo.pr_pri;
+ buf->nice = psinfo.pr_nice - NZERO;
+#endif
+
+ buf->flags = _glibtop_sysdeps_proc_uid_psinfo;
+
+#if LIBGTOP_VERSION_CODE >= 1001002
+ if(glibtop_get_proc_credentials_s(server, &prcred, groups, pid))
+ return;
+
+ buf->suid = prcred.pr_suid;
+ buf->sgid = prcred.pr_sgid;
+ buf->ngroups = (prcred.pr_ngroups <= GLIBTOP_MAX_GROUPS) ?
+ prcred.pr_ngroups : GLIBTOP_MAX_GROUPS;
+
+#ifdef HAVE_PROCFS_H
+ if(sizeof(int) == sizeof(gid_t))
+ memcpy(buf->groups, &groups, buf->ngroups * sizeof(gid_t));
+ else
+ {
+ int i;
+
+ for(i = 0; i < buf->ngroups; ++i)
+ buf->groups[i] = groups[i];
+ }
+#endif
+#endif
+
+ buf->flags += _glibtop_sysdeps_proc_uid_prcred;
+}
diff --git a/sysdeps/solaris/safeio.c b/sysdeps/solaris/safeio.c
new file mode 100644
index 00000000..ed9c784a
--- /dev/null
+++ b/sysdeps/solaris/safeio.c
@@ -0,0 +1,84 @@
+/* Copyright (C) 1999 Drazen Kacar
+ This file is part of LibGTop 1.0.
+
+ Contributed by Drazen Kacar <dave@srce.hr>, May 1999.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <errno.h>
+
+int
+s_open(const char *file, int mode)
+{
+ int fd;
+
+ do {
+ fd = open(file, mode);
+ } while(fd < 0 && errno == EINTR);
+ return fd;
+}
+
+int
+s_stat(const char *path, struct stat *buf)
+{
+ int status;
+
+ do {
+ status = stat(path, buf);
+ } while(status < 0 && errno == EINTR);
+ return status;
+}
+
+int
+s_close(int fd)
+{
+ int status;
+
+ do {
+ status = close(fd);
+ } while(status < 0 && errno == EINTR);
+ return status;
+}
+
+ssize_t
+s_pread(int fd, void *buf, size_t nbytes, off_t offset)
+{
+ ssize_t len;
+
+ /* Now, why doesn't the pread(2) man page say anything about pread()
+ return values? Can it read less bytes than requested? */
+
+ do {
+ len = pread(fd, buf, nbytes, offset);
+ } while(len < 0 && errno == EINTR);
+ return len;
+}
+
+int s_closedir(DIR *dirp)
+{
+ int status;
+
+ do {
+ status = closedir(dirp);
+ } while(status < 0 && errno == EINTR);
+ return status;
+}
diff --git a/sysdeps/solaris/safeio.h b/sysdeps/solaris/safeio.h
new file mode 100644
index 00000000..b6808e81
--- /dev/null
+++ b/sysdeps/solaris/safeio.h
@@ -0,0 +1,48 @@
+/* Copyright (C) 1999 Drazen Kacar
+ This file is part of LibGTop 1.0.
+
+ Contributed by Drazen Kacar <dave@srce.hr>, May 1999.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SAFEIO_H__
+#define __GLIBTOP_SAFEIO_H__
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+
+BEGIN_LIBGTOP_DECLS
+
+int
+s_open(const char *, int);
+
+int
+s_stat(const char *, struct stat *);
+
+int
+s_close(int);
+
+ssize_t
+s_pread(int, void *, size_t, off_t);
+
+int
+s_closedir(DIR *);
+
+END_LIBGTOP_DECLS
+
+#endif
diff --git a/sysdeps/solaris/sem_limits.c b/sysdeps/solaris/sem_limits.c
new file mode 100644
index 00000000..e7e97436
--- /dev/null
+++ b/sysdeps/solaris/sem_limits.c
@@ -0,0 +1,85 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/sem_limits.h>
+
+#include <kvm.h>
+#include <sys/sem.h>
+
+static struct nlist nlst[] = { {"seminfo"}, {NULL} };
+static const unsigned long _glibtop_sysdeps_sem_limits =
+#if GLIBTOP_SOLARIS_RELEASE <= 570
+(1L << GLIBTOP_IPC_SEMMAP) +
+#endif
+(1L << GLIBTOP_IPC_SEMMNI) + (1L << GLIBTOP_IPC_SEMMNS) +
+(1L << GLIBTOP_IPC_SEMMNU) + (1L << GLIBTOP_IPC_SEMMSL) +
+(1L << GLIBTOP_IPC_SEMOPM) + (1L << GLIBTOP_IPC_SEMUME) +
+(1L << GLIBTOP_IPC_SEMUSZ) + (1L << GLIBTOP_IPC_SEMVMX) +
+(1L << GLIBTOP_IPC_SEMAEM);
+
+/* Init function. */
+
+void
+glibtop_init_sem_limits_p (glibtop *server)
+{
+ kvm_t *kd = server->machine.kd;
+
+ if(kd && !kvm_nlist(kd, nlst))
+ server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
+ else
+ server->sysdeps.sem_limits = 0;
+}
+
+/* Provides information about sysv sem limits. */
+
+void
+glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
+{
+ kvm_t *kd = server->machine.kd;
+ struct seminfo sinfo;
+
+ memset (buf, 0, sizeof (glibtop_sem_limits));
+
+ if(!(server->sysdeps.sem_limits))
+ return;
+ if(kvm_read(kd, nlst[0].n_value, (void *)&sinfo,
+ sizeof(struct seminfo)) != sizeof(struct seminfo))
+ return;
+
+#if GLIBTOP_SOLARIS_RELEASE <= 570
+ /* This field don't exist anymore in Solaris 8.
+ * Thanks to Laszlo PETER <Laszlo.Peter@ireland.sun.com>. */
+ buf->semmap = sinfo.semmap;
+#endif
+ buf->semmni = sinfo.semmni;
+ buf->semmns = sinfo.semmns;
+ buf->semmnu = sinfo.semmnu;
+ buf->semmsl = sinfo.semmsl;
+ buf->semopm = sinfo.semopm;
+ buf->semume = sinfo.semume;
+ buf->semusz = sinfo.semusz;
+ buf->semvmx = sinfo.semvmx;
+ buf->semaem = sinfo.semaem;
+ buf->flags = _glibtop_sysdeps_sem_limits;
+}
diff --git a/sysdeps/solaris/shm_limits.c b/sysdeps/solaris/shm_limits.c
new file mode 100644
index 00000000..24854b33
--- /dev/null
+++ b/sysdeps/solaris/shm_limits.c
@@ -0,0 +1,68 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/shm_limits.h>
+
+#include <kvm.h>
+#include <sys/shm.h>
+
+static struct nlist nlst[] = { {"shminfo"}, {NULL} };
+static const unsigned long _glibtop_sysdeps_shm_limits =
+(1L << GLIBTOP_IPC_SHMMAX) + (1L << GLIBTOP_IPC_SHMMIN) +
+(1L << GLIBTOP_IPC_SHMMNI) + (1L << GLIBTOP_IPC_SHMSEG);
+
+/* Init function. */
+
+void
+glibtop_init_shm_limits_p (glibtop *server)
+{
+ kvm_t *kd = server->machine.kd;
+
+ if(kd && !kvm_nlist(kd, nlst))
+ server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
+ else
+ server->sysdeps.shm_limits = 0;
+}
+
+/* Provides information about sysv ipc limits. */
+
+void
+glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
+{
+ kvm_t *kd = server->machine.kd;
+ struct shminfo sinfo;
+
+ memset (buf, 0, sizeof (glibtop_shm_limits));
+
+ if(!(server->sysdeps.shm_limits))
+ return;
+ if(kvm_read(kd, nlst[0].n_value, (void *)&sinfo,
+ sizeof(struct shminfo)) != sizeof(struct shminfo))
+ return;
+ buf->shmmax = sinfo.shmmax;
+ buf->shmmin = sinfo.shmmin;
+ buf->shmmni = sinfo.shmmni;
+ buf->shmseg = sinfo.shmseg;
+ buf->flags = _glibtop_sysdeps_shm_limits;
+}
diff --git a/sysdeps/solaris/siglist.c b/sysdeps/solaris/siglist.c
new file mode 100644
index 00000000..292bb73e
--- /dev/null
+++ b/sysdeps/solaris/siglist.c
@@ -0,0 +1,74 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 1, "SIGHUP", "Hangup" },
+ { 2, "SIGINT", "Interrupt" },
+ { 3, "SIGQUIT", "Quit" },
+ { 4, "SIGILL", "Illegal Instruction" },
+ { 5, "SIGTRAP", "Trace/Breakpoint Trap" },
+ { 6, "SIGABRT", "Abort" },
+ { 7, "SIGEMT", "Emulation Trap" },
+ { 8, "SIGFPE", "Arithmetic Exception" },
+ { 9, "SIGKILL", "Killed" },
+ { 10, "SIGBUS", "Bus Error" },
+ { 11, "SIGSEGV", "Segmentation Fault" },
+ { 12, "SIGSYS", "Bad System Call" },
+ { 13, "SIGPIPE", "Broken Pipe" },
+ { 14, "SIGALRM", "Alarm Clock" },
+ { 15, "SIGTERM", "Terminated" },
+ { 16, "SIGUSR1", "User Signal 1" },
+ { 17, "SIGUSR2", "User Signal 2" },
+ { 18, "SIGCHLD", "Child Status Changed" },
+ { 19, "SIGPWR", "Power-Fail/Restart" },
+ { 20, "SIGWINCH","Window Size Change" },
+ { 21, "SIGURG", "Urgent Socket Condition" },
+ { 22, "SIGPOLL", "Pollable Event" },
+ { 23, "SIGSTOP", "Stoped (signal)" },
+ { 24, "SIGTSTP", "Stopped (user)" },
+ { 25, "SIGCONT", "Continued" },
+ { 26, "SIGTTIN", "Stopped (tty input)" },
+ { 27, "SIGTTOU", "Stopped (tty output)" },
+ { 28, "SIGVTALRM","Virtual Timer Expired" },
+ { 29, "SIGPROF", "Profiling Timer Expired" },
+ { 30, "SIGXCPU", "Cpu Limit Exceeded" },
+ { 31, "SIGXFSZ", "File Size Limit Exceeded" },
+ { 32, "SIGWAITING","No runnable lwp" },
+ { 33, "SIGLWP", "Inter-lwp signal" },
+ { 34, "SIGFREEZE","Checkpoint Freeze" },
+ { 35, "SIGTHAW", "Checkpoint Thaw" },
+ { 36, "SIGCANCEL","Thread Cancelation" },
+ { 37, "SIGLOST", "Resource Lost" },
+ { 38, "SIGRTMIN","First Realtime Signal" },
+ { 39, "SIGRTMIN+1", "Second Realtime Signal" },
+ { 40, "SIGRTMIN+2", "Third Realtime Signal" },
+ { 41, "SIGRTMIN+3", "Fourth Realtime Signal" },
+ { 42, "SIGRTMAX-3", "Fourth Last Realtime Signal" },
+ { 43, "SIGRTMAX-2", "Third Last Realtime Signal" },
+ { 44, "SIGRTMAX-1", "Second Last Realtime Signal" },
+ { 45, "SIGRTMAX", "Last Realtime Signal" },
+ { 0, NULL, NULL }
+};
diff --git a/sysdeps/solaris/swap.c b/sysdeps/solaris/swap.c
new file mode 100644
index 00000000..b2e4721d
--- /dev/null
+++ b/sysdeps/solaris/swap.c
@@ -0,0 +1,89 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/swap.h>
+
+#include <assert.h>
+#include <sys/sysinfo.h>
+
+#include <glibtop_private.h>
+
+static const unsigned long _glibtop_sysdeps_swap =
+(1L << GLIBTOP_SWAP_TOTAL) + (1L << GLIBTOP_SWAP_USED) +
+(1L << 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)
+{
+ kstat_ctl_t *kc = server->machine.kc;
+ kstat_t *ksp = server->machine.vminfo_kstat;
+ u_int64_t swap_resv, swap_alloc, swap_avail, swap_free;
+ vminfo_t vminfo;
+ double rate;
+ kid_t ret;
+
+ memset (buf, 0, sizeof (glibtop_swap));
+
+ if (!ksp) return;
+
+ switch(kstat_chain_update(kc))
+ {
+ case -1: assert(0); /* Debugging, shouldn't happen */
+ case 0: break;
+ default: glibtop_get_kstats(server);
+ }
+ ret = kstat_read (kc, ksp, &vminfo);
+
+ if (ret == -1) {
+ glibtop_warn_io_r (server, "kstat_read (vminfo)");
+ return;
+ }
+
+ rate = (ksp->ks_snaptime - server->machine.vminfo_snaptime) / 1E+9;
+
+ swap_resv = (vminfo.swap_resv - server->machine.vminfo.swap_resv) / rate;
+ swap_alloc = (vminfo.swap_alloc - server->machine.vminfo.swap_alloc) / rate;
+ swap_avail = (vminfo.swap_avail - server->machine.vminfo.swap_avail) / rate;
+ swap_free = (vminfo.swap_free - server->machine.vminfo.swap_free) / rate;
+
+ memcpy (&server->machine.vminfo, &vminfo, sizeof (vminfo_t));
+ server->machine.vminfo_snaptime = ksp->ks_snaptime;
+
+ buf->total = swap_resv + swap_avail;
+ buf->used = swap_alloc;
+ buf->free = buf->total - buf->used;
+
+ buf->flags = _glibtop_sysdeps_swap;
+}
diff --git a/sysdeps/solaris/uptime.c b/sysdeps/solaris/uptime.c
new file mode 100644
index 00000000..7ea2d0bf
--- /dev/null
+++ b/sysdeps/solaris/uptime.c
@@ -0,0 +1,58 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/uptime.h>
+
+#include <time.h>
+
+static const unsigned long _glibtop_sysdeps_uptime =
+#if LIBGTOP_VERSION_CODE >= 1001002
+(1L <<GLIBTOP_UPTIME_BOOT_TIME) +
+#endif
+(1L << 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)
+{
+ memset (buf, 0, sizeof (glibtop_uptime));
+
+ if(!(server->machine.boot))
+ return;
+#if LIBGTOP_VERSION_CODE >= 1001002
+ buf->boot_time = server->machine.boot;
+#endif
+ buf->uptime = time(NULL) - server->machine.boot;
+
+ buf->flags = _glibtop_sysdeps_uptime;
+}
diff --git a/sysdeps/stub/.cvsignore b/sysdeps/stub/.cvsignore
new file mode 100644
index 00000000..e71d5287
--- /dev/null
+++ b/sysdeps/stub/.cvsignore
@@ -0,0 +1,27 @@
+.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
new file mode 100644
index 00000000..0cb0e05c
--- /dev/null
+++ b/sysdeps/stub/ChangeLog
@@ -0,0 +1,22 @@
+2001-10-17 Abel Cheung <maddog@linux.org.hk>
+
+ * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * netload.c: New file.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * procargs.c: New file.
+
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file.
+
+1998-08-24 Martin Baulig <martin@home-of-linux.org>
+
+ * *.c: Added initialization functions `glibtop_init_<feature>_s'.
+
+ * ChangeLog: New file.
+
diff --git a/sysdeps/stub/Makefile.am b/sysdeps/stub/Makefile.am
new file mode 100644
index 00000000..8e18f2cb
--- /dev/null
+++ b/sysdeps/stub/Makefile.am
@@ -0,0 +1,17 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la
+
+libgtop_sysdeps_2_0_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_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtopinclude_HEADERS = glibtop_server.h
+libgtopincludedir = $(includedir)/libgtop-2.0
diff --git a/sysdeps/stub/close.c b/sysdeps/stub/close.c
new file mode 100644
index 00000000..4262d2f0
--- /dev/null
+++ b/sysdeps/stub/close.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/stub/cpu.c b/sysdeps/stub/cpu.c
new file mode 100644
index 00000000..3ddfdfb8
--- /dev/null
+++ b/sysdeps/stub/cpu.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/cpu.h>
+
+static const unsigned long _glibtop_sysdeps_cpu = 0;
+
+/* Init function. */
+
+void
+glibtop_init_cpu_s (glibtop *server)
+{
+ server->sysdeps.cpu = _glibtop_sysdeps_cpu;
+}
+
+/* Provides information about cpu usage. */
+
+void
+glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
+{
+ memset (buf, 0, sizeof (glibtop_cpu));
+}
diff --git a/sysdeps/stub/glibtop_server.h b/sysdeps/stub/glibtop_server.h
new file mode 100644
index 00000000..b3822d47
--- /dev/null
+++ b/sysdeps/stub/glibtop_server.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#define GLIBTOP_SUID_CPU 0
+#define GLIBTOP_SUID_MEM 0
+#define GLIBTOP_SUID_SWAP 0
+#define GLIBTOP_SUID_UPTIME 0
+#define GLIBTOP_SUID_LOADAVG 0
+#define GLIBTOP_SUID_SHM_LIMITS 0
+#define GLIBTOP_SUID_MSG_LIMITS 0
+#define GLIBTOP_SUID_SEM_LIMITS 0
+#define GLIBTOP_SUID_PROCLIST 0
+#define GLIBTOP_SUID_PROC_STATE 0
+#define GLIBTOP_SUID_PROC_UID 0
+#define GLIBTOP_SUID_PROC_MEM 0
+#define GLIBTOP_SUID_PROC_TIME 0
+#define GLIBTOP_SUID_PROC_SIGNAL 0
+#define GLIBTOP_SUID_PROC_KERNEL 0
+#define GLIBTOP_SUID_PROC_SEGMENT 0
+#define GLIBTOP_SUID_PROC_ARGS 0
+#define GLIBTOP_SUID_PROC_MAP 0
+#define GLIBTOP_SUID_NETLOAD 0
+#define GLIBTOP_SUID_PPP 0
+
+END_LIBGTOP_DECLS
+
+#endif
diff --git a/sysdeps/stub/loadavg.c b/sysdeps/stub/loadavg.c
new file mode 100644
index 00000000..9bf900f5
--- /dev/null
+++ b/sysdeps/stub/loadavg.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/loadavg.h>
+
+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
new file mode 100644
index 00000000..8a2c31a5
--- /dev/null
+++ b/sysdeps/stub/mem.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/mem.h>
+
+static const unsigned long _glibtop_sysdeps_mem = 0;
+
+/* Init function. */
+
+void
+glibtop_init_mem_s (glibtop *server)
+{
+ server->sysdeps.mem = _glibtop_sysdeps_mem;
+}
+
+/* Provides information about memory usage. */
+
+void
+glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
+{
+ memset (buf, 0, sizeof (glibtop_mem));
+}
diff --git a/sysdeps/stub/msg_limits.c b/sysdeps/stub/msg_limits.c
new file mode 100644
index 00000000..adee0dae
--- /dev/null
+++ b/sysdeps/stub/msg_limits.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/msg_limits.h>
+
+static const unsigned long _glibtop_sysdeps_msg_limits = 0;
+
+/* Init function. */
+
+void
+glibtop_init_msg_limits_s (glibtop *server)
+{
+ server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
+}
+
+/* Provides information about sysv ipc limits. */
+
+void
+glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
+{
+ memset (buf, 0, sizeof (glibtop_msg_limits));
+}
diff --git a/sysdeps/stub/netload.c b/sysdeps/stub/netload.c
new file mode 100644
index 00000000..beebedba
--- /dev/null
+++ b/sysdeps/stub/netload.c
@@ -0,0 +1,45 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/netload.h>
+
+static const unsigned long _glibtop_sysdeps_netload = 0;
+
+/* Init function. */
+
+void
+glibtop_init_netload_s (glibtop *server)
+{
+ server->sysdeps.netload = _glibtop_sysdeps_netload;
+}
+
+/* Provides network statistics. */
+
+void
+glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
+ const char *interface)
+{
+ memset (buf, 0, sizeof (glibtop_netload));
+}
diff --git a/sysdeps/stub/open.c b/sysdeps/stub/open.c
new file mode 100644
index 00000000..eef22d71
--- /dev/null
+++ b/sysdeps/stub/open.c
@@ -0,0 +1,33 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/open.h>
+
+/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
+
+void
+glibtop_open_s (glibtop *server, const char *program_name,
+ const unsigned long features, const unsigned flags)
+{
+ server->name = program_name;
+}
diff --git a/sysdeps/stub/ppp.c b/sysdeps/stub/ppp.c
new file mode 100644
index 00000000..6d0905d5
--- /dev/null
+++ b/sysdeps/stub/ppp.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/stub/procargs.c b/sysdeps/stub/procargs.c
new file mode 100644
index 00000000..7d010d5e
--- /dev/null
+++ b/sysdeps/stub/procargs.c
@@ -0,0 +1,47 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procargs.h>
+
+static const unsigned long _glibtop_sysdeps_proc_args = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_args_s (glibtop *server)
+{
+ server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
+}
+
+/* Provides detailed information about a process. */
+
+char *
+glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
+ pid_t pid, unsigned max_len)
+{
+ memset (buf, 0, sizeof (glibtop_proc_args));
+ return NULL;
+}
diff --git a/sysdeps/stub/prockernel.c b/sysdeps/stub/prockernel.c
new file mode 100644
index 00000000..d06f6cab
--- /dev/null
+++ b/sysdeps/stub/prockernel.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/prockernel.h>
+
+static const unsigned long _glibtop_sysdeps_proc_kernel = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_kernel_s (glibtop *server)
+{
+ server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
+ pid_t pid)
+{
+ memset (buf, 0, sizeof (glibtop_proc_kernel));
+}
diff --git a/sysdeps/stub/proclist.c b/sysdeps/stub/proclist.c
new file mode 100644
index 00000000..7794cdba
--- /dev/null
+++ b/sysdeps/stub/proclist.c
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/proclist.h>
+
+#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
new file mode 100644
index 00000000..5a6c479a
--- /dev/null
+++ b/sysdeps/stub/procmap.c
@@ -0,0 +1,50 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procmap.h>
+
+static const unsigned long _glibtop_sysdeps_proc_map = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_map_s (glibtop *server)
+{
+ server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
+}
+
+/* Provides detailed information about a process. */
+
+glibtop_map_entry *
+glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
+{
+ glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_map));
+
+ return NULL;
+}
diff --git a/sysdeps/stub/procmem.c b/sysdeps/stub/procmem.c
new file mode 100644
index 00000000..ab0c4170
--- /dev/null
+++ b/sysdeps/stub/procmem.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procmem.h>
+
+static const unsigned long _glibtop_sysdeps_proc_mem = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_mem_s (glibtop *server)
+{
+ server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
+ pid_t pid)
+{
+ memset (buf, 0, sizeof (glibtop_proc_mem));
+}
diff --git a/sysdeps/stub/procsegment.c b/sysdeps/stub/procsegment.c
new file mode 100644
index 00000000..b03709d4
--- /dev/null
+++ b/sysdeps/stub/procsegment.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procsegment.h>
+
+static const unsigned long _glibtop_sysdeps_proc_segment = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_segment_s (glibtop *server)
+{
+ server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
+ pid_t pid)
+{
+ memset (buf, 0, sizeof (glibtop_proc_segment));
+}
diff --git a/sysdeps/stub/procsignal.c b/sysdeps/stub/procsignal.c
new file mode 100644
index 00000000..540960f5
--- /dev/null
+++ b/sysdeps/stub/procsignal.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procsignal.h>
+
+static const unsigned long _glibtop_sysdeps_proc_signal = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_signal_s (glibtop *server)
+{
+ server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
+ pid_t pid)
+{
+ memset (buf, 0, sizeof (glibtop_proc_signal));
+}
diff --git a/sysdeps/stub/procstate.c b/sysdeps/stub/procstate.c
new file mode 100644
index 00000000..227f52ee
--- /dev/null
+++ b/sysdeps/stub/procstate.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procstate.h>
+
+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
new file mode 100644
index 00000000..4c060235
--- /dev/null
+++ b/sysdeps/stub/proctime.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/proctime.h>
+
+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
new file mode 100644
index 00000000..f9f68311
--- /dev/null
+++ b/sysdeps/stub/procuid.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procuid.h>
+
+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
new file mode 100644
index 00000000..474ce8c7
--- /dev/null
+++ b/sysdeps/stub/sem_limits.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/sem_limits.h>
+
+static const unsigned long _glibtop_sysdeps_sem_limits = 0;
+
+/* Init function. */
+
+void
+glibtop_init_sem_limits_s (glibtop *server)
+{
+ server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
+}
+
+/* Provides information about sysv sem limits. */
+
+void
+glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
+{
+ memset (buf, 0, sizeof (glibtop_sem_limits));
+}
diff --git a/sysdeps/stub/shm_limits.c b/sysdeps/stub/shm_limits.c
new file mode 100644
index 00000000..8a024b4a
--- /dev/null
+++ b/sysdeps/stub/shm_limits.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/shm_limits.h>
+
+static const unsigned long _glibtop_sysdeps_shm_limits = 0;
+
+/* Init function. */
+
+void
+glibtop_init_shm_limits_s (glibtop *server)
+{
+ server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
+}
+
+/* Provides information about sysv ipc limits. */
+
+void
+glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
+{
+ memset (buf, 0, sizeof (glibtop_shm_limits));
+}
diff --git a/sysdeps/stub/siglist.c b/sysdeps/stub/siglist.c
new file mode 100644
index 00000000..94abfdc6
--- /dev/null
+++ b/sysdeps/stub/siglist.c
@@ -0,0 +1,28 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 0, NULL, NULL } };
diff --git a/sysdeps/stub/swap.c b/sysdeps/stub/swap.c
new file mode 100644
index 00000000..4731b8e3
--- /dev/null
+++ b/sysdeps/stub/swap.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/swap.h>
+
+static const unsigned long _glibtop_sysdeps_swap = 0;
+
+/* Init function. */
+
+void
+glibtop_init_swap_s (glibtop *server)
+{
+ server->sysdeps.swap = _glibtop_sysdeps_swap;
+}
+
+/* Provides information about swap usage. */
+
+void
+glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
+{
+ memset (buf, 0, sizeof (glibtop_swap));
+}
diff --git a/sysdeps/stub/uptime.c b/sysdeps/stub/uptime.c
new file mode 100644
index 00000000..a6189448
--- /dev/null
+++ b/sysdeps/stub/uptime.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/uptime.h>
+
+static const unsigned long _glibtop_sysdeps_uptime = 0;
+
+/* Init function. */
+
+void
+glibtop_init_uptime_s (glibtop *server)
+{
+ server->sysdeps.uptime = _glibtop_sysdeps_uptime;
+}
+
+/* Provides uptime and idle time. */
+
+void
+glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
+{
+ memset (buf, 0, sizeof (glibtop_uptime));
+}
diff --git a/sysdeps/stub_suid/.cvsignore b/sysdeps/stub_suid/.cvsignore
new file mode 100644
index 00000000..d15c76bc
--- /dev/null
+++ b/sysdeps/stub_suid/.cvsignore
@@ -0,0 +1,28 @@
+.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
new file mode 100644
index 00000000..4d7d7bec
--- /dev/null
+++ b/sysdeps/stub_suid/ChangeLog
@@ -0,0 +1,18 @@
+2001-10-17 Abel Cheung <maddog@linux.org.hk>
+
+ * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * netload.c: New file.
+
+1998-10-26 Martin Baulig <martin@home-of-linux.org>
+
+ * procargs.c: New file.
+ * procmap.c: New file.
+
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ChangeLog: New file.
+ * ppp.c: New file.
+
diff --git a/sysdeps/stub_suid/Makefile.am b/sysdeps/stub_suid/Makefile.am
new file mode 100644
index 00000000..3842ad14
--- /dev/null
+++ b/sysdeps/stub_suid/Makefile.am
@@ -0,0 +1,23 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
+
+libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c
+
+libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtop_sysdeps_suid_2_0_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_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
+libgtopincludedir = $(includedir)/libgtop-2.0
+
+noinst_HEADERS = glibtop_suid.h
diff --git a/sysdeps/stub_suid/close.c b/sysdeps/stub_suid/close.c
new file mode 100644
index 00000000..4262d2f0
--- /dev/null
+++ b/sysdeps/stub_suid/close.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/stub_suid/cpu.c b/sysdeps/stub_suid/cpu.c
new file mode 100644
index 00000000..7f05c827
--- /dev/null
+++ b/sysdeps/stub_suid/cpu.c
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/cpu.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..835f177f
--- /dev/null
+++ b/sysdeps/stub_suid/glibtop_machine.h
@@ -0,0 +1,39 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_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
new file mode 100644
index 00000000..ccf3d29d
--- /dev/null
+++ b/sysdeps/stub_suid/glibtop_server.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#define GLIBTOP_SUID_CPU (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
new file mode 100644
index 00000000..b88421ff
--- /dev/null
+++ b/sysdeps/stub_suid/glibtop_suid.h
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_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
new file mode 100644
index 00000000..0f643bd0
--- /dev/null
+++ b/sysdeps/stub_suid/init.c
@@ -0,0 +1,45 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+
+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
new file mode 100644
index 00000000..6118d614
--- /dev/null
+++ b/sysdeps/stub_suid/loadavg.c
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/loadavg.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..85c4fc5d
--- /dev/null
+++ b/sysdeps/stub_suid/mem.c
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/mem.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..7a2b8f93
--- /dev/null
+++ b/sysdeps/stub_suid/msg_limits.c
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/msg_limits.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..bb1226ed
--- /dev/null
+++ b/sysdeps/stub_suid/netload.c
@@ -0,0 +1,45 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/netload.h>
+
+static const unsigned long _glibtop_sysdeps_netload = 0;
+
+/* Init function. */
+
+void
+glibtop_init_netload_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
new file mode 100644
index 00000000..9f6ce9cb
--- /dev/null
+++ b/sysdeps/stub_suid/nosuid.c
@@ -0,0 +1,34 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+
+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
new file mode 100644
index 00000000..3357ad25
--- /dev/null
+++ b/sysdeps/stub_suid/open.c
@@ -0,0 +1,77 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/xmalloc.h>
+
+/* !!! 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
new file mode 100644
index 00000000..67d01fcf
--- /dev/null
+++ b/sysdeps/stub_suid/ppp.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_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
new file mode 100644
index 00000000..67c183e8
--- /dev/null
+++ b/sysdeps/stub_suid/procargs.c
@@ -0,0 +1,47 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procargs.h>
+
+static const unsigned long _glibtop_sysdeps_proc_args = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_args_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
new file mode 100644
index 00000000..1f24d61a
--- /dev/null
+++ b/sysdeps/stub_suid/procdata.c
@@ -0,0 +1,180 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/procdata.h>
+
+#include <sys/stat.h>
+
+#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 "<rest>" */
+ 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
new file mode 100644
index 00000000..e7d961a1
--- /dev/null
+++ b/sysdeps/stub_suid/prockernel.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/prockernel.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..908dadb9
--- /dev/null
+++ b/sysdeps/stub_suid/proclist.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/proclist.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..0b9bd6e0
--- /dev/null
+++ b/sysdeps/stub_suid/procmap.c
@@ -0,0 +1,46 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/procmap.h>
+
+static const unsigned long _glibtop_sysdeps_proc_map = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_map_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
new file mode 100644
index 00000000..6084aa66
--- /dev/null
+++ b/sysdeps/stub_suid/procmem.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procmem.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..38499f83
--- /dev/null
+++ b/sysdeps/stub_suid/procsegment.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procsegment.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_proc_segment = 0;
+
+/* Init function. */
+
+void
+glibtop_init_proc_segment_p (glibtop *server)
+{
+ server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf,
+ pid_t pid)
+{
+ glibtop_init_p (server, 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
new file mode 100644
index 00000000..9a89e8ab
--- /dev/null
+++ b/sysdeps/stub_suid/procsignal.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procsignal.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..576889c1
--- /dev/null
+++ b/sysdeps/stub_suid/procstate.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procstate.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..bc6c6c09
--- /dev/null
+++ b/sysdeps/stub_suid/proctime.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/proctime.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..e487375e
--- /dev/null
+++ b/sysdeps/stub_suid/procuid.c
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/procuid.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..b1aa85cd
--- /dev/null
+++ b/sysdeps/stub_suid/sem_limits.c
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/sem_limits.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..9aa3574c
--- /dev/null
+++ b/sysdeps/stub_suid/shm_limits.c
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/shm_limits.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..94abfdc6
--- /dev/null
+++ b/sysdeps/stub_suid/siglist.c
@@ -0,0 +1,28 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 0, NULL, NULL } };
diff --git a/sysdeps/stub_suid/swap.c b/sysdeps/stub_suid/swap.c
new file mode 100644
index 00000000..2c97ebc6
--- /dev/null
+++ b/sysdeps/stub_suid/swap.c
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/swap.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..76a1d5b6
--- /dev/null
+++ b/sysdeps/stub_suid/uptime.c
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/uptime.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..dd420e7f
--- /dev/null
+++ b/sysdeps/sun4/.cvsignore
@@ -0,0 +1,17 @@
+.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
new file mode 100644
index 00000000..f05eac85
--- /dev/null
+++ b/sysdeps/sun4/ChangeLog
@@ -0,0 +1,17 @@
+2001-10-17 Abel Cheung <maddog@linux.org.hk>
+
+ * Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
+
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file.
+
+1998-08-25 Martin Baulig <martin@home-of-linux.org>
+
+ * *.c (glibtop_init_p): Using correct `(1 << GLIBTOP_SYSDPES_*)'.
+ (<glibtop_suid.h>): Include.
+
+ * glibtop_suid.h: New file.
+
+ * ChangeLog: New file.
+
diff --git a/sysdeps/sun4/Makefile.am b/sysdeps/sun4/Makefile.am
new file mode 100644
index 00000000..87ac8c74
--- /dev/null
+++ b/sysdeps/sun4/Makefile.am
@@ -0,0 +1,22 @@
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+
+INCLUDES = @INCLUDES@
+
+lib_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
+
+libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c
+libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+libgtop_sysdeps_2_0_la_LIBADD = -lkvm
+
+libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
+ uptime.c loadavg.c shm_limits.c msg_limits.c \
+ sem_limits.c proclist.c procstate.c procuid.c \
+ proctime.c procmem.c procsignal.c prockernel.c \
+ procsegment.c ppp.c
+libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+libgtop_sysdeps_suid_2_0_la_LIBADD = -lkvm
+
+libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
+libgtopincludedir = $(includedir)/libgtop-2.0
+
+noinst_HEADERS = glibtop_suid.h
diff --git a/sysdeps/sun4/close.c b/sysdeps/sun4/close.c
new file mode 100644
index 00000000..a8733f0f
--- /dev/null
+++ b/sysdeps/sun4/close.c
@@ -0,0 +1,30 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop/close.h>
+
+/* Closes pipe to gtop server. */
+
+void
+glibtop_close_p (glibtop *server)
+{ }
diff --git a/sysdeps/sun4/cpu.c b/sysdeps/sun4/cpu.c
new file mode 100644
index 00000000..9c27e538
--- /dev/null
+++ b/sysdeps/sun4/cpu.c
@@ -0,0 +1,107 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/cpu.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_cpu =
+(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) +
+(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) +
+(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY);
+
+/* 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
new file mode 100644
index 00000000..8ab56840
--- /dev/null
+++ b/sysdeps/sun4/glibtop_machine.h
@@ -0,0 +1,117 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_MACHINE_H__
+#define __GLIBTOP_MACHINE_H__
+
+/* make sure param.h gets loaded with KERNEL defined to get PZERO & NZERO */
+#define KERNEL
+#include <sys/param.h>
+#undef KERNEL
+
+#include <stdio.h>
+#include <kvm.h>
+#include <nlist.h>
+#include <math.h>
+#include <sys/dir.h>
+#include <sys/user.h>
+#include <sys/proc.h>
+#include <sys/dk.h>
+#include <sys/vm.h>
+#include <sys/file.h>
+#include <sys/time.h>
+#include <vm/page.h>
+
+#ifdef solbourne
+#include <sys/syscall.h>
+#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
new file mode 100644
index 00000000..e631e43e
--- /dev/null
+++ b/sysdeps/sun4/glibtop_server.h
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_SERVER_H__
+#define __GLIBTOP_SERVER_H__
+
+BEGIN_LIBGTOP_DECLS
+
+#define GLIBTOP_SUID_CPU (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
new file mode 100644
index 00000000..18d3b1d3
--- /dev/null
+++ b/sysdeps/sun4/glibtop_suid.h
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef __GLIBTOP_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/loadavg.c b/sysdeps/sun4/loadavg.c
new file mode 100644
index 00000000..530efb9a
--- /dev/null
+++ b/sysdeps/sun4/loadavg.c
@@ -0,0 +1,67 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/loadavg.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..f49541e7
--- /dev/null
+++ b/sysdeps/sun4/loadavg.h
@@ -0,0 +1,57 @@
+/*
+ * 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 <sys/fixpoint.h>
+# 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
new file mode 100644
index 00000000..6bbac96b
--- /dev/null
+++ b/sysdeps/sun4/mem.c
@@ -0,0 +1,91 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/mem.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..7a01740c
--- /dev/null
+++ b/sysdeps/sun4/msg_limits.c
@@ -0,0 +1,75 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/msg_limits.h>
+
+#include <glibtop_suid.h>
+
+/* #define KERNEL to get declaration of `struct msginfo'. */
+
+#define KERNEL
+
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+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
new file mode 100644
index 00000000..cd52852c
--- /dev/null
+++ b/sysdeps/sun4/nosuid.c
@@ -0,0 +1,35 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/close.h>
+
+void
+glibtop_open_s (glibtop *server, const char *program_name,
+ const unsigned long features, const unsigned flags)
+{ }
+
+void
+glibtop_close_s (glibtop *server)
+{ }
diff --git a/sysdeps/sun4/open.c b/sysdeps/sun4/open.c
new file mode 100644
index 00000000..30fd3e1e
--- /dev/null
+++ b/sysdeps/sun4/open.c
@@ -0,0 +1,308 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/open.h>
+#include <glibtop/xmalloc.h>
+
+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
new file mode 100644
index 00000000..6d0905d5
--- /dev/null
+++ b/sysdeps/sun4/ppp.c
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/error.h>
+#include <glibtop/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/sun4/procdata.c b/sysdeps/sun4/procdata.c
new file mode 100644
index 00000000..50756730
--- /dev/null
+++ b/sysdeps/sun4/procdata.c
@@ -0,0 +1,33 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/procdata.h>
+
+/* 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
new file mode 100644
index 00000000..603e881b
--- /dev/null
+++ b/sysdeps/sun4/prockernel.c
@@ -0,0 +1,60 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/prockernel.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..4b6fc42e
--- /dev/null
+++ b/sysdeps/sun4/proclist.c
@@ -0,0 +1,97 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/xmalloc.h>
+#include <glibtop/proclist.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..979fc7af
--- /dev/null
+++ b/sysdeps/sun4/procmem.c
@@ -0,0 +1,63 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/procmem.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..8dd64bea
--- /dev/null
+++ b/sysdeps/sun4/procsegment.c
@@ -0,0 +1,61 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procsegment.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..66a5a2bc
--- /dev/null
+++ b/sysdeps/sun4/procsignal.c
@@ -0,0 +1,63 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procsignal.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_proc_signal =
+(1 << GLIBTOP_PROC_SIGNAL_SIGNAL) + (1 << GLIBTOP_PROC_SIGNAL_BLOCKED) +
+(1 << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + (1 << GLIBTOP_PROC_SIGNAL_SIGCATCH);
+
+/* 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
new file mode 100644
index 00000000..4ce3734d
--- /dev/null
+++ b/sysdeps/sun4/procstate.c
@@ -0,0 +1,60 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procstate.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..9541f948
--- /dev/null
+++ b/sysdeps/sun4/proctime.c
@@ -0,0 +1,60 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/proctime.h>
+
+#include <glibtop_suid.h>
+
+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
new file mode 100644
index 00000000..5ff0e5bf
--- /dev/null
+++ b/sysdeps/sun4/procuid.c
@@ -0,0 +1,71 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/procuid.h>
+
+#include <glibtop_suid.h>
+
+static const unsigned long _glibtop_sysdeps_proc_uid =
+(1 << GLIBTOP_PROC_UID_UID) + (1 << GLIBTOP_PROC_UID_EUID) +
+(1 << GLIBTOP_PROC_UID_EGID) + (1 << GLIBTOP_PROC_UID_PID) +
+(1 << GLIBTOP_PROC_UID_PPID) + (1 << GLIBTOP_PROC_UID_PGRP) +
+(1 << GLIBTOP_PROC_UID_TPGID) + (1 << GLIBTOP_PROC_UID_PRIORITY) +
+(1 << GLIBTOP_PROC_UID_NICE);
+
+/* 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
new file mode 100644
index 00000000..e6f07c6c
--- /dev/null
+++ b/sysdeps/sun4/sem_limits.c
@@ -0,0 +1,81 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/sem_limits.h>
+
+#include <glibtop_suid.h>
+
+/* #define KERNEL to get declaration of `struct seminfo'. */
+
+#define KERNEL
+
+#include <sys/ipc.h>
+#include <sys/sem.h>
+
+static unsigned long _glibtop_sysdeps_sem_limits =
+(1 << GLIBTOP_IPC_SEMMAP) + (1 << GLIBTOP_IPC_SEMMNI) +
+(1 << GLIBTOP_IPC_SEMMNS) + (1 << GLIBTOP_IPC_SEMMNU) +
+(1 << GLIBTOP_IPC_SEMMSL) + (1 << GLIBTOP_IPC_SEMOPM) +
+(1 << GLIBTOP_IPC_SEMUME) + (1 << GLIBTOP_IPC_SEMUSZ) +
+(1 << GLIBTOP_IPC_SEMVMX) + (1 << GLIBTOP_IPC_SEMAEM);
+
+/* 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
new file mode 100644
index 00000000..a5f638f2
--- /dev/null
+++ b/sysdeps/sun4/shm_limits.c
@@ -0,0 +1,74 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/shm_limits.h>
+
+#include <glibtop_suid.h>
+
+/* #define KERNEL to get declaration of `struct shminfo'. */
+
+#define KERNEL
+
+#include <sys/ipc.h>
+#include <sys/shm.h>
+
+static unsigned long _glibtop_sysdeps_shm_limits =
+(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) +
+(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) +
+(1 << GLIBTOP_IPC_SHMALL);
+
+/* 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
new file mode 100644
index 00000000..c5bd59c0
--- /dev/null
+++ b/sysdeps/sun4/siglist.c
@@ -0,0 +1,60 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/signal.h>
+
+const glibtop_signame glibtop_sys_siglist [] =
+{ { 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
new file mode 100644
index 00000000..3c93e3a7
--- /dev/null
+++ b/sysdeps/sun4/swap.c
@@ -0,0 +1,37 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/swap.h>
+
+#include <glibtop_suid.h>
+
+/* 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
new file mode 100644
index 00000000..023cf3f3
--- /dev/null
+++ b/sysdeps/sun4/uptime.c
@@ -0,0 +1,61 @@
+/* $Id$ */
+
+/* Copyright (C) 1998-99 Martin Baulig
+ This file is part of LibGTop 1.0.
+
+ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <glibtop.h>
+#include <glibtop/cpu.h>
+#include <glibtop/uptime.h>
+
+#include <glibtop_suid.h>
+
+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;
+}