Compare commits

..

8 Commits

Author SHA1 Message Date
Benoît Dejean
6c95195787 Build daemon on linux.
svn path=/branches/linux_daemon/; revision=2615
2007-06-25 21:43:20 +00:00
Benoît Dejean
ef34cfb38a git-svn sucks. Kill r2609
svn path=/trunk/; revision=2611
2007-06-25 17:30:40 +00:00
Benoît Dejean
1e0ba1d7aa Fixed smaps parsing with linux > 2.6.21.
Closes #449595.
Improved example.

svn path=/trunk/; revision=2610
2007-06-25 17:27:29 +00:00
Benoît Dejean
6b0bafcafb New API : glibtop_get_proc_affinity.
Implemented for linux.

svn path=/trunk/; revision=2609
2007-06-25 17:27:27 +00:00
Kjartan Maraas
c0856a39bd Updated Norwegian bokmål translation.
2007-06-23  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.

svn path=/trunk/; revision=2608
2007-06-23 09:52:40 +00:00
Benoît Dejean
270820a05c Released 2.19.4.
svn path=/trunk/; revision=2606
2007-06-18 16:49:07 +00:00
Pema Geyleg
358660837c updated dzongkha translation
svn path=/trunk/; revision=2605
2007-06-13 08:41:43 +00:00
Benoît Dejean
e387c66aad Fixed build. Patch by Damien Carbery <damien.carbery@sun.com>. Closes
2007-06-07  Benoît Dejean  <benoit@placenet.org>

        * proclist.c: (glibtop_get_proclist_s):

        Fixed build.
        Patch by Damien Carbery <damien.carbery@sun.com>.
        Closes #444815.

svn path=/trunk/; revision=2604
2007-06-07 16:30:59 +00:00
15 changed files with 227 additions and 168 deletions

5
NEWS
View File

@@ -1,3 +1,8 @@
18 June 2007: Overview of changes in 2.19.4
===========================================
* solaris:
- fixed build. Damien Carbery.
3 June 2007: Overview of changes in 2.19.3
==========================================
* Small API change. get_proclist returns pid_t instead of unsigned

View File

@@ -4,7 +4,7 @@ dnl
m4_define([libgtop_major_version], [2])
m4_define([libgtop_minor_version], [19])
m4_define([libgtop_micro_version], [3])
m4_define([libgtop_micro_version], [4])
m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version])
dnl increment if the interface has additions, changes, removals.

0
examples/affinity.c Normal file
View File

View File

@@ -140,9 +140,9 @@ main (int argc, char *argv [])
}
g_print("smaps flags:%#llx size:%llu rss:%llu "
"shared_clean:%llu shared_dirty:%llu "
"private_clean:%llu private_dirty: %llu\n",
g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB "
"shared_clean:%lluKib shared_dirty:%lluKiB "
"private_clean:%lluKiB private_dirty: %lluKiB\n",
maps[i].flags,
maps[i].size >> 10,
maps[i].rss >> 10,

View File

View File

@@ -63,9 +63,9 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
case "$host_os" in
linux*)
libgtop_sysdeps_dir=linux
libgtop_use_machine_h=no
libgtop_use_machine_h=yes
libgtop_have_sysinfo=yes
libgtop_need_server=no
libgtop_need_server=yes
;;
netbsd*|openbsd*|bsdi*)
libgtop_sysdeps_dir=bsd

View File

@@ -1,3 +1,11 @@
2007-06-23 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2007-06-13 Pema Geyleg <pema.geyleg@gmail.com>
* dz.po: Updated dzongkha translation.
2007-05-27 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.

