kostya-sigar 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/Rakefile +1 -1
- data/include/sigar.h +0 -10
- data/src/sigar.c +0 -32
- data/src/sigar_util.c +0 -77
- data/version.properties +1 -1
- metadata +3 -3
- data/README +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28c9f4080187a2a6b7d511da6919e0d968a62783
|
4
|
+
data.tar.gz: cd50fb58c14e789cfbc4c5f6a5e0383f8cf13698
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f91aeca50c796cbd5bc12569f2f7d3c470a3b2bf00f6eca6ff6c2d027904345da0e1c7c25cc720680fa83d171c71ff205b646d11aab2ccf93c849333b0566e19
|
7
|
+
data.tar.gz: 1dffef142dc06e9d99ded7c50cc3fe8611f5a98cb288b72f9f7d690c37ea9ec11cbc5f72dedf45985548c25369b719d1098282b8c44ae11237f110bf33c3ada9
|
data/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# System Information Gatherer And Reporter.
|
2
|
+
|
3
|
+
Fork of hyperic/sigar with some fixes.
|
4
|
+
|
5
|
+
## Fixed:
|
6
|
+
|
7
|
+
* sigfaulted logger, [#28](https://github.com/hyperic/sigar/pull/28)([commit](https://github.com/kostya/sigar/commit/c2a1af))
|
8
|
+
* bug undefined symbol: sigar_skip_token, [#60](https://github.com/hyperic/sigar/pull/60)([commit](https://github.com/kostya/sigar/commit/dfe8fe))
|
9
|
+
* bug detection boot_time on linux (now it works like gnu ps, and fix some issues with process start_time) ([commit](https://github.com/kostya/sigar/commit/660259))
|
10
|
+
* FreeBSD: don't use v_cache_min/max [#68](https://github.com/hyperic/sigar/pull/68)([commit](https://github.com/kostya/sigar/commit/800076db97bcacb1ba90805d740b4f9a5a1d3cca))
|
11
|
+
* Remove obsolete rpc usage (fix compilation fail with glibc 2.27) ([commit](https://github.com/kostya/sigar/commit/a971b9e8e1443fdf236c5ffa199c1994c05fcd4b))
|
12
|
+
|
13
|
+
|
14
|
+
## Installation:
|
15
|
+
|
16
|
+
$ gem install kostya-sigar
|
data/Rakefile
CHANGED
@@ -30,7 +30,7 @@ spec = Gem::Specification.new do |s|
|
|
30
30
|
s.has_rdoc = false
|
31
31
|
s.extensions = 'bindings/ruby/extconf.rb'
|
32
32
|
s.files =
|
33
|
-
%w(LICENSE NOTICE README Rakefile version.properties) +
|
33
|
+
%w(LICENSE NOTICE README.md Rakefile version.properties) +
|
34
34
|
%w(bindings/SigarWrapper.pm bindings/SigarBuild.pm) +
|
35
35
|
`git ls-files -- bindings/ruby/*.*`.split("\n") +
|
36
36
|
Dir.glob("include/*.h") +
|
data/include/sigar.h
CHANGED
@@ -549,9 +549,6 @@ SIGAR_DECLARE(int) sigar_disk_usage_get(sigar_t *sigar,
|
|
549
549
|
const char *name,
|
550
550
|
sigar_disk_usage_t *disk);
|
551
551
|
|
552
|
-
SIGAR_DECLARE(int)
|
553
|
-
sigar_file_system_ping(sigar_t *sigar,
|
554
|
-
sigar_file_system_t *fs);
|
555
552
|
|
556
553
|
typedef struct {
|
557
554
|
enum {
|
@@ -968,13 +965,6 @@ SIGAR_DECLARE(int) sigar_sys_info_get(sigar_t *sigar, sigar_sys_info_t *sysinfo)
|
|
968
965
|
|
969
966
|
SIGAR_DECLARE(int) sigar_fqdn_get(sigar_t *sigar, char *name, int namelen);
|
970
967
|
|
971
|
-
SIGAR_DECLARE(int) sigar_rpc_ping(char *hostname,
|
972
|
-
int protocol,
|
973
|
-
unsigned long program,
|
974
|
-
unsigned long version);
|
975
|
-
|
976
|
-
SIGAR_DECLARE(char *) sigar_rpc_strerror(int err);
|
977
|
-
|
978
968
|
SIGAR_DECLARE(char *) sigar_password_get(const char *prompt);
|
979
969
|
|
980
970
|
#ifdef __cplusplus
|
data/src/sigar.c
CHANGED
@@ -618,38 +618,6 @@ sigar_file_system_list_destroy(sigar_t *sigar,
|
|
618
618
|
#define NFS_VERSION 2
|
619
619
|
#endif
|
620
620
|
|
621
|
-
SIGAR_DECLARE(int)
|
622
|
-
sigar_file_system_ping(sigar_t *sigar,
|
623
|
-
sigar_file_system_t *fs)
|
624
|
-
{
|
625
|
-
int status = SIGAR_OK;
|
626
|
-
#ifndef WIN32
|
627
|
-
char *ptr;
|
628
|
-
|
629
|
-
if ((fs->type == SIGAR_FSTYPE_NETWORK) &&
|
630
|
-
strEQ(fs->sys_type_name, "nfs") &&
|
631
|
-
(ptr = strchr(fs->dev_name, ':')))
|
632
|
-
{
|
633
|
-
*ptr = '\0'; /* "hostname:/mount" -> "hostname" */
|
634
|
-
|
635
|
-
status = sigar_rpc_ping(fs->dev_name,
|
636
|
-
SIGAR_NETCONN_UDP,
|
637
|
-
NFS_PROGRAM, NFS_VERSION);
|
638
|
-
|
639
|
-
if (SIGAR_LOG_IS_DEBUG(sigar)) {
|
640
|
-
sigar_log_printf(sigar, SIGAR_LOG_DEBUG,
|
641
|
-
"[fs_ping] %s -> %s: %s",
|
642
|
-
fs->dir_name, fs->dev_name,
|
643
|
-
((status == SIGAR_OK) ?
|
644
|
-
"OK" : sigar_rpc_strerror(status)));
|
645
|
-
}
|
646
|
-
|
647
|
-
*ptr = ':'; /* "hostname" -> "hostname:/mount" */
|
648
|
-
}
|
649
|
-
#endif
|
650
|
-
return status;
|
651
|
-
}
|
652
|
-
|
653
621
|
int sigar_cpu_info_list_create(sigar_cpu_info_list_t *cpu_infos)
|
654
622
|
{
|
655
623
|
cpu_infos->number = 0;
|
data/src/sigar_util.c
CHANGED
@@ -739,9 +739,6 @@ int sigar_cpu_mhz_from_model(char *model)
|
|
739
739
|
|
740
740
|
#if !defined(WIN32) && !defined(NETWARE)
|
741
741
|
#include <netdb.h>
|
742
|
-
#include <rpc/rpc.h>
|
743
|
-
#include <rpc/pmap_prot.h>
|
744
|
-
#include <rpc/pmap_clnt.h>
|
745
742
|
#ifdef SIGAR_HPUX
|
746
743
|
#include <nfs/nfs.h>
|
747
744
|
#endif
|
@@ -749,84 +746,10 @@ int sigar_cpu_mhz_from_model(char *model)
|
|
749
746
|
#include <arpa/inet.h>
|
750
747
|
#endif
|
751
748
|
#if defined(__sun) || defined(SIGAR_HPUX)
|
752
|
-
#include <rpc/clnt_soc.h>
|
753
749
|
#endif
|
754
750
|
#if defined(_AIX) || defined(SIGAR_HPUX) || defined(__OpenBSD__) || defined(__NetBSD__)
|
755
751
|
#include <sys/socket.h>
|
756
752
|
#endif
|
757
|
-
|
758
|
-
static enum clnt_stat get_sockaddr(struct sockaddr_in *addr, char *host)
|
759
|
-
{
|
760
|
-
register struct hostent *hp;
|
761
|
-
sigar_hostent_t data;
|
762
|
-
|
763
|
-
memset(addr, 0, sizeof(struct sockaddr_in));
|
764
|
-
addr->sin_family = AF_INET;
|
765
|
-
|
766
|
-
if ((addr->sin_addr.s_addr = inet_addr(host)) == -1) {
|
767
|
-
if (!(hp = sigar_gethostbyname(host, &data))) {
|
768
|
-
return RPC_UNKNOWNHOST;
|
769
|
-
}
|
770
|
-
memcpy(&addr->sin_addr, hp->h_addr, hp->h_length);
|
771
|
-
}
|
772
|
-
|
773
|
-
return RPC_SUCCESS;
|
774
|
-
}
|
775
|
-
|
776
|
-
char *sigar_rpc_strerror(int err)
|
777
|
-
{
|
778
|
-
return (char *)clnt_sperrno(err);
|
779
|
-
}
|
780
|
-
|
781
|
-
SIGAR_DECLARE(int) sigar_rpc_ping(char *host,
|
782
|
-
int protocol,
|
783
|
-
unsigned long program,
|
784
|
-
unsigned long version)
|
785
|
-
{
|
786
|
-
CLIENT *client;
|
787
|
-
struct sockaddr_in addr;
|
788
|
-
int sock;
|
789
|
-
struct timeval timeout;
|
790
|
-
unsigned short port = 0;
|
791
|
-
enum clnt_stat rpc_stat;
|
792
|
-
|
793
|
-
rpc_stat = get_sockaddr(&addr, host);
|
794
|
-
if (rpc_stat != RPC_SUCCESS) {
|
795
|
-
return rpc_stat;
|
796
|
-
}
|
797
|
-
|
798
|
-
timeout.tv_sec = 2;
|
799
|
-
timeout.tv_usec = 0;
|
800
|
-
addr.sin_port = htons(port);
|
801
|
-
sock = RPC_ANYSOCK;
|
802
|
-
|
803
|
-
if (protocol == SIGAR_NETCONN_UDP) {
|
804
|
-
client =
|
805
|
-
clntudp_create(&addr, program, version,
|
806
|
-
timeout, &sock);
|
807
|
-
}
|
808
|
-
else if (protocol == SIGAR_NETCONN_TCP) {
|
809
|
-
client =
|
810
|
-
clnttcp_create(&addr, program, version,
|
811
|
-
&sock, 0, 0);
|
812
|
-
}
|
813
|
-
else {
|
814
|
-
return RPC_UNKNOWNPROTO;
|
815
|
-
}
|
816
|
-
|
817
|
-
if (!client) {
|
818
|
-
return rpc_createerr.cf_stat;
|
819
|
-
}
|
820
|
-
|
821
|
-
timeout.tv_sec = 10;
|
822
|
-
timeout.tv_usec = 0;
|
823
|
-
rpc_stat = clnt_call(client, NULLPROC, (xdrproc_t)xdr_void, NULL,
|
824
|
-
(xdrproc_t)xdr_void, NULL, timeout);
|
825
|
-
|
826
|
-
clnt_destroy(client);
|
827
|
-
|
828
|
-
return rpc_stat;
|
829
|
-
}
|
830
753
|
#endif
|
831
754
|
|
832
755
|
int sigar_file2str(const char *fname, char *buffer, int buflen)
|
data/version.properties
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kostya-sigar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug MacEachern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: System Information Gatherer And Reporter
|
14
14
|
email: sigar-users@hyperic.org
|
@@ -19,7 +19,7 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- LICENSE
|
21
21
|
- NOTICE
|
22
|
-
- README
|
22
|
+
- README.md
|
23
23
|
- Rakefile
|
24
24
|
- bindings/SigarBuild.pm
|
25
25
|
- bindings/SigarWrapper.pm
|
data/README
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
|
2
|
-
System Information Gatherer And Reporter. Fork of https://github.com/hyperic/sigar.
|
3
|
-
|
4
|
-
Fixed:
|
5
|
-
|
6
|
-
* sigfaulted logger, #28 (c2a1af)
|
7
|
-
* bug undefined symbol: sigar_skip_token, #60 (dfe8fe)
|
8
|
-
* bug detection boot_time on linux (now it works like gnu ps, and fix some issues with process start_time) (660259)
|
9
|
-
* FreeBSD: don't use v_cache_min/max (https://github.com/hyperic/sigar/pull/68) (800076)
|
10
|
-
|
11
|
-
|
12
|
-
Installation:
|
13
|
-
|
14
|
-
$ gem install kostya-sigar
|