[Libvir] Proposal: Block device and network stats
Richard W.M. Jones
rjones at redhat.com
Fri Aug 10 12:59:34 UTC 2007
It was suggested to me that we should provide a way to return bytes read
and written on block devices (not just requests). Xen doesn't support
that however, so I have also changed the fields in this structure so
that they can be returned set to -1 to indicate "no data / not supported".
The updated stats structures are shown below.
Rich.
/* Block device stats for virDomainBlockStats.
*
* Hypervisors may return a field set to (int64_t)-1 which indicates
* that the hypervisor does not support that statistic.
*/
struct _virDomainBlockStats {
int64_t rd_req;
int64_t rd_bytes;
int64_t wr_req;
int64_t wr_byes;
int64_t errs; // In Xen this returns the mysterious 'oo_req'.
};
typedef struct _virDomainBlockStats *virDomainBlockStatsPtr;
/* Network interface stats for virDomainInterfaceStats.
*
* Hypervisors may return a field set to (int64_t)-1 which indicates
* that the hypervisor does not support that statistic.
*/
struct _virDomainInterfaceStats {
int64_t rx_bytes;
int64_t rx_packets;
int64_t rx_errs;
int64_t rx_drop;
int64_t tx_bytes;
int64_t tx_packets;
int64_t tx_errs;
int64_t tx_drop;
};
typedef struct _virDomainInterfaceStats *virDomainInterfaceStatsPtr;
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070810/2175ac1e/attachment-0001.bin>
More information about the libvir-list
mailing list