sstore_info_read, sstore_info_iter_next - Read meta information about statistics store identifiers.
cc [ flag... ] file... -lsstore [ library... ] #include <libsstore.h> sstore_err_t sstore_info_read(sstore_handle_t hdl, const char **ids, uint32_t id_count, sstore_range_t range, sstore_iter_t *iterp); sstore_err_t sstore_info_iter_next(sstore_handle_t hdl, sstore_iter_t iter, char **idp, uint64_t *timep, sstore_value_t *valp);
Handle to libsstore
Array of statistics store identifiers
Total number of statistics store identifiers
Time range or data range.
Passing NULL for range implies:
start-time = SS_TIME_NOW
end-time = SS_TIME_NOW
step = 1
Address to store the starting address of the iterator.
Iterator returned from data_read().
Address to store the starting address of the statistics store identifier.
Address to store the time in microseconds since epoch.
Address to store the handle to a typed value.
sstore_info_read() retrieves the metadata associated with the given identifiers and range. The retrieved data is returned in the form of an iterator that can be used to read the information records. When all the information records have been read from the iterator, use sstore_iter_free(3SSTORE) to free the iterator.
sstore_info_iter_next() retrieves the next information record of the iteration. Each information record consists of a statistics store identifier, a time stamp, and a value. The reference pointers passed to this call are populated if the call succeeds. The identifier, the time stamp, and the value populated on success do not need to be freed. They will be freed on the next call to sstore_info_iter_next().
Upon successful completion, sstore_info_read() and sstore_info_iter_next() return ESSTORE_OK. Otherwise, they return an error code, which is also cached in the given libsstore handle.
The sstore_info_read() function will fail if:
One of the following reasons:
All the ssids are invalid.
All the ssids are inactive.
The range is not valid.
The fmt is not valid.
Required arguments are missing.
The handle is invalid
The statistics store daemon is busy. Retry later
Failed to connect to the statistics store daemon
The total size of all the resulting statistics records is larger than the maximum size limit set in libsstore.
No memory is available.
The sstore_info_iter_next() function will fail if:
Some arguments are invalid.
The handle is invalid
No more records left to iterate.
Possible warning codes for sstore_info_read() are as follows:
An ssid is invalid.
See attributes(7) for descriptions of the following attributes:
|
libsstore(3LIB), sstore_alloc(3SSTORE), sstore_err_action(3SSTORE), sstore_range_alloc(3SSTORE), attributes(7), ssid(7)