Compare commits
2
Commits
v2.0.9
...
remove_nfs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49a9aeeff5 | ||
|
|
04754bdf48 |
No files matched your search
@@ -5,7 +5,7 @@ Fork of hyperic/sigar with some fixes. Support only ruby binding. Part of [Eye g
|
|||||||
## Fixed:
|
## Fixed:
|
||||||
|
|
||||||
### [2.0.9] 28-06-2021
|
### [2.0.9] 28-06-2021
|
||||||
* Fix compilation on FreeBSD 13 [#8](https://github.com/kostya/sigar/issues/10)([commit](https://github.com/kostya/sigar/commit/b78b558fb756a75dc7d6cbf704423be3c7098ae5))
|
* Fix compilation on FreeBSD 13 [#10](https://github.com/kostya/sigar/issues/10)([commit](https://github.com/kostya/sigar/commit/b78b558fb756a75dc7d6cbf704423be3c7098ae5))
|
||||||
|
|
||||||
### [2.0.8] 02-10-2020
|
### [2.0.8] 02-10-2020
|
||||||
* Fix compilation on MacOS [#8](https://github.com/kostya/sigar/issues/8)([commit](https://github.com/kostya/sigar/pull/9/commits/ad39547629fa328e115f7d7bc3c7c358247d1961))
|
* Fix compilation on MacOS [#8](https://github.com/kostya/sigar/issues/8)([commit](https://github.com/kostya/sigar/pull/9/commits/ad39547629fa328e115f7d7bc3c7c358247d1961))
|
||||||
|
|||||||
@@ -3310,20 +3310,20 @@ sigar_tcp_get(sigar_t *sigar,
|
|||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SIGAR_FREEBSD5_NFSSTAT
|
// #ifndef SIGAR_FREEBSD5_NFSSTAT
|
||||||
static int get_nfsstats(struct nfsstats *stats)
|
// static int get_nfsstats(struct nfsstats *stats)
|
||||||
{
|
// {
|
||||||
size_t len = sizeof(*stats);
|
// size_t len = sizeof(*stats);
|
||||||
int mib[] = { CTL_VFS, 2, NFS_NFSSTATS };
|
// int mib[] = { CTL_VFS, 2, NFS_NFSSTATS };
|
||||||
|
|
||||||
if (sysctl(mib, NMIB(mib), stats, &len, NULL, 0) < 0) {
|
// if (sysctl(mib, NMIB(mib), stats, &len, NULL, 0) < 0) {
|
||||||
return errno;
|
// return errno;
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
return SIGAR_OK;
|
// return SIGAR_OK;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
#if defined(__OpenBSD__)
|
#if defined(__OpenBSD__)
|
||||||
typedef uint64_t rpc_cnt_t;
|
typedef uint64_t rpc_cnt_t;
|
||||||
@@ -3372,25 +3372,25 @@ int sigar_nfs_server_v2_get(sigar_t *sigar,
|
|||||||
int sigar_nfs_client_v3_get(sigar_t *sigar,
|
int sigar_nfs_client_v3_get(sigar_t *sigar,
|
||||||
sigar_nfs_client_v3_t *nfs)
|
sigar_nfs_client_v3_t *nfs)
|
||||||
{
|
{
|
||||||
#ifdef SIGAR_FREEBSD5_NFSSTAT
|
// #ifdef SIGAR_FREEBSD5_NFSSTAT
|
||||||
struct nfsstats stats;
|
// struct nfsstats stats;
|
||||||
size_t size = sizeof(stats);
|
// size_t size = sizeof(stats);
|
||||||
|
|
||||||
if (sysctlbyname("vfs.nfs.nfsstats", &stats, &size, NULL, 0) == -1) {
|
// if (sysctlbyname("vfs.nfs.nfsstats", &stats, &size, NULL, 0) == -1) {
|
||||||
return errno;
|
// return errno;
|
||||||
}
|
// }
|
||||||
|
|
||||||
map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.rpccnt[0]);
|
// map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.rpccnt[0]);
|
||||||
#else
|
// #else
|
||||||
int status;
|
// int status;
|
||||||
struct nfsstats stats;
|
// struct nfsstats stats;
|
||||||
|
|
||||||
if ((status = get_nfsstats(&stats)) != SIGAR_OK) {
|
// if ((status = get_nfsstats(&stats)) != SIGAR_OK) {
|
||||||
return status;
|
// return status;
|
||||||
}
|
// }
|
||||||
|
|
||||||
map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.rpccnt[0]);
|
// map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.rpccnt[0]);
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
@@ -3398,25 +3398,25 @@ int sigar_nfs_client_v3_get(sigar_t *sigar,
|
|||||||
int sigar_nfs_server_v3_get(sigar_t *sigar,
|
int sigar_nfs_server_v3_get(sigar_t *sigar,
|
||||||
sigar_nfs_server_v3_t *nfs)
|
sigar_nfs_server_v3_t *nfs)
|
||||||
{
|
{
|
||||||
#ifdef SIGAR_FREEBSD5_NFSSTAT
|
// #ifdef SIGAR_FREEBSD5_NFSSTAT
|
||||||
struct nfsrvstats stats;
|
// struct nfsrvstats stats;
|
||||||
size_t size = sizeof(stats);
|
// size_t size = sizeof(stats);
|
||||||
|
|
||||||
if (sysctlbyname("vfs.nfsrv.nfsrvstats", &stats, &size, NULL, 0) == -1) {
|
// if (sysctlbyname("vfs.nfsrv.nfsrvstats", &stats, &size, NULL, 0) == -1) {
|
||||||
return errno;
|
// return errno;
|
||||||
}
|
// }
|
||||||
|
|
||||||
map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.srvrpccnt[0]);
|
// map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.srvrpccnt[0]);
|
||||||
#else
|
// #else
|
||||||
int status;
|
// int status;
|
||||||
struct nfsstats stats;
|
// struct nfsstats stats;
|
||||||
|
|
||||||
if ((status = get_nfsstats(&stats)) != SIGAR_OK) {
|
// if ((status = get_nfsstats(&stats)) != SIGAR_OK) {
|
||||||
return status;
|
// return status;
|
||||||
}
|
// }
|
||||||
|
|
||||||
map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.srvrpccnt[0]);
|
// map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.srvrpccnt[0]);
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user