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.1 by tdb, Thu Oct 2 17:38:03 2003 UTC vs.
Revision 1.6 by tdb, Sat Mar 6 23:35:20 2004 UTC

# Line 26 | Line 26
26        <funcsynopsisinfo>#include &lt;statgrab.h&gt;</funcsynopsisinfo>
27  
28        <funcprototype>
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>
39          <void/>
40        </funcprototype>
# Line 76 | 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 100 | 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 <      The library was originally written to support the i-scream central
124 <      monitoring system, but has since become a standalone package. It
125 <      has been ported to work on Linux, FreeBSD, and Solaris.
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> 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
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    
149    <refsect1>
# Line 139 | Line 173
173          </citerefentry>
174          <citerefentry>
175            <refentrytitle>get_network_stats</refentrytitle>
176 +          <manvolnum>3</manvolnum>
177 +        </citerefentry>
178 +        <citerefentry>
179 +          <refentrytitle>get_network_iface_stats</refentrytitle>
180            <manvolnum>3</manvolnum>
181          </citerefentry>
182          <citerefentry>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines