remove _stat from sigar_tcp names

This commit is contained in:
Doug MacEachern committed 2007-08-08 05:34:21 +00:00
1 parent 7e0b4af3ca
commit f8c583fbc8
16 files changed
+82 -84

No files matched your search

+2 -2
View File
@@ -1022,7 +1022,7 @@ my %classes = (
name => 'all_outbound_total', type => 'Int',
},
],
TcpStat => [
Tcp => [
{
name => 'active_opens', type => 'Long',
desc => '',
@@ -1366,7 +1366,7 @@ my %cmds = (
Solaris => '',
Win32 => '',
},
TcpStat => {
Tcp => {
Linux => 'cat /proc/net/snmp',
Solaris => 'netstat -s -P tcp',
},
@@ -781,9 +781,9 @@ public class Sigar implements SigarProxy {
* TCP-MIB stats
* @exception SigarException on failure.
*/
public TcpStat getTcpStat()
public Tcp getTcp()
throws SigarException {
return TcpStat.fetch(this);
return Tcp.fetch(this);
}
public NfsClientV2 getNfsClientV2()
@@ -157,7 +157,7 @@ public interface SigarProxy {
public Who[] getWhoList() throws SigarException;
public TcpStat getTcpStat() throws SigarException;
public Tcp getTcp() throws SigarException;
public NfsClientV2 getNfsClientV2() throws SigarException;
@@ -26,7 +26,7 @@ import org.hyperic.sigar.NetServices;
import org.hyperic.sigar.SigarException;
import org.hyperic.sigar.NetConnection;
import org.hyperic.sigar.NetFlags;
import org.hyperic.sigar.TcpStat;
import org.hyperic.sigar.Tcp;
/**
* Display network connections.
@@ -161,7 +161,7 @@ public class Netstat extends SigarCommandBase {
}
private void outputTcpStats() throws SigarException {
TcpStat stat = this.sigar.getTcpStat();
Tcp stat = this.sigar.getTcp();
final String dnt = " ";
println(dnt + stat.getActiveOpens() + " active connections openings");
println(dnt + stat.getPassiveOpens() + " passive connection openings");
@@ -20,7 +20,7 @@ package org.hyperic.sigar.test;
import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.SigarNotImplementedException;
import org.hyperic.sigar.TcpStat;
import org.hyperic.sigar.Tcp;
public class TestTcpStat extends SigarTestCase {
@@ -30,17 +30,15 @@ public class TestTcpStat extends SigarTestCase {
public void testCreate() throws Exception {
Sigar sigar = getSigar();
TcpStat tcp;
Tcp tcp;
try {
tcp = sigar.getTcpStat();
tcp = sigar.getTcp();
} catch (SigarNotImplementedException e) {
return;
}
traceln("");
//assertGtZeroTrace("MaxConn", tcp.getMaxConn()); //XXX -1 on linux
traceln("MaxConn=" + tcp.getMaxConn());
assertGtEqZeroTrace("ActiveOpens", tcp.getActiveOpens());
assertGtEqZeroTrace("PassiveOpens", tcp.getPassiveOpens());
assertGtEqZeroTrace("AttemptFails", tcp.getAttemptFails());