ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/docs/statgrab.xml
(Generate patch)

Comparing projects/libstatgrab/docs/statgrab.xml (file contents):
Revision 1.2 by pajs, Tue Oct 21 15:48:55 2003 UTC vs.
Revision 1.7 by tdb, Thu Mar 11 17:35:24 2004 UTC

# Line 29 | Line 29
29          <funcdef>int <function>statgrab_init</function></funcdef>
30          <void/>
31        </funcprototype>
32 +      <funcprototype>
33 +        <funcdef>int <function>statgrab_drop_privileges</function></funcdef>
34 +        <void/>
35 +      </funcprototype>
36  
37        <funcprototype>
38          <funcdef>cpu_percent_t *<function>cpu_percent_usage</function></funcdef>
# Line 81 | Line 85
85        </funcprototype>
86  
87        <funcprototype>
88 +        <funcdef>network_iface_stat_t *<function>get_network_iface_stats</function></funcdef>
89 +        <paramdef>int *<parameter>entries</parameter></paramdef>
90 +      </funcprototype>
91 +
92 +      <funcprototype>
93          <funcdef>page_stat_t *<function>get_page_stats</function></funcdef>
94          <void/>
95        </funcprototype>
# Line 105 | Line 114
114    <refsect1>
115      <title>Description</title>
116      <para>
117 <      The statgrab library provides a cross platform interface to getting
117 >      The statgrab library provides a cross-platform interface to getting
118        system statistics. Each of the function calls returns a structure
119        containing statistics. See the manual page for each individual
120        function for more details on usage.
121      </para>
122      <para>
123 <      <function>statgrab_init(void)</function> should be the first
124 <      function you call before you start to use libstatgrab. This
125 <      function on *bsd systems opens up the kernel structures and
126 <      leaves them open for future use. Because of this, any special
127 <      privileges the program has (e.g. setgid kmem) can be dropped
128 <      after this call, and all the libstatgrab calls should continue to
129 <      work.
123 >      <function>statgrab_init</function> must be the first
124 >      function you call before you start to use libstatgrab; it performs all
125 >      the one-time initialisation operations that need setuid/setgid
126 >      privileges. For instance, on *BSD it opens a descriptor to be able to
127 >      read kernel structures later on, and on Solaris it reads the device
128 >      mappings that in some cases are only accessible by root (machines with
129 >      a /dev/osa). Once this has run, the other libstatgrab functions no longer
130 >      need elevated privileges. It is therefore a good idea to call
131 >      <function>statgrab_drop_privileges</function>, which discards
132 >      setuid and setgid privileges, immediately after you call
133 >      <function>statgrab_init</function>, unless your application has
134 >      another reason for needing setuid or setgid privileges.
135      </para>
136      <para>
137 <      <function>statgrab_init</function> returns 0 on success, and
137 >      <function>statgrab_init</function> and
138 >      <function>statgrab_drop_privileges</function> return 0 on success, and
139        non-zero on failure.
140      </para>
141      <para>
142 <      The library was originally written to support the i-scream central
143 <      monitoring system, but has since become a standalone package. It
144 <      has been ported to work on Linux, FreeBSD, and Solaris.
142 >      The library was originally written to support the i-scream
143 >      central monitoring system, but has since become a standalone
144 >      package. It has been ported to work on Linux, NetBSD, FreeBSD,
145 >      OpenBSD, DragonFly BSD, Solaris and Cygwin.
146      </para>
147    </refsect1>
148    
# Line 160 | Line 176
176            <manvolnum>3</manvolnum>
177          </citerefentry>
178          <citerefentry>
179 +          <refentrytitle>get_network_iface_stats</refentrytitle>
180 +          <manvolnum>3</manvolnum>
181 +        </citerefentry>
182 +        <citerefentry>
183            <refentrytitle>get_page_stats</refentrytitle>
184            <manvolnum>3</manvolnum>
185          </citerefentry>
# Line 180 | Line 200
200      
201      <simplelist type="vert">
202        <member>
203 <        <ulink url="http://www.i-scream.org">http://www.i-scream.org</ulink>
203 >        <ulink url="http://www.i-scream.org/libstatgrab/">
204 >          http://www.i-scream.org/libstatgrab/
205 >        </ulink>
206        </member>
207      </simplelist>
208    </refsect1>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines