--- projects/libstatgrab/docs/statgrab.xml 2004/05/02 17:39:19 1.8 +++ projects/libstatgrab/docs/statgrab.xml 2004/11/01 18:43:03 1.13 @@ -6,8 +6,8 @@ - $Date: 2004/05/02 17:39:19 $ - $Id: statgrab.xml,v 1.8 2004/05/02 17:39:19 tdb Exp $ + $Date: 2004/11/01 18:43:03 $ + $Id: statgrab.xml,v 1.13 2004/11/01 18:43:03 tdb Exp $ @@ -35,6 +35,23 @@ + sg_error sg_get_error + + + + const char *sg_get_error_arg + + + + intsg_get_error_errno + + + + const char *sg_str_error + sg_error code + + + sg_cpu_stats *sg_get_cpu_stats @@ -57,6 +74,11 @@ + sg_fs_stats *sg_get_fs_stats + + + + sg_host_info *sg_get_host_info @@ -139,10 +161,28 @@ non-zero on failure. + There are three functions relating to error reporting in libstatgrab. + The first, sg_get_error returns an sg_error code + which relates to the last error generated by libstatgrab. This can be + converted to a string by calling sg_str_error + giving the sg_error code as an argument. An optional + argument may be set when the error was generated. This can be + accessed by calling sg_get_error_arg; + NULL will be returned if no argument has + been set. Some errors will also record the value of the system + errno variable when the error occurred; this can be retrieved by + calling sg_get_error_errno, which will + return 0 if no valid errno has been recorded. + + + It is the intended practice that whenever a libstatgrab function is + called and subsequently fails that an appropriate error will be set. + + The library was originally written to support the i-scream central monitoring system, but has since become a standalone package. It has been ported to work on Linux, NetBSD, FreeBSD, - OpenBSD, DragonFly BSD, Solaris and Cygwin. + OpenBSD, DragonFly BSD, Solaris, HP-UX and Cygwin. @@ -157,6 +197,10 @@ sg_get_disk_io_stats + 3 + + + sg_get_fs_stats 3