Skip Navigation Links | |
Exit Print View | |
Resource Management, Oracle Solaris Zones, and Oracle Solaris 10 Zones Developer's Guide Oracle Solaris 11.1 Information Library |
1. Resource Management in the Oracle Solaris Operating System
3. Using the C Interface to Extended Accounting
Overview of the C Interface to Extended Accounting
Extended Accounting API Functions
C Code Examples for Accessing exacct Files
4. Using the Perl Interface to Extended Accounting
7. Design Considerations for Resource Management Applications in Oracle Solaris Zones
Use the same allocation flags for ea_free_object() and ea_unpack_object().
For string objects, an ea_set_item() results in allocation, and should be followed by ea_free_item(obj, EUP_ALLOC) to free internal storage.
ea_pack_object() and getacct() use zero size. To get size. getacct() should be called twice: first time with NULL buffer to size buffer to be passed in the second call. See Example 3-1 in C Code Examples for Accessing exacct Files.
Applications should skip unknown exacct records in exacct files produced by the system, to be robust in the face of changes to exacct file content.
Use EXC_LOCAL for customized accounting. Application-specific records can be created using EXC_LOCAL. Use libexacct as general tracing or debugging facility.
See <sys/exacct_catalog.h>.
Data id field of ea_catalog_t can be customized.