140
po/dz.po
View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libgtop.HEAD\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-03-06 05:23+0100\n"
"POT-Creation-Date: 2007-05-14 03:41+0100\n"
"PO-Revision-Date: 2006-03-28 11:12-0500\n"
"Last-Translator: \n"
"Language-Team: <en@li.org>\n"
@@ -19,224 +19,186 @@ msgstr ""
"X-Poedit-SourceCharset: utf-8\n"
"X-Generator: KBabel 1.10.2\n"
#: ../lib/read.c:65
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
msgstr[0] "བའིཊི་ %d ལྷག"
msgstr[1] "བའིཊི་ %d ལྷག"
#: ../lib/read_data.c:53
#: ../lib/read_data.c:51
msgid "read data size"
msgstr "གནད་སྡུད་ཀྱི་ཚད་ལྷག"
#: ../lib/read_data.c:72
#: ../lib/read_data.c:70
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "གནས་སྡུད་ བའིཊི་ %lu ལྷག"
msgstr[1] "གནས་སྡུད་ བའིཊི་ %lu ལྷག"
#: ../lib/write.c:52
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "བའིཊི་ %d བྲིས་ཡི། "
msgstr[1] "བའིཊི་ %d བྲིས་ཡི།"
#: ../src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:458
msgid "Enable debugging"
msgstr "རྐྱེན་སེལ་འབད་ནི་ ལྕོགས་ཅན་བཟོ།"
#: ../src/daemon/gnuserv.c:460
msgid "DEBUG"
msgstr "རྐྱེན་སེལ།"
#: ../src/daemon/gnuserv.c:462
msgid "Enable verbose output"
msgstr "ཚིག་མང་ཨའུཊི་པུཊི་ ལྕོགས་ཅན་བཟོ།"
#: ../src/daemon/gnuserv.c:462
msgid "VERBOSE"
msgstr "ཚིག་མང་།"
#: ../src/daemon/gnuserv.c:464
msgid "Don't fork into background"
msgstr "རྒྱབ་གཞིའི་ནང་ ཁ་མ་སྤེལ།"
#: ../src/daemon/gnuserv.c:464
msgid "NO-DAEMON"
msgstr "ཌེ་མཱོན་མིན་འདུག"
#: ../src/daemon/gnuserv.c:466
msgid "Invoked from inetd"
msgstr "ཨའི་ཨེན་ཨི་ཊི་ཌི་ནང་ལས་ ལས་བཀོལ་འབད།"
#: ../src/daemon/gnuserv.c:466
msgid "INETD"
msgstr "ཨའི་ཨེན་ཨི་ཊི་ཌི།"
#: ../src/daemon/gnuserv.c:500
#, c-format
msgid ""
"Error on option %s: %s.\n"
"Run '%s --help' to see a full list of available command line options.\n"
#: ../src/daemon/gnuserv.c:498
#, fuzzy, c-format
msgid "Run '%s --help' to see a full list of available command line options.\n"
msgstr ""
"གདམ་ཁ་%s: %sལུ་འཛོལ་བ། \n"
"འཐོབ་ཚུགས་པའི་ བརྡ་ལམ་གདམ་ཁའི་ ཐོ་ཡིག་ཧྲིལ་བུ་ཅིག་ལུ་ བལྟ་ནིའི་དོན་ལས་ '%s --help' གཡོག་བཀོལ།\n"
#: ../sysdeps/osf1/siglist.c:28
#: ../sysdeps/sun4/siglist.c:28
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
msgstr "ཐོགས་རྐྱེན།"
#: ../sysdeps/osf1/siglist.c:29
#: ../sysdeps/sun4/siglist.c:29
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
msgid "Interrupt"
msgstr "བར་ཆད།"
#: ../sysdeps/osf1/siglist.c:30
#: ../sysdeps/sun4/siglist.c:30
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
msgid "Quit"
msgstr "སྤངས།"
#: ../sysdeps/osf1/siglist.c:31
#: ../sysdeps/sun4/siglist.c:31
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
msgid "Illegal instruction"
msgstr "ཁྲིམས་འགལ་བཀོད་རྒྱ།"
#: ../sysdeps/osf1/siglist.c:32
#: ../sysdeps/sun4/siglist.c:32
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
msgid "Trace trap"
msgstr "ཧིང་ རྗེས་འཚོལ་འབད།"
#: ../sysdeps/osf1/siglist.c:33
#: ../sysdeps/sun4/siglist.c:33
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
msgid "Abort"
msgstr "བར་བཤོལ་འབད།"
#: ../sysdeps/osf1/siglist.c:34
#: ../sysdeps/sun4/siglist.c:34
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
msgid "EMT error"
msgstr "ཨི་ཨེམ་ཊི་འཛོལ་བ།"
#: ../sysdeps/osf1/siglist.c:35
#: ../sysdeps/sun4/siglist.c:35
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
msgid "Floating-point exception"
msgstr "ལྡིང་ཚད་དམིགས་བསལ།"
#: ../sysdeps/osf1/siglist.c:36
#: ../sysdeps/sun4/siglist.c:36
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
msgid "Kill"
msgstr "གསད།"
#: ../sysdeps/osf1/siglist.c:37
#: ../sysdeps/sun4/siglist.c:37
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "བརྡ་རྟགས་འགྲུལ་ལམ་གྱི་འཛོལ་བ།"
#: ../sysdeps/osf1/siglist.c:38
#: ../sysdeps/sun4/siglist.c:38
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
msgid "Segmentation violation"
msgstr "ཆ་བགོ་བའི་འགལ་བ།"
#: ../sysdeps/osf1/siglist.c:39
#: ../sysdeps/sun4/siglist.c:39
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
msgid "Bad argument to system call"
msgstr "རིམ་ལུགས་བོད་བརྡ་ལུ་ སྒྲུབ་རྟགས་བྱང་ཉེས།"
#: ../sysdeps/osf1/siglist.c:40
#: ../sysdeps/sun4/siglist.c:40
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "རྒྱུད་དུང་ཆད་པ།"
#: ../sysdeps/osf1/siglist.c:41
#: ../sysdeps/sun4/siglist.c:41
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
msgid "Alarm clock"
msgstr "འཇིགས་བརྡ་ཆེ་འཁོར།"
#: ../sysdeps/osf1/siglist.c:42
#: ../sysdeps/sun4/siglist.c:42
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "རྩ་གྲོལ།"
#: ../sysdeps/osf1/siglist.c:43
#: ../sysdeps/sun4/siglist.c:43
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"
msgstr "སོཀ་ཀེཊི་ལུ་ འཕྲལ་མཁོའི་གནས་སྟངས།"
#: ../sysdeps/osf1/siglist.c:44
#: ../sysdeps/sun4/siglist.c:44
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
msgid "Stop"
msgstr "བཀག"
#: ../sysdeps/osf1/siglist.c:45
#: ../sysdeps/sun4/siglist.c:45
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
msgid "Keyboard stop"
msgstr "ལྡེ་སྒྲོམ་བཀག"
#: ../sysdeps/osf1/siglist.c:46
#: ../sysdeps/sun4/siglist.c:46
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
msgid "Continue"
msgstr "འཕྲོ་མཐུད།"
#: ../sysdeps/osf1/siglist.c:47
#: ../sysdeps/sun4/siglist.c:47
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
msgid "Child status has changed"
msgstr "རྩ་ལག་གི་གནས་ཚད་ བསྒྱུར་བཅོས་ཡར་སོ་ནུག"
#: ../sysdeps/osf1/siglist.c:48
#: ../sysdeps/sun4/siglist.c:48
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
msgid "Background read from tty"
msgstr "ཊི་ཊི་ཝའི་ནང་ལས་ རྒྱབ་གཞི་ལྷག་ཡོད།"
#: ../sysdeps/osf1/siglist.c:49
#: ../sysdeps/sun4/siglist.c:49
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
msgid "Background write to tty"
msgstr "ཊི་ཊི་ཝའི་ལུ་ རྒྱབ་གཞི་བྲིས།"
#: ../sysdeps/osf1/siglist.c:50
#: ../sysdeps/sun4/siglist.c:50
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
msgid "I/O now possible"
msgstr "ཨའི་/ཨོ་ ད་ལྟོ་ཚུགས་པས།"
#: ../sysdeps/osf1/siglist.c:51
#: ../sysdeps/sun4/siglist.c:51
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
msgid "CPU limit exceeded"
msgstr "ལས་སྦྱོར་ལྟེ་བའི་ཚད་ལས་ ལྷག་སོ་ནུག"
#: ../sysdeps/osf1/siglist.c:52
#: ../sysdeps/sun4/siglist.c:52
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
msgid "File size limit exceeded"
msgstr "ཡིག་སྣོད་ཀྱི་ཚད་ལས་ ལྷག་སོ་ནུག"
#: ../sysdeps/osf1/siglist.c:53
#: ../sysdeps/sun4/siglist.c:53
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
msgid "Virtual alarm clock"
msgstr "བར་ཅུ་ཡེལ་ འཇིགས་བརྡའི་ཆེ་འཁོར།"
#: ../sysdeps/osf1/siglist.c:54
#: ../sysdeps/sun4/siglist.c:54
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
msgid "Profiling alarm clock"
msgstr "གསལ་སྡུད་འཇིགས་བརྡའི་ཆེ་འཁོར།"
#: ../sysdeps/osf1/siglist.c:55
#: ../sysdeps/sun4/siglist.c:55
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
msgid "Window size change"
msgstr "སྒོ་སྒྲིག་ཚད་ཀྱི་བསྒྱུར་བཅོས།"
#: ../sysdeps/osf1/siglist.c:56
#: ../sysdeps/sun4/siglist.c:56
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
msgid "Information request"
msgstr "བརྡ་དོན་གྱི་ཞུ་བ།"
#: ../sysdeps/osf1/siglist.c:57
#: ../sysdeps/sun4/siglist.c:57
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
msgid "User defined signal 1"
msgstr "ལག་ལེན་པའི་ ངེས་འཛིན་བརྡ་རྟགས་ ༡པ།"
#: ../sysdeps/osf1/siglist.c:58
#: ../sysdeps/sun4/siglist.c:58
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "ལག་ལེན་པའི་ངེས་འཛིན་བརྡ་རྟགས་ ༢པ།"
#~ msgid "DEBUG"
#~ msgstr "རྐྱེན་སེལ།"
#~ msgid "VERBOSE"
#~ msgstr "ཚིག་མང་།"
#~ msgid "NO-DAEMON"
#~ msgstr "ཌེ་མཱོན་མིན་འདུག"
#~ msgid "INETD"
#~ msgstr "ཨའི་ཨེན་ཨི་ཊི་ཌི།"

103
po/nb.po
View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: libgtop 2.5.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-04-02 14:48+0200\n"
"PO-Revision-Date: 2005-01-28 17:05+0100\n"
"POT-Creation-Date: 2007-06-23 11:52+0200\n"
"PO-Revision-Date: 2007-06-23 11:52+0200\n"
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
"Language-Team: Norwegian <i18n-nb@lister.ping.uio.no>\n"
"MIME-Version: 1.0\n"
@@ -15,193 +15,172 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../lib/read.c:65
#: ../lib/read.c:51
#, c-format
msgid "read %d byte"
msgid_plural "read %d bytes"
msgstr[0] "les %d byte"
msgstr[1] "les %d bytes"
#: ../lib/read_data.c:53
#: ../lib/read_data.c:51
msgid "read data size"
msgstr "les størrelse på data"
#: ../lib/read_data.c:72
#: ../lib/read_data.c:70
#, c-format
msgid "read %lu byte of data"
msgid_plural "read %lu bytes of data"
msgstr[0] "leste %lu byte med data"
msgstr[1] "leste %lu bytes med data"
#: ../lib/write.c:52
#: ../lib/write.c:51
#, c-format
msgid "wrote %d byte"
msgid_plural "wrote %d bytes"
msgstr[0] "skrev %d byte"
msgstr[1] "skrev %d bytes"
#: ../src/daemon/gnuserv.c:460
#: ../src/daemon/gnuserv.c:458
msgid "Enable debugging"
msgstr "Slå på avlusing"
#: ../src/daemon/gnuserv.c:460
msgid "DEBUG"
msgstr "DEBUG"
#: ../src/daemon/gnuserv.c:462
msgid "Enable verbose output"
msgstr "Slå på utfyllende utskrift"
#: ../src/daemon/gnuserv.c:462
msgid "VERBOSE"
msgstr "VERBOSE"
#: ../src/daemon/gnuserv.c:464
msgid "Don't fork into background"
msgstr "Ikke forgren til bakgrunnen"
#: ../src/daemon/gnuserv.c:464
msgid "NO-DAEMON"
msgstr "NO-DAEMON"
#: ../src/daemon/gnuserv.c:466
msgid "Invoked from inetd"
msgstr "Kalt fra inetd"
#: ../src/daemon/gnuserv.c:466
msgid "INETD"
msgstr "INETD"
#: ../src/daemon/gnuserv.c:500
#: ../src/daemon/gnuserv.c:498
#, c-format
msgid ""
"Error on option %s: %s.\n"
"Run '%s --help' to see a full list of available command line options.\n"
msgstr ""
"Feil ved flagg %s: %s.\n"
"Kjør '%s --help' for å se en full liste av tilgjengelige "
"kommandolinjeflagg.\n"
msgid "Run '%s --help' to see a full list of available command line options.\n"
msgstr "Kjør '%s --help' for å se en full liste av tilgjengelige kommandolinjeflagg.\n"
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
msgid "Hangup"
msgstr "Frakobling"
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
msgid "Interrupt"
msgstr "Avbrudd"
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
msgid "Quit"
msgstr "Avslutt"
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
msgid "Illegal instruction"
msgstr "Ugyldig instruksjon"
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
msgid "Trace trap"
msgstr "Spor felle"
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
msgid "Abort"
msgstr "Aborter"
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
msgid "EMT error"
msgstr "EMT-feil"
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
msgid "Floating-point exception"
msgstr "Flyttallsunntak"
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
msgid "Kill"
msgstr "Drep"
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
msgid "Bus error"
msgstr "Buss-feil"
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
msgid "Segmentation violation"
msgstr "Segmentoverskridelse"
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
msgid "Bad argument to system call"
msgstr "Ugyldig argument til systemkall"
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
msgid "Broken pipe"
msgstr "Brukket rør"
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
msgid "Alarm clock"
msgstr "Alarmklokke"
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
msgid "Termination"
msgstr "Terminering"
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
msgid "Urgent condition on socket"
msgstr "Viktig tilstand på socket"
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
msgid "Stop"
msgstr "Stopp"
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
msgid "Keyboard stop"
msgstr "Tastaturstopp"
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
msgid "Continue"
msgstr "Fortsett"
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
msgid "Child status has changed"
msgstr "Barnets status er endret"
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
msgid "Background read from tty"
msgstr "Lesing fra tty i bakgrunnen"
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
msgid "Background write to tty"
msgstr "Skriving til tty i bakgrunnen"
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
msgid "I/O now possible"
msgstr "I/O nå mulig"
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
msgid "CPU limit exceeded"
msgstr "CPU-grense oversteget"
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
msgid "File size limit exceeded"
msgstr "Grense for filstørrelse overskredet"
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
msgid "Virtual alarm clock"
msgstr "Virtuell alarmklokke"
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
msgid "Profiling alarm clock"
msgstr "Profilerer alarmklokken"
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
msgid "Window size change"
msgstr "Endring i vindusstørrelse"
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
msgid "Information request"
msgstr "Informasjonsforespørsel"
#: ../sysdeps/osf1/siglist.c:58 ../sysdeps/sun4/siglist.c:58
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
msgid "User defined signal 1"
msgstr "Brukerdefinert signal 1"
#: ../sysdeps/osf1/siglist.c:59 ../sysdeps/sun4/siglist.c:59
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
msgid "User defined signal 2"
msgstr "Brukerdefinert signal 2"

View File

@@ -1,6 +1,6 @@
INCLUDES = @INCLUDES@
noinst_LTLIBRARIES = libgtop_sysdeps-2.0.la
noinst_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-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 \
@@ -18,3 +18,7 @@ libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
libgtopincludedir = $(includedir)/libgtop-2.0
noinst_HEADERS = glibtop_private.h
libgtop_sysdeps_suid_2_0_la_SOURCES = suid.c
libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)

View File

View File

@@ -164,11 +164,10 @@ glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
if (getline(&line, &line_size, maps) == -1)
break;
/* 8 arguments */
if (sscanf(line, PROC_MAPS_FORMAT,
&start, &end, flags, &offset,
&dev_major, &dev_minor, &inode, &line_end) != 7)
break;
continue;
filename = line + line_end;
g_strstrip(filename);

94
sysdeps/linux/suid.c Normal file
View File

@@ -0,0 +1,94 @@
/* 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.h>
#include <glibtop/error.h>
#include <glibtop/open.h>
#include <glibtop/init_hooks.h>
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
const _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
#if 0
/* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */
server->machine.uid = getuid ();
server->machine.euid = geteuid ();
server->machine.gid = getgid ();
server->machine.egid = getegid ();
server->os_version_code = __FreeBSD_version;
/* 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);
#endif
/* !!! 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. */
}

View File

@@ -1,3 +1,11 @@
2007-06-07 Benoît Dejean <benoit@placenet.org>
* proclist.c: (glibtop_get_proclist_s):
Fixed build.
Patch by Damien Carbery <damien.carbery@sun.com>.
Closes #444815.
2006-09-19 Benoît Dejean <benoit@placenet.org>
* Makefile.am:

View File

@@ -46,7 +46,7 @@ _glibtop_init_proclist_s (glibtop *server)
}
#define BLOCK_COUNT 256
#define BLOCK_SIZE (BLOCK_COUNT * sizeof (unsigned))
#define BLOCK_SIZE (BLOCK_COUNT * sizeof (pid_t))
/* Fetch list of currently running processes.
*
@@ -55,7 +55,7 @@ _glibtop_init_proclist_s (glibtop *server)
* 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 *
pid_t*
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
gint64 which, gint64 arg)
{
@@ -63,7 +63,7 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
struct dirent *entry;
char buffer [BUFSIZ];
unsigned count, total, pid = 0, mask;
unsigned pids [BLOCK_COUNT], *pids_chain = NULL;
pid_t pids [BLOCK_COUNT], *pids_chain = NULL;
unsigned pids_size = 0, pids_offset = 0, new_size;
struct stat statb;
int len, ok;
@@ -98,7 +98,7 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
if(s_stat(buffer, &statb) < 0)
return NULL;
}
pids_chain = g_malloc(sizeof(unsigned));
pids_chain = g_malloc(sizeof(pid_t));
*pids_chain = pid;
return pids_chain;
}
@@ -216,11 +216,11 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
* new size and copy pids to the beginning of the newly allocated
* block. */
new_size = pids_size + count * sizeof (unsigned);
new_size = pids_size + count * sizeof (pid_t);
pids_chain = g_realloc (pids_chain, new_size);
memcpy (pids_chain + pids_offset, pids, count * sizeof (unsigned));
memcpy (pids_chain + pids_offset, pids, count * sizeof (pid_t));
pids_size = new_size;
@@ -231,10 +231,10 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
buf->flags = _glibtop_sysdeps_proclist;
buf->size = sizeof (unsigned);
buf->size = sizeof (pid_t);
buf->number = total;
buf->total = total * sizeof (unsigned);
buf->total = buf->number * buf->size;
return pids_chain;
}