Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f918d1ae9 | ||
|
|
49a9aeeff5 | ||
|
|
04754bdf48 |
No files matched your search
@@ -4,8 +4,11 @@ Fork of hyperic/sigar with some fixes. Support only ruby binding. Part of [Eye g
|
||||
|
||||
## Fixed:
|
||||
|
||||
### [2.0.10] 31-10-2021
|
||||
* Fix compilation on MacOS 11.3.1 [#11](https://github.com/kostya/sigar/issues/11)([commit](https://github.com/kostya/sigar/commit/49a9aeeff54e97ac6f41d464c30ff6c8adf4bcf4))
|
||||
|
||||
### [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
|
||||
* Fix compilation on MacOS [#8](https://github.com/kostya/sigar/issues/8)([commit](https://github.com/kostya/sigar/pull/9/commits/ad39547629fa328e115f7d7bc3c7c358247d1961))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "kostya-sigar"
|
||||
s.version = "2.0.9"
|
||||
s.version = "2.0.10"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.require_paths = ["lib"]
|
||||
|
||||
@@ -3310,20 +3310,20 @@ sigar_tcp_get(sigar_t *sigar,
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
||||
#ifndef SIGAR_FREEBSD5_NFSSTAT
|
||||
static int get_nfsstats(struct nfsstats *stats)
|
||||
{
|
||||
size_t len = sizeof(*stats);
|
||||
int mib[] = { CTL_VFS, 2, NFS_NFSSTATS };
|
||||
// #ifndef SIGAR_FREEBSD5_NFSSTAT
|
||||
// static int get_nfsstats(struct nfsstats *stats)
|
||||
// {
|
||||
// size_t len = sizeof(*stats);
|
||||
// int mib[] = { CTL_VFS, 2, NFS_NFSSTATS };
|
||||
|
||||
if (sysctl(mib, NMIB(mib), stats, &len, NULL, 0) < 0) {
|
||||
return errno;
|
||||
}
|
||||
else {
|
||||
return SIGAR_OK;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// if (sysctl(mib, NMIB(mib), stats, &len, NULL, 0) < 0) {
|
||||
// return errno;
|
||||
// }
|
||||
// else {
|
||||
// return SIGAR_OK;
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
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,
|
||||
sigar_nfs_client_v3_t *nfs)
|
||||
{
|
||||
#ifdef SIGAR_FREEBSD5_NFSSTAT
|
||||
struct nfsstats stats;
|
||||
size_t size = sizeof(stats);
|
||||
// #ifdef SIGAR_FREEBSD5_NFSSTAT
|
||||
// struct nfsstats stats;
|
||||
// size_t size = sizeof(stats);
|
||||
|
||||
if (sysctlbyname("vfs.nfs.nfsstats", &stats, &size, NULL, 0) == -1) {
|
||||
return errno;
|
||||
}
|
||||
// if (sysctlbyname("vfs.nfs.nfsstats", &stats, &size, NULL, 0) == -1) {
|
||||
// return errno;
|
||||
// }
|
||||
|
||||
map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.rpccnt[0]);
|
||||
#else
|
||||
int status;
|
||||
struct nfsstats stats;
|
||||
// map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.rpccnt[0]);
|
||||
// #else
|
||||
// int status;
|
||||
// struct nfsstats stats;
|
||||
|
||||
if ((status = get_nfsstats(&stats)) != SIGAR_OK) {
|
||||
return status;
|
||||
}
|
||||
// if ((status = get_nfsstats(&stats)) != SIGAR_OK) {
|
||||
// return status;
|
||||
// }
|
||||
|
||||
map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.rpccnt[0]);
|
||||
#endif
|
||||
// map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.rpccnt[0]);
|
||||
// #endif
|
||||
|
||||
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,
|
||||
sigar_nfs_server_v3_t *nfs)
|
||||
{
|
||||
#ifdef SIGAR_FREEBSD5_NFSSTAT
|
||||
struct nfsrvstats stats;
|
||||
size_t size = sizeof(stats);
|
||||
// #ifdef SIGAR_FREEBSD5_NFSSTAT
|
||||
// struct nfsrvstats stats;
|
||||
// size_t size = sizeof(stats);
|
||||
|
||||
if (sysctlbyname("vfs.nfsrv.nfsrvstats", &stats, &size, NULL, 0) == -1) {
|
||||
return errno;
|
||||
}
|
||||
// if (sysctlbyname("vfs.nfsrv.nfsrvstats", &stats, &size, NULL, 0) == -1) {
|
||||
// return errno;
|
||||
// }
|
||||
|
||||
map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.srvrpccnt[0]);
|
||||
#else
|
||||
int status;
|
||||
struct nfsstats stats;
|
||||
// map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.srvrpccnt[0]);
|
||||
// #else
|
||||
// int status;
|
||||
// struct nfsstats stats;
|
||||
|
||||
if ((status = get_nfsstats(&stats)) != SIGAR_OK) {
|
||||
return status;
|
||||
}
|
||||
// if ((status = get_nfsstats(&stats)) != SIGAR_OK) {
|
||||
// return status;
|
||||
// }
|
||||
|
||||
map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.srvrpccnt[0]);
|
||||
#endif
|
||||
// map_nfs_stats((sigar_nfs_v3_t *)nfs, &stats.srvrpccnt[0]);
|
||||
// #endif
|
||||
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
copyright.year=2004-2011
|
||||
version.major=2
|
||||
version.minor=0
|
||||
version.maint=9
|
||||
version.maint=10
|
||||
version.build=0
|
||||
project.name=kostya-sigar
|
||||
project.author=Doug MacEachern
|
||||
|
||||
Reference in new issue
Block a user