Merge branch 'master' into SIGAR-172
This commit is contained in:
commit
7496b795e4
13 files changed
+218
-27
No files matched your search
@@ -71,7 +71,7 @@ sub flags {
|
||||
$os = $1;
|
||||
$is_win32 = 1;
|
||||
@cppflags = ('-DWIN32');
|
||||
@libs = qw(kernel32 user32 advapi32 ws2_32 netapi32 shell32 pdh version);
|
||||
@libs = qw(kernel32 user32 advapi32 ws2_32 netapi32 shell32 pdh version comsupp wbemuuid);
|
||||
}
|
||||
elsif ($os =~ /(linux)/) {
|
||||
$os = $1;
|
||||
|
||||
+28
-13
@@ -462,34 +462,44 @@ use vars qw(%classes %cmds);
|
||||
{
|
||||
name => 'vendor', type => 'String',
|
||||
desc => 'CPU vendor id',
|
||||
plat => 'AFLHSW'
|
||||
plat => '*'
|
||||
},
|
||||
{
|
||||
name => 'model', type => 'String',
|
||||
desc => 'CPU model',
|
||||
plat => 'AFLHSW'
|
||||
plat => '*'
|
||||
},
|
||||
{
|
||||
name => 'mhz', type => 'Int',
|
||||
desc => 'CPU speed',
|
||||
plat => 'AFHLSW'
|
||||
desc => 'Current CPU speed',
|
||||
plat => '*'
|
||||
},
|
||||
{
|
||||
name => 'mhz_max', type => 'Int',
|
||||
desc => 'Maximum CPU speed',
|
||||
plat => 'DL'
|
||||
},
|
||||
{
|
||||
name => 'mhz_min', type => 'Int',
|
||||
desc => 'Maximum CPU speed',
|
||||
plat => 'DL'
|
||||
},
|
||||
{
|
||||
name => 'cache_size', type => 'Long',
|
||||
desc => 'CPU cache size',
|
||||
plat => 'AL'
|
||||
plat => 'ADL'
|
||||
},
|
||||
{
|
||||
name => 'total_cores', type => 'Int',
|
||||
desc => 'Total CPU cores (logical)',
|
||||
name => 'total_cores', type => 'Int',
|
||||
desc => 'Total CPU cores (logical)',
|
||||
},
|
||||
{
|
||||
name => 'total_sockets', type => 'Int',
|
||||
desc => 'Total CPU sockets (physical)',
|
||||
name => 'total_sockets', type => 'Int',
|
||||
desc => 'Total CPU sockets (physical)',
|
||||
},
|
||||
{
|
||||
name => 'cores_per_socket', type => 'Int',
|
||||
desc => 'Number of CPU cores per CPU socket',
|
||||
name => 'cores_per_socket', type => 'Int',
|
||||
desc => 'Number of CPU cores per CPU socket',
|
||||
},
|
||||
],
|
||||
Uptime => [
|
||||
@@ -1086,6 +1096,11 @@ use vars qw(%classes %cmds);
|
||||
desc => '',
|
||||
plat => 'DFL'
|
||||
},
|
||||
{
|
||||
name => 'tx_queue_len', type => 'Int',
|
||||
desc => '',
|
||||
plat => 'L'
|
||||
},
|
||||
],
|
||||
NetInterfaceStat => [
|
||||
{
|
||||
@@ -2065,8 +2080,8 @@ EOF
|
||||
my $member = $field->{member} || $name;
|
||||
my $desc = $field->{desc} || $name;
|
||||
(my $jname = $name) =~ s/_(\w)/\u$1/g;
|
||||
my $getter = "get\u$jname";
|
||||
$jname = jname($jname);
|
||||
my $getter = "get\u$jname";
|
||||
$jname = jname($jname);
|
||||
my $sig = qq("$field_types{$type}");
|
||||
my $set = "JENV->Set${type}Field";
|
||||
my $get = "JENV->Get${type}Field";
|
||||
|
||||
@@ -97,6 +97,16 @@ public class NetFlags {
|
||||
|
||||
public final static int IFF_SLAVE = 0x1000;
|
||||
|
||||
/**
|
||||
* Master of a load balancer
|
||||
*/
|
||||
public static final int IFF_MASTER = 0x2000;
|
||||
|
||||
/**
|
||||
* Dialup device with changing addresses
|
||||
*/
|
||||
public static final int IFF_DYNAMIC = 0x4000;
|
||||
|
||||
public static final int RTF_UP = 0x1;
|
||||
|
||||
public static final int RTF_GATEWAY = 0x2;
|
||||
|
||||
@@ -25,7 +25,7 @@ else {
|
||||
my $flags = SigarBuild::flags();
|
||||
my(@inline_src) = SigarBuild::inline_src($flags);
|
||||
push @clean_files, @inline_src;
|
||||
my(@object) = ('Sigar.o', map { s/c$/o/; $_ } @inline_src);
|
||||
my(@object) = ('Sigar.o', map { s/cp{0,2}$/o/; $_ } @inline_src);
|
||||
my(@libs) = map { "-l$_" } @{$flags->{libs}};
|
||||
|
||||
@mm_args = (
|
||||
|
||||
@@ -11,6 +11,8 @@ puts num.to_s + " total CPUs.."
|
||||
infos.each do |info|
|
||||
puts "Vendor........" + info.vendor
|
||||
puts "Model........." + info.model
|
||||
puts "Mhz..........." + info.mhz.to_s
|
||||
puts "Current Mhz..." + info.mhz.to_s
|
||||
puts "Maximum Mhz..." + info.mhz_max.to_s
|
||||
puts "Minimum Mhz..." + info.mhz_min.to_s
|
||||
puts "Cache size...." + info.cache_size.to_s
|
||||
end
|
||||
@@ -65,7 +65,8 @@ iflist.each do |ifname|
|
||||
" overruns:" + ifstat.tx_overruns.to_s +
|
||||
" carrier:" + ifstat.tx_carrier.to_s
|
||||
|
||||
puts "\t" + "collisions:" + ifstat.tx_collisions.to_s
|
||||
puts "\t" + "collisions:" + ifstat.tx_collisions.to_s +
|
||||
" txqueuelen:" + ifconfig.tx_queue_len.to_s
|
||||
|
||||
rx_bytes = ifstat.rx_bytes
|
||||
tx_bytes = ifstat.tx_bytes
|
||||
|
||||
@@ -684,6 +684,7 @@ static void Init_rbsigar_constants(VALUE rclass)
|
||||
RB_SIGAR_CONST_INT(IFF_MULTICAST);
|
||||
RB_SIGAR_CONST_INT(IFF_SLAVE);
|
||||
RB_SIGAR_CONST_INT(IFF_MASTER);
|
||||
RB_SIGAR_CONST_INT(IFF_DYNAMIC);
|
||||
|
||||
RB_SIGAR_CONST_INT(NETCONN_CLIENT);
|
||||
RB_SIGAR_CONST_INT(NETCONN_SERVER);
|
||||
|
||||
Reference in new issue
Block a user