ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/docs/statgrab.xml
Revision: 1.2
Committed: Tue Oct 21 15:48:55 2003 UTC (20 years, 7 months ago) by pajs
Content type: text/xml
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_7
Changes since 1.1: +20 -2 lines
Log Message:
Added doc's for statgrab_init

File Contents

# Content
1 <?xml version="1.0"?>
2
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6 <refentry id="statgrab">
7
8 <refentryinfo>
9 <date>$Date: 2003/10/02 17:38:03 $</date>
10 <releaseinfo>$Id: statgrab.xml,v 1.1 2003/10/02 17:38:03 tdb Exp $</releaseinfo>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>statgrab</refentrytitle>
15 <manvolnum>3</manvolnum>
16 <refmiscinfo>i-scream</refmiscinfo>
17 </refmeta>
18
19 <refnamediv>
20 <refname>statgrab</refname>
21 <refpurpose>get system statistics</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <funcsynopsis>
26 <funcsynopsisinfo>#include &lt;statgrab.h&gt;</funcsynopsisinfo>
27
28 <funcprototype>
29 <funcdef>int <function>statgrab_init</function></funcdef>
30 <void/>
31 </funcprototype>
32
33 <funcprototype>
34 <funcdef>cpu_percent_t *<function>cpu_percent_usage</function></funcdef>
35 <void/>
36 </funcprototype>
37 <funcprototype>
38 <funcdef>cpu_states_t *<function>get_cpu_totals</function></funcdef>
39 <void/>
40 </funcprototype>
41 <funcprototype>
42 <funcdef>cpu_states_t *<function>get_cpu_diff</function></funcdef>
43 <void/>
44 </funcprototype>
45
46 <funcprototype>
47 <funcdef>diskio_stat_t *<function>get_diskio_stats</function></funcdef>
48 <paramdef>int *<parameter>entries</parameter></paramdef>
49 </funcprototype>
50 <funcprototype>
51 <funcdef>diskio_stat_t *<function>get_diskio_stats_diff</function></funcdef>
52 <paramdef>int *<parameter>entries</parameter></paramdef>
53 </funcprototype>
54
55 <funcprototype>
56 <funcdef>general_stat_t *<function>get_general_stats</function></funcdef>
57 <void/>
58 </funcprototype>
59
60 <funcprototype>
61 <funcdef>load_stat_t *<function>get_load_stats</function></funcdef>
62 <void/>
63 </funcprototype>
64
65 <funcprototype>
66 <funcdef>mem_stat_t *<function>get_memory_stats</function></funcdef>
67 <void/>
68 </funcprototype>
69 <funcprototype>
70 <funcdef>swap_stat_t *<function>get_swap_stats</function></funcdef>
71 <void/>
72 </funcprototype>
73
74 <funcprototype>
75 <funcdef>network_stat_t *<function>get_network_stats</function></funcdef>
76 <paramdef>int *<parameter>entries</parameter></paramdef>
77 </funcprototype>
78 <funcprototype>
79 <funcdef>network_stat_t *<function>get_network_stats_diff</function></funcdef>
80 <paramdef>int *<parameter>entries</parameter></paramdef>
81 </funcprototype>
82
83 <funcprototype>
84 <funcdef>page_stat_t *<function>get_page_stats</function></funcdef>
85 <void/>
86 </funcprototype>
87 <funcprototype>
88 <funcdef>page_stat_t *<function>get_page_stats_diff</function></funcdef>
89 <void/>
90 </funcprototype>
91
92 <funcprototype>
93 <funcdef>process_stat_t *<function>get_process_stats</function></funcdef>
94 <void/>
95 </funcprototype>
96
97 <funcprototype>
98 <funcdef>user_stat_t *<function>get_user_stats</function></funcdef>
99 <void/>
100 </funcprototype>
101
102 </funcsynopsis>
103 </refsynopsisdiv>
104
105 <refsect1>
106 <title>Description</title>
107 <para>
108 The statgrab library provides a cross platform interface to getting
109 system statistics. Each of the function calls returns a structure
110 containing statistics. See the manual page for each individual
111 function for more details on usage.
112 </para>
113 <para>
114 <function>statgrab_init(void)</function> should be the first
115 function you call before you start to use libstatgrab. This
116 function on *bsd systems opens up the kernel structures and
117 leaves them open for future use. Because of this, any special
118 privileges the program has (e.g. setgid kmem) can be dropped
119 after this call, and all the libstatgrab calls should continue to
120 work.
121 </para>
122 <para>
123 <function>statgrab_init</function> returns 0 on success, and
124 non-zero on failure.
125 </para>
126 <para>
127 The library was originally written to support the i-scream central
128 monitoring system, but has since become a standalone package. It
129 has been ported to work on Linux, FreeBSD, and Solaris.
130 </para>
131 </refsect1>
132
133 <refsect1>
134 <title>See Also</title>
135
136 <simplelist type="inline">
137 <member>
138 <citerefentry>
139 <refentrytitle>cpu_percent_usage</refentrytitle>
140 <manvolnum>3</manvolnum>
141 </citerefentry>
142 <citerefentry>
143 <refentrytitle>get_diskio_stats</refentrytitle>
144 <manvolnum>3</manvolnum>
145 </citerefentry>
146 <citerefentry>
147 <refentrytitle>get_general_stats</refentrytitle>
148 <manvolnum>3</manvolnum>
149 </citerefentry>
150 <citerefentry>
151 <refentrytitle>get_load_stats</refentrytitle>
152 <manvolnum>3</manvolnum>
153 </citerefentry>
154 <citerefentry>
155 <refentrytitle>get_memory_stats</refentrytitle>
156 <manvolnum>3</manvolnum>
157 </citerefentry>
158 <citerefentry>
159 <refentrytitle>get_network_stats</refentrytitle>
160 <manvolnum>3</manvolnum>
161 </citerefentry>
162 <citerefentry>
163 <refentrytitle>get_page_stats</refentrytitle>
164 <manvolnum>3</manvolnum>
165 </citerefentry>
166 <citerefentry>
167 <refentrytitle>get_process_stats</refentrytitle>
168 <manvolnum>3</manvolnum>
169 </citerefentry>
170 <citerefentry>
171 <refentrytitle>get_user_stats</refentrytitle>
172 <manvolnum>3</manvolnum>
173 </citerefentry>
174 </member>
175 </simplelist>
176 </refsect1>
177
178 <refsect1>
179 <title>Website</title>
180
181 <simplelist type="vert">
182 <member>
183 <ulink url="http://www.i-scream.org">http://www.i-scream.org</ulink>
184 </member>
185 </simplelist>
186 </refsect1>
187
188 </refentry>