Class NetStat
java.lang.Object
oshi.driver.unix.NetStat
-
Method Summary
Modifier and TypeMethodDescriptionQuery netstat to all TCP and UDP connectionsQuery netstat to obtain number of established TCP connectionsqueryTcpStats(String netstatStr) Gets TCP stats vianetstat -s.queryUdpStats(String netstatStr) Gets UDP stats vianetstat -s.
-
Method Details
-
queryTcpnetstat
-
queryNetstat
Query netstat to all TCP and UDP connections- Returns:
- A list of TCP and UDP connections
-
queryTcpStats
Gets TCP stats vianetstat -s. Used for Linux and OpenBSD formats- Parameters:
netstatStr- The command string- Returns:
- The statistics
-
queryUdpStats
Gets UDP stats vianetstat -s. Used for Linux and OpenBSD formats- Parameters:
netstatStr- The command string- Returns:
- The statistics
-