add diskstats on Darwin (#593)

* Add diskstats collector for Darwin

* Update year in the header

* Update README.md

* Add github.com/lufia/iostat to vendored packages

* Change stats to follow naming guidelines

* Add a entry of github.com/lufia/iostat into vendor.json

* Remove /proc/diskstats from description
This commit is contained in:
kadota kyohei 2017-07-06 20:51:24 +09:00 committed by Johannes 'fish' Ziemke
commit a077024f51
10 changed files with 440 additions and 1 deletions

23
vendor/github.com/lufia/iostat/iostat_darwin.h generated vendored Normal file
View file

@ -0,0 +1,23 @@
typedef struct DriveStats DriveStats;
enum {
NDRIVE = 16,
NAMELEN = 31
};
struct DriveStats {
char name[NAMELEN+1];
int64_t size;
int64_t blocksize;
int64_t read;
int64_t written;
int64_t nread;
int64_t nwrite;
int64_t readtime;
int64_t writetime;
int64_t readlat;
int64_t writelat;
};
extern int readdrivestat(DriveStats a[], int n);