Compare commits
4 Commits
LIBGTOP_2_
...
testing
Author | SHA1 | Date | |
---|---|---|---|
|
4dc31b6c94 | ||
|
69989d716f | ||
|
8204d4d450 | ||
|
44653a62ee |
@@ -6,7 +6,7 @@ else
|
||||
EXAMPLES_DIR =
|
||||
endif
|
||||
|
||||
SUBDIRS = po misc include sysdeps lib src $(EXAMPLES_DIR) doc
|
||||
SUBDIRS = po misc include sysdeps lib src $(EXAMPLES_DIR) doc tests
|
||||
|
||||
libgtopinclude_HEADERS = glibtop.h libgtopconfig.h
|
||||
libgtopincludedir = $(includedir)/libgtop-2.0
|
||||
|
@@ -6,7 +6,7 @@ test -z "$srcdir" && srcdir=.
|
||||
|
||||
PKG_NAME="Gnome Top Library"
|
||||
|
||||
(test -f $srcdir/configure.in \
|
||||
(test -f $srcdir/configure.ac \
|
||||
&& test -f $srcdir/copyright.txt \
|
||||
&& test -d $srcdir/sysdeps) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
|
@@ -8,7 +8,7 @@ m4_define([libgtop_micro_version], [6])
|
||||
m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version])
|
||||
|
||||
dnl increment if the interface has additions, changes, removals.
|
||||
m4_define([libgtop_current], [10])
|
||||
m4_define([libgtop_current], [9])
|
||||
|
||||
dnl increment any time the source changes; set to
|
||||
dnl 0 if you increment CURRENT
|
||||
@@ -17,7 +17,7 @@ m4_define([libgtop_revision], [0])
|
||||
dnl increment if any interfaces have been added; set to 0
|
||||
dnl if any interfaces have been removed. removal has
|
||||
dnl precedence over adding, so set to 0 if both happened.
|
||||
m4_define([libgtop_age], [0])
|
||||
m4_define([libgtop_age], [2])
|
||||
|
||||
# Increase each time you change the client/server protocol.
|
||||
m4_define([libgtop_server_version], [5])
|
||||
@@ -89,6 +89,7 @@ AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
||||
|
||||
GNOME_LIBGTOP_SYSDEPS
|
||||
GNOME_LIBGTOP_TYPES
|
||||
GLIB_TESTS
|
||||
|
||||
GLIB_REQUIRED=2.6.0
|
||||
|
@@ -1,5 +1,11 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(AM_LDFLAGS) -o $@
|
||||
|
||||
INCLUDES = @INCLUDES@
|
||||
|
||||
DEFS = @DEFS@
|
||||
|
||||
AM_LDFLAGS = $(LIBGTOP_EXTRA_LIBS)
|
||||
|
||||
noinst_PROGRAMS = first second pprint procargs df netlist \
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#endif
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/sysinfo.h>
|
||||
|
||||
#include <glibtop/union.h>
|
||||
|
||||
@@ -30,41 +29,9 @@ for(i = 0; i < (SIZE - 1); ++i) printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \
|
||||
printf(".%u = " FORMAT " }\n", SIZE - 1 , buf.ARRAY[SIZE - 1]); \
|
||||
} while(0)
|
||||
|
||||
#define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \
|
||||
size_t i; \
|
||||
printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \
|
||||
(unsigned long) sizeof buf->ARRAY, 0,\
|
||||
(unsigned long) G_N_ELEMENTS(buf->ARRAY)); \
|
||||
for(i = 0; i < SIZE; ++i) { \
|
||||
printf ("[ ");\
|
||||
PPRINT_HASHTABLE(buf->ARRAY[i].values); \
|
||||
printf ("]\n");\
|
||||
} \
|
||||
printf("} "); \
|
||||
} while(0)
|
||||
|
||||
#define PPRINT_HASHTABLE(HASHTABLE) do { \
|
||||
g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \
|
||||
} while(0)
|
||||
|
||||
#define FOOTER_PPRINT() putchar('\n');
|
||||
|
||||
static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data)
|
||||
{
|
||||
printf ("'%s': '%s', ", key, value);
|
||||
}
|
||||
static void pprint_get_sysinfo(void)
|
||||
{
|
||||
const glibtop_sysinfo *buf;
|
||||
|
||||
buf = glibtop_get_sysinfo();
|
||||
|
||||
HEADER_PPRINT(glibtop_get_sysinfo);
|
||||
//PPRINT(flags, "%#llx");
|
||||
//PPRINT(ncpu, "%llu");
|
||||
PPRINT_ENTRY_ARRAY(cpuinfo, 4);
|
||||
FOOTER_PPRINT();
|
||||
}
|
||||
|
||||
static void pprint_get_cpu(void)
|
||||
{
|
||||
@@ -324,7 +291,6 @@ int main()
|
||||
{
|
||||
glibtop_init();
|
||||
|
||||
pprint_get_sysinfo();
|
||||
pprint_get_cpu();
|
||||
|
||||
pprint_get_fsusage("/");
|
||||
|
545
glib-tap.mk
Normal file
545
glib-tap.mk
Normal file
@@ -0,0 +1,545 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<title>glib - Low level core library</title>
|
||||
<meta name='generator' content='cgit v0.9.2'/>
|
||||
<meta name='robots' content='index, nofollow'/>
|
||||
<link rel='stylesheet' type='text/css' href='/browse/cgit-gnome.css'/>
|
||||
<link rel='shortcut icon' href='http://www-old.gnome.org/img/logo/foot-16.png'/>
|
||||
<link rel='alternate' title='Atom feed' href='https://git.gnome.org/browse/glib/atom/glib-tap.mk?h=master' type='application/atom+xml'/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="global_domain_bar">
|
||||
<div class="maxwidth">
|
||||
<div class="tab">
|
||||
<a class="root" href="https://www.gnome.org/">GNOME.org</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="page">
|
||||
<div id="logo_bar" class="container_12">
|
||||
<div id="logo" class="grid_3">
|
||||
<a title="Go to home page" href="https://git.gnome.org/"><img src="https://static.gnome.org/img/gnome-git.png" alt="GNOME: Git Repository" /></a>
|
||||
</div>
|
||||
|
||||
<div id="top_bar" class="grid_9">
|
||||
<div class="left">
|
||||
<div class="menu-globalnav-container">
|
||||
<ul id="menu-globalnav" class="menu">
|
||||
<li id="menu-item-1039" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1039">
|
||||
<a href="https://git.gnome.org/">Home</a></li>
|
||||
|
||||
<li id="menu-item-1037" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1037">
|
||||
<a href="https://wiki.gnome.org/Git">Git Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id='cgit'><table id='header'>
|
||||
<tr>
|
||||
<td class='main'><a href='/browse/'>index</a> : <a title='glib' href='/browse/glib/'>glib</a></td><td class='form'><form method='get' action=''>
|
||||
<select name='h' onchange='this.form.submit();'>
|
||||
<option value='GLIB_1_1_3_MARTIN'>GLIB_1_1_3_MARTIN</option>
|
||||
<option value='GLIB_1_1_4_THREADS'>GLIB_1_1_4_THREADS</option>
|
||||
<option value='GLIB_1_3_HACKS'>GLIB_1_3_HACKS</option>
|
||||
<option value='GLIB_2_15_0'>GLIB_2_15_0</option>
|
||||
<option value='dispatch-data'>dispatch-data</option>
|
||||
<option value='gdbus-daemon'>gdbus-daemon</option>
|
||||
<option value='gdbus-daemon2'>gdbus-daemon2</option>
|
||||
<option value='glib-1-2'>glib-1-2</option>
|
||||
<option value='glib-2-0'>glib-2-0</option>
|
||||
<option value='glib-2-10'>glib-2-10</option>
|
||||
<option value='glib-2-12'>glib-2-12</option>
|
||||
<option value='glib-2-14'>glib-2-14</option>
|
||||
<option value='glib-2-16'>glib-2-16</option>
|
||||
<option value='glib-2-18'>glib-2-18</option>
|
||||
<option value='glib-2-2'>glib-2-2</option>
|
||||
<option value='glib-2-20'>glib-2-20</option>
|
||||
<option value='glib-2-22'>glib-2-22</option>
|
||||
<option value='glib-2-24'>glib-2-24</option>
|
||||
<option value='glib-2-26'>glib-2-26</option>
|
||||
<option value='glib-2-28'>glib-2-28</option>
|
||||
<option value='glib-2-30'>glib-2-30</option>
|
||||
<option value='glib-2-32'>glib-2-32</option>
|
||||
<option value='glib-2-34'>glib-2-34</option>
|
||||
<option value='glib-2-36'>glib-2-36</option>
|
||||
<option value='glib-2-38'>glib-2-38</option>
|
||||
<option value='glib-2-4'>glib-2-4</option>
|
||||
<option value='glib-2-6'>glib-2-6</option>
|
||||
<option value='glib-2-8'>glib-2-8</option>
|
||||
<option value='glib-main-loop'>glib-main-loop</option>
|
||||
<option value='glib-threads'>glib-threads</option>
|
||||
<option value='master' selected='selected'>master</option>
|
||||
<option value='new-gsettings'>new-gsettings</option>
|
||||
<option value='signal-performance'>signal-performance</option>
|
||||
<option value='test/gobjectnew'>test/gobjectnew</option>
|
||||
<option value='tizen/kdbus-dev'>tizen/kdbus-dev</option>
|
||||
<option value='wip/async-io-perf'>wip/async-io-perf</option>
|
||||
<option value='wip/child-catchall'>wip/child-catchall</option>
|
||||
<option value='wip/coverity-fixes'>wip/coverity-fixes</option>
|
||||
<option value='wip/danw/clicert'>wip/danw/clicert</option>
|
||||
<option value='wip/danw/glib.mk'>wip/danw/glib.mk</option>
|
||||
<option value='wip/dbusable'>wip/dbusable</option>
|
||||
<option value='wip/desktop-actions'>wip/desktop-actions</option>
|
||||
<option value='wip/doc-fixes'>wip/doc-fixes</option>
|
||||
<option value='wip/format-errors'>wip/format-errors</option>
|
||||
<option value='wip/free'>wip/free</option>
|
||||
<option value='wip/g-action-print-detailed-name'>wip/g-action-print-detailed-name</option>
|
||||
<option value='wip/gbytes-takeover'>wip/gbytes-takeover</option>
|
||||
<option value='wip/gcleanup'>wip/gcleanup</option>
|
||||
<option value='wip/gcleanup-desrt'>wip/gcleanup-desrt</option>
|
||||
<option value='wip/gdesktopappinfo'>wip/gdesktopappinfo</option>
|
||||
<option value='wip/gicon'>wip/gicon</option>
|
||||
<option value='wip/gnotification'>wip/gnotification</option>
|
||||
<option value='wip/gobjectnew'>wip/gobjectnew</option>
|
||||
<option value='wip/gproperty'>wip/gproperty</option>
|
||||
<option value='wip/gproperty-2'>wip/gproperty-2</option>
|
||||
<option value='wip/gsettings-list'>wip/gsettings-list</option>
|
||||
<option value='wip/gsettings-work'>wip/gsettings-work</option>
|
||||
<option value='wip/gsubprocess'>wip/gsubprocess</option>
|
||||
<option value='wip/gsubprocess-2.36'>wip/gsubprocess-2.36</option>
|
||||
<option value='wip/gsubprocess-desrt'>wip/gsubprocess-desrt</option>
|
||||
<option value='wip/gsubprocess-ostreams'>wip/gsubprocess-ostreams</option>
|
||||
<option value='wip/gutils-splitup'>wip/gutils-splitup</option>
|
||||
<option value='wip/installed-tests'>wip/installed-tests</option>
|
||||
<option value='wip/latest-gsubprocess'>wip/latest-gsubprocess</option>
|
||||
<option value='wip/le-gsubprocess'>wip/le-gsubprocess</option>
|
||||
<option value='wip/linux'>wip/linux</option>
|
||||
<option value='wip/locale-monitor'>wip/locale-monitor</option>
|
||||
<option value='wip/makefile.glib'>wip/makefile.glib</option>
|
||||
<option value='wip/mapped-bytes'>wip/mapped-bytes</option>
|
||||
<option value='wip/new-parser'>wip/new-parser</option>
|
||||
<option value='wip/pcre-jit'>wip/pcre-jit</option>
|
||||
<option value='wip/pcre-mark'>wip/pcre-mark</option>
|
||||
<option value='wip/private-rework-3'>wip/private-rework-3</option>
|
||||
<option value='wip/resources2'>wip/resources2</option>
|
||||
<option value='wip/serializable'>wip/serializable</option>
|
||||
<option value='wip/settings-backend'>wip/settings-backend</option>
|
||||
<option value='wip/subprocess-2013'>wip/subprocess-2013</option>
|
||||
<option value='wip/symbol-visibility'>wip/symbol-visibility</option>
|
||||
<option value='wip/task'>wip/task</option>
|
||||
<option value='wip/test-cleanup'>wip/test-cleanup</option>
|
||||
<option value='wip/threadsafe-qdata'>wip/threadsafe-qdata</option>
|
||||
<option value='wip/unicode-graphemebreak'>wip/unicode-graphemebreak</option>
|
||||
<option value='wip/version-bounds'>wip/version-bounds</option>
|
||||
<option value='wip/win32-source-api'>wip/win32-source-api</option>
|
||||
</select> <input type='submit' name='' value='switch'/></form></td></tr>
|
||||
<tr><td class='sub'>Low level core library</td><td class='sub right'></td></tr></table>
|
||||
<table class='tabs'><tr><td>
|
||||
<a href='/browse/glib/'>summary</a><a href='/browse/glib/refs/'>refs</a><a href='/browse/glib/log/glib-tap.mk'>log</a><a class='active' href='/browse/glib/tree/glib-tap.mk'>tree</a><a href='/browse/glib/commit/glib-tap.mk'>commit</a><a href='/browse/glib/diff/glib-tap.mk'>diff</a></td><td class='form'><form class='right' method='get' action='/browse/glib/log/glib-tap.mk'>
|
||||
<select name='qt'>
|
||||
<option value='grep'>log msg</option>
|
||||
<option value='author'>author</option>
|
||||
<option value='committer'>committer</option>
|
||||
<option value='range'>range</option>
|
||||
</select>
|
||||
<input class='txt' type='text' size='10' name='q' value=''/>
|
||||
<input type='submit' value='search'/>
|
||||
</form>
|
||||
</td></tr></table>
|
||||
<div class='path'>path: <a href='/browse/glib/tree/'>root</a>/<a href='/browse/glib/tree/glib-tap.mk'>glib-tap.mk</a></div><div class='content'>blob: c97bf3f2813a580862c7f73d7dc62b7260a848a9 (<a href='/browse/glib/plain/glib-tap.mk'>plain</a>)
|
||||
<table summary='blob content' class='blob'>
|
||||
<tr><td class='linenumbers'><pre><a class='no' id='n1' name='n1' href='#n1'>1</a>
|
||||
<a class='no' id='n2' name='n2' href='#n2'>2</a>
|
||||
<a class='no' id='n3' name='n3' href='#n3'>3</a>
|
||||
<a class='no' id='n4' name='n4' href='#n4'>4</a>
|
||||
<a class='no' id='n5' name='n5' href='#n5'>5</a>
|
||||
<a class='no' id='n6' name='n6' href='#n6'>6</a>
|
||||
<a class='no' id='n7' name='n7' href='#n7'>7</a>
|
||||
<a class='no' id='n8' name='n8' href='#n8'>8</a>
|
||||
<a class='no' id='n9' name='n9' href='#n9'>9</a>
|
||||
<a class='no' id='n10' name='n10' href='#n10'>10</a>
|
||||
<a class='no' id='n11' name='n11' href='#n11'>11</a>
|
||||
<a class='no' id='n12' name='n12' href='#n12'>12</a>
|
||||
<a class='no' id='n13' name='n13' href='#n13'>13</a>
|
||||
<a class='no' id='n14' name='n14' href='#n14'>14</a>
|
||||
<a class='no' id='n15' name='n15' href='#n15'>15</a>
|
||||
<a class='no' id='n16' name='n16' href='#n16'>16</a>
|
||||
<a class='no' id='n17' name='n17' href='#n17'>17</a>
|
||||
<a class='no' id='n18' name='n18' href='#n18'>18</a>
|
||||
<a class='no' id='n19' name='n19' href='#n19'>19</a>
|
||||
<a class='no' id='n20' name='n20' href='#n20'>20</a>
|
||||
<a class='no' id='n21' name='n21' href='#n21'>21</a>
|
||||
<a class='no' id='n22' name='n22' href='#n22'>22</a>
|
||||
<a class='no' id='n23' name='n23' href='#n23'>23</a>
|
||||
<a class='no' id='n24' name='n24' href='#n24'>24</a>
|
||||
<a class='no' id='n25' name='n25' href='#n25'>25</a>
|
||||
<a class='no' id='n26' name='n26' href='#n26'>26</a>
|
||||
<a class='no' id='n27' name='n27' href='#n27'>27</a>
|
||||
<a class='no' id='n28' name='n28' href='#n28'>28</a>
|
||||
<a class='no' id='n29' name='n29' href='#n29'>29</a>
|
||||
<a class='no' id='n30' name='n30' href='#n30'>30</a>
|
||||
<a class='no' id='n31' name='n31' href='#n31'>31</a>
|
||||
<a class='no' id='n32' name='n32' href='#n32'>32</a>
|
||||
<a class='no' id='n33' name='n33' href='#n33'>33</a>
|
||||
<a class='no' id='n34' name='n34' href='#n34'>34</a>
|
||||
<a class='no' id='n35' name='n35' href='#n35'>35</a>
|
||||
<a class='no' id='n36' name='n36' href='#n36'>36</a>
|
||||
<a class='no' id='n37' name='n37' href='#n37'>37</a>
|
||||
<a class='no' id='n38' name='n38' href='#n38'>38</a>
|
||||
<a class='no' id='n39' name='n39' href='#n39'>39</a>
|
||||
<a class='no' id='n40' name='n40' href='#n40'>40</a>
|
||||
<a class='no' id='n41' name='n41' href='#n41'>41</a>
|
||||
<a class='no' id='n42' name='n42' href='#n42'>42</a>
|
||||
<a class='no' id='n43' name='n43' href='#n43'>43</a>
|
||||
<a class='no' id='n44' name='n44' href='#n44'>44</a>
|
||||
<a class='no' id='n45' name='n45' href='#n45'>45</a>
|
||||
<a class='no' id='n46' name='n46' href='#n46'>46</a>
|
||||
<a class='no' id='n47' name='n47' href='#n47'>47</a>
|
||||
<a class='no' id='n48' name='n48' href='#n48'>48</a>
|
||||
<a class='no' id='n49' name='n49' href='#n49'>49</a>
|
||||
<a class='no' id='n50' name='n50' href='#n50'>50</a>
|
||||
<a class='no' id='n51' name='n51' href='#n51'>51</a>
|
||||
<a class='no' id='n52' name='n52' href='#n52'>52</a>
|
||||
<a class='no' id='n53' name='n53' href='#n53'>53</a>
|
||||
<a class='no' id='n54' name='n54' href='#n54'>54</a>
|
||||
<a class='no' id='n55' name='n55' href='#n55'>55</a>
|
||||
<a class='no' id='n56' name='n56' href='#n56'>56</a>
|
||||
<a class='no' id='n57' name='n57' href='#n57'>57</a>
|
||||
<a class='no' id='n58' name='n58' href='#n58'>58</a>
|
||||
<a class='no' id='n59' name='n59' href='#n59'>59</a>
|
||||
<a class='no' id='n60' name='n60' href='#n60'>60</a>
|
||||
<a class='no' id='n61' name='n61' href='#n61'>61</a>
|
||||
<a class='no' id='n62' name='n62' href='#n62'>62</a>
|
||||
<a class='no' id='n63' name='n63' href='#n63'>63</a>
|
||||
<a class='no' id='n64' name='n64' href='#n64'>64</a>
|
||||
<a class='no' id='n65' name='n65' href='#n65'>65</a>
|
||||
<a class='no' id='n66' name='n66' href='#n66'>66</a>
|
||||
<a class='no' id='n67' name='n67' href='#n67'>67</a>
|
||||
<a class='no' id='n68' name='n68' href='#n68'>68</a>
|
||||
<a class='no' id='n69' name='n69' href='#n69'>69</a>
|
||||
<a class='no' id='n70' name='n70' href='#n70'>70</a>
|
||||
<a class='no' id='n71' name='n71' href='#n71'>71</a>
|
||||
<a class='no' id='n72' name='n72' href='#n72'>72</a>
|
||||
<a class='no' id='n73' name='n73' href='#n73'>73</a>
|
||||
<a class='no' id='n74' name='n74' href='#n74'>74</a>
|
||||
<a class='no' id='n75' name='n75' href='#n75'>75</a>
|
||||
<a class='no' id='n76' name='n76' href='#n76'>76</a>
|
||||
<a class='no' id='n77' name='n77' href='#n77'>77</a>
|
||||
<a class='no' id='n78' name='n78' href='#n78'>78</a>
|
||||
<a class='no' id='n79' name='n79' href='#n79'>79</a>
|
||||
<a class='no' id='n80' name='n80' href='#n80'>80</a>
|
||||
<a class='no' id='n81' name='n81' href='#n81'>81</a>
|
||||
<a class='no' id='n82' name='n82' href='#n82'>82</a>
|
||||
<a class='no' id='n83' name='n83' href='#n83'>83</a>
|
||||
<a class='no' id='n84' name='n84' href='#n84'>84</a>
|
||||
<a class='no' id='n85' name='n85' href='#n85'>85</a>
|
||||
<a class='no' id='n86' name='n86' href='#n86'>86</a>
|
||||
<a class='no' id='n87' name='n87' href='#n87'>87</a>
|
||||
<a class='no' id='n88' name='n88' href='#n88'>88</a>
|
||||
<a class='no' id='n89' name='n89' href='#n89'>89</a>
|
||||
<a class='no' id='n90' name='n90' href='#n90'>90</a>
|
||||
<a class='no' id='n91' name='n91' href='#n91'>91</a>
|
||||
<a class='no' id='n92' name='n92' href='#n92'>92</a>
|
||||
<a class='no' id='n93' name='n93' href='#n93'>93</a>
|
||||
<a class='no' id='n94' name='n94' href='#n94'>94</a>
|
||||
<a class='no' id='n95' name='n95' href='#n95'>95</a>
|
||||
<a class='no' id='n96' name='n96' href='#n96'>96</a>
|
||||
<a class='no' id='n97' name='n97' href='#n97'>97</a>
|
||||
<a class='no' id='n98' name='n98' href='#n98'>98</a>
|
||||
<a class='no' id='n99' name='n99' href='#n99'>99</a>
|
||||
<a class='no' id='n100' name='n100' href='#n100'>100</a>
|
||||
<a class='no' id='n101' name='n101' href='#n101'>101</a>
|
||||
<a class='no' id='n102' name='n102' href='#n102'>102</a>
|
||||
<a class='no' id='n103' name='n103' href='#n103'>103</a>
|
||||
<a class='no' id='n104' name='n104' href='#n104'>104</a>
|
||||
<a class='no' id='n105' name='n105' href='#n105'>105</a>
|
||||
<a class='no' id='n106' name='n106' href='#n106'>106</a>
|
||||
<a class='no' id='n107' name='n107' href='#n107'>107</a>
|
||||
<a class='no' id='n108' name='n108' href='#n108'>108</a>
|
||||
<a class='no' id='n109' name='n109' href='#n109'>109</a>
|
||||
<a class='no' id='n110' name='n110' href='#n110'>110</a>
|
||||
<a class='no' id='n111' name='n111' href='#n111'>111</a>
|
||||
<a class='no' id='n112' name='n112' href='#n112'>112</a>
|
||||
<a class='no' id='n113' name='n113' href='#n113'>113</a>
|
||||
<a class='no' id='n114' name='n114' href='#n114'>114</a>
|
||||
<a class='no' id='n115' name='n115' href='#n115'>115</a>
|
||||
<a class='no' id='n116' name='n116' href='#n116'>116</a>
|
||||
<a class='no' id='n117' name='n117' href='#n117'>117</a>
|
||||
<a class='no' id='n118' name='n118' href='#n118'>118</a>
|
||||
<a class='no' id='n119' name='n119' href='#n119'>119</a>
|
||||
<a class='no' id='n120' name='n120' href='#n120'>120</a>
|
||||
<a class='no' id='n121' name='n121' href='#n121'>121</a>
|
||||
<a class='no' id='n122' name='n122' href='#n122'>122</a>
|
||||
<a class='no' id='n123' name='n123' href='#n123'>123</a>
|
||||
<a class='no' id='n124' name='n124' href='#n124'>124</a>
|
||||
<a class='no' id='n125' name='n125' href='#n125'>125</a>
|
||||
<a class='no' id='n126' name='n126' href='#n126'>126</a>
|
||||
<a class='no' id='n127' name='n127' href='#n127'>127</a>
|
||||
<a class='no' id='n128' name='n128' href='#n128'>128</a>
|
||||
<a class='no' id='n129' name='n129' href='#n129'>129</a>
|
||||
<a class='no' id='n130' name='n130' href='#n130'>130</a>
|
||||
<a class='no' id='n131' name='n131' href='#n131'>131</a>
|
||||
<a class='no' id='n132' name='n132' href='#n132'>132</a>
|
||||
<a class='no' id='n133' name='n133' href='#n133'>133</a>
|
||||
<a class='no' id='n134' name='n134' href='#n134'>134</a>
|
||||
</pre></td>
|
||||
<td class='lines'><pre><code><span class="hl slc"># GLIB - Library of useful C routines</span>
|
||||
|
||||
TESTS_ENVIRONMENT<span class="hl opt">=</span> \
|
||||
G_TEST_SRCDIR<span class="hl opt">=</span><span class="hl str">"$(abs_srcdir)"</span> \
|
||||
G_TEST_BUILDDIR<span class="hl opt">=</span><span class="hl str">"$(abs_builddir)"</span> \
|
||||
G_DEBUG<span class="hl opt">=</span>gc-friendly \
|
||||
MALLOC_CHECK_<span class="hl opt">=</span><span class="hl num">2</span> \
|
||||
MALLOC_PERTURB_<span class="hl opt">=$$(($${</span>RANDOM<span class="hl opt">:-</span><span class="hl num">256</span><span class="hl opt">} %</span> <span class="hl num">256</span><span class="hl opt">))</span>
|
||||
LOG_DRIVER <span class="hl opt">=</span> env AM_TAP_AWK<span class="hl opt">=</span><span class="hl str">'$(AWK)'</span> <span class="hl opt">$(</span>SHELL<span class="hl opt">) $(</span>top_srcdir<span class="hl opt">)/</span>tap-driver.sh
|
||||
LOG_COMPILER <span class="hl opt">= $(</span>top_srcdir<span class="hl opt">)/</span>tap-test
|
||||
|
||||
NULL <span class="hl opt">=</span>
|
||||
|
||||
<span class="hl slc"># initialize variables for unconditional += appending</span>
|
||||
BUILT_SOURCES <span class="hl opt">=</span>
|
||||
BUILT_EXTRA_DIST <span class="hl opt">=</span>
|
||||
CLEANFILES <span class="hl opt">= *</span>.log <span class="hl opt">*</span>.trs
|
||||
DISTCLEANFILES <span class="hl opt">=</span>
|
||||
MAINTAINERCLEANFILES <span class="hl opt">=</span>
|
||||
EXTRA_DIST <span class="hl opt">=</span>
|
||||
TESTS <span class="hl opt">=</span>
|
||||
|
||||
installed_test_LTLIBRARIES <span class="hl opt">=</span>
|
||||
installed_test_PROGRAMS <span class="hl opt">=</span>
|
||||
installed_test_SCRIPTS <span class="hl opt">=</span>
|
||||
nobase_installed_test_DATA <span class="hl opt">=</span>
|
||||
|
||||
noinst_LTLIBRARIES <span class="hl opt">=</span>
|
||||
noinst_PROGRAMS <span class="hl opt">=</span>
|
||||
noinst_SCRIPTS <span class="hl opt">=</span>
|
||||
noinst_DATA <span class="hl opt">=</span>
|
||||
|
||||
check_LTLIBRARIES <span class="hl opt">=</span>
|
||||
check_PROGRAMS <span class="hl opt">=</span>
|
||||
check_SCRIPTS <span class="hl opt">=</span>
|
||||
check_DATA <span class="hl opt">=</span>
|
||||
|
||||
<span class="hl slc"># We support a fairly large range of possible variables. It is expected that all types of files in a test suite</span>
|
||||
<span class="hl slc"># will belong in exactly one of the following variables.</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># First, we support the usual automake suffixes, but in lowercase, with the customary meaning:</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># test_programs, test_scripts, test_data, test_ltlibraries</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># The above are used to list files that are involved in both uninstalled and installed testing. The</span>
|
||||
<span class="hl slc"># test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.</span>
|
||||
<span class="hl slc"># Note that _data is always used with the nobase_ automake variable name to ensure that installed test data is</span>
|
||||
<span class="hl slc"># installed in the same way as it appears in the package layout.</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',</span>
|
||||
<span class="hl slc"># like so:</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># installed_test_programs, uninstalled_test_programs</span>
|
||||
<span class="hl slc"># installed_test_scripts, uninstalled_test_scripts</span>
|
||||
<span class="hl slc"># installed_test_data, uninstalled_test_data</span>
|
||||
<span class="hl slc"># installed_test_ltlibraries, uninstalled_test_ltlibraries</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># Additionally, we support 'extra' infixes for programs and scripts. This is used for support programs/scripts</span>
|
||||
<span class="hl slc"># that should not themselves be run as testcases (but exist to be used from other testcases):</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs</span>
|
||||
<span class="hl slc"># test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or data</span>
|
||||
<span class="hl slc"># file automatically end up in the tarball.</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># dist_test_scripts, dist_test_data, dist_test_extra_scripts</span>
|
||||
<span class="hl slc"># dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts</span>
|
||||
<span class="hl slc"># dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># Note that no file is automatically disted unless it appears in one of the dist_ variables. This follows the</span>
|
||||
<span class="hl slc"># standard automake convention of not disting programs scripts or data by default.</span>
|
||||
<span class="hl slc">#</span>
|
||||
<span class="hl slc"># test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their disted</span>
|
||||
<span class="hl slc"># variants) will be run as part of the in-tree 'make check'. These are all assumed to be runnable under</span>
|
||||
<span class="hl slc"># gtester. That's a bit strange for scripts, but it's possible.</span>
|
||||
|
||||
TESTS <span class="hl opt">+= $(</span>test_programs<span class="hl opt">) $(</span>test_scripts<span class="hl opt">) $(</span>uninstalled_test_programs<span class="hl opt">) $(</span>uninstalled_test_scripts<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>dist_test_scripts<span class="hl opt">) $(</span>dist_uninstalled_test_scripts<span class="hl opt">)</span>
|
||||
|
||||
<span class="hl slc"># Note: build even the installed-only targets during 'make check' to ensure that they still work.</span>
|
||||
<span class="hl slc"># We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to</span>
|
||||
<span class="hl slc"># prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were</span>
|
||||
<span class="hl slc"># filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.</span>
|
||||
all_test_programs <span class="hl opt">= $(</span>test_programs<span class="hl opt">) $(</span>uninstalled_test_programs<span class="hl opt">) $(</span>installed_test_programs<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>test_extra_programs<span class="hl opt">) $(</span>uninstalled_test_extra_programs<span class="hl opt">) $(</span>installed_test_extra_programs<span class="hl opt">)</span>
|
||||
all_test_scripts <span class="hl opt">= $(</span>test_scripts<span class="hl opt">) $(</span>uninstalled_test_scripts<span class="hl opt">) $(</span>installed_test_scripts<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>test_extra_scripts<span class="hl opt">) $(</span>uninstalled_test_extra_scripts<span class="hl opt">) $(</span>installed_test_extra_scripts<span class="hl opt">)</span>
|
||||
all_dist_test_scripts <span class="hl opt">= $(</span>dist_test_scripts<span class="hl opt">) $(</span>dist_uninstalled_test_scripts<span class="hl opt">) $(</span>dist_installed_test_scripts<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>dist_test_extra_scripts<span class="hl opt">) $(</span>dist_uninstalled_test_extra_scripts<span class="hl opt">) $(</span>dist_installed_test_extra_scripts<span class="hl opt">)</span>
|
||||
all_test_scripts <span class="hl opt">+= $(</span>all_dist_test_scripts<span class="hl opt">)</span>
|
||||
EXTRA_DIST <span class="hl opt">+= $(</span>all_dist_test_scripts<span class="hl opt">)</span>
|
||||
all_test_data <span class="hl opt">= $(</span>test_data<span class="hl opt">) $(</span>uninstalled_test_data<span class="hl opt">) $(</span>installed_test_data<span class="hl opt">)</span>
|
||||
all_dist_test_data <span class="hl opt">= $(</span>dist_test_data<span class="hl opt">) $(</span>dist_uninstalled_test_data<span class="hl opt">) $(</span>dist_installed_test_data<span class="hl opt">)</span>
|
||||
all_test_data <span class="hl opt">+= $(</span>all_dist_test_data<span class="hl opt">)</span>
|
||||
EXTRA_DIST <span class="hl opt">+= $(</span>all_dist_test_data<span class="hl opt">)</span>
|
||||
all_test_ltlibs <span class="hl opt">= $(</span>test_ltlibraries<span class="hl opt">) $(</span>uninstalled_test_ltlibraries<span class="hl opt">) $(</span>installed_test_ltlibraries<span class="hl opt">)</span>
|
||||
|
||||
if ENABLE_ALWAYS_BUILD_TESTS
|
||||
noinst_LTLIBRARIES <span class="hl opt">+= $(</span>all_test_ltlibs<span class="hl opt">)</span>
|
||||
noinst_PROGRAMS <span class="hl opt">+= $(</span>all_test_programs<span class="hl opt">)</span>
|
||||
noinst_SCRIPTS <span class="hl opt">+= $(</span>all_test_scripts<span class="hl opt">)</span>
|
||||
noinst_DATA <span class="hl opt">+= $(</span>all_test_data<span class="hl opt">)</span>
|
||||
<span class="hl kwb">else</span>
|
||||
check_LTLIBRARIES <span class="hl opt">+= $(</span>all_test_ltlibs<span class="hl opt">)</span>
|
||||
check_PROGRAMS <span class="hl opt">+= $(</span>all_test_programs<span class="hl opt">)</span>
|
||||
check_SCRIPTS <span class="hl opt">+= $(</span>all_test_scripts<span class="hl opt">)</span>
|
||||
check_DATA <span class="hl opt">+= $(</span>all_test_data<span class="hl opt">)</span>
|
||||
<span class="hl kwb">endif</span>
|
||||
|
||||
if ENABLE_INSTALLED_TESTS
|
||||
installed_test_PROGRAMS <span class="hl opt">+= $(</span>test_programs<span class="hl opt">) $(</span>installed_test_programs<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>test_extra_programs<span class="hl opt">) $(</span>installed_test_extra_programs<span class="hl opt">)</span>
|
||||
installed_test_SCRIPTS <span class="hl opt">+= $(</span>test_scripts<span class="hl opt">) $(</span>installed_test_scripts<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>test_extra_scripts<span class="hl opt">) $(</span>test_installed_extra_scripts<span class="hl opt">)</span>
|
||||
installed_test_SCRIPTS <span class="hl opt">+= $(</span>dist_test_scripts<span class="hl opt">) $(</span>dist_test_extra_scripts<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>dist_installed_test_scripts<span class="hl opt">) $(</span>dist_installed_test_extra_scripts<span class="hl opt">)</span>
|
||||
nobase_installed_test_DATA <span class="hl opt">+= $(</span>test_data<span class="hl opt">) $(</span>installed_test_data<span class="hl opt">)</span>
|
||||
nobase_installed_test_DATA <span class="hl opt">+= $(</span>dist_test_data<span class="hl opt">) $(</span>dist_installed_test_data<span class="hl opt">)</span>
|
||||
installed_test_LTLIBRARIES <span class="hl opt">+= $(</span>test_ltlibraries<span class="hl opt">) $(</span>installed_test_ltlibraries<span class="hl opt">)</span>
|
||||
installed_testcases <span class="hl opt">= $(</span>test_programs<span class="hl opt">) $(</span>installed_test_programs<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>test_scripts<span class="hl opt">) $(</span>installed_test_scripts<span class="hl opt">)</span> \
|
||||
<span class="hl opt">$(</span>dist_test_scripts<span class="hl opt">) $(</span>dist_installed_test_scripts<span class="hl opt">)</span>
|
||||
|
||||
installed_test_meta_DATA <span class="hl opt">= $(</span>installed_testcases<span class="hl opt">:=</span>.<span class="hl kwa">test</span><span class="hl opt">)</span>
|
||||
|
||||
<span class="hl opt">%</span>.<span class="hl kwa">test</span><span class="hl opt">: %$(</span>EXEEXT<span class="hl opt">)</span> Makefile
|
||||
<span class="hl opt">$(</span>AM_V_GEN<span class="hl opt">) (</span>echo <span class="hl str">'[Test]'</span> <span class="hl opt">> $</span>@.tmp<span class="hl opt">;</span> \
|
||||
echo <span class="hl str">'Type=session'</span> <span class="hl opt">>> $</span>@.tmp<span class="hl opt">;</span> \
|
||||
echo <span class="hl str">'Exec=$(installed_testdir)/$<'</span> <span class="hl opt">>> $</span>@.tmp<span class="hl opt">;</span> \
|
||||
mv <span class="hl opt">$</span>@.tmp <span class="hl opt">$</span>@<span class="hl opt">)</span>
|
||||
|
||||
CLEANFILES <span class="hl opt">+= $(</span>installed_test_meta_DATA<span class="hl opt">)</span>
|
||||
<span class="hl kwb">endif</span>
|
||||
</code></pre></td></tr></table>
|
||||
</div> <!-- class=content -->
|
||||
</div>
|
||||
<div id="footer_community"></div>
|
||||
|
||||
<div id="footer_grass"></div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container_13" id="container_12">
|
||||
<div class="links grid_9">
|
||||
<div class="menu-footer-container">
|
||||
<ul id="menu-footer" class="menu">
|
||||
<li id="menu-item-1048" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-1048">
|
||||
<a href="/">The GNOME Project</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1049" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1049">
|
||||
<a href="https://www.gnome.org/about/">About Us</a></li>
|
||||
|
||||
<li id="menu-item-1050" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1050">
|
||||
<a href="https://www.gnome.org/get-involved/">Get Involved</a></li>
|
||||
|
||||
<li id="menu-item-1051" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1051">
|
||||
<a href="https://www.gnome.org/teams/">Teams</a></li>
|
||||
|
||||
<li id="menu-item-1053" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1053">
|
||||
<a href="https://www.gnome.org/support-gnome/">Support GNOME</a></li>
|
||||
|
||||
<li id="menu-item-1054" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1054">
|
||||
<a href="https://www.gnome.org/contact/">Contact Us</a></li>
|
||||
|
||||
<li id="menu-item-2246" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-2246">
|
||||
<a href="https://www.gnome.org/foundation/">The GNOME Foundation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li id="menu-item-1047" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1047">
|
||||
<a href="#">Resources</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1055" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1055">
|
||||
<a href="https://developer.gnome.org">Developer Center</a></li>
|
||||
|
||||
<li id="menu-item-1056" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1056">
|
||||
<a href="https://help.gnome.org">Documentation</a></li>
|
||||
|
||||
<li id="menu-item-1057" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1057">
|
||||
<a href="https://wiki.gnome.org">Wiki</a></li>
|
||||
|
||||
<li id="menu-item-1058" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1058">
|
||||
<a href="https://mail.gnome.org/mailman/listinfo">Mailing Lists</a></li>
|
||||
|
||||
<li id="menu-item-1059" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1059">
|
||||
<a href="https://wiki.gnome.org/GnomeIrcChannels">IRC Channels</a></li>
|
||||
|
||||
<li id="menu-item-1060" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1060">
|
||||
<a href="https://bugzilla.gnome.org/">Bug Tracker</a></li>
|
||||
|
||||
<li id="menu-item-1061" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1061">
|
||||
<a href="https://git.gnome.org/browse/">Development Code</a></li>
|
||||
|
||||
<li id="menu-item-1062" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1062">
|
||||
<a href="https://wiki.gnome.org/Jhbuild">Build Tool</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li id="menu-item-1046" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1046">
|
||||
<a href="/news">News</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1063" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1063">
|
||||
<a href="https://www.gnome.org/press/">Press Releases</a></li>
|
||||
|
||||
<li id="menu-item-1064" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1064">
|
||||
<a href="https://www.gnome.org/start/stable">Latest Release</a></li>
|
||||
|
||||
<li id="menu-item-1065" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1065">
|
||||
<a href="https://planet.gnome.org">Planet GNOME</a></li>
|
||||
|
||||
<li id="menu-item-1067" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1067">
|
||||
<a href="https://news.gnome.org">Development News</a></li>
|
||||
|
||||
<li id="menu-item-1068" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1068">
|
||||
<a href="https://identi.ca/gnome">Identi.ca</a></li>
|
||||
|
||||
<li id="menu-item-1069" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1069">
|
||||
<a href="https://twitter.com/gnome">Twitter</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footnotes" class="grid_9">
|
||||
<p>Copyright © 2004-2013, <a href="https://www.gnome.org/">The GNOME Project</a>.</p>
|
||||
<br />
|
||||
<small><p>Hosted by <a href="http://www.redhat.com/">Red Hat</a>.
|
||||
Powered by <a href="http://hjemli.net/git/cgit/">cgit</a>.</p>
|
||||
<p>To follow the commits, subscribe to <a href="http://mail.gnome.org/mailman/listinfo/commits-list">commits-list</a>. (can be limited to specific modules)</p></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- id=cgit -->
|
||||
</body>
|
||||
</html>
|
@@ -54,7 +54,7 @@ G_BEGIN_DECLS
|
||||
Yes we are :)
|
||||
Nobody should really be using more than 32 processors.
|
||||
*/
|
||||
#define GLIBTOP_NCPU 1024
|
||||
#define GLIBTOP_NCPU 32
|
||||
|
||||
typedef struct _glibtop_cpu glibtop_cpu;
|
||||
|
||||
|
@@ -79,8 +79,6 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
|
||||
libgtop_sysdeps_dir=openbsd
|
||||
libgtop_use_machine_h=yes
|
||||
libgtop_need_server=yes
|
||||
libgtop_sysdeps_private_mountlist=yes
|
||||
libgtop_sysdeps_private_fsusage=yes
|
||||
libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2555 $(bindir)/libgtop_server2'
|
||||
;;
|
||||
freebsd*|kfreebsd*)
|
||||
@@ -160,10 +158,21 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
|
||||
AC_CHECK_LIB(kvm, kvm_open, KVM_LIBS=-lkvm, KVM_LIBS=)
|
||||
AC_SUBST(KVM_LIBS)
|
||||
|
||||
AC_CHECK_HEADERS(net/if_var.h,,, [
|
||||
#include <net/if.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>])
|
||||
case "$host_os" in
|
||||
kfreebsd*)
|
||||
EXTRA_SYSDEPS_LIBS="-lgeom -ldevstat"
|
||||
;;
|
||||
freebsd*)
|
||||
osreldate=`sysctl -n kern.osreldate 2>/dev/null`
|
||||
if test -n "${osreldate}" && test ${osreldate} -ge 600000 ; then
|
||||
EXTRA_SYSDEPS_LIBS="-lgeom -ldevstat"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(EXTRA_SYSDEPS_LIBS)
|
||||
|
||||
AC_CHECK_HEADERS(net/if_var.h)
|
||||
AC_MSG_CHECKING([for I4B])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
|
333
m4/glibtests.m4
Normal file
333
m4/glibtests.m4
Normal file
@@ -0,0 +1,333 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<title>glib - Low level core library</title>
|
||||
<meta name='generator' content='cgit v0.9.2'/>
|
||||
<meta name='robots' content='index, nofollow'/>
|
||||
<link rel='stylesheet' type='text/css' href='/browse/cgit-gnome.css'/>
|
||||
<link rel='shortcut icon' href='http://www-old.gnome.org/img/logo/foot-16.png'/>
|
||||
<link rel='alternate' title='Atom feed' href='https://git.gnome.org/browse/glib/atom/m4macros/glibtests.m4?h=master' type='application/atom+xml'/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="global_domain_bar">
|
||||
<div class="maxwidth">
|
||||
<div class="tab">
|
||||
<a class="root" href="https://www.gnome.org/">GNOME.org</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="page">
|
||||
<div id="logo_bar" class="container_12">
|
||||
<div id="logo" class="grid_3">
|
||||
<a title="Go to home page" href="https://git.gnome.org/"><img src="https://static.gnome.org/img/gnome-git.png" alt="GNOME: Git Repository" /></a>
|
||||
</div>
|
||||
|
||||
<div id="top_bar" class="grid_9">
|
||||
<div class="left">
|
||||
<div class="menu-globalnav-container">
|
||||
<ul id="menu-globalnav" class="menu">
|
||||
<li id="menu-item-1039" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1039">
|
||||
<a href="https://git.gnome.org/">Home</a></li>
|
||||
|
||||
<li id="menu-item-1037" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1037">
|
||||
<a href="https://wiki.gnome.org/Git">Git Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id='cgit'><table id='header'>
|
||||
<tr>
|
||||
<td class='main'><a href='/browse/'>index</a> : <a title='glib' href='/browse/glib/'>glib</a></td><td class='form'><form method='get' action=''>
|
||||
<select name='h' onchange='this.form.submit();'>
|
||||
<option value='GLIB_1_1_3_MARTIN'>GLIB_1_1_3_MARTIN</option>
|
||||
<option value='GLIB_1_1_4_THREADS'>GLIB_1_1_4_THREADS</option>
|
||||
<option value='GLIB_1_3_HACKS'>GLIB_1_3_HACKS</option>
|
||||
<option value='GLIB_2_15_0'>GLIB_2_15_0</option>
|
||||
<option value='dispatch-data'>dispatch-data</option>
|
||||
<option value='gdbus-daemon'>gdbus-daemon</option>
|
||||
<option value='gdbus-daemon2'>gdbus-daemon2</option>
|
||||
<option value='glib-1-2'>glib-1-2</option>
|
||||
<option value='glib-2-0'>glib-2-0</option>
|
||||
<option value='glib-2-10'>glib-2-10</option>
|
||||
<option value='glib-2-12'>glib-2-12</option>
|
||||
<option value='glib-2-14'>glib-2-14</option>
|
||||
<option value='glib-2-16'>glib-2-16</option>
|
||||
<option value='glib-2-18'>glib-2-18</option>
|
||||
<option value='glib-2-2'>glib-2-2</option>
|
||||
<option value='glib-2-20'>glib-2-20</option>
|
||||
<option value='glib-2-22'>glib-2-22</option>
|
||||
<option value='glib-2-24'>glib-2-24</option>
|
||||
<option value='glib-2-26'>glib-2-26</option>
|
||||
<option value='glib-2-28'>glib-2-28</option>
|
||||
<option value='glib-2-30'>glib-2-30</option>
|
||||
<option value='glib-2-32'>glib-2-32</option>
|
||||
<option value='glib-2-34'>glib-2-34</option>
|
||||
<option value='glib-2-36'>glib-2-36</option>
|
||||
<option value='glib-2-38'>glib-2-38</option>
|
||||
<option value='glib-2-4'>glib-2-4</option>
|
||||
<option value='glib-2-6'>glib-2-6</option>
|
||||
<option value='glib-2-8'>glib-2-8</option>
|
||||
<option value='glib-main-loop'>glib-main-loop</option>
|
||||
<option value='glib-threads'>glib-threads</option>
|
||||
<option value='master' selected='selected'>master</option>
|
||||
<option value='new-gsettings'>new-gsettings</option>
|
||||
<option value='signal-performance'>signal-performance</option>
|
||||
<option value='test/gobjectnew'>test/gobjectnew</option>
|
||||
<option value='tizen/kdbus-dev'>tizen/kdbus-dev</option>
|
||||
<option value='wip/async-io-perf'>wip/async-io-perf</option>
|
||||
<option value='wip/child-catchall'>wip/child-catchall</option>
|
||||
<option value='wip/coverity-fixes'>wip/coverity-fixes</option>
|
||||
<option value='wip/danw/clicert'>wip/danw/clicert</option>
|
||||
<option value='wip/danw/glib.mk'>wip/danw/glib.mk</option>
|
||||
<option value='wip/dbusable'>wip/dbusable</option>
|
||||
<option value='wip/desktop-actions'>wip/desktop-actions</option>
|
||||
<option value='wip/doc-fixes'>wip/doc-fixes</option>
|
||||
<option value='wip/format-errors'>wip/format-errors</option>
|
||||
<option value='wip/free'>wip/free</option>
|
||||
<option value='wip/g-action-print-detailed-name'>wip/g-action-print-detailed-name</option>
|
||||
<option value='wip/gbytes-takeover'>wip/gbytes-takeover</option>
|
||||
<option value='wip/gcleanup'>wip/gcleanup</option>
|
||||
<option value='wip/gcleanup-desrt'>wip/gcleanup-desrt</option>
|
||||
<option value='wip/gdesktopappinfo'>wip/gdesktopappinfo</option>
|
||||
<option value='wip/gicon'>wip/gicon</option>
|
||||
<option value='wip/gnotification'>wip/gnotification</option>
|
||||
<option value='wip/gobjectnew'>wip/gobjectnew</option>
|
||||
<option value='wip/gproperty'>wip/gproperty</option>
|
||||
<option value='wip/gproperty-2'>wip/gproperty-2</option>
|
||||
<option value='wip/gsettings-list'>wip/gsettings-list</option>
|
||||
<option value='wip/gsettings-work'>wip/gsettings-work</option>
|
||||
<option value='wip/gsubprocess'>wip/gsubprocess</option>
|
||||
<option value='wip/gsubprocess-2.36'>wip/gsubprocess-2.36</option>
|
||||
<option value='wip/gsubprocess-desrt'>wip/gsubprocess-desrt</option>
|
||||
<option value='wip/gsubprocess-ostreams'>wip/gsubprocess-ostreams</option>
|
||||
<option value='wip/gutils-splitup'>wip/gutils-splitup</option>
|
||||
<option value='wip/installed-tests'>wip/installed-tests</option>
|
||||
<option value='wip/latest-gsubprocess'>wip/latest-gsubprocess</option>
|
||||
<option value='wip/le-gsubprocess'>wip/le-gsubprocess</option>
|
||||
<option value='wip/linux'>wip/linux</option>
|
||||
<option value='wip/locale-monitor'>wip/locale-monitor</option>
|
||||
<option value='wip/makefile.glib'>wip/makefile.glib</option>
|
||||
<option value='wip/mapped-bytes'>wip/mapped-bytes</option>
|
||||
<option value='wip/new-parser'>wip/new-parser</option>
|
||||
<option value='wip/pcre-jit'>wip/pcre-jit</option>
|
||||
<option value='wip/pcre-mark'>wip/pcre-mark</option>
|
||||
<option value='wip/private-rework-3'>wip/private-rework-3</option>
|
||||
<option value='wip/resources2'>wip/resources2</option>
|
||||
<option value='wip/serializable'>wip/serializable</option>
|
||||
<option value='wip/settings-backend'>wip/settings-backend</option>
|
||||
<option value='wip/subprocess-2013'>wip/subprocess-2013</option>
|
||||
<option value='wip/symbol-visibility'>wip/symbol-visibility</option>
|
||||
<option value='wip/task'>wip/task</option>
|
||||
<option value='wip/test-cleanup'>wip/test-cleanup</option>
|
||||
<option value='wip/threadsafe-qdata'>wip/threadsafe-qdata</option>
|
||||
<option value='wip/unicode-graphemebreak'>wip/unicode-graphemebreak</option>
|
||||
<option value='wip/version-bounds'>wip/version-bounds</option>
|
||||
<option value='wip/win32-source-api'>wip/win32-source-api</option>
|
||||
</select> <input type='submit' name='' value='switch'/></form></td></tr>
|
||||
<tr><td class='sub'>Low level core library</td><td class='sub right'></td></tr></table>
|
||||
<table class='tabs'><tr><td>
|
||||
<a href='/browse/glib/'>summary</a><a href='/browse/glib/refs/'>refs</a><a href='/browse/glib/log/m4macros/glibtests.m4'>log</a><a class='active' href='/browse/glib/tree/m4macros/glibtests.m4'>tree</a><a href='/browse/glib/commit/m4macros/glibtests.m4'>commit</a><a href='/browse/glib/diff/m4macros/glibtests.m4'>diff</a></td><td class='form'><form class='right' method='get' action='/browse/glib/log/m4macros/glibtests.m4'>
|
||||
<select name='qt'>
|
||||
<option value='grep'>log msg</option>
|
||||
<option value='author'>author</option>
|
||||
<option value='committer'>committer</option>
|
||||
<option value='range'>range</option>
|
||||
</select>
|
||||
<input class='txt' type='text' size='10' name='q' value=''/>
|
||||
<input type='submit' value='search'/>
|
||||
</form>
|
||||
</td></tr></table>
|
||||
<div class='path'>path: <a href='/browse/glib/tree/'>root</a>/<a href='/browse/glib/tree/m4macros'>m4macros</a>/<a href='/browse/glib/tree/m4macros/glibtests.m4'>glibtests.m4</a></div><div class='content'>blob: 7d5920a43c76d68affa5cbc8b8c3a8fbb5cfb017 (<a href='/browse/glib/plain/m4macros/glibtests.m4'>plain</a>)
|
||||
<table summary='blob content' class='blob'>
|
||||
<tr><td class='linenumbers'><pre><a class='no' id='n1' name='n1' href='#n1'>1</a>
|
||||
<a class='no' id='n2' name='n2' href='#n2'>2</a>
|
||||
<a class='no' id='n3' name='n3' href='#n3'>3</a>
|
||||
<a class='no' id='n4' name='n4' href='#n4'>4</a>
|
||||
<a class='no' id='n5' name='n5' href='#n5'>5</a>
|
||||
<a class='no' id='n6' name='n6' href='#n6'>6</a>
|
||||
<a class='no' id='n7' name='n7' href='#n7'>7</a>
|
||||
<a class='no' id='n8' name='n8' href='#n8'>8</a>
|
||||
<a class='no' id='n9' name='n9' href='#n9'>9</a>
|
||||
<a class='no' id='n10' name='n10' href='#n10'>10</a>
|
||||
<a class='no' id='n11' name='n11' href='#n11'>11</a>
|
||||
<a class='no' id='n12' name='n12' href='#n12'>12</a>
|
||||
<a class='no' id='n13' name='n13' href='#n13'>13</a>
|
||||
<a class='no' id='n14' name='n14' href='#n14'>14</a>
|
||||
<a class='no' id='n15' name='n15' href='#n15'>15</a>
|
||||
<a class='no' id='n16' name='n16' href='#n16'>16</a>
|
||||
<a class='no' id='n17' name='n17' href='#n17'>17</a>
|
||||
<a class='no' id='n18' name='n18' href='#n18'>18</a>
|
||||
<a class='no' id='n19' name='n19' href='#n19'>19</a>
|
||||
<a class='no' id='n20' name='n20' href='#n20'>20</a>
|
||||
<a class='no' id='n21' name='n21' href='#n21'>21</a>
|
||||
<a class='no' id='n22' name='n22' href='#n22'>22</a>
|
||||
<a class='no' id='n23' name='n23' href='#n23'>23</a>
|
||||
<a class='no' id='n24' name='n24' href='#n24'>24</a>
|
||||
<a class='no' id='n25' name='n25' href='#n25'>25</a>
|
||||
<a class='no' id='n26' name='n26' href='#n26'>26</a>
|
||||
<a class='no' id='n27' name='n27' href='#n27'>27</a>
|
||||
<a class='no' id='n28' name='n28' href='#n28'>28</a>
|
||||
</pre></td>
|
||||
<td class='lines'><pre><code>dnl GLIB_TESTS
|
||||
dnl
|
||||
|
||||
AC_DEFUN([GLIB_TESTS],
|
||||
[
|
||||
AC_ARG_ENABLE(installed-tests,
|
||||
AS_HELP_STRING([--enable-installed-tests],
|
||||
[Enable installation of some test cases]),
|
||||
[case ${enableval} in
|
||||
yes) ENABLE_INSTALLED_TESTS='1' ;;
|
||||
no) ENABLE_INSTALLED_TESTS='' ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
|
||||
esac])
|
||||
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test '$ENABLE_INSTALLED_TESTS' = '1')
|
||||
AC_ARG_ENABLE(always-build-tests,
|
||||
AS_HELP_STRING([--enable-always-build-tests],
|
||||
[Enable always building tests during 'make all']),
|
||||
[case ${enableval} in
|
||||
yes) ENABLE_ALWAYS_BUILD_TESTS='1' ;;
|
||||
no) ENABLE_ALWAYS_BUILD_TESTS='' ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
|
||||
esac])
|
||||
AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test '$ENABLE_ALWAYS_BUILD_TESTS' = '1')
|
||||
if test '$ENABLE_INSTALLED_TESTS' = '1'; then
|
||||
AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
|
||||
AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
|
||||
fi
|
||||
])
|
||||
</code></pre></td></tr></table>
|
||||
</div> <!-- class=content -->
|
||||
</div>
|
||||
<div id="footer_community"></div>
|
||||
|
||||
<div id="footer_grass"></div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container_13" id="container_12">
|
||||
<div class="links grid_9">
|
||||
<div class="menu-footer-container">
|
||||
<ul id="menu-footer" class="menu">
|
||||
<li id="menu-item-1048" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-1048">
|
||||
<a href="/">The GNOME Project</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1049" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1049">
|
||||
<a href="https://www.gnome.org/about/">About Us</a></li>
|
||||
|
||||
<li id="menu-item-1050" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1050">
|
||||
<a href="https://www.gnome.org/get-involved/">Get Involved</a></li>
|
||||
|
||||
<li id="menu-item-1051" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1051">
|
||||
<a href="https://www.gnome.org/teams/">Teams</a></li>
|
||||
|
||||
<li id="menu-item-1053" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1053">
|
||||
<a href="https://www.gnome.org/support-gnome/">Support GNOME</a></li>
|
||||
|
||||
<li id="menu-item-1054" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1054">
|
||||
<a href="https://www.gnome.org/contact/">Contact Us</a></li>
|
||||
|
||||
<li id="menu-item-2246" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-2246">
|
||||
<a href="https://www.gnome.org/foundation/">The GNOME Foundation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li id="menu-item-1047" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1047">
|
||||
<a href="#">Resources</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1055" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1055">
|
||||
<a href="https://developer.gnome.org">Developer Center</a></li>
|
||||
|
||||
<li id="menu-item-1056" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1056">
|
||||
<a href="https://help.gnome.org">Documentation</a></li>
|
||||
|
||||
<li id="menu-item-1057" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1057">
|
||||
<a href="https://wiki.gnome.org">Wiki</a></li>
|
||||
|
||||
<li id="menu-item-1058" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1058">
|
||||
<a href="https://mail.gnome.org/mailman/listinfo">Mailing Lists</a></li>
|
||||
|
||||
<li id="menu-item-1059" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1059">
|
||||
<a href="https://wiki.gnome.org/GnomeIrcChannels">IRC Channels</a></li>
|
||||
|
||||
<li id="menu-item-1060" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1060">
|
||||
<a href="https://bugzilla.gnome.org/">Bug Tracker</a></li>
|
||||
|
||||
<li id="menu-item-1061" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1061">
|
||||
<a href="https://git.gnome.org/browse/">Development Code</a></li>
|
||||
|
||||
<li id="menu-item-1062" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1062">
|
||||
<a href="https://wiki.gnome.org/Jhbuild">Build Tool</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li id="menu-item-1046" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1046">
|
||||
<a href="/news">News</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1063" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1063">
|
||||
<a href="https://www.gnome.org/press/">Press Releases</a></li>
|
||||
|
||||
<li id="menu-item-1064" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1064">
|
||||
<a href="https://www.gnome.org/start/stable">Latest Release</a></li>
|
||||
|
||||
<li id="menu-item-1065" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1065">
|
||||
<a href="https://planet.gnome.org">Planet GNOME</a></li>
|
||||
|
||||
<li id="menu-item-1067" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1067">
|
||||
<a href="https://news.gnome.org">Development News</a></li>
|
||||
|
||||
<li id="menu-item-1068" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1068">
|
||||
<a href="https://identi.ca/gnome">Identi.ca</a></li>
|
||||
|
||||
<li id="menu-item-1069" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1069">
|
||||
<a href="https://twitter.com/gnome">Twitter</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footnotes" class="grid_9">
|
||||
<p>Copyright © 2004-2013, <a href="https://www.gnome.org/">The GNOME Project</a>.</p>
|
||||
<br />
|
||||
<small><p>Hosted by <a href="http://www.redhat.com/">Red Hat</a>.
|
||||
Powered by <a href="http://hjemli.net/git/cgit/">cgit</a>.</p>
|
||||
<p>To follow the commits, subscribe to <a href="http://mail.gnome.org/mailman/listinfo/commits-list">commits-list</a>. (can be limited to specific modules)</p></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- id=cgit -->
|
||||
</body>
|
||||
</html>
|
105
po/kn.po
105
po/kn.po
@@ -6,18 +6,16 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop.HEAD\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product="
|
||||
"libgtop&component=general\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgtop&component=general\n"
|
||||
"POT-Creation-Date: 2009-03-01 23:08+0000\n"
|
||||
"PO-Revision-Date: 2009-03-14 10:31-0400\n"
|
||||
"PO-Revision-Date: 2009-03-14 20:01+0530\n"
|
||||
"Last-Translator: Shankar Prasad <svenkate@redhat.com>\n"
|
||||
"Language-Team: Kannada <en@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: kn\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Zanata 3.2.3\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
@@ -63,160 +61,129 @@ msgstr "inetd ಇಂದ ರದ್ದು ಮಾಡಲಾದ"
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"ಲಭ್ಯವಿರುವ ಆಜ್ಞೆಯ ಒಂದು ಸಂಪೂರ್ಣ ಪಟ್ಟಿಯನ್ನು ನೋಡಲು '%s --help' ಅನ್ನು ಚಲಾಯಿಸಿ.\n"
|
||||
msgstr "ಲಭ್ಯವಿರುವ ಆಜ್ಞೆಯ ಒಂದು ಸಂಪೂರ್ಣ ಪಟ್ಟಿಯನ್ನು ನೋಡಲು '%s --help' ಅನ್ನು ಚಲಾಯಿಸಿ.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27
|
||||
#: ../sysdeps/sun4/siglist.c:27
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "ನೇತಾಡು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28
|
||||
#: ../sysdeps/sun4/siglist.c:28
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "ತಡೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29
|
||||
#: ../sysdeps/sun4/siglist.c:29
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
msgstr "ತ್ಯಜಿಸು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30
|
||||
#: ../sysdeps/sun4/siglist.c:30
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
msgstr "ಅನಧೀಕೃತ ಸೂಚನೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:31
|
||||
#: ../sysdeps/sun4/siglist.c:31
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Trace trap"
|
||||
msgstr "ಜಾಡಿನ ಟ್ರಾಪ್"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32
|
||||
#: ../sysdeps/sun4/siglist.c:32
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
msgstr "ಸ್ಥಗಿತಗೊಳಿಸು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33
|
||||
#: ../sysdeps/sun4/siglist.c:33
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "EMT ದೋಷ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34
|
||||
#: ../sysdeps/sun4/siglist.c:34
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "ತೇಲುವ-ಬಿಂದುವಿನ ವಿನಾಯಿತಿ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35
|
||||
#: ../sysdeps/sun4/siglist.c:35
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
msgstr "ಕೊಲ್ಲು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36
|
||||
#: ../sysdeps/sun4/siglist.c:36
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "ಬಸ್ ದೋಷ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37
|
||||
#: ../sysdeps/sun4/siglist.c:37
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
msgstr "ಸೆಗ್ಮೆಂಟೇಶನ್ ಉಲ್ಲಂಘನೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38
|
||||
#: ../sysdeps/sun4/siglist.c:38
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "ವ್ಯವಸ್ಥೆಯ ಕೋಶಕ್ಕೆ ಸರಿಯಲ್ಲದ ಆರ್ಗ್ಯುಮೆಂಟ್"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39
|
||||
#: ../sysdeps/sun4/siglist.c:39
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
msgstr "ತುಂಡಾದ ಪೈಪ್"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40
|
||||
#: ../sysdeps/sun4/siglist.c:40
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "ಅಲಾರಮ್ ಗಡಿಯಾರ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41
|
||||
#: ../sysdeps/sun4/siglist.c:41
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
msgstr "ಅಂತ್ಯಗೊಳಿಕೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42
|
||||
#: ../sysdeps/sun4/siglist.c:42
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "ಸಾಕೆಟ್ನಲ್ಲಿ ತುರ್ತು ಪರಿಸ್ಥಿತಿ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43
|
||||
#: ../sysdeps/sun4/siglist.c:43
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
msgstr "ನಿಲ್ಲಿಸು"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44
|
||||
#: ../sysdeps/sun4/siglist.c:44
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "ಕೀಲಿಮಣೆ ನಿಲುಗಡೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45
|
||||
#: ../sysdeps/sun4/siglist.c:45
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
msgstr "ಮುಂದುವರೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:46
|
||||
#: ../sysdeps/sun4/siglist.c:46
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Child status has changed"
|
||||
msgstr "ಚೈಲ್ಡಿನ ಸ್ಥಿತಿ ಬದಲಾಗಿದೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47
|
||||
#: ../sysdeps/sun4/siglist.c:47
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "tty ಇಂದ ಓದಲಾದ ಹಿನ್ನಲೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48
|
||||
#: ../sysdeps/sun4/siglist.c:48
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "tty ಗೆ ಹಿನ್ನಲೆ ಬರೆಯುವಿಕೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49
|
||||
#: ../sysdeps/sun4/siglist.c:49
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
msgstr "I/O ಈಗ ಸಾಧ್ಯವಿದೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50
|
||||
#: ../sysdeps/sun4/siglist.c:50
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "CPU ಮಿತಿಯನ್ನು ಮೀರಲಾಗಿದೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51
|
||||
#: ../sysdeps/sun4/siglist.c:51
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "ಕಡತದ ಗಾತ್ರದ ಮಿತಿಯನ್ನು ಮೀರಲಾಗಿದೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52
|
||||
#: ../sysdeps/sun4/siglist.c:52
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "ವರ್ಚುವಲ್ ಅಲಾರಮ್ ಗಡಿಯಾರ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53
|
||||
#: ../sysdeps/sun4/siglist.c:53
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "ಪ್ರೊಫೈಲಿಂಗ್ ಅಲಾರಮ್ ಗಡಿಯಾರ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54
|
||||
#: ../sysdeps/sun4/siglist.c:54
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "ವಿಂಡೋ ಗಾತ್ರದ ಬದಲಾವಣೆ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55
|
||||
#: ../sysdeps/sun4/siglist.c:55
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "ಮಾಹಿತಿಯ ಮನವಿ"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56
|
||||
#: ../sysdeps/sun4/siglist.c:56
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
msgstr "ಬಳಕೆದಾರ ಸೂಚಿತ ಸಂಕೇತ ೧"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:57
|
||||
#: ../sysdeps/sun4/siglist.c:57
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "ಬಳಕೆದಾರ ಸೂಚಿತ ಸಂಕೇತ ೨"
|
||||
|
||||
|
86
po/tg.po
86
po/tg.po
@@ -8,72 +8,70 @@ msgstr ""
|
||||
"Project-Id-Version: Tajik Gnome\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=libgtop&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2013-12-19 14:39+0000\n"
|
||||
"PO-Revision-Date: 2013-12-20 13:36+0500\n"
|
||||
"POT-Creation-Date: 2012-12-29 00:29+0000\n"
|
||||
"PO-Revision-Date: 2013-01-21 15:11+0500\n"
|
||||
"Last-Translator: Victor Ibragimov <victor.ibragimov@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: tg\n"
|
||||
"Language: Tajik\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=1;\n"
|
||||
"X-Generator: Poedit 1.6.3\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
|
||||
#: ../lib/read.c:51
|
||||
#, c-format
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "%d байти хондашуда"
|
||||
msgstr[1] "%d байти хондашуда"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../lib/read_data.c:51
|
||||
msgid "read data size"
|
||||
msgstr "андозаи иттилооти хондашуда"
|
||||
msgstr ""
|
||||
|
||||
#: ../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 байти иттилооти хондашуда"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../lib/write.c:51
|
||||
#, c-format
|
||||
msgid "wrote %d byte"
|
||||
msgid_plural "wrote %d bytes"
|
||||
msgstr[0] "%d байти сабтшуда"
|
||||
msgstr[1] "%d байти сабтшуда"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/daemon/gnuserv.c:455
|
||||
msgid "Enable debugging"
|
||||
msgstr "Фаъол кардани ислоҳи хатоҳо"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon/gnuserv.c:457
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Фаъол кардани барориши ботафсил"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon/gnuserv.c:459
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Нагузаштан ба пасзамина"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon/gnuserv.c:461
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Дархостшуда аз inetd"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon/gnuserv.c:495
|
||||
#, c-format
|
||||
msgid "Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Барои намоиш додани рӯйхати ҳамаи фармонҳои имконпазир '%s --help'-ро иҷро "
|
||||
"намоед.\n"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:27 ../sysdeps/sun4/siglist.c:27
|
||||
msgid "Hangup"
|
||||
msgstr "Боздоштан"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:28 ../sysdeps/sun4/siglist.c:28
|
||||
msgid "Interrupt"
|
||||
msgstr "Қатъ"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:29 ../sysdeps/sun4/siglist.c:29
|
||||
msgid "Quit"
|
||||
@@ -81,11 +79,11 @@ msgstr "Баромад"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:30 ../sysdeps/sun4/siglist.c:30
|
||||
msgid "Illegal instruction"
|
||||
msgstr "Дастури нодуруст"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:31 ../sysdeps/sun4/siglist.c:31
|
||||
msgid "Trace trap"
|
||||
msgstr "Таҳлил"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:32 ../sysdeps/sun4/siglist.c:32
|
||||
msgid "Abort"
|
||||
@@ -93,35 +91,35 @@ msgstr "Қатъ кардан"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:33 ../sysdeps/sun4/siglist.c:33
|
||||
msgid "EMT error"
|
||||
msgstr "Хатои EMT"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:34 ../sysdeps/sun4/siglist.c:34
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Истиснои нуқтаи тағйирёбанда"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:35 ../sysdeps/sun4/siglist.c:35
|
||||
msgid "Kill"
|
||||
msgstr "Қатъ кардан"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:36 ../sysdeps/sun4/siglist.c:36
|
||||
msgid "Bus error"
|
||||
msgstr "Хатои гузаргоҳ"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:37 ../sysdeps/sun4/siglist.c:37
|
||||
msgid "Segmentation violation"
|
||||
msgstr "Вайронии қисматбандӣ"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:38 ../sysdeps/sun4/siglist.c:38
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Аргументи нокифоя барои дархости системавӣ"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:39 ../sysdeps/sun4/siglist.c:39
|
||||
msgid "Broken pipe"
|
||||
msgstr "Вуруди вайроншуда"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:40 ../sysdeps/sun4/siglist.c:40
|
||||
msgid "Alarm clock"
|
||||
msgstr "Соати зангдор"
|
||||
msgstr "Соати зангдор\t"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:41 ../sysdeps/sun4/siglist.c:41
|
||||
msgid "Termination"
|
||||
@@ -129,7 +127,7 @@ msgstr "Анҷоми кор"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:42 ../sysdeps/sun4/siglist.c:42
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Шарти таъҷилӣ дар бастагоҳ"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:43 ../sysdeps/sun4/siglist.c:43
|
||||
msgid "Stop"
|
||||
@@ -137,7 +135,7 @@ msgstr "Истодан"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:44 ../sysdeps/sun4/siglist.c:44
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Қатъи клавиатура"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:45 ../sysdeps/sun4/siglist.c:45
|
||||
msgid "Continue"
|
||||
@@ -145,48 +143,48 @@ msgstr "Идома додан"
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:46 ../sysdeps/sun4/siglist.c:46
|
||||
msgid "Child status has changed"
|
||||
msgstr "Вазъияти иловагӣ тағйир ёфт"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:47 ../sysdeps/sun4/siglist.c:47
|
||||
msgid "Background read from tty"
|
||||
msgstr "Пасзаминаи хониш аз tty"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:48 ../sysdeps/sun4/siglist.c:48
|
||||
msgid "Background write to tty"
|
||||
msgstr "Пасзаминаи сабт ба tty"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:49 ../sysdeps/sun4/siglist.c:49
|
||||
msgid "I/O now possible"
|
||||
msgstr "I/O ҳоло имконпазир аст"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:50 ../sysdeps/sun4/siglist.c:50
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "Аз ҳудуди CPU афзуд"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:51 ../sysdeps/sun4/siglist.c:51
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Аз ҳудуди андозаи файл афзуд"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:52 ../sysdeps/sun4/siglist.c:52
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "Соати зангдори виртуалӣ"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:53 ../sysdeps/sun4/siglist.c:53
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Соати зангдори профил"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:54 ../sysdeps/sun4/siglist.c:54
|
||||
msgid "Window size change"
|
||||
msgstr "Тағйири андозаи равзана"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:55 ../sysdeps/sun4/siglist.c:55
|
||||
msgid "Information request"
|
||||
msgstr "Дархости иттилоот"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:56 ../sysdeps/sun4/siglist.c:56
|
||||
msgid "User defined signal 1"
|
||||
msgstr "Сигнали интихобшудаи 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../sysdeps/osf1/siglist.c:57 ../sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 2"
|
||||
msgstr "Сигнали интихобшудаи 2"
|
||||
msgstr ""
|
||||
|
@@ -12,6 +12,8 @@
|
||||
## 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`\"" \
|
||||
|
@@ -11,7 +11,7 @@ libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c shm_limits.c \
|
||||
|
||||
libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
|
||||
libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS)
|
||||
libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS) $(EXTRA_SYSDEPS_LIBS)
|
||||
libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.c \
|
||||
proclist.c procstate.c procuid.c \
|
||||
proctime.c procmem.c procsignal.c \
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/statvfs.h>
|
||||
#if 0
|
||||
#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__)
|
||||
#include <libgeom.h>
|
||||
#include <sys/resource.h>
|
||||
#include <devstat.h>
|
||||
@@ -32,7 +32,7 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch
|
||||
{
|
||||
int result;
|
||||
struct statfs sfs;
|
||||
#if 0
|
||||
#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__)
|
||||
struct devstat *ds;
|
||||
void *sc;
|
||||
struct timespec ts;
|
||||
@@ -49,7 +49,7 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch
|
||||
glibtop_warn_io_r (server, "statfs");
|
||||
return;
|
||||
}
|
||||
#if 0
|
||||
#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__)
|
||||
ld[0] = 0;
|
||||
ld[1] = 0;
|
||||
result = geom_gettree (&gmp);
|
||||
|
@@ -43,6 +43,10 @@ glibtop_open_s (glibtop *server, const char *program_name,
|
||||
server->real_ncpu = ncpus - 1;
|
||||
server->ncpu = MIN(GLIBTOP_NCPU - 1, server->real_ncpu);
|
||||
|
||||
#if defined(__FreeBSD_kernel__)
|
||||
server->os_version_code = __FreeBSD_kernel_version;
|
||||
#else
|
||||
server->os_version_code = __FreeBSD_version;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@@ -38,7 +38,10 @@
|
||||
#include <sys/vnode.h>
|
||||
#undef _KVM_VNODE
|
||||
|
||||
#define _KERNEL
|
||||
#include <sys/pipe.h>
|
||||
#include <sys/conf.h>
|
||||
#undef _KERNEL
|
||||
#if (__FreeBSD_version >= 800038) || (__FreeBSD_kernel_version >= 800038)
|
||||
#define _WANT_FILE
|
||||
#include <sys/file.h>
|
||||
|
@@ -66,12 +66,11 @@ _glibtop_init_cpu_s (glibtop *server)
|
||||
/* Provides information about cpu usage. */
|
||||
|
||||
#define FILENAME "/proc/stat"
|
||||
#define STAT_BUFSIZ 81920
|
||||
|
||||
void
|
||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
{
|
||||
char buffer [STAT_BUFSIZ], *p;
|
||||
char buffer [BUFSIZ], *p;
|
||||
int i;
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_cpu));
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <mntent.h>
|
||||
|
||||
|
||||
@@ -198,7 +197,7 @@ glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path)
|
||||
memset(buf, 0, sizeof(glibtop_fsusage));
|
||||
|
||||
if (statvfs(path, &fsd) < 0) {
|
||||
glibtop_warn_r(server, "statvfs '%s' failed: %s", path, strerror (errno));
|
||||
glibtop_warn_r(server, "statvfs '%s' failed", path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -61,14 +61,13 @@ static void set_linux_version(glibtop *server)
|
||||
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
|
||||
|
||||
#define FILENAME "/proc/stat"
|
||||
#define STAT_BUFSIZ 81920
|
||||
|
||||
void
|
||||
glibtop_open_s (glibtop *server, const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
char buffer [STAT_BUFSIZ], *p = buffer;
|
||||
char buffer [BUFSIZ], *p = buffer;
|
||||
|
||||
server->name = program_name;
|
||||
|
||||
|
@@ -51,8 +51,7 @@ init_sysinfo (glibtop *server)
|
||||
sysinfo.ncpu++) {
|
||||
|
||||
gchar **parts, **p;
|
||||
if (g_strrstr (processors[sysinfo.ncpu], "processor" ) == NULL)
|
||||
continue;
|
||||
|
||||
glibtop_entry * const cpuinfo = &sysinfo.cpuinfo[sysinfo.ncpu];
|
||||
|
||||
cpuinfo->labels = g_ptr_array_new ();
|
||||
|
@@ -1,24 +1,21 @@
|
||||
# $OpenBSD: Makefile.am,v 1.2 2011/05/23 19:35:52 jasper Exp $
|
||||
|
||||
INCLUDES = @INCLUDES@
|
||||
|
||||
noinst_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
|
||||
|
||||
libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c \
|
||||
cpu.c loadavg.c \
|
||||
uptime.c netlist.c fsusage.c mem.c \
|
||||
mountlist.c procopenfiles.c procwd.c \
|
||||
procaffinity.c glibtop_private.c open.c
|
||||
libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c
|
||||
|
||||
libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
|
||||
libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS)
|
||||
libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.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
|
||||
|
||||
# TODO should be made nosuid like FreeBSD
|
||||
libgtop_sysdeps_suid_2_0_la_SOURCES += shm_limits.c msg_limits.c sem_limits.c
|
||||
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 netlist.c \
|
||||
netload.c ppp.c procopenfiles.c fsusage.c \
|
||||
procwd.c procaffinity.c glibtop_private.c
|
||||
|
||||
libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: close.c,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: cpu.c,v 1.7 2011/07/10 15:23:01 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -42,7 +44,7 @@ static int mib2 [] = { CTL_KERN, KERN_CPTIME };
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_cpu_s (glibtop *server)
|
||||
_glibtop_init_cpu_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
|
||||
}
|
||||
@@ -50,7 +52,7 @@ _glibtop_init_cpu_s (glibtop *server)
|
||||
/* Provides information about cpu usage. */
|
||||
|
||||
void
|
||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
|
||||
{
|
||||
gulong cpts [CPUSTATES];
|
||||
|
||||
|
@@ -1,4 +1,15 @@
|
||||
/* $OpenBSD: fsusage.c,v 1.4 2011/05/31 19:25:31 jasper Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/*
|
||||
* statvfs is lacking various members which are present in statfs,
|
||||
* like f_(a)syncreads and f_(a)syncwrites. So eventhough we have
|
||||
* statvfs, undef it here untill those members are added.
|
||||
*/
|
||||
#undef HAVE_SYS_STATVFS_H
|
||||
#undef STAT_STATVFS
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/fsusage.h>
|
||||
@@ -9,28 +20,40 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#if defined (HAVE_SYS_STATVFS_H)
|
||||
#include <sys/statvfs.h>
|
||||
#else
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_fsusage =
|
||||
(1L << GLIBTOP_FSUSAGE_BLOCKS) + (1L << GLIBTOP_FSUSAGE_BFREE)
|
||||
+ (1L << GLIBTOP_FSUSAGE_BAVAIL) + (1L << GLIBTOP_FSUSAGE_FILES)
|
||||
+ (1L << GLIBTOP_FSUSAGE_FFREE) + (1L << GLIBTOP_FSUSAGE_BLOCK_SIZE);
|
||||
void
|
||||
_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
|
||||
glibtop_fsusage *buf,
|
||||
const char *path);
|
||||
|
||||
static void
|
||||
_glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const char *path)
|
||||
void
|
||||
_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
|
||||
glibtop_fsusage *buf,
|
||||
const char *path)
|
||||
{
|
||||
int result;
|
||||
#if defined (STAT_STATVFS)
|
||||
struct statvfs sfs;
|
||||
#else
|
||||
struct statfs sfs;
|
||||
#endif
|
||||
|
||||
#if defined (STAT_STATVFS)
|
||||
result = statvfs (path, &sfs);
|
||||
#else
|
||||
result = statfs (path, &sfs);
|
||||
#endif
|
||||
|
||||
if (result == -1) {
|
||||
glibtop_warn_io_r (server, "statfs");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -38,28 +61,3 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch
|
||||
buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
|
||||
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path)
|
||||
{
|
||||
struct statvfs fsd;
|
||||
|
||||
glibtop_init_r (&server, 0, 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_fsusage));
|
||||
|
||||
if (statvfs (path, &fsd) < 0)
|
||||
return;
|
||||
|
||||
buf->block_size = fsd.f_frsize;
|
||||
buf->blocks = fsd.f_blocks;
|
||||
buf->bfree = fsd.f_bfree;
|
||||
buf->bavail = (fsd.f_bavail > fsd.f_bfree) ? 0 : fsd.f_bavail;
|
||||
buf->files = fsd.f_files;
|
||||
buf->ffree = fsd.f_ffree;
|
||||
|
||||
buf->flags = _glibtop_sysdeps_fsusage;
|
||||
|
||||
_glibtop_get_fsusage_read_write(server, buf, path);
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: glibtop_machine.h,v 1.3 2011/05/23 19:35:53 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: glibtop_private.c,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
@@ -10,6 +12,32 @@
|
||||
#include <glib.h>
|
||||
#include <errno.h>
|
||||
|
||||
char *
|
||||
execute_lsof(pid_t pid) {
|
||||
char *output = NULL;
|
||||
char *lsof;
|
||||
char *command;
|
||||
int exit_status;
|
||||
|
||||
lsof = g_find_program_in_path("lsof");
|
||||
if (lsof == NULL)
|
||||
return NULL;
|
||||
|
||||
command = g_strdup_printf("%s -n -P -Fftn -p %d", lsof, pid);
|
||||
g_free(lsof);
|
||||
|
||||
if (g_spawn_command_line_sync (command, &output, NULL, &exit_status, NULL)) {
|
||||
if (exit_status != 0) {
|
||||
g_warning("Could not execute \"%s\" (%i)\nMake sure lsof(8) is installed sgid kmem.",
|
||||
command, exit_status);
|
||||
output = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
g_free(command);
|
||||
return output;
|
||||
}
|
||||
|
||||
/* Ported from linux/glibtop_private.c */
|
||||
gboolean
|
||||
safe_readlink(const char *path, char *buf, int bufsiz)
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: glibtop_private.h,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 2007 Joe Marcus Clarke
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
@@ -32,6 +34,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
char *execute_lsof(pid_t pid);
|
||||
gboolean safe_readlink(const char *path, char *buf, int bufsiz);
|
||||
|
||||
G_END_DECLS
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: glibtop_server.h,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -24,7 +26,11 @@
|
||||
|
||||
G_BEGIN_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)
|
||||
@@ -39,12 +45,8 @@ G_BEGIN_DECLS
|
||||
#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)
|
||||
#define GLIBTOP_SUID_CPU 0
|
||||
#define GLIBTOP_SUID_MEM 0
|
||||
#define GLIBTOP_SUID_UPTIME 0
|
||||
#define GLIBTOP_SUID_LOADAVG 0
|
||||
#define GLIBTOP_SUID_NETLIST 0
|
||||
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
|
||||
#define GLIBTOP_SUID_PROC_WD 0
|
||||
#define GLIBTOP_SUID_PROC_AFFINITY 0
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: glibtop_suid.h,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: loadavg.c,v 1.2 2011/05/23 19:35:53 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -32,7 +34,7 @@ static const unsigned long _glibtop_sysdeps_loadavg =
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_loadavg_s (glibtop *server)
|
||||
_glibtop_init_loadavg_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
|
||||
}
|
||||
@@ -40,7 +42,7 @@ _glibtop_init_loadavg_s (glibtop *server)
|
||||
/* Provides load averange. */
|
||||
|
||||
void
|
||||
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
|
||||
glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
|
||||
{
|
||||
double ldavg[3];
|
||||
int i;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: mem.c,v 1.11 2011/07/10 15:23:01 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -28,7 +30,9 @@
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#include <uvm/uvm_extern.h>
|
||||
#include <uvm/uvm_param.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_mem =
|
||||
(1L << GLIBTOP_MEM_TOTAL) + (1L << GLIBTOP_MEM_USED) +
|
||||
@@ -46,17 +50,29 @@ 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 [] = {
|
||||
{ "_bufpages" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* MIB array for sysctl */
|
||||
static int vmmeter_mib [] = { CTL_VM, VM_METER };
|
||||
static int uvmexp_mib [] = { CTL_VM, VM_UVMEXP };
|
||||
static int bcstats_mib [] = { CTL_VFS, VFS_GENERIC, VFS_BCACHESTAT };
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_mem_s (glibtop *server)
|
||||
_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 and calculate pageshift from it */
|
||||
pagesize = sysconf(_SC_PAGESIZE);
|
||||
pageshift = 0;
|
||||
@@ -72,10 +88,14 @@ _glibtop_init_mem_s (glibtop *server)
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
||||
glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
|
||||
{
|
||||
struct vmtotal vmt;
|
||||
struct uvmexp uvmexp;
|
||||
struct bcachestats bcstats;
|
||||
u_int v_used_count;
|
||||
u_int v_total_count;
|
||||
u_int v_free_count;
|
||||
size_t length;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MEM), 0);
|
||||
@@ -86,6 +106,13 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
||||
return;
|
||||
|
||||
/* Get the data from sysctl */
|
||||
length = sizeof (vmt);
|
||||
if (sysctl (vmmeter_mib, 2, &vmt, &length, NULL, 0)) {
|
||||
glibtop_warn_io_r (server, "sysctl (vm.vmmeter)");
|
||||
bzero(&vmt, sizeof(length));
|
||||
return;
|
||||
}
|
||||
|
||||
length = sizeof (uvmexp);
|
||||
if (sysctl (uvmexp_mib, 2, &uvmexp, &length, NULL, 0)) {
|
||||
glibtop_warn_io_r (server, "sysctl (vm.uvmexp)");
|
||||
@@ -100,12 +127,21 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* t_arm = active real memory
|
||||
* t_rm = total real memory in use
|
||||
* t_free = free memory pages
|
||||
*/
|
||||
v_total_count = vmt.t_rm + vmt.t_free;
|
||||
v_used_count = vmt.t_rm;
|
||||
v_free_count = vmt.t_free;
|
||||
|
||||
/* convert memory stats to Kbytes */
|
||||
buf->total = (guint64) pagetok (uvmexp.npages) << LOG1024;
|
||||
buf->used = (guint64) pagetok (uvmexp.npages - uvmexp.free) << LOG1024;
|
||||
buf->free = (guint64) pagetok (uvmexp.free) << LOG1024;
|
||||
buf->total = (guint64) pagetok (v_total_count) << LOG1024;
|
||||
buf->used = (guint64) pagetok (v_used_count) << LOG1024;
|
||||
buf->free = (guint64) pagetok (v_free_count) << LOG1024;
|
||||
buf->locked = (guint64) pagetok (uvmexp.wired) << LOG1024;
|
||||
buf->shared = (guint64) pagetok (0 /* XXX */) << LOG1024;
|
||||
buf->shared = (guint64) pagetok (vmt.t_rmshr) << LOG1024;
|
||||
buf->cached = (guint64) pagetok (bcstats.numbufpages) << LOG1024;
|
||||
buf->buffer = 0;
|
||||
|
||||
|
@@ -1,168 +0,0 @@
|
||||
/* mountlist.c -- return a list of mounted filesystems
|
||||
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/mountlist.h>
|
||||
|
||||
/* A mount table entry. */
|
||||
struct mount_entry
|
||||
{
|
||||
char *me_devname; /* Device node pathname, including "/dev/". */
|
||||
char *me_mountdir; /* Mount point directory pathname. */
|
||||
char *me_type; /* "nfs", "4.2", etc. */
|
||||
dev_t me_dev; /* Device number of me_mountdir. */
|
||||
struct mount_entry *me_next;
|
||||
};
|
||||
|
||||
static struct mount_entry *read_filesystem_list (void);
|
||||
|
||||
/* Return a list of the currently mounted filesystems, or NULL on error.
|
||||
Add each entry to the tail of the list so that they stay in order.
|
||||
*/
|
||||
|
||||
static struct mount_entry *
|
||||
read_filesystem_list (void)
|
||||
{
|
||||
struct mount_entry *mount_list;
|
||||
struct mount_entry *me;
|
||||
struct mount_entry *mtail;
|
||||
|
||||
/* Start the list off with a dummy entry. */
|
||||
me = g_new (struct mount_entry, 1);
|
||||
me->me_next = NULL;
|
||||
mount_list = mtail = me;
|
||||
{
|
||||
struct statfs *fsp;
|
||||
int entries;
|
||||
|
||||
entries = getmntinfo (&fsp, MNT_NOWAIT);
|
||||
if (entries < 0)
|
||||
return NULL;
|
||||
while (entries-- > 0)
|
||||
{
|
||||
me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
|
||||
me->me_devname = g_strdup (fsp->f_mntfromname);
|
||||
me->me_mountdir = g_strdup (fsp->f_mntonname);
|
||||
me->me_type = g_strdup (fsp->f_fstypename);
|
||||
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
|
||||
me->me_next = NULL;
|
||||
|
||||
/* Add to the linked list. */
|
||||
mtail->me_next = me;
|
||||
mtail = me;
|
||||
fsp++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Free the dummy head. */
|
||||
me = mount_list;
|
||||
mount_list = mount_list->me_next;
|
||||
g_free (me);
|
||||
return mount_list;
|
||||
}
|
||||
|
||||
static gboolean ignore_mount_entry(const struct mount_entry *me)
|
||||
{
|
||||
/* keep sorted */
|
||||
static const char ignored[][17] = {
|
||||
"autofs",
|
||||
"devfs",
|
||||
"fusectl",
|
||||
"linprocfs",
|
||||
"linsysfs",
|
||||
"mfs",
|
||||
"none",
|
||||
"nfs",
|
||||
"nullfs",
|
||||
"nwfs",
|
||||
"portalfs",
|
||||
"proc",
|
||||
"procfs",
|
||||
"smbfs",
|
||||
"tmpfs",
|
||||
"unionfs",
|
||||
"unknown"
|
||||
};
|
||||
|
||||
typedef int (*Comparator)(const void*, const void*);
|
||||
|
||||
return bsearch(me->me_type,
|
||||
ignored, G_N_ELEMENTS(ignored), sizeof ignored[0],
|
||||
(Comparator) strcmp) != NULL;
|
||||
}
|
||||
|
||||
|
||||
glibtop_mountentry *
|
||||
glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs)
|
||||
{
|
||||
struct mount_entry *entries, *cur, *next;
|
||||
|
||||
GArray *mount_array = g_array_new(FALSE, FALSE,
|
||||
sizeof(glibtop_mountentry));
|
||||
|
||||
glibtop_init_r (&server, 0, 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_mountlist));
|
||||
|
||||
/* Read filesystem list. */
|
||||
|
||||
if((entries = read_filesystem_list ()) == NULL)
|
||||
return NULL;
|
||||
|
||||
for (cur = &entries[0]; cur != NULL; cur = next) {
|
||||
|
||||
if(all_fs || !ignore_mount_entry(cur)) {
|
||||
/* add a new glibtop_mountentry */
|
||||
glibtop_mountentry e;
|
||||
|
||||
g_strlcpy(e.devname, cur->me_devname, sizeof e.devname);
|
||||
g_strlcpy(e.mountdir, cur->me_mountdir, sizeof e.mountdir);
|
||||
g_strlcpy(e.type, cur->me_type, sizeof e.type);
|
||||
e.dev = cur->me_dev;
|
||||
|
||||
g_array_append_val(mount_array, e);
|
||||
}
|
||||
|
||||
/* free current mount_entry and move to the next */
|
||||
next = cur->me_next;
|
||||
g_free(cur->me_devname);
|
||||
g_free(cur->me_mountdir);
|
||||
g_free(cur->me_type);
|
||||
g_free(cur);
|
||||
}
|
||||
|
||||
buf->size = sizeof (glibtop_mountentry);
|
||||
buf->number = mount_array->len;
|
||||
buf->total = buf->number * buf->size;
|
||||
|
||||
buf->flags = (1 << GLIBTOP_MOUNTLIST_SIZE)
|
||||
| (1 << GLIBTOP_MOUNTLIST_NUMBER)
|
||||
| (1 << GLIBTOP_MOUNTLIST_TOTAL);
|
||||
|
||||
return (glibtop_mountentry*) g_array_free(mount_array, FALSE);
|
||||
}
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: msg_limits.c,v 1.3 2011/05/23 19:35:54 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: netlist.c,v 1.2 2011/05/23 19:35:54 jasper Exp $ */
|
||||
|
||||
/*
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: netload.c,v 1.4 2011/06/20 09:50:04 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -34,12 +36,12 @@
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef HAVE_NET_IF_VAR_H
|
||||
#include <net/if_var.h>
|
||||
#endif
|
||||
|
||||
#include <netinet/in.h>
|
||||
#define _KERNEL
|
||||
#include <netinet/in_var.h>
|
||||
#undef _KERNEL
|
||||
#include <netinet6/in6_var.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_netload =
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: nosuid.c,v 1.2 2011/05/23 19:35:54 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -21,8 +23,16 @@
|
||||
|
||||
#include <config.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)
|
||||
{ }
|
||||
|
||||
void
|
||||
glibtop_close_s (glibtop *server)
|
||||
{ }
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: open.c,v 1.4 2011/05/23 19:35:54 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -20,17 +22,74 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <sys/types.h>
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/init_hooks.h>
|
||||
|
||||
#include <glibtop_private.h>
|
||||
|
||||
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
|
||||
|
||||
void
|
||||
glibtop_open_s (glibtop *server, const char *program_name,
|
||||
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
|
||||
|
||||
/* !!! 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 = OpenBSD;
|
||||
|
||||
/* 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. */
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: ppp.c,v 1.3 2011/05/23 19:35:54 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* TODO (procaffinity stub)
|
||||
* $OpenBSD: procaffinity.c,v 1.1 2009/10/16 10:56:04 jasper Exp $
|
||||
* procaffinity stub.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: procargs.c,v 1.3 2011/05/23 19:35:54 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -67,7 +69,7 @@ glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
|
||||
/* Get the process data */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
if ((pinfo == NULL) || (count < 1)) {
|
||||
glibtop_suid_leave (server);
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return NULL;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: prockernel.c,v 1.4 2011/05/31 14:02:26 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -34,13 +36,12 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_kernel_pstats =
|
||||
(1L << GLIBTOP_PROC_KERNEL_K_FLAGS) +
|
||||
(1L << GLIBTOP_PROC_KERNEL_MIN_FLT) +
|
||||
(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT);
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_kernel_wchan =
|
||||
(1L << GLIBTOP_PROC_KERNEL_WCHAN) +
|
||||
(1L << GLIBTOP_PROC_KERNEL_NWCHAN);
|
||||
(1L << GLIBTOP_PROC_KERNEL_NWCHAN) +
|
||||
(1L << GLIBTOP_PROC_KERNEL_WCHAN);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
@@ -69,39 +70,20 @@ glibtop_get_proc_kernel_p (glibtop *server,
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
glibtop_suid_enter (server);
|
||||
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof(*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
if ((pinfo == NULL) || (count != 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
glibtop_suid_leave (server);
|
||||
return;
|
||||
}
|
||||
|
||||
glibtop_suid_leave (server);
|
||||
if (pinfo->p_wmesg[0])
|
||||
g_strlcpy(buf->wchan, pinfo->p_wmesg[0], sizeof(buf->wchan));
|
||||
|
||||
#define PROC_WCHAN p_wchan
|
||||
#define PROC_WMESG p_wmesg
|
||||
buf->min_flt = pinfo[0].p_uru_minflt;
|
||||
buf->maj_flt = pinfo[0].p_uru_majflt;
|
||||
|
||||
buf->nwchan = (unsigned long) pinfo [0].PROC_WCHAN;
|
||||
|
||||
buf->flags |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN);
|
||||
|
||||
if (pinfo [0].PROC_WCHAN && pinfo [0].PROC_WMESG[0] != 0) {
|
||||
g_strlcpy (buf->wchan, pinfo [0].PROC_WMESG,
|
||||
sizeof buf->wchan);
|
||||
buf->flags |= (1L << GLIBTOP_PROC_KERNEL_WCHAN);
|
||||
} else {
|
||||
buf->wchan [0] = 0;
|
||||
}
|
||||
|
||||
buf->k_flags = (unsigned long) pinfo [0].p_flag;
|
||||
buf->min_flt = (unsigned long) pinfo [0].p_uru_minflt;
|
||||
buf->maj_flt = (unsigned long) pinfo [0].p_uru_majflt;
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_proc_kernel_pstats;
|
||||
|
||||
return;
|
||||
buf->flags |= (_glibtop_sysdeps_proc_kernel_wchan
|
||||
| _glibtop_sysdeps_proc_kernel_pstats);
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: proclist.c,v 1.3 2011/05/23 19:35:55 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: patch-sysdeps_openbsd_procmap_c,v 1.7 2012/03/11 08:45:24 ajacoutot Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -182,7 +184,7 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
|
||||
|
||||
/* Get the process data */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &count);
|
||||
if (pinfo == NULL) {
|
||||
if ((pinfo == NULL) || (count < 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return (glibtop_map_entry*) g_array_free(maps, TRUE);
|
||||
}
|
||||
@@ -191,11 +193,8 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
|
||||
|
||||
if (kvm_read (server->machine.kd,
|
||||
(unsigned long) pinfo [0].p_vmspace,
|
||||
(char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (vmspace)");
|
||||
glibtop_suid_leave (server);
|
||||
return NULL;
|
||||
}
|
||||
(char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace))
|
||||
glibtop_error_io_r (server, "kvm_read (vmspace)");
|
||||
|
||||
RB_INIT(&root);
|
||||
nentries = load_vmmap_entries(server,
|
||||
@@ -239,7 +238,6 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
|
||||
&vnode, sizeof (vnode)) != sizeof (vnode)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (vnode)");
|
||||
unload_vmmap_entries(RB_ROOT(&root));
|
||||
glibtop_suid_leave (server);
|
||||
return (glibtop_map_entry*) g_array_free(maps, TRUE);
|
||||
}
|
||||
|
||||
@@ -252,12 +250,8 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
|
||||
|
||||
if (kvm_read (server->machine.kd,
|
||||
(unsigned long) vnode.v_data,
|
||||
&inode, sizeof (inode)) != sizeof (inode)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (inode)");
|
||||
unload_vmmap_entries(RB_ROOT(&root));
|
||||
glibtop_suid_leave (server);
|
||||
return (glibtop_map_entry*) g_array_free(maps, TRUE);
|
||||
}
|
||||
&inode, sizeof (inode)) != sizeof (inode))
|
||||
glibtop_error_io_r (server, "kvm_read (inode)");
|
||||
|
||||
inum = inode.i_number;
|
||||
dev = inode.i_dev;
|
||||
@@ -284,8 +278,6 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
|
||||
mentry->perm |= GLIBTOP_MAP_PERM_EXECUTE;
|
||||
}
|
||||
|
||||
glibtop_suid_leave (server);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_map;
|
||||
|
||||
buf->number = maps->len;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: procmem.c,v 1.4 2011/05/24 10:40:47 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
/* $OpenBSD: procopenfiles.c,v 1.2 2011/05/23 19:35:55 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
Copyright (C) 2004 Nicol\ufffds Lichtmaier
|
||||
Copyright (C) 2007 Joe Marcus Clarke
|
||||
Copyright (C) 2013 Robert Nagy
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Modified by Nicol\ufffds Lichtmaier to give a process open files.
|
||||
@@ -32,12 +33,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#define _KERNEL
|
||||
#include <sys/file.h>
|
||||
#undef _KERNEL
|
||||
#include <sys/mount.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <string.h>
|
||||
@@ -50,20 +46,6 @@ static const unsigned long _glibtop_sysdeps_proc_open_files =
|
||||
(1L << GLIBTOP_PROC_OPEN_FILES_TOTAL)|
|
||||
(1L << GLIBTOP_PROC_OPEN_FILES_SIZE);
|
||||
|
||||
kvm_t *kd;
|
||||
|
||||
struct filearg {
|
||||
SLIST_ENTRY(filearg) next;
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
char *name;
|
||||
TAILQ_HEAD(fuserhead, fuser) fusers;
|
||||
};
|
||||
|
||||
SLIST_HEAD(fileargs, filearg);
|
||||
|
||||
struct fileargs fileargs = SLIST_HEAD_INITIALIZER(fileargs);
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
@@ -72,121 +54,167 @@ _glibtop_init_proc_open_files_s (glibtop *server)
|
||||
server->sysdeps.proc_open_files = _glibtop_sysdeps_proc_open_files;
|
||||
}
|
||||
|
||||
static char *
|
||||
addr_to_string(struct kinfo_file *kf)
|
||||
{
|
||||
char *buffer = NULL;
|
||||
struct in_addr faddr;
|
||||
static GArray *
|
||||
parse_output(const char *output) {
|
||||
GArray *entries;
|
||||
char **lines;
|
||||
char *ftype = NULL;
|
||||
char *fname = NULL;
|
||||
guint i;
|
||||
guint len;
|
||||
int fd = -1;
|
||||
|
||||
memcpy(&faddr, kf->inp_faddru, sizeof(faddr));
|
||||
entries = g_array_new(FALSE, FALSE, sizeof(glibtop_open_files_entry));
|
||||
|
||||
if ((kf->so_protocol == IPPROTO_TCP) ||
|
||||
(kf->so_protocol == IPPROTO_UDP)) {
|
||||
if (kf->inp_fport) {
|
||||
buffer = g_strdup(faddr.s_addr == INADDR_ANY ? "*" :
|
||||
inet_ntoa(faddr));
|
||||
}
|
||||
lines = g_strsplit(output, "\n", 0);
|
||||
len = g_strv_length(lines);
|
||||
|
||||
for (i = 0; i < len && lines[i]; i++) {
|
||||
glibtop_open_files_entry entry = {0};
|
||||
|
||||
if (strlen(lines[i]) < 2)
|
||||
continue;
|
||||
|
||||
if (!g_str_has_prefix(lines[i], "f") &&
|
||||
!g_str_has_prefix(lines[i], "t") &&
|
||||
!g_str_has_prefix(lines[i], "n"))
|
||||
continue;
|
||||
|
||||
if (g_str_has_prefix(lines[i], "f")) {
|
||||
if (!g_ascii_isdigit(*(lines[i] + 1)))
|
||||
i += 2;
|
||||
else
|
||||
fd = atoi(lines[i] + 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
return buffer;
|
||||
if (g_str_has_prefix(lines[i], "t")) {
|
||||
ftype = lines[i];
|
||||
ftype++;
|
||||
continue;
|
||||
} else {
|
||||
fname = lines[i];
|
||||
fname++;
|
||||
}
|
||||
|
||||
if (ftype == NULL || fname == NULL)
|
||||
continue;
|
||||
|
||||
if (!strcmp(ftype, "unix")) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET;
|
||||
g_strlcpy(entry.info.localsock.name, fname,
|
||||
sizeof(entry.info.localsock.name));
|
||||
} else if (!strcmp(ftype, "PIPE")) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_PIPE;
|
||||
} else if (!strcmp(ftype, "VREG") ||
|
||||
!strcmp(ftype, "GDIR") ||
|
||||
!strcmp(ftype, "GREG") ||
|
||||
!strcmp(ftype, "VCHR") ||
|
||||
!strcmp(ftype, "VBLK") ||
|
||||
!strcmp(ftype, "DIR") ||
|
||||
!strcmp(ftype, "LINK") ||
|
||||
!strcmp(ftype, "REG") ||
|
||||
!strcmp(ftype, "VDIR")) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_FILE;
|
||||
g_strlcpy(entry.info.file.name, fname,
|
||||
sizeof(entry.info.file.name));
|
||||
} else if (!strcmp(ftype, "IPv4")) {
|
||||
char **hosts;
|
||||
char **remote_host;
|
||||
|
||||
if (!strstr(fname, "->")) {
|
||||
remote_host = g_strsplit(fname, ":", 0);
|
||||
} else {
|
||||
hosts = g_strsplit(fname, "->", 0);
|
||||
if (g_strv_length(hosts) < 2) {
|
||||
g_strfreev(hosts);
|
||||
continue;
|
||||
}
|
||||
|
||||
remote_host = g_strsplit(hosts[1], ":", 0);
|
||||
g_strfreev(hosts);
|
||||
}
|
||||
|
||||
if (g_strv_length(remote_host) < 2) {
|
||||
g_strfreev(remote_host);
|
||||
continue;
|
||||
}
|
||||
|
||||
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
|
||||
if (!strcmp(remote_host[0], "*"))
|
||||
g_strlcpy(entry.info.sock.dest_host, "0.0.0.0",
|
||||
sizeof(entry.info.sock.dest_host));
|
||||
else
|
||||
g_strlcpy(entry.info.sock.dest_host,
|
||||
remote_host[0],
|
||||
sizeof(entry.info.sock.dest_host));
|
||||
entry.info.sock.dest_port = atoi(remote_host[1]);
|
||||
|
||||
g_strfreev(remote_host);
|
||||
} else if (!strcmp(ftype, "IPv6")) {
|
||||
char **hosts;
|
||||
char **remote_host;
|
||||
|
||||
if (!strstr(fname, "->")) {
|
||||
remote_host = g_strsplit(fname, ":", 0);
|
||||
} else {
|
||||
hosts = g_strsplit(fname, "->", 0);
|
||||
if (g_strv_length(hosts) < 2) {
|
||||
g_strfreev(hosts);
|
||||
continue;
|
||||
}
|
||||
|
||||
remote_host = g_strsplit(hosts[1], "]", 0);
|
||||
g_strfreev(hosts);
|
||||
}
|
||||
|
||||
if (g_strv_length(remote_host) < 2) {
|
||||
g_strfreev(remote_host);
|
||||
continue;
|
||||
}
|
||||
|
||||
entry.type = GLIBTOP_FILE_TYPE_INET6SOCKET;
|
||||
if (!strcmp(remote_host[0], "*"))
|
||||
g_strlcpy(entry.info.sock.dest_host, "0.0.0.0",
|
||||
sizeof(entry.info.sock.dest_host));
|
||||
else
|
||||
g_strlcpy(entry.info.sock.dest_host,
|
||||
remote_host[0] + 1,
|
||||
sizeof(entry.info.sock.dest_host));
|
||||
entry.info.sock.dest_port = atoi(remote_host[1] + 1);
|
||||
|
||||
g_strfreev(remote_host);
|
||||
} else
|
||||
continue;
|
||||
|
||||
entry.fd = fd;
|
||||
|
||||
fd = -1;
|
||||
ftype = NULL;
|
||||
fname = NULL;
|
||||
|
||||
g_array_append_val(entries, entry);
|
||||
}
|
||||
|
||||
g_strfreev(lines);
|
||||
|
||||
return entries;
|
||||
}
|
||||
|
||||
glibtop_open_files_entry *
|
||||
glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pid_t pid)
|
||||
{
|
||||
struct kinfo_file *kf, *kflast;
|
||||
int cnt;
|
||||
char kbuf[_POSIX2_LINE_MAX];
|
||||
char *output;
|
||||
GArray *entries;
|
||||
|
||||
memset(buf, 0, sizeof (glibtop_proc_open_files));
|
||||
|
||||
if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, kbuf)) == NULL)
|
||||
g_warning("%s", kbuf);
|
||||
output = execute_lsof(pid);
|
||||
if (output == NULL) return NULL;
|
||||
|
||||
if ((kf = kvm_getfiles(kd, KERN_FILE_BYPID, pid, sizeof(*kf), &cnt)) == NULL)
|
||||
g_warning("%s", kvm_geterr(kd));
|
||||
entries = parse_output(output);
|
||||
|
||||
entries = g_array_new(FALSE, FALSE, sizeof(glibtop_open_files_entry));
|
||||
|
||||
for (kflast = &kf[cnt]; kf < kflast; ++kf) {
|
||||
glibtop_open_files_entry entry = {0};
|
||||
|
||||
if (kf->fd_fd < 0)
|
||||
continue;
|
||||
|
||||
if (kf->f_type == DTYPE_SOCKET) {
|
||||
if (kf->so_family == AF_LOCAL) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET;
|
||||
static char *stypename[] = {
|
||||
"unused", /* 0 */
|
||||
"stream",
|
||||
"dgram",
|
||||
"raw",
|
||||
"rdm",
|
||||
"seqpak"
|
||||
};
|
||||
#define STYPEMAX 5
|
||||
char *stype, stypebuf[24];
|
||||
|
||||
if (kf->so_type > STYPEMAX) {
|
||||
snprintf(stypebuf, sizeof(stypebuf), "?%d", kf->so_type);
|
||||
stype = stypebuf;
|
||||
} else {
|
||||
stype = stypename[kf->so_type];
|
||||
}
|
||||
g_strlcpy(entry.info.localsock.name, stype,
|
||||
sizeof(entry.info.localsock.name));
|
||||
} else if (kf->so_family == AF_INET ||
|
||||
kf->so_family == AF_INET6) {
|
||||
char *addrstr;
|
||||
|
||||
if (kf->so_family == AF_INET)
|
||||
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
|
||||
else
|
||||
entry.type = GLIBTOP_FILE_TYPE_INET6SOCKET;
|
||||
|
||||
addrstr = addr_to_string(kf);
|
||||
g_strlcpy(entry.info.sock.dest_host,
|
||||
addrstr,
|
||||
sizeof(entry.info.sock.dest_host));
|
||||
g_free(addrstr);
|
||||
entry.info.sock.dest_port = kf->inp_fport ? ntohs(kf->inp_fport) : 0;
|
||||
}
|
||||
} else if (kf->f_type == DTYPE_PIPE) {
|
||||
entry.type = GLIBTOP_FILE_TYPE_PIPE;
|
||||
} else if (kf->f_type == DTYPE_VNODE) {
|
||||
int badtype = 0;
|
||||
char nbuf[MAXPATHLEN];
|
||||
|
||||
entry.type = GLIBTOP_FILE_TYPE_FILE;
|
||||
|
||||
if ((kf->v_type == VNON) ||
|
||||
(kf->v_type == VBAD) ||
|
||||
(kf->v_tag == VT_NON && !(kf->v_flag & VCLONE))) {
|
||||
badtype = 1;
|
||||
}
|
||||
|
||||
if (badtype)
|
||||
continue;
|
||||
|
||||
if ((kf->v_type == VBLK) ||
|
||||
(kf->v_type == VCHR)) {
|
||||
snprintf(nbuf, sizeof(nbuf), "/dev/%s",
|
||||
devname(kf->va_rdev, kf->v_type == VCHR ? S_IFCHR : S_IFBLK));
|
||||
} else {
|
||||
snprintf(nbuf, sizeof(nbuf), "inode %llu on %s", kf->va_fileid,
|
||||
kf->f_mntonname);
|
||||
}
|
||||
g_strlcpy(entry.info.file.name, nbuf,
|
||||
sizeof(entry.info.file.name));
|
||||
} else
|
||||
continue;
|
||||
|
||||
entry.fd = kf->fd_fd;
|
||||
|
||||
g_array_append_val(entries, entry);
|
||||
}
|
||||
g_free(output);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_open_files;
|
||||
buf->number = entries->len;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: procsegment.c,v 1.2 2011/05/23 19:35:55 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -30,18 +32,13 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_segment =
|
||||
(1L << GLIBTOP_PROC_SEGMENT_TEXT_RSS) +
|
||||
(1L << GLIBTOP_PROC_SEGMENT_DATA_RSS);
|
||||
|
||||
static int pagesize;
|
||||
static const unsigned long _glibtop_sysdeps_proc_segment = 0;
|
||||
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_proc_segment_p (glibtop *server)
|
||||
{
|
||||
pagesize = getpagesize ();
|
||||
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
|
||||
}
|
||||
|
||||
@@ -52,26 +49,35 @@ glibtop_get_proc_segment_p (glibtop *server,
|
||||
glibtop_proc_segment *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
int count = 0;
|
||||
|
||||
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_segment));
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return;
|
||||
|
||||
#if 0
|
||||
/* Get the process info from the kernel */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, count);
|
||||
if (*count != 1) {
|
||||
return; /* the zeroed-out buffer indicating no data */
|
||||
}
|
||||
|
||||
buf->text_rss = pinfo[0].p_vm_tsize * pagesize;
|
||||
buf->data_rss = pinfo[0].p_vm_dsize * pagesize;
|
||||
/* 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
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_segment;
|
||||
*/
|
||||
/* end_code: address of end of code segment
|
||||
*/
|
||||
/* start_stack: address of the bottom of stack segment
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: procsignal.c,v 1.3 2011/05/23 19:35:55 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -60,7 +62,7 @@ glibtop_get_proc_signal_p (glibtop *server,
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
if ((pinfo == NULL) || (count != 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: procstate.c,v 1.3 2011/05/23 19:35:55 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998 Joshua Sled
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -62,7 +64,7 @@ glibtop_get_proc_state_p (glibtop *server,
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
if ((pinfo == NULL) || (count != 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: proctime.c,v 1.5 2011/07/10 15:29:26 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -56,6 +58,59 @@ _glibtop_init_proc_time_p (glibtop *server)
|
||||
_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(struct proc *p, struct timeval *up, struct timeval *sp,
|
||||
struct timeval *ip)
|
||||
{
|
||||
quad_t totusec;
|
||||
u_quad_t u, st, ut, it, tot;
|
||||
long sec, usec;
|
||||
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;
|
||||
}
|
||||
|
||||
sec = p->p_rtime.tv_sec;
|
||||
usec = p->p_rtime.tv_usec;
|
||||
|
||||
totusec = (quad_t)sec * 1000000 + usec;
|
||||
|
||||
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
|
||||
@@ -76,7 +131,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
if ((pinfo == NULL) || (count != 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: procuid.c,v 1.3 2011/05/23 19:35:56 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -65,7 +67,7 @@ glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
|
||||
sizeof (*pinfo), &count);
|
||||
if (pinfo == NULL) {
|
||||
if ((pinfo == NULL) || (count != 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: procwd.c,v 1.2 2011/05/23 19:35:56 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 2007 Joe Marcus Clarke
|
||||
This file is part of LibGTop 2.
|
||||
|
||||
@@ -39,9 +41,84 @@ _glibtop_init_proc_wd_s(glibtop *server)
|
||||
server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd;
|
||||
}
|
||||
|
||||
static GPtrArray *
|
||||
parse_output(const char *output, glibtop_proc_wd *buf)
|
||||
{
|
||||
GPtrArray *dirs;
|
||||
char **lines;
|
||||
gboolean nextwd = FALSE;
|
||||
gboolean nextrtd = FALSE;
|
||||
gboolean havertd = FALSE;
|
||||
guint i;
|
||||
guint len;
|
||||
|
||||
dirs = g_ptr_array_sized_new(1);
|
||||
|
||||
lines = g_strsplit(output, "\n", 0);
|
||||
len = g_strv_length(lines);
|
||||
|
||||
for (i = 0; i < len && lines[i]; i++) {
|
||||
if (strlen(lines[i]) < 2)
|
||||
continue;
|
||||
|
||||
if (!strcmp(lines[i], "fcwd")) {
|
||||
nextwd = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(lines[i], "frtd")) {
|
||||
nextrtd = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!g_str_has_prefix(lines[i], "n"))
|
||||
continue;
|
||||
|
||||
if (nextwd) {
|
||||
g_ptr_array_add(dirs, g_strdup(lines[i] + 1));
|
||||
nextwd = FALSE;
|
||||
}
|
||||
|
||||
if (nextrtd && !havertd) {
|
||||
g_strlcpy(buf->root, lines[i] + 1,
|
||||
sizeof(buf->root));
|
||||
buf->flags |= (1 << GLIBTOP_PROC_WD_ROOT);
|
||||
nextrtd = FALSE;
|
||||
havertd = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(lines);
|
||||
|
||||
return dirs;
|
||||
}
|
||||
|
||||
char**
|
||||
glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid)
|
||||
{
|
||||
/* TODO */
|
||||
char path[MAXPATHLEN];
|
||||
char *output;
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_wd));
|
||||
|
||||
g_snprintf(path, sizeof(path), "/proc/%u/file", pid);
|
||||
if (safe_readlink(path, buf->exe, sizeof(buf->exe)))
|
||||
buf->flags |= (1 << GLIBTOP_PROC_WD_EXE);
|
||||
|
||||
output = execute_lsof(pid);
|
||||
if (output != NULL) {
|
||||
GPtrArray *dirs;
|
||||
|
||||
dirs = parse_output(output, buf);
|
||||
g_free(output);
|
||||
|
||||
buf->number = dirs->len;
|
||||
buf->flags |= (1 << GLIBTOP_PROC_WD_NUMBER);
|
||||
|
||||
g_ptr_array_add(dirs, NULL);
|
||||
|
||||
return (char **)g_ptr_array_free(dirs, FALSE);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: sem_limits.c,v 1.3 2011/05/23 19:35:56 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: shm_limits.c,v 1.3 2011/05/23 19:35:56 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: siglist.c,v 1.2 2011/05/23 19:35:56 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,92 +0,0 @@
|
||||
/* 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/cpu.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)
|
||||
{
|
||||
char errbuf[_POSIX2_LINE_MAX];
|
||||
#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 ();
|
||||
/* Setup machine-specific data */
|
||||
server->machine.kd = kvm_openfiles (NULL, NULL, NULL, O_RDONLY, errbuf);
|
||||
|
||||
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 OpenBSD, 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. */
|
||||
}
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: swap.c,v 1.7 2011/07/10 15:23:01 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: sysinfo.c,v 1.4 2011/05/31 14:02:26 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $OpenBSD: uptime.c,v 1.6 2011/06/01 07:24:49 jasper Exp $ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
@@ -37,7 +39,7 @@ static const unsigned long _required_cpu_flags =
|
||||
/* Init function. */
|
||||
|
||||
void
|
||||
_glibtop_init_uptime_s (glibtop *server)
|
||||
_glibtop_init_uptime_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
|
||||
}
|
||||
@@ -45,7 +47,7 @@ _glibtop_init_uptime_s (glibtop *server)
|
||||
/* Provides uptime and idle time. */
|
||||
|
||||
void
|
||||
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
||||
glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
|
||||
{
|
||||
time_t now;
|
||||
int mib[2];
|
||||
@@ -63,7 +65,7 @@ glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
||||
buf->boot_time = boottime.tv_sec;
|
||||
}
|
||||
|
||||
glibtop_get_cpu_s (server, &cpu);
|
||||
glibtop_get_cpu_p (server, &cpu);
|
||||
|
||||
/* Put something clever in buf->idletime: CP_IDLE. */
|
||||
buf->idletime = (double) cpu.idle / (double) cpu.frequency;
|
||||
|
287
tap-test
Normal file
287
tap-test
Normal file
@@ -0,0 +1,287 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<title>glib - Low level core library</title>
|
||||
<meta name='generator' content='cgit v0.9.2'/>
|
||||
<meta name='robots' content='index, nofollow'/>
|
||||
<link rel='stylesheet' type='text/css' href='/browse/cgit-gnome.css'/>
|
||||
<link rel='shortcut icon' href='http://www-old.gnome.org/img/logo/foot-16.png'/>
|
||||
<link rel='alternate' title='Atom feed' href='https://git.gnome.org/browse/glib/atom/tap-test?h=master' type='application/atom+xml'/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="global_domain_bar">
|
||||
<div class="maxwidth">
|
||||
<div class="tab">
|
||||
<a class="root" href="https://www.gnome.org/">GNOME.org</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="page">
|
||||
<div id="logo_bar" class="container_12">
|
||||
<div id="logo" class="grid_3">
|
||||
<a title="Go to home page" href="https://git.gnome.org/"><img src="https://static.gnome.org/img/gnome-git.png" alt="GNOME: Git Repository" /></a>
|
||||
</div>
|
||||
|
||||
<div id="top_bar" class="grid_9">
|
||||
<div class="left">
|
||||
<div class="menu-globalnav-container">
|
||||
<ul id="menu-globalnav" class="menu">
|
||||
<li id="menu-item-1039" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1039">
|
||||
<a href="https://git.gnome.org/">Home</a></li>
|
||||
|
||||
<li id="menu-item-1037" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1037">
|
||||
<a href="https://wiki.gnome.org/Git">Git Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id='cgit'><table id='header'>
|
||||
<tr>
|
||||
<td class='main'><a href='/browse/'>index</a> : <a title='glib' href='/browse/glib/'>glib</a></td><td class='form'><form method='get' action=''>
|
||||
<select name='h' onchange='this.form.submit();'>
|
||||
<option value='GLIB_1_1_3_MARTIN'>GLIB_1_1_3_MARTIN</option>
|
||||
<option value='GLIB_1_1_4_THREADS'>GLIB_1_1_4_THREADS</option>
|
||||
<option value='GLIB_1_3_HACKS'>GLIB_1_3_HACKS</option>
|
||||
<option value='GLIB_2_15_0'>GLIB_2_15_0</option>
|
||||
<option value='dispatch-data'>dispatch-data</option>
|
||||
<option value='gdbus-daemon'>gdbus-daemon</option>
|
||||
<option value='gdbus-daemon2'>gdbus-daemon2</option>
|
||||
<option value='glib-1-2'>glib-1-2</option>
|
||||
<option value='glib-2-0'>glib-2-0</option>
|
||||
<option value='glib-2-10'>glib-2-10</option>
|
||||
<option value='glib-2-12'>glib-2-12</option>
|
||||
<option value='glib-2-14'>glib-2-14</option>
|
||||
<option value='glib-2-16'>glib-2-16</option>
|
||||
<option value='glib-2-18'>glib-2-18</option>
|
||||
<option value='glib-2-2'>glib-2-2</option>
|
||||
<option value='glib-2-20'>glib-2-20</option>
|
||||
<option value='glib-2-22'>glib-2-22</option>
|
||||
<option value='glib-2-24'>glib-2-24</option>
|
||||
<option value='glib-2-26'>glib-2-26</option>
|
||||
<option value='glib-2-28'>glib-2-28</option>
|
||||
<option value='glib-2-30'>glib-2-30</option>
|
||||
<option value='glib-2-32'>glib-2-32</option>
|
||||
<option value='glib-2-34'>glib-2-34</option>
|
||||
<option value='glib-2-36'>glib-2-36</option>
|
||||
<option value='glib-2-38'>glib-2-38</option>
|
||||
<option value='glib-2-4'>glib-2-4</option>
|
||||
<option value='glib-2-6'>glib-2-6</option>
|
||||
<option value='glib-2-8'>glib-2-8</option>
|
||||
<option value='glib-main-loop'>glib-main-loop</option>
|
||||
<option value='glib-threads'>glib-threads</option>
|
||||
<option value='master' selected='selected'>master</option>
|
||||
<option value='new-gsettings'>new-gsettings</option>
|
||||
<option value='signal-performance'>signal-performance</option>
|
||||
<option value='test/gobjectnew'>test/gobjectnew</option>
|
||||
<option value='tizen/kdbus-dev'>tizen/kdbus-dev</option>
|
||||
<option value='wip/async-io-perf'>wip/async-io-perf</option>
|
||||
<option value='wip/child-catchall'>wip/child-catchall</option>
|
||||
<option value='wip/coverity-fixes'>wip/coverity-fixes</option>
|
||||
<option value='wip/danw/clicert'>wip/danw/clicert</option>
|
||||
<option value='wip/danw/glib.mk'>wip/danw/glib.mk</option>
|
||||
<option value='wip/dbusable'>wip/dbusable</option>
|
||||
<option value='wip/desktop-actions'>wip/desktop-actions</option>
|
||||
<option value='wip/doc-fixes'>wip/doc-fixes</option>
|
||||
<option value='wip/format-errors'>wip/format-errors</option>
|
||||
<option value='wip/free'>wip/free</option>
|
||||
<option value='wip/g-action-print-detailed-name'>wip/g-action-print-detailed-name</option>
|
||||
<option value='wip/gbytes-takeover'>wip/gbytes-takeover</option>
|
||||
<option value='wip/gcleanup'>wip/gcleanup</option>
|
||||
<option value='wip/gcleanup-desrt'>wip/gcleanup-desrt</option>
|
||||
<option value='wip/gdesktopappinfo'>wip/gdesktopappinfo</option>
|
||||
<option value='wip/gicon'>wip/gicon</option>
|
||||
<option value='wip/gnotification'>wip/gnotification</option>
|
||||
<option value='wip/gobjectnew'>wip/gobjectnew</option>
|
||||
<option value='wip/gproperty'>wip/gproperty</option>
|
||||
<option value='wip/gproperty-2'>wip/gproperty-2</option>
|
||||
<option value='wip/gsettings-list'>wip/gsettings-list</option>
|
||||
<option value='wip/gsettings-work'>wip/gsettings-work</option>
|
||||
<option value='wip/gsubprocess'>wip/gsubprocess</option>
|
||||
<option value='wip/gsubprocess-2.36'>wip/gsubprocess-2.36</option>
|
||||
<option value='wip/gsubprocess-desrt'>wip/gsubprocess-desrt</option>
|
||||
<option value='wip/gsubprocess-ostreams'>wip/gsubprocess-ostreams</option>
|
||||
<option value='wip/gutils-splitup'>wip/gutils-splitup</option>
|
||||
<option value='wip/installed-tests'>wip/installed-tests</option>
|
||||
<option value='wip/latest-gsubprocess'>wip/latest-gsubprocess</option>
|
||||
<option value='wip/le-gsubprocess'>wip/le-gsubprocess</option>
|
||||
<option value='wip/linux'>wip/linux</option>
|
||||
<option value='wip/locale-monitor'>wip/locale-monitor</option>
|
||||
<option value='wip/makefile.glib'>wip/makefile.glib</option>
|
||||
<option value='wip/mapped-bytes'>wip/mapped-bytes</option>
|
||||
<option value='wip/new-parser'>wip/new-parser</option>
|
||||
<option value='wip/pcre-jit'>wip/pcre-jit</option>
|
||||
<option value='wip/pcre-mark'>wip/pcre-mark</option>
|
||||
<option value='wip/private-rework-3'>wip/private-rework-3</option>
|
||||
<option value='wip/resources2'>wip/resources2</option>
|
||||
<option value='wip/serializable'>wip/serializable</option>
|
||||
<option value='wip/settings-backend'>wip/settings-backend</option>
|
||||
<option value='wip/subprocess-2013'>wip/subprocess-2013</option>
|
||||
<option value='wip/symbol-visibility'>wip/symbol-visibility</option>
|
||||
<option value='wip/task'>wip/task</option>
|
||||
<option value='wip/test-cleanup'>wip/test-cleanup</option>
|
||||
<option value='wip/threadsafe-qdata'>wip/threadsafe-qdata</option>
|
||||
<option value='wip/unicode-graphemebreak'>wip/unicode-graphemebreak</option>
|
||||
<option value='wip/version-bounds'>wip/version-bounds</option>
|
||||
<option value='wip/win32-source-api'>wip/win32-source-api</option>
|
||||
</select> <input type='submit' name='' value='switch'/></form></td></tr>
|
||||
<tr><td class='sub'>Low level core library</td><td class='sub right'></td></tr></table>
|
||||
<table class='tabs'><tr><td>
|
||||
<a href='/browse/glib/'>summary</a><a href='/browse/glib/refs/'>refs</a><a href='/browse/glib/log/tap-test'>log</a><a class='active' href='/browse/glib/tree/tap-test'>tree</a><a href='/browse/glib/commit/tap-test'>commit</a><a href='/browse/glib/diff/tap-test'>diff</a></td><td class='form'><form class='right' method='get' action='/browse/glib/log/tap-test'>
|
||||
<select name='qt'>
|
||||
<option value='grep'>log msg</option>
|
||||
<option value='author'>author</option>
|
||||
<option value='committer'>committer</option>
|
||||
<option value='range'>range</option>
|
||||
</select>
|
||||
<input class='txt' type='text' size='10' name='q' value=''/>
|
||||
<input type='submit' value='search'/>
|
||||
</form>
|
||||
</td></tr></table>
|
||||
<div class='path'>path: <a href='/browse/glib/tree/'>root</a>/<a href='/browse/glib/tree/tap-test'>tap-test</a></div><div class='content'>blob: 481e333ec90cb9667b097643f9c1dd79afca4ab2 (<a href='/browse/glib/plain/tap-test'>plain</a>)
|
||||
<table summary='blob content' class='blob'>
|
||||
<tr><td class='linenumbers'><pre><a class='no' id='n1' name='n1' href='#n1'>1</a>
|
||||
<a class='no' id='n2' name='n2' href='#n2'>2</a>
|
||||
<a class='no' id='n3' name='n3' href='#n3'>3</a>
|
||||
<a class='no' id='n4' name='n4' href='#n4'>4</a>
|
||||
<a class='no' id='n5' name='n5' href='#n5'>5</a>
|
||||
</pre></td>
|
||||
<td class='lines'><pre><code>#! /bin/sh
|
||||
|
||||
# run a GTest in tap mode. The test binary is passed as $1
|
||||
|
||||
$1 -k --tap
|
||||
</code></pre></td></tr></table>
|
||||
</div> <!-- class=content -->
|
||||
</div>
|
||||
<div id="footer_community"></div>
|
||||
|
||||
<div id="footer_grass"></div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container_13" id="container_12">
|
||||
<div class="links grid_9">
|
||||
<div class="menu-footer-container">
|
||||
<ul id="menu-footer" class="menu">
|
||||
<li id="menu-item-1048" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-1048">
|
||||
<a href="/">The GNOME Project</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1049" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1049">
|
||||
<a href="https://www.gnome.org/about/">About Us</a></li>
|
||||
|
||||
<li id="menu-item-1050" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1050">
|
||||
<a href="https://www.gnome.org/get-involved/">Get Involved</a></li>
|
||||
|
||||
<li id="menu-item-1051" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1051">
|
||||
<a href="https://www.gnome.org/teams/">Teams</a></li>
|
||||
|
||||
<li id="menu-item-1053" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1053">
|
||||
<a href="https://www.gnome.org/support-gnome/">Support GNOME</a></li>
|
||||
|
||||
<li id="menu-item-1054" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1054">
|
||||
<a href="https://www.gnome.org/contact/">Contact Us</a></li>
|
||||
|
||||
<li id="menu-item-2246" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-2246">
|
||||
<a href="https://www.gnome.org/foundation/">The GNOME Foundation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li id="menu-item-1047" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1047">
|
||||
<a href="#">Resources</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1055" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1055">
|
||||
<a href="https://developer.gnome.org">Developer Center</a></li>
|
||||
|
||||
<li id="menu-item-1056" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1056">
|
||||
<a href="https://help.gnome.org">Documentation</a></li>
|
||||
|
||||
<li id="menu-item-1057" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1057">
|
||||
<a href="https://wiki.gnome.org">Wiki</a></li>
|
||||
|
||||
<li id="menu-item-1058" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1058">
|
||||
<a href="https://mail.gnome.org/mailman/listinfo">Mailing Lists</a></li>
|
||||
|
||||
<li id="menu-item-1059" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1059">
|
||||
<a href="https://wiki.gnome.org/GnomeIrcChannels">IRC Channels</a></li>
|
||||
|
||||
<li id="menu-item-1060" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1060">
|
||||
<a href="https://bugzilla.gnome.org/">Bug Tracker</a></li>
|
||||
|
||||
<li id="menu-item-1061" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1061">
|
||||
<a href="https://git.gnome.org/browse/">Development Code</a></li>
|
||||
|
||||
<li id="menu-item-1062" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1062">
|
||||
<a href="https://wiki.gnome.org/Jhbuild">Build Tool</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li id="menu-item-1046" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1046">
|
||||
<a href="/news">News</a>
|
||||
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-1063" class=
|
||||
"menu-item menu-item-type-post_type menu-item-object-page menu-item-1063">
|
||||
<a href="https://www.gnome.org/press/">Press Releases</a></li>
|
||||
|
||||
<li id="menu-item-1064" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1064">
|
||||
<a href="https://www.gnome.org/start/stable">Latest Release</a></li>
|
||||
|
||||
<li id="menu-item-1065" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1065">
|
||||
<a href="https://planet.gnome.org">Planet GNOME</a></li>
|
||||
|
||||
<li id="menu-item-1067" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1067">
|
||||
<a href="https://news.gnome.org">Development News</a></li>
|
||||
|
||||
<li id="menu-item-1068" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1068">
|
||||
<a href="https://identi.ca/gnome">Identi.ca</a></li>
|
||||
|
||||
<li id="menu-item-1069" class=
|
||||
"menu-item menu-item-type-custom menu-item-object-custom menu-item-1069">
|
||||
<a href="https://twitter.com/gnome">Twitter</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footnotes" class="grid_9">
|
||||
<p>Copyright © 2004-2013, <a href="https://www.gnome.org/">The GNOME Project</a>.</p>
|
||||
<br />
|
||||
<small><p>Hosted by <a href="http://www.redhat.com/">Red Hat</a>.
|
||||
Powered by <a href="http://hjemli.net/git/cgit/">cgit</a>.</p>
|
||||
<p>To follow the commits, subscribe to <a href="http://mail.gnome.org/mailman/listinfo/commits-list">commits-list</a>. (can be limited to specific modules)</p></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- id=cgit -->
|
||||
</body>
|
||||
</html>
|
22
tests/Makefile.am
Normal file
22
tests/Makefile.am
Normal file
@@ -0,0 +1,22 @@
|
||||
include $top_srcdir/glib-tap.mk
|
||||
|
||||
noinst_PROGRAMS = test
|
||||
|
||||
TESTS = test
|
||||
|
||||
test_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) \
|
||||
@libs_xauth@
|
||||
|
||||
test_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/include/glibtop \
|
||||
$(NULL)
|
||||
|
||||
test_SOURCES = \
|
||||
cpuinfo-tests.c
|
11
tests/cpuinfo-tests.c
Normal file
11
tests/cpuinfo-tests.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/sysinfo.h>
|
||||
|
||||
static void
|
||||
test_simple_cpuinfo (void)
|
||||
{
|
||||
glibtop_sysinfo *infos = glibtop_get_sysinfo ();
|
||||
|
||||
g_assert_cmpint (infos->ncpu, ==, 4);
|
||||
|
||||
}
|
Reference in New Issue
Block a user