[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] Proposal: Block device and network stats



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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]