org.hyperic.sigar.NetInterfaceStat Maven / Gradle / Ivy
/*****************************************************
* WARNING: this file was generated by -e
* on Mon May 24 16:26:06 2010.
* Any changes made here will be LOST.
*****************************************************/
package org.hyperic.sigar;
import java.util.HashMap;
import java.util.Map;
/**
* NetInterfaceStat sigar class.
*/
public class NetInterfaceStat implements java.io.Serializable {
private static final long serialVersionUID = 20008L;
public NetInterfaceStat() { }
public native void gather(Sigar sigar, String name) throws SigarException;
/**
* This method is not intended to be called directly.
* use Sigar.getNetInterfaceStat() instead.
* @exception SigarException on failure.
* @see org.hyperic.sigar.Sigar#getNetInterfaceStat
*/
static NetInterfaceStat fetch(Sigar sigar, String name) throws SigarException {
NetInterfaceStat netInterfaceStat = new NetInterfaceStat();
netInterfaceStat.gather(sigar, name);
return netInterfaceStat;
}
long rxBytes = 0;
/**
* Get the rx_bytes.
* Supported Platforms: All.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return rx_bytes
*/
public long getRxBytes() { return rxBytes; }
long rxPackets = 0;
/**
* Get the rx_packets.
* Supported Platforms: All.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return rx_packets
*/
public long getRxPackets() { return rxPackets; }
long rxErrors = 0;
/**
* Get the rx_errors.
* Supported Platforms: All.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return rx_errors
*/
public long getRxErrors() { return rxErrors; }
long rxDropped = 0;
/**
* Get the rx_dropped.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return rx_dropped
*/
public long getRxDropped() { return rxDropped; }
long rxOverruns = 0;
/**
* Get the rx_overruns.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return rx_overruns
*/
public long getRxOverruns() { return rxOverruns; }
long rxFrame = 0;
/**
* Get the rx_frame.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return rx_frame
*/
public long getRxFrame() { return rxFrame; }
long txBytes = 0;
/**
* Get the tx_bytes.
* Supported Platforms: All.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return tx_bytes
*/
public long getTxBytes() { return txBytes; }
long txPackets = 0;
/**
* Get the tx_packets.
* Supported Platforms: All.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return tx_packets
*/
public long getTxPackets() { return txPackets; }
long txErrors = 0;
/**
* Get the *.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return *
*/
public long getTxErrors() { return txErrors; }
long txDropped = 0;
/**
* Get the tx_dropped.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return tx_dropped
*/
public long getTxDropped() { return txDropped; }
long txOverruns = 0;
/**
* Get the tx_overruns.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return tx_overruns
*/
public long getTxOverruns() { return txOverruns; }
long txCollisions = 0;
/**
* Get the tx_collisions.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return tx_collisions
*/
public long getTxCollisions() { return txCollisions; }
long txCarrier = 0;
/**
* Get the tx_carrier.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return tx_carrier
*/
public long getTxCarrier() { return txCarrier; }
long speed = 0;
/**
* Get the speed.
* Supported Platforms: Undocumented.
*
* System equivalent commands:
* - AIX:
* - Darwin:
* - FreeBSD:
* - HPUX:
/usr/sbin/lanadmin -g mibstats 0, netstat -i
* - Linux:
ifconfig
* - Solaris:
* - Win32:
*
* @return speed
*/
public long getSpeed() { return speed; }
void copyTo(NetInterfaceStat copy) {
copy.rxBytes = this.rxBytes;
copy.rxPackets = this.rxPackets;
copy.rxErrors = this.rxErrors;
copy.rxDropped = this.rxDropped;
copy.rxOverruns = this.rxOverruns;
copy.rxFrame = this.rxFrame;
copy.txBytes = this.txBytes;
copy.txPackets = this.txPackets;
copy.txErrors = this.txErrors;
copy.txDropped = this.txDropped;
copy.txOverruns = this.txOverruns;
copy.txCollisions = this.txCollisions;
copy.txCarrier = this.txCarrier;
copy.speed = this.speed;
}
public Map toMap() {
Map map = new HashMap();
String strrxBytes =
String.valueOf(this.rxBytes);
if (!"-1".equals(strrxBytes))
map.put("RxBytes", strrxBytes);
String strrxPackets =
String.valueOf(this.rxPackets);
if (!"-1".equals(strrxPackets))
map.put("RxPackets", strrxPackets);
String strrxErrors =
String.valueOf(this.rxErrors);
if (!"-1".equals(strrxErrors))
map.put("RxErrors", strrxErrors);
String strrxDropped =
String.valueOf(this.rxDropped);
if (!"-1".equals(strrxDropped))
map.put("RxDropped", strrxDropped);
String strrxOverruns =
String.valueOf(this.rxOverruns);
if (!"-1".equals(strrxOverruns))
map.put("RxOverruns", strrxOverruns);
String strrxFrame =
String.valueOf(this.rxFrame);
if (!"-1".equals(strrxFrame))
map.put("RxFrame", strrxFrame);
String strtxBytes =
String.valueOf(this.txBytes);
if (!"-1".equals(strtxBytes))
map.put("TxBytes", strtxBytes);
String strtxPackets =
String.valueOf(this.txPackets);
if (!"-1".equals(strtxPackets))
map.put("TxPackets", strtxPackets);
String strtxErrors =
String.valueOf(this.txErrors);
if (!"-1".equals(strtxErrors))
map.put("TxErrors", strtxErrors);
String strtxDropped =
String.valueOf(this.txDropped);
if (!"-1".equals(strtxDropped))
map.put("TxDropped", strtxDropped);
String strtxOverruns =
String.valueOf(this.txOverruns);
if (!"-1".equals(strtxOverruns))
map.put("TxOverruns", strtxOverruns);
String strtxCollisions =
String.valueOf(this.txCollisions);
if (!"-1".equals(strtxCollisions))
map.put("TxCollisions", strtxCollisions);
String strtxCarrier =
String.valueOf(this.txCarrier);
if (!"-1".equals(strtxCarrier))
map.put("TxCarrier", strtxCarrier);
String strspeed =
String.valueOf(this.speed);
if (!"-1".equals(strspeed))
map.put("Speed", strspeed);
return map;
}
public String toString() {
return toMap().toString();
}
}