Topic: 我想问一下,如何用java去取得每一秒的我的网卡的输出速度?

  Print this page

1.我想问一下,如何用java去取得每一秒的我的网卡的输出速度? Copy to clipboard
Posted by: constantin
Posted on: 2008-02-18 05:38

我想问一下,如何用java去取得每一秒的我的网卡的上载速度,和下载速度?
我看了,在c# 下非常容易实现
调用这个类 IPv4InterfaceStatistics 就可以直接取得速度值。
在java怎么办呢?
有什么好的办法吗?

2.Re:我想问一下,如何用java去取得每一秒的我的网卡的输出速度? [Re: constantin] Copy to clipboard
Posted by: andy_wang_5
Posted on: 2008-02-18 10:06

用java调用c#写的程序

3.Re:我想问一下,如何用java去取得每一秒的我的网卡的输出速度? [Re: constantin] Copy to clipboard
Posted by: ftang
Posted on: 2008-03-29 05:04

right now, I don't see the java have any existing information about statistic of network card is available, in java 5.0, use java.net.NetworkInterface will only give the general infomations about the each network card like IpAddress , MTU, MAC address etc.

I can't figure out how to calculate the speed of network card outside of jvm (in jvm is simple: total received bytes/ total system time) but you can call "netstat -s" from System.exec to get full view of network card statistics.


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923