| 1 |
General Operating System Statistics |
| 2 |
=================================== |
| 3 |
|
| 4 |
$Id: os_stats.txt,v 1.2 2003/08/24 20:24:08 tdb Exp $ |
| 5 |
|
| 6 |
The structure returned is of type general_stat_t and looks like this: |
| 7 |
|
| 8 |
typedef struct{ |
| 9 |
char *os_name; |
| 10 |
char *os_release; |
| 11 |
char *os_version; |
| 12 |
char *platform; |
| 13 |
char *hostname; |
| 14 |
time_t uptime; |
| 15 |
}general_stat_t; |
| 16 |
|
| 17 |
os_name is the operating system name. |
| 18 |
(eg. SunOS or Linux) |
| 19 |
os_release is the operating system release. |
| 20 |
(eg. 5.8 or 5.9 for Solaris) |
| 21 |
os_version is the version level of the OS. |
| 22 |
platform is the hardware platform (architecture) the OS runs on. |
| 23 |
hostname is the name of the machine |
| 24 |
uptime is the uptime of the machine in seconds |
| 25 |
|
| 26 |
Functions |
| 27 |
--------- |
| 28 |
|
| 29 |
general_stat_t *get_general_stats(); |
| 30 |
|
| 31 |
This call returns details on the operating system. |
| 32 |
|
| 33 |
It returns a static buffer general_stat_t. |
| 34 |
|
| 35 |
Example |
| 36 |
------- |
| 37 |
|
| 38 |
An example can be found in examples/os_info.c |