Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

network utilization program in java  RSS feed

 
dj kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I want to write a program which monitors how much network bandwidth is getting used by my local machine.It should display me the statistics like the percentage utilization of the network by the local machine.
Could anybody let me know how to do this in java?

Thanks
Dhananjay
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you running Linux? It stores all kinds of useful information, including network utilization, as text files in the proc filesystem. Just open the file like you would a normal text file and read away.
If you're on Windows, well, probably should start reading about the Win 32 API or learning C#. You're going to have to write a DLL then use JNI to interface with it.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!