File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Network Utilization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Network Utilization" Watch "Network Utilization" New topic
Author

Network Utilization

Vadivel Murugesan
Greenhorn

Joined: Jul 19, 2008
Posts: 11
Hi.. Ranchers,

Is there anyway to find Utilization of Network on System using Java API'S?

Thanks in Advance


Levi<br />SCJP 1.4
Carey Evans
Ranch Hand

Joined: May 27, 2008
Posts: 225

Not directly, as far as I know. If it's available, you could access an SNMP or WBEM server on the system over the network, which is fairly cross-platform.

For less cross-platform solutions, you could use the WMI scripting APIs via COM/ActiveX on Windows, or you could parse files like /proc/net/dev on Linux.
vipin jos
Greenhorn

Joined: Nov 18, 2008
Posts: 24
If you want to connect from a Windows machine to Solaris machine and run commands like netstat, one of the quick and dirty ways is to use plink(available in the PuTTY downloads page).

Use Runtime exec and run plink with the commands you need.

Read the output and parse.

Another much more decent alternative is to use OpenSSH
Carey Evans
Ranch Hand

Joined: May 27, 2008
Posts: 225

Originally posted by vipin jos:
If you want to connect from a Windows machine to Solaris machine and run commands like netstat, one of the quick and dirty ways is to use plink(available in the PuTTY downloads page).

There are SSH libraries for Java like Trilead SSH too, which may be easier to use than Runtime.exec().
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Network Utilization
 
Similar Threads
network utilization program in java
Conditional GET operations...
tomcat maxthread count and minspare thread count on tomcat 6.0
Admin console - Monitoring
Qaulity Standards for Maximum no of items in SELECT tag