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="get_general_stats"> |
7 |
|
8 |
<refentryinfo> |
9 |
<date>$Date$</date> |
10 |
<releaseinfo>$Id$</releaseinfo> |
11 |
</refentryinfo> |
12 |
|
13 |
<refmeta> |
14 |
<refentrytitle>get_general_stats</refentrytitle> |
15 |
<manvolnum>3</manvolnum> |
16 |
<refmiscinfo>i-scream</refmiscinfo> |
17 |
</refmeta> |
18 |
|
19 |
<refnamediv> |
20 |
<refname>get_general_stats</refname> |
21 |
<refpurpose>get general operating system statistics</refpurpose> |
22 |
</refnamediv> |
23 |
|
24 |
<refsynopsisdiv> |
25 |
<funcsynopsis> |
26 |
<funcsynopsisinfo>#include <statgrab.h></funcsynopsisinfo> |
27 |
<funcprototype> |
28 |
<funcdef>general_stat_t *<function>get_general_stats</function></funcdef> |
29 |
<void/> |
30 |
</funcprototype> |
31 |
</funcsynopsis> |
32 |
</refsynopsisdiv> |
33 |
|
34 |
<refsect1> |
35 |
<title>Description</title> |
36 |
<para> |
37 |
This call returns details on the operating system. |
38 |
</para> |
39 |
<para> |
40 |
It returns a pointer to a static buffer of |
41 |
<structname>general_stat_t</structname>. |
42 |
</para> |
43 |
</refsect1> |
44 |
|
45 |
<refsect1> |
46 |
<title>Return Values</title> |
47 |
|
48 |
<para> |
49 |
The structure returned is of type |
50 |
<structname>general_stat_t</structname>. |
51 |
</para> |
52 |
|
53 |
<programlisting> |
54 |
typedef struct{ |
55 |
char *os_name; |
56 |
char *os_release; |
57 |
char *os_version; |
58 |
char *platform; |
59 |
char *hostname; |
60 |
time_t uptime; |
61 |
}general_stat_t; |
62 |
</programlisting> |
63 |
|
64 |
<variablelist> |
65 |
<varlistentry> |
66 |
<term><structfield>os_name</structfield></term> |
67 |
<listitem> |
68 |
<para> |
69 |
the operating system name. |
70 |
(eg. SunOS or Linux) |
71 |
</para> |
72 |
</listitem> |
73 |
</varlistentry> |
74 |
<varlistentry> |
75 |
<term><structfield>os_release</structfield></term> |
76 |
<listitem> |
77 |
<para> |
78 |
the operating system release. |
79 |
(eg. 5.8 or 5.9 or Solaris) |
80 |
</para> |
81 |
</listitem> |
82 |
</varlistentry> |
83 |
<varlistentry> |
84 |
<term><structfield>os_version</structfield></term> |
85 |
<listitem> |
86 |
<para> |
87 |
the version level of the OS. |
88 |
</para> |
89 |
</listitem> |
90 |
</varlistentry> |
91 |
<varlistentry> |
92 |
<term><structfield>platform</structfield></term> |
93 |
<listitem> |
94 |
<para> |
95 |
the hardware platform (architecture) the OS runs on. |
96 |
</para> |
97 |
</listitem> |
98 |
</varlistentry> |
99 |
<varlistentry> |
100 |
<term><structfield>hostname</structfield></term> |
101 |
<listitem> |
102 |
<para> |
103 |
the name of the machine. |
104 |
</para> |
105 |
</listitem> |
106 |
</varlistentry> |
107 |
<varlistentry> |
108 |
<term><structfield>uptime</structfield></term> |
109 |
<listitem> |
110 |
<para> |
111 |
the uptime of the machine in seconds. |
112 |
</para> |
113 |
</listitem> |
114 |
</varlistentry> |
115 |
</variablelist> |
116 |
</refsect1> |
117 |
|
118 |
<refsect1> |
119 |
<title>See Also</title> |
120 |
<para>Nothing yet</para> |
121 |
</refsect1> |
122 |
|
123 |
<refsect1> |
124 |
<title>Website</title> |
125 |
|
126 |
<simplelist type="vert"> |
127 |
<member> |
128 |
<ulink url="http://www.i-scream.org">http://www.i-scream.org</ulink> |
129 |
</member> |
130 |
</simplelist> |
131 |
</refsect1> |
132 |
|
133 |
</refentry> |