print state
This commit is contained in:
parent
98761935f7
commit
91b3efc822
|
@ -120,7 +120,7 @@ public class Netstat extends SigarCommandBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
NetConnection[] connections = this.sigar.getNetConnectionList(flags);
|
NetConnection[] connections = this.sigar.getNetConnectionList(flags);
|
||||||
println("Proto\tLocal Address\tForeign Address");
|
println("Proto\tLocal Address\tForeign Address\tState");
|
||||||
|
|
||||||
for (int i=0; i<connections.length; i++) {
|
for (int i=0; i<connections.length; i++) {
|
||||||
NetConnection conn = connections[i];
|
NetConnection conn = connections[i];
|
||||||
|
@ -131,7 +131,8 @@ public class Netstat extends SigarCommandBase {
|
||||||
formatPort(proto, conn.getLocalPort()) +
|
formatPort(proto, conn.getLocalPort()) +
|
||||||
"\t" +
|
"\t" +
|
||||||
formatAddress(conn.getRemoteAddress()) + ":" +
|
formatAddress(conn.getRemoteAddress()) + ":" +
|
||||||
formatPort(proto, conn.getRemotePort()));
|
formatPort(proto, conn.getRemotePort()) + "\t" +
|
||||||
|
conn.getStateString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue