本文整理汇总了Java中org.hyperic.sigar.Tcp类的典型用法代码示例。如果您正苦于以下问题:Java Tcp类的具体用法?Java Tcp怎么用?Java Tcp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Tcp类属于org.hyperic.sigar包,在下文中一共展示了Tcp类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: outputTcpStats
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
private void outputTcpStats() throws SigarException {
Tcp stat = this.sigar.getTcp();
final String dnt = " ";
println(dnt + stat.getActiveOpens() + " active connections openings");
println(dnt + stat.getPassiveOpens() + " passive connection openings");
println(dnt + stat.getAttemptFails() + " failed connection attempts");
println(dnt + stat.getEstabResets() + " connection resets received");
println(dnt + stat.getCurrEstab() + " connections established");
println(dnt + stat.getInSegs() + " segments received");
println(dnt + stat.getOutSegs() + " segments send out");
println(dnt + stat.getRetransSegs() + " segments retransmited");
println(dnt + stat.getInErrs() + " bad segments received.");
println(dnt + stat.getOutRsts() + " resets sent");
}
示例2: getActiveConnectionOpenings
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getActiveConnectionOpenings() {
return units.map(tcp, Tcp::getActiveOpens, 0L);
}
示例3: getFailedConnectionAttempts
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getFailedConnectionAttempts() {
return units.map(tcp, Tcp::getAttemptFails, 0L);
}
示例4: getPassiveConnectionOpenings
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getPassiveConnectionOpenings() {
return units.map(tcp, Tcp::getPassiveOpens, 0L);
}
示例5: getConnectionsEstablished
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getConnectionsEstablished() {
return units.map(tcp, Tcp::getCurrEstab, 0L);
}
示例6: getConnectionResets
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getConnectionResets() {
return units.map(tcp, Tcp::getEstabResets, 0L);
}
示例7: getSegmentRetransmitted
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getSegmentRetransmitted() {
return units.map(tcp, Tcp::getRetransSegs, 0L);
}
示例8: getBadSegmentsReceived
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getBadSegmentsReceived() {
return units.map(tcp, Tcp::getInErrs, 0L);
}
示例9: getSegmentsSentOut
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getSegmentsSentOut() {
return units.map(tcp, Tcp::getOutSegs, 0L);
}
示例10: getResetsSent
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public long getResetsSent() {
return units.map(tcp, Tcp::getOutRsts, 0L);
}
示例11: tcp
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Bean
Try.CheckedSupplier<Tcp> tcp(
final Sigar sigar,
final CachingService caching) {
return caching.cache(sigar::getTcp);
}
示例12: getTcp
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
public Tcp getTcp() {
return tcp;
}
示例13: tcp
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
public Builder tcp(Tcp val) {
tcp = val;
return this;
}
示例14: executeCommand
import org.hyperic.sigar.Tcp; //导入依赖的package包/类
@Override
public String executeCommand(final SigarProxy sigar) throws SigarException {
StrBuilder sb = new StrBuilder(200);
Tcp tcp = sigar.getTcp();
long activeOpens = tcp.getActiveOpens();
long passiveOpens = tcp.getPassiveOpens();
long attemptFails = tcp.getAttemptFails();
long estabResets = tcp.getEstabResets();
long currEstab = tcp.getCurrEstab();
long inSegs = tcp.getInSegs();
long outSegs = tcp.getOutSegs();
long retransSegs = tcp.getRetransSegs();
long inErrs = tcp.getInErrs();
long outRsts = tcp.getOutRsts();
sb.append(TYPE_TCP);
sb.append(separator);
sb.append(activeOpens); // active connections openings
sb.append(separator);
sb.append(passiveOpens); // passive connection openings
sb.append(separator);
sb.append(attemptFails); // failed connection attempts
sb.append(separator);
sb.append(estabResets); // connection resets received
sb.append(separator);
sb.append(currEstab);// connections established
sb.append(separator);
sb.append(inSegs); // segments received
sb.append(separator);
sb.append(outSegs); // segments send out
sb.append(separator);
sb.append(retransSegs); // segments retransmitted
sb.append(separator);
sb.append(inErrs); // bad segments received
sb.append(separator);
sb.append(outRsts); // resets sent
return sb.toString();
}