ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/docs/sg_get_fs_stats.xml
Revision: 1.4
Committed: Mon Apr 25 11:25:47 2005 UTC (19 years ago) by tdb
Content type: text/xml
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
State: FILE REMOVED
Log Message:
Move by repocopy the libstatgrab docs in to a subdirectory. This is so
I can create separate directories for statgrab/saidar docs.

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="sg_get_fs_stats">
7
8 <refentryinfo>
9 <date>$Date: 2004/05/08 16:40:58 $</date>
10 <releaseinfo>$Id: sg_get_fs_stats.xml,v 1.3 2004/05/08 16:40:58 tdb Exp $</releaseinfo>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>sg_get_fs_stats</refentrytitle>
15 <manvolnum>3</manvolnum>
16 <refmiscinfo>i-scream</refmiscinfo>
17 </refmeta>
18
19 <refnamediv>
20 <refname>sg_get_fs_stats</refname>
21 <refpurpose>get filesystem statistics</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <funcsynopsis>
26 <funcsynopsisinfo>#include &lt;statgrab.h&gt;</funcsynopsisinfo>
27 <funcprototype>
28 <funcdef>sg_fs_stats *<function>sg_get_fs_stats</function></funcdef>
29 <paramdef>int *<parameter>entries</parameter></paramdef>
30 </funcprototype>
31 </funcsynopsis>
32 </refsynopsisdiv>
33
34 <refsect1>
35 <title>Description</title>
36 <para>
37 The <function>sg_get_fs_stats</function> takes a pointer to an
38 int, <parameter>entries</parameter>, which is filled with the
39 number of mounted file systems the machine has. The return
40 value is a pointer to the first member of an array of
41 <structname>sg_fs_stats</structname> structures; the number of
42 entries in the array is returned in <parameter>entries</parameter>.
43 </para>
44 <para>
45 The function returns statistics about mounted filesystems,
46 including free space and inode usage.
47 </para>
48 </refsect1>
49
50 <refsect1>
51 <title>Return Values</title>
52
53 <para>
54 <function>sg_get_fs_stats</function> returns a pointer to a
55 structure of type <structname>sg_fs_stats</structname>.
56 </para>
57
58 <programlisting>
59 typedef struct {
60 char *device_name;
61 char *fs_type;
62 char *mnt_point;
63 long long size;
64 long long used;
65 long long avail;
66 long long total_inodes;
67 long long used_inodes;
68 long long free_inodes;
69 } sg_fs_stats;
70 </programlisting>
71
72 <variablelist>
73 <varlistentry>
74 <term>
75 <structfield>device_name</structfield>
76 </term>
77 <listitem>
78 <para>
79 The name known to the operating system.
80 (eg. on linux it might be hda)
81 </para>
82 </listitem>
83 </varlistentry>
84 <varlistentry>
85 <term>
86 <structfield>fs_type</structfield>
87 </term>
88 <listitem>
89 <para>
90 The type of the filesystem.
91 </para>
92 </listitem>
93 </varlistentry>
94 <varlistentry>
95 <term>
96 <structfield>mnt_point</structfield>
97 </term>
98 <listitem>
99 <para>
100 The mount point of the file system.
101 </para>
102 </listitem>
103 </varlistentry>
104 <varlistentry>
105 <term>
106 <structfield>size</structfield>
107 </term>
108 <listitem>
109 <para>
110 The size, in bytes, of the file system.
111 </para>
112 </listitem>
113 </varlistentry>
114 <varlistentry>
115 <term>
116 <structfield>used</structfield>
117 </term>
118 <listitem>
119 <para>
120 The amount of space, in bytes, used on the
121 filesystem.
122 </para>
123 </listitem>
124 </varlistentry>
125 <varlistentry>
126 <term>
127 <structfield>avail</structfield>
128 </term>
129 <listitem>
130 <para>
131 The amount of space, in bytes, available on
132 the filesystem.
133 </para>
134 </listitem>
135 </varlistentry>
136 <varlistentry>
137 <term>
138 <structfield>total_inodes</structfield>
139 </term>
140 <listitem>
141 <para>
142 The total number of inodes in the filesystem.
143 </para>
144 </listitem>
145 </varlistentry>
146 <varlistentry>
147 <term>
148 <structfield>used_inodes</structfield>
149 </term>
150 <listitem>
151 <para>
152 The number of used inodes in the filesystem.
153 </para>
154 </listitem>
155 </varlistentry>
156 <varlistentry>
157 <term>
158 <structfield>free_inodes</structfield>
159 </term>
160 <listitem>
161 <para>
162 The number of free inodes in the filesystem.
163 </para>
164 </listitem>
165 </varlistentry>
166 </variablelist>
167 </refsect1>
168
169 <refsect1>
170 <title>See Also</title>
171
172 <simplelist type="inline">
173 <member>
174 <citerefentry>
175 <refentrytitle>statgrab</refentrytitle>
176 <manvolnum>3</manvolnum>
177 </citerefentry>
178 </member>
179 </simplelist>
180 </refsect1>
181
182 <refsect1>
183 <title>Website</title>
184
185 <simplelist type="vert">
186 <member>
187 <ulink url="http://www.i-scream.org/libstatgrab/">
188 http://www.i-scream.org/libstatgrab/
189 </ulink>
190 </member>
191 </simplelist>
192 </refsect1>
193
194 </refentry>