Compare commits
29 Commits
LIBGTOP_2_
...
LIBGTOP_2_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d21fd97f6 | ||
|
|
666a347f25 | ||
|
|
68db204d6a | ||
|
|
fbe5c8da8e | ||
|
|
a354ca2635 | ||
|
|
639ea4870c | ||
|
|
702d9a1501 | ||
|
|
ea1a6dbaca | ||
|
|
bb60753844 | ||
|
|
d9781917c5 | ||
|
|
bd119a72e2 | ||
|
|
78c10bca9b | ||
|
|
270ec235c1 | ||
|
|
2362be986b | ||
|
|
8a1e1cff91 | ||
|
|
46380bf655 | ||
|
|
91dda5b70d | ||
|
|
9b263e0fbb | ||
|
|
793807b07e | ||
|
|
9898e7ee58 | ||
|
|
7ecdcd712d | ||
|
|
703a17f3f0 | ||
|
|
92a9e7d937 | ||
|
|
01c7e99aa6 | ||
|
|
6fe16f1d91 | ||
|
|
fcb83e637d | ||
|
|
50e4e07013 | ||
|
|
ab40c94db3 | ||
|
|
fee415ecd8 |
26
ChangeLog
26
ChangeLog
@@ -1,3 +1,29 @@
|
||||
2005-02-06 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* NEWS:
|
||||
* configure.in: Released 2.9.91.
|
||||
|
||||
2005-01-24 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* NEWS:
|
||||
* configure.in: Released 2.9.90.
|
||||
|
||||
2005-01-24 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* include/glibtop/procopenfiles.h:
|
||||
* sysdeps/linux/procopenfiles.c:
|
||||
* sysdeps/stub/procopenfiles.c: UTF-8-ified.
|
||||
|
||||
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* examples/openfiles.c: (show_open_files):
|
||||
* include/glibtop/procopenfiles.h: added localsock { name } to
|
||||
glibtop_open_files_entry. Should not break ABI.
|
||||
|
||||
2005-01-12 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* configure.in: 2.9.5.
|
||||
|
||||
2005-01-10 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* NEWS: Released 2.9.4.
|
||||
|
||||
9
NEWS
9
NEWS
@@ -1,3 +1,12 @@
|
||||
February 6, 2004: Overview of Changes from 2.9.90 to 2.9.91
|
||||
==========================================================
|
||||
* Fixed typo in stub.
|
||||
* Updated i18n.
|
||||
|
||||
January 24, 2004: Overview of Changes from 2.9.4 to 2.9.90
|
||||
==========================================================
|
||||
* Updated Linux support.
|
||||
|
||||
January 10, 2004: Overview of Changes from 2.9.3 to 2.9.4
|
||||
=========================================================
|
||||
* New glibtop_proc_open_files nick@reloco.com.ar (Nicolás Lichtmaier).
|
||||
|
||||
@@ -8,7 +8,7 @@ AC_CANONICAL_SYSTEM
|
||||
|
||||
LIBGTOP_MAJOR_VERSION=2
|
||||
LIBGTOP_MINOR_VERSION=9
|
||||
LIBGTOP_MICRO_VERSION=4
|
||||
LIBGTOP_MICRO_VERSION=91
|
||||
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
|
||||
AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* openfiles.c: (show_open_files): Updated.
|
||||
|
||||
2004-12-23 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* netload.c: (main):
|
||||
|
||||
@@ -34,7 +34,7 @@ static void show_open_files(pid_t pid)
|
||||
break;
|
||||
|
||||
case GLIBTOP_FILE_TYPE_LOCALSOCKET:
|
||||
printf("localsocket\n");
|
||||
printf("localsocket %s\n", files[i].info.localsock.name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
Copyright (C) 2004 Nicolás Lichtmaier
|
||||
Copyright (C) 2004 Nicolás Lichtmaier
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
Modified by Nicolás Lichtmaier to give open process files.
|
||||
Modified by Nicolás Lichtmaier to give open process files.
|
||||
|
||||
LibGTop is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
@@ -77,6 +77,12 @@ struct _glibtop_open_files_entry
|
||||
struct {
|
||||
char name[GLIBTOP_OPEN_FILENAME_LEN+1];
|
||||
} file;
|
||||
|
||||
/* When type == GLIBTOP_FILE_TYPE_LOCALSOCKET */
|
||||
struct {
|
||||
char name[GLIBTOP_OPEN_FILENAME_LEN+1];
|
||||
} localsock;
|
||||
|
||||
} info;
|
||||
};
|
||||
|
||||
|
||||
66
po/ChangeLog
66
po/ChangeLog
@@ -1,3 +1,69 @@
|
||||
2005-02-06 Ole Laursen <olau@hardworking.dk>
|
||||
|
||||
* da.po: Updated Danish translation.
|
||||
|
||||
2005-02-06 Pauli Virtanen <pauli.virtanen@hut.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2005-02-04 Priit Laes <plaes@cvs.gnome.org>
|
||||
|
||||
* et.po: Translation updated by Tõivo Leedjärv.
|
||||
|
||||
2005-01-30 Žygimantas Beručka <uid0@akl.lt>
|
||||
|
||||
* lt.po: Updated Lithuanian translation.
|
||||
|
||||
2005-01-28 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Update
|
||||
* no.po: Update
|
||||
|
||||
2005-01-27 Alexander Shopov <ash@contact.bg>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by
|
||||
Iassen Pramatarov <turin@fsa-bg.org>
|
||||
|
||||
2005-01-26 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
|
||||
2005-01-24 Funda Wang <fundawang@linux.net.cn>
|
||||
|
||||
* zh_CN.po: Updated Simplified Chinese translation.
|
||||
|
||||
2005-01-24 Alexander Shopov <ash@contact.bg>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by
|
||||
Vladimir Petkov <vpetkov@i-space.org>
|
||||
|
||||
2005-01-24 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* POTFILES.in:
|
||||
* POTFILES.skip: Removed lib/lib.c as it is generated.
|
||||
Closes #165038.
|
||||
|
||||
2005-01-17 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* POTFILES.in: Updated.
|
||||
|
||||
2005-01-16 Hendrik Richter <hendrik@gnome-de.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2005-01-16 Takeshi AIHANA <aihana@gnome.gr.jp>
|
||||
|
||||
* ja.po: Updated Japanese translation.
|
||||
|
||||
2005-01-13 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* POTFILES.in:
|
||||
* POTFILES.skip: Don't translate examples/smp.c.
|
||||
|
||||
2005-01-13 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* POTFILES.in: Added missing file.
|
||||
|
||||
2005-01-02 Miloslav Trmac <mitr@volny.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
@@ -2,3 +2,5 @@ support/error.c
|
||||
support/getopt.c
|
||||
support/popt.c
|
||||
support/popthelp.c
|
||||
examples/smp.c
|
||||
lib/lib.c
|
||||
|
||||
4
po/es.po
4
po/es.po
@@ -40,8 +40,8 @@ msgstr "leído tamaño de datos"
|
||||
#, c-format
|
||||
msgid "read %lu byte of data"
|
||||
msgid_plural "read %lu bytes of data"
|
||||
msgstr[0] "leído %d byte de datos"
|
||||
msgstr[1] "leídos %d bytes de datos"
|
||||
msgstr[0] "leído %lu byte de datos"
|
||||
msgstr[1] "leídos %lu bytes de datos"
|
||||
|
||||
#: lib/write.c:51
|
||||
#, c-format
|
||||
|
||||
30
po/et.po
30
po/et.po
@@ -2,18 +2,19 @@
|
||||
# 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: libgtop\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2004-08-03 14:09+0200\n"
|
||||
"POT-Creation-Date: 2004-08-06 12:07+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=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: examples/smp.c:76
|
||||
#, c-format
|
||||
@@ -100,8 +101,8 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "loetud %d bait"
|
||||
msgstr[1] "loetud %d baiti"
|
||||
|
||||
#: lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
@@ -111,8 +112,8 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "read data %d byte"
|
||||
msgid_plural "read data %d bytes"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "andmeid loetud %d bait"
|
||||
msgstr[1] "andmeid loetud %d baiti"
|
||||
|
||||
#: lib/write.c:51
|
||||
#, c-format
|
||||
@@ -411,14 +412,12 @@ msgid "MTU"
|
||||
msgstr ""
|
||||
|
||||
#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:69
|
||||
#, fuzzy
|
||||
msgid "IPv4 Subnet"
|
||||
msgstr "Alamvõrk"
|
||||
msgstr "IPv4 alamvõrk"
|
||||
|
||||
#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:70
|
||||
#, fuzzy
|
||||
msgid "IPv4 Address"
|
||||
msgstr "Aadress"
|
||||
msgstr "IPv4 aadress"
|
||||
|
||||
#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:71
|
||||
msgid "Packets In"
|
||||
@@ -461,9 +460,8 @@ msgid "Collisions"
|
||||
msgstr "Põrkumisi"
|
||||
|
||||
#: sysdeps/names/netload.c:60 sysdeps/names/netload.c:81
|
||||
#, fuzzy
|
||||
msgid "IPv6 Address"
|
||||
msgstr "Aadress"
|
||||
msgstr "IPv6 aadress"
|
||||
|
||||
#: sysdeps/names/netload.c:61 sysdeps/names/netload.c:82
|
||||
msgid "IPv6 Prefix"
|
||||
@@ -1004,9 +1002,8 @@ msgid "Set Group ID"
|
||||
msgstr ""
|
||||
|
||||
#: sysdeps/names/procuid.c:62
|
||||
#, fuzzy
|
||||
msgid "Filesystem User ID"
|
||||
msgstr "Failisüsteemide kasutus"
|
||||
msgstr "Failisüsteemi kasutaja ID"
|
||||
|
||||
#: sysdeps/names/procuid.c:63
|
||||
msgid "Filesystem Group ID"
|
||||
@@ -1261,9 +1258,8 @@ 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/names/uptime.c:48
|
||||
#, fuzzy
|
||||
msgid "Time of last system boot in seconds since the epoch"
|
||||
msgstr "Aega süsteemi käivitamisest (sekundites)"
|
||||
msgstr "Aega viimasest süsteemi alglaadimisest (sekundites aasta 1970 algusest)"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
|
||||
msgid "Hangup"
|
||||
@@ -1299,7 +1295,7 @@ msgstr ""
|
||||
|
||||
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
|
||||
msgid "Kill"
|
||||
msgstr ""
|
||||
msgstr "Kõrvaldamine"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
|
||||
msgid "Bus error"
|
||||
|
||||
160
po/nb.po
160
po/nb.po
@@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop 2.5.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2004-12-28 11:39+0100\n"
|
||||
"PO-Revision-Date: 2004-12-28 11:40+0100\n"
|
||||
"POT-Creation-Date: 2005-01-28 17:04+0100\n"
|
||||
"PO-Revision-Date: 2005-01-28 17:05+0100\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,87 +15,6 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: examples/smp.c:76
|
||||
#, c-format
|
||||
msgid "Ticks (%ld per second):"
|
||||
msgstr "Tikk (%ld per sekund):"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "Total"
|
||||
msgstr "Totalt"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "User"
|
||||
msgstr "Bruker"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "Nice"
|
||||
msgstr "Nice"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "Sys"
|
||||
msgstr "Sys"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "Idle"
|
||||
msgstr "Idle"
|
||||
|
||||
#: examples/smp.c:81
|
||||
#, 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:85
|
||||
#, 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:102
|
||||
msgid "Percent:"
|
||||
msgstr "Prosent:"
|
||||
|
||||
#: examples/smp.c:103
|
||||
msgid "Total (%)"
|
||||
msgstr "Total (%)"
|
||||
|
||||
#: examples/smp.c:103
|
||||
msgid "User (%)"
|
||||
msgstr "Bruker (%)"
|
||||
|
||||
#: examples/smp.c:103
|
||||
msgid "Nice (%)"
|
||||
msgstr "Nice (%)"
|
||||
|
||||
#: examples/smp.c:103
|
||||
msgid "Sys (%)"
|
||||
msgstr "Sys (%)"
|
||||
|
||||
#: examples/smp.c:104
|
||||
msgid "Idle (%)"
|
||||
msgstr "Idle (%)"
|
||||
|
||||
#: examples/smp.c:106
|
||||
#, 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:122
|
||||
#, 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:128
|
||||
msgid "Spin:"
|
||||
msgstr "Spinn:"
|
||||
|
||||
#: lib/read.c:64
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
@@ -109,17 +28,17 @@ msgstr "les størrelse på data"
|
||||
|
||||
#: lib/read_data.c:71
|
||||
#, c-format
|
||||
msgid "read data %lu byte"
|
||||
msgid_plural "read data %lu bytes"
|
||||
msgstr[0] "les data %lu byte"
|
||||
msgstr[1] "les data %lu bytes"
|
||||
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:51
|
||||
#, c-format
|
||||
msgid "write %d byte"
|
||||
msgid_plural "write %d bytes"
|
||||
msgstr[0] "skriv %d byte"
|
||||
msgstr[1] "skriv %d bytes"
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "skrev %d byte"
|
||||
msgstr[1] "skrev %d bytes"
|
||||
|
||||
#: src/daemon/gnuserv.c:461
|
||||
msgid "Enable debugging"
|
||||
@@ -287,6 +206,65 @@ msgstr "Brukerdefinert signal 1"
|
||||
msgid "User defined signal 2"
|
||||
msgstr "Brukerdefinert signal 2"
|
||||
|
||||
#~ msgid "Ticks (%ld per second):"
|
||||
#~ msgstr "Tikk (%ld per sekund):"
|
||||
|
||||
#~ msgid "Total"
|
||||
#~ msgstr "Totalt"
|
||||
|
||||
#~ msgid "User"
|
||||
#~ msgstr "Bruker"
|
||||
|
||||
#~ msgid "Nice"
|
||||
#~ msgstr "Nice"
|
||||
|
||||
#~ msgid "Sys"
|
||||
#~ msgstr "Sys"
|
||||
|
||||
#~ msgid "Idle"
|
||||
#~ msgstr "Idle"
|
||||
|
||||
#~ 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"
|
||||
|
||||
#~ msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
#~ msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
|
||||
#~ msgid "Percent:"
|
||||
#~ msgstr "Prosent:"
|
||||
|
||||
#~ msgid "Total (%)"
|
||||
#~ msgstr "Total (%)"
|
||||
|
||||
#~ msgid "User (%)"
|
||||
#~ msgstr "Bruker (%)"
|
||||
|
||||
#~ msgid "Nice (%)"
|
||||
#~ msgstr "Nice (%)"
|
||||
|
||||
#~ msgid "Sys (%)"
|
||||
#~ msgstr "Sys (%)"
|
||||
|
||||
#~ msgid "Idle (%)"
|
||||
#~ msgstr "Idle (%)"
|
||||
|
||||
#~ 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"
|
||||
|
||||
#~ 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"
|
||||
|
||||
#~ msgid "Spin:"
|
||||
#~ msgstr "Spinn:"
|
||||
|
||||
#~ msgid "Total CPU Time"
|
||||
#~ msgstr "Total prosessortid"
|
||||
|
||||
|
||||
160
po/no.po
160
po/no.po
@@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop 2.5.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2004-12-28 11:39+0100\n"
|
||||
"PO-Revision-Date: 2004-12-28 11:40+0100\n"
|
||||
"POT-Creation-Date: 2005-01-28 17:04+0100\n"
|
||||
"PO-Revision-Date: 2005-01-28 17:05+0100\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,87 +15,6 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: examples/smp.c:76
|
||||
#, c-format
|
||||
msgid "Ticks (%ld per second):"
|
||||
msgstr "Tikk (%ld per sekund):"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "Total"
|
||||
msgstr "Totalt"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "User"
|
||||
msgstr "Bruker"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "Nice"
|
||||
msgstr "Nice"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "Sys"
|
||||
msgstr "Sys"
|
||||
|
||||
#: examples/smp.c:79
|
||||
msgid "Idle"
|
||||
msgstr "Idle"
|
||||
|
||||
#: examples/smp.c:81
|
||||
#, 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:85
|
||||
#, 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:102
|
||||
msgid "Percent:"
|
||||
msgstr "Prosent:"
|
||||
|
||||
#: examples/smp.c:103
|
||||
msgid "Total (%)"
|
||||
msgstr "Total (%)"
|
||||
|
||||
#: examples/smp.c:103
|
||||
msgid "User (%)"
|
||||
msgstr "Bruker (%)"
|
||||
|
||||
#: examples/smp.c:103
|
||||
msgid "Nice (%)"
|
||||
msgstr "Nice (%)"
|
||||
|
||||
#: examples/smp.c:103
|
||||
msgid "Sys (%)"
|
||||
msgstr "Sys (%)"
|
||||
|
||||
#: examples/smp.c:104
|
||||
msgid "Idle (%)"
|
||||
msgstr "Idle (%)"
|
||||
|
||||
#: examples/smp.c:106
|
||||
#, 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:122
|
||||
#, 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:128
|
||||
msgid "Spin:"
|
||||
msgstr "Spinn:"
|
||||
|
||||
#: lib/read.c:64
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
@@ -109,17 +28,17 @@ msgstr "les størrelse på data"
|
||||
|
||||
#: lib/read_data.c:71
|
||||
#, c-format
|
||||
msgid "read data %lu byte"
|
||||
msgid_plural "read data %lu bytes"
|
||||
msgstr[0] "les data %lu byte"
|
||||
msgstr[1] "les data %lu bytes"
|
||||
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:51
|
||||
#, c-format
|
||||
msgid "write %d byte"
|
||||
msgid_plural "write %d bytes"
|
||||
msgstr[0] "skriv %d byte"
|
||||
msgstr[1] "skriv %d bytes"
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "skrev %d byte"
|
||||
msgstr[1] "skrev %d bytes"
|
||||
|
||||
#: src/daemon/gnuserv.c:461
|
||||
msgid "Enable debugging"
|
||||
@@ -287,6 +206,65 @@ msgstr "Brukerdefinert signal 1"
|
||||
msgid "User defined signal 2"
|
||||
msgstr "Brukerdefinert signal 2"
|
||||
|
||||
#~ msgid "Ticks (%ld per second):"
|
||||
#~ msgstr "Tikk (%ld per sekund):"
|
||||
|
||||
#~ msgid "Total"
|
||||
#~ msgstr "Totalt"
|
||||
|
||||
#~ msgid "User"
|
||||
#~ msgstr "Bruker"
|
||||
|
||||
#~ msgid "Nice"
|
||||
#~ msgstr "Nice"
|
||||
|
||||
#~ msgid "Sys"
|
||||
#~ msgstr "Sys"
|
||||
|
||||
#~ msgid "Idle"
|
||||
#~ msgstr "Idle"
|
||||
|
||||
#~ 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"
|
||||
|
||||
#~ msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
#~ msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
|
||||
#~ msgid "Percent:"
|
||||
#~ msgstr "Prosent:"
|
||||
|
||||
#~ msgid "Total (%)"
|
||||
#~ msgstr "Total (%)"
|
||||
|
||||
#~ msgid "User (%)"
|
||||
#~ msgstr "Bruker (%)"
|
||||
|
||||
#~ msgid "Nice (%)"
|
||||
#~ msgstr "Nice (%)"
|
||||
|
||||
#~ msgid "Sys (%)"
|
||||
#~ msgstr "Sys (%)"
|
||||
|
||||
#~ msgid "Idle (%)"
|
||||
#~ msgstr "Idle (%)"
|
||||
|
||||
#~ 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"
|
||||
|
||||
#~ 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"
|
||||
|
||||
#~ msgid "Spin:"
|
||||
#~ msgstr "Spinn:"
|
||||
|
||||
#~ msgid "Total CPU Time"
|
||||
#~ msgstr "Total prosessortid"
|
||||
|
||||
|
||||
1232
po/zh_CN.po
1232
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,7 @@
|
||||
2005-01-18 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* mountlist.c: (ignore_mount_entry): Re-worked with bsearch.
|
||||
|
||||
2004-12-09 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* mountlist.c: (ignore_mount_entry): Ignores "unkown" file system type.
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
|
||||
@@ -535,31 +536,28 @@ read_filesystem_list (void)
|
||||
|
||||
static gboolean ignore_mount_entry(const struct mount_entry *me)
|
||||
{
|
||||
/* keep sorted */
|
||||
static const char ignored[][12] = {
|
||||
"autofs",
|
||||
"binfmt_misc",
|
||||
"devpts",
|
||||
"mntfs",
|
||||
"none",
|
||||
"openpromfs",
|
||||
"proc",
|
||||
"procfs",
|
||||
"autofs",
|
||||
"sysfs",
|
||||
"usbfs",
|
||||
"none",
|
||||
"devpts",
|
||||
"usbdevfs",
|
||||
"binfmt_misc",
|
||||
"supermount",
|
||||
"mntfs",
|
||||
"openpromfs",
|
||||
"unknown"
|
||||
"sysfs",
|
||||
"unknown",
|
||||
"usbdevfs",
|
||||
"usbfs"
|
||||
};
|
||||
|
||||
const char (*i)[12] = &ignored[0];
|
||||
typedef int (*Comparator)(const void*, const void*);
|
||||
|
||||
while(i != (&ignored[0] + G_N_ELEMENTS(ignored))) {
|
||||
if(strcmp(*i, me->me_type) == 0)
|
||||
return TRUE;
|
||||
++i;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return bsearch(me->me_type,
|
||||
ignored, G_N_ELEMENTS(ignored), sizeof ignored[0],
|
||||
(Comparator) strcmp) != NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
2005-01-22 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* procopenfiles.c: (parse_file), (get_all), (inet_socket_parser),
|
||||
(get_all_inet_sockets), (local_socket_parser),
|
||||
(get_all_local_sockets), (glibtop_get_proc_open_files_s): Total rewrite.
|
||||
socket/localsocket should be much faster.
|
||||
|
||||
2005-01-16 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* glibtop_private.c: (skip_token):
|
||||
* glibtop_private.h: Uninlined.
|
||||
|
||||
2005-01-13 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* fsusage.c: (get_partition), (get_sys_path), (linux_2_6_0): Reworked.
|
||||
Should works with IDE, SCSI. DM support is ready, but i don't know why
|
||||
their /stat is empty ...
|
||||
|
||||
2005-01-12 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* procopenfiles.c: (get_all_sockets),
|
||||
(glibtop_get_proc_open_files_s): Parses /proc/net/tcp only once.
|
||||
|
||||
2005-01-10 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* procopenfiles.c: (get_socket_endpoint): Fixed.
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <mntent.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <linux/kdev_t.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -24,68 +25,97 @@ _glibtop_linux_get_fsusage_read_write(glibtop *server,
|
||||
* linux/Documentation/iostats.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
static char *
|
||||
get_partition(const char *mountpoint)
|
||||
{
|
||||
FILE *partitions;
|
||||
char *name = NULL;
|
||||
char line[1024];
|
||||
struct stat statb;
|
||||
|
||||
if(stat(mountpoint, &statb) == -1)
|
||||
return NULL;
|
||||
|
||||
g_return_val_if_fail((partitions = fopen("/proc/partitions", "r")), NULL);
|
||||
|
||||
while(fgets(line, sizeof line, partitions))
|
||||
{
|
||||
unsigned major, minor;
|
||||
char dev[32];
|
||||
|
||||
if(sscanf(line, "%u %u %*u %31s", &major, &minor, dev) != 3)
|
||||
continue;
|
||||
|
||||
if(MKDEV(major, minor) != statb.st_dev)
|
||||
continue;
|
||||
|
||||
name = g_strdup(dev);
|
||||
break;
|
||||
}
|
||||
|
||||
fclose(partitions);
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
get_sys_path(const char *device)
|
||||
{
|
||||
if(g_str_has_prefix(device, "hd") || g_str_has_prefix(device, "sd"))
|
||||
{
|
||||
char *prefix;
|
||||
char *path;
|
||||
size_t offset;
|
||||
|
||||
offset = strcspn(device, "0123456789");
|
||||
|
||||
prefix = g_strdup(device);
|
||||
prefix [offset] = '\0';
|
||||
|
||||
path = g_strdup_printf("/sys/block/%s/%s/stat",
|
||||
prefix, device);
|
||||
|
||||
g_free(prefix);
|
||||
return path;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return g_strdup_printf("/sys/block/%s/stat", device);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void linux_2_6_0(glibtop *server, glibtop_fsusage *buf, const char *path)
|
||||
{
|
||||
FILE *mtab = setmntent("/etc/mtab", "r");
|
||||
char *device;
|
||||
char *filename;
|
||||
int ret;
|
||||
char buffer[BUFSIZ];
|
||||
char *p;
|
||||
|
||||
struct mntent *emnt;
|
||||
device = get_partition(path);
|
||||
if(!device) return;
|
||||
|
||||
while((emnt = getmntent(mtab)) != NULL)
|
||||
{
|
||||
if(strcmp(emnt->mnt_dir, path) == 0)
|
||||
{
|
||||
char filename[64]; /* magic */
|
||||
filename = get_sys_path(device);
|
||||
g_free(device);
|
||||
|
||||
char buffer[1024]; /* magic */
|
||||
char *p;
|
||||
ret = try_file_to_buffer(buffer, filename);
|
||||
g_free(filename);
|
||||
|
||||
char device[32]; /* magic */
|
||||
unsigned partition;
|
||||
if(ret < 0) return;
|
||||
|
||||
const char *devname = emnt->mnt_fsname;
|
||||
size_t offset;
|
||||
p = buffer;
|
||||
p = skip_token(p);
|
||||
buf->read = strtoull(p, &p, 0);
|
||||
p = skip_token(p);
|
||||
buf->write = strtoull(p, &p, 0);
|
||||
|
||||
/*
|
||||
we only deal with /dev block devices "/dev/<DEVICE><PARTITION>"
|
||||
i don't know if other block devices such as network block
|
||||
devices provide this kind of information.
|
||||
*/
|
||||
|
||||
if(!g_str_has_prefix(devname, "/dev/"))
|
||||
break;
|
||||
|
||||
/* skip the "/dev/" */
|
||||
devname += sizeof "/dev/" - 1;
|
||||
|
||||
g_strlcpy(device, devname, sizeof device);
|
||||
|
||||
offset = strcspn(devname, "0123456789");
|
||||
partition = strtoul(devname + offset, NULL, 0);
|
||||
|
||||
device[offset] = '\0';
|
||||
|
||||
if((size_t) g_snprintf(filename, sizeof filename,
|
||||
"/sys/block/%s/%s%u/stat",
|
||||
device, device, partition) >= sizeof filename)
|
||||
break;
|
||||
|
||||
|
||||
if(try_file_to_buffer(buffer, filename) < 0)
|
||||
break;
|
||||
|
||||
p = buffer;
|
||||
p = skip_token(p);
|
||||
buf->read = strtoull(p, &p, 0);
|
||||
p = skip_token(p);
|
||||
buf->write = strtoull(p, &p, 0);
|
||||
|
||||
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
endmntent(mtab);
|
||||
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,16 @@ get_scaled(const char *buffer, const char *key)
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
skip_token (const char *p)
|
||||
{
|
||||
p = next_token(p);
|
||||
while (*p && !isspace(*p)) p++;
|
||||
p = next_token(p);
|
||||
return (char *)p;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Read functions
|
||||
*/
|
||||
|
||||
@@ -40,14 +40,8 @@ next_token(const char *p)
|
||||
return (char*) p;
|
||||
}
|
||||
|
||||
static inline char *
|
||||
skip_token (const char *p)
|
||||
{
|
||||
p = next_token(p);
|
||||
while (*p && !isspace(*p)) p++;
|
||||
p = next_token(p);
|
||||
return (char *)p;
|
||||
}
|
||||
char * G_GNUC_INTERNAL
|
||||
skip_token (const char *p);
|
||||
|
||||
static inline char *
|
||||
skip_multiple_token (const char *p, size_t count)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
Copyright (C) 2004 Nicolás Lichtmaier
|
||||
Copyright (C) 2004 Nicolás Lichtmaier
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Modified by Nicolás Lichtmaier to give a process open files.
|
||||
Modified by Nicolás Lichtmaier to give a process open files.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
@@ -49,41 +49,127 @@ glibtop_init_proc_open_files_s (glibtop *server)
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef void (*LineParser)(GHashTable *dict, const char *line);
|
||||
|
||||
|
||||
static void
|
||||
get_socket_endpoint(char *buf, int *prmtport, int s)
|
||||
parse_file(const char *filename, LineParser parser, GHashTable *dict)
|
||||
{
|
||||
FILE *f;
|
||||
char line[1024];
|
||||
|
||||
buf[0] = '\0';
|
||||
*prmtport = 0;
|
||||
f = fopen(filename, "r");
|
||||
|
||||
f = fopen("/proc/net/tcp", "r");
|
||||
if(!f)
|
||||
if(!f) {
|
||||
g_warning("Cannot open '%s'", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
/* skip the first line */
|
||||
if(!fgets(line, sizeof line, f)) goto eof;
|
||||
|
||||
|
||||
while(fgets(line, sizeof line, f))
|
||||
{
|
||||
unsigned int rmt;
|
||||
int sock = -42;
|
||||
|
||||
sscanf(line, "%*d: %*x:%*x %8x:%4x %*x %*x:%*x %*x:%*x %*d %*d %*d %d",
|
||||
&rmt, prmtport, &sock);
|
||||
|
||||
if(sock == s)
|
||||
{
|
||||
inet_ntop(AF_INET, &rmt, buf, GLIBTOP_OPEN_DEST_HOST_LEN);
|
||||
break;
|
||||
}
|
||||
parser(dict, line);
|
||||
}
|
||||
|
||||
eof:
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
||||
static GHashTable*
|
||||
get_all(const char *filename, LineParser parser)
|
||||
{
|
||||
GHashTable *dict;
|
||||
|
||||
dict = g_hash_table_new_full(g_direct_hash, g_direct_equal,
|
||||
NULL, g_free);
|
||||
|
||||
parse_file(filename, parser, dict);
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct InetSocketEntry
|
||||
{
|
||||
char host[GLIBTOP_OPEN_DEST_HOST_LEN + 1];
|
||||
int port;
|
||||
};
|
||||
|
||||
|
||||
static void
|
||||
inet_socket_parser(GHashTable *dict, const char* line)
|
||||
{
|
||||
struct InetSocketEntry *se;
|
||||
int sock;
|
||||
unsigned addr;
|
||||
|
||||
se = g_malloc0(sizeof *se);
|
||||
|
||||
if(sscanf(line, "%*d: %*x:%*x %8x:%4x %*x %*x:%*x %*x:%*x %*d %*d %*d %d",
|
||||
&addr, &se->port, &sock) != 3)
|
||||
goto error;
|
||||
|
||||
if(!inet_ntop(AF_INET, &addr, se->host, sizeof se->host))
|
||||
goto error;
|
||||
|
||||
g_hash_table_insert(dict, GINT_TO_POINTER(sock), se);
|
||||
return;
|
||||
|
||||
error:
|
||||
g_free(se);
|
||||
}
|
||||
|
||||
|
||||
static inline GHashTable *
|
||||
get_all_inet_sockets()
|
||||
{
|
||||
return get_all("/proc/net/tcp", inet_socket_parser);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct LocalSocketEntry
|
||||
{
|
||||
char name[GLIBTOP_OPEN_DEST_HOST_LEN + 1];
|
||||
};
|
||||
|
||||
|
||||
static void
|
||||
local_socket_parser(GHashTable *dict, const char *line)
|
||||
{
|
||||
int sock;
|
||||
struct LocalSocketEntry *use;
|
||||
char *p;
|
||||
|
||||
use = g_malloc0(sizeof *use);
|
||||
|
||||
/* dfaf1640: 00000003 00000000 00000000 0001 03 6457 /dev/log */
|
||||
p = skip_multiple_token(line, 6);
|
||||
|
||||
sock = strtoul(p, &p, 10);
|
||||
g_strlcpy(use->name, p, sizeof use->name);
|
||||
g_strstrip(use->name);
|
||||
g_hash_table_insert(dict, GINT_TO_POINTER(sock), use);
|
||||
}
|
||||
|
||||
|
||||
static inline GHashTable *
|
||||
get_all_local_sockets()
|
||||
{
|
||||
return get_all("/proc/net/unix", local_socket_parser);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Provides detailed information about a process' open files */
|
||||
|
||||
glibtop_open_files_entry *
|
||||
@@ -91,8 +177,8 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
|
||||
{
|
||||
char fn [BUFSIZ];
|
||||
GArray *entries;
|
||||
GHashTable *inet_sockets = NULL, *local_sockets = NULL;
|
||||
struct dirent *direntry;
|
||||
int rv;
|
||||
DIR *dir;
|
||||
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_OPEN_FILES, 0);
|
||||
@@ -108,9 +194,9 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
|
||||
|
||||
while((direntry = readdir(dir))) {
|
||||
char tgt [BUFSIZ];
|
||||
int rv;
|
||||
glibtop_open_files_entry entry = {0};
|
||||
|
||||
|
||||
if(direntry->d_name[0] == '.')
|
||||
continue;
|
||||
|
||||
@@ -126,11 +212,37 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
|
||||
if(g_str_has_prefix(tgt, "socket:["))
|
||||
{
|
||||
int sockfd;
|
||||
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
|
||||
struct InetSocketEntry *ise;
|
||||
struct LocalSocketEntry *lse;
|
||||
|
||||
if(!inet_sockets) inet_sockets = get_all_inet_sockets();
|
||||
if(!local_sockets) local_sockets = get_all_local_sockets();
|
||||
|
||||
sockfd = atoi(tgt + 8);
|
||||
get_socket_endpoint(entry.info.sock.dest_host,
|
||||
&(entry.info.sock.dest_port),
|
||||
sockfd);
|
||||
|
||||
ise = g_hash_table_lookup(inet_sockets,
|
||||
GINT_TO_POINTER(sockfd));
|
||||
|
||||
if(ise) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
|
||||
entry.info.sock.dest_port = ise->port;
|
||||
g_strlcpy(entry.info.sock.dest_host, ise->host,
|
||||
sizeof entry.info.sock.dest_host);
|
||||
goto found;
|
||||
}
|
||||
|
||||
lse = g_hash_table_lookup(local_sockets,
|
||||
GINT_TO_POINTER(sockfd));
|
||||
|
||||
if(lse) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET;
|
||||
g_strlcpy(entry.info.localsock.name, lse->name,
|
||||
sizeof entry.info.localsock.name);
|
||||
goto found;
|
||||
}
|
||||
|
||||
found:
|
||||
(void)0; /* kills warning */
|
||||
}
|
||||
else if(g_str_has_prefix(tgt, "pipe:["))
|
||||
{
|
||||
@@ -147,6 +259,9 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi
|
||||
|
||||
closedir (dir);
|
||||
|
||||
if(inet_sockets) g_hash_table_destroy(inet_sockets);
|
||||
if(local_sockets) g_hash_table_destroy(local_sockets);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_open_files;
|
||||
buf->number = entries->len;
|
||||
buf->size = sizeof(glibtop_open_files_entry);
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2005-02-02 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* procopenfiles.c: Fixed typo. Closes #166090
|
||||
|
||||
2004-12-23 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* netlist.c: (glibtop_get_netlist_s): Fixed.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
Copyright (C) 2004 Nicolás Lichtmaier
|
||||
Copyright (C) 2004 Nicolás Lichtmaier
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
@@ -37,7 +37,7 @@ glibtop_init_proc_open_files_s (glibtop *server)
|
||||
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
glibtop_open_file_entry *
|
||||
glibtop_open_files_entry *
|
||||
glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pid_t pid)
|
||||
{
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0);
|
||||
|
||||
Reference in New Issue
Block a user