Network Monitoring

by blues » Wed, 29 Oct 2008 14:16:28 GMT


Sponsored Links
 Is there a way to monitor the IP traffic? For example throughput?
If not in java, can it be done through native code? I have seen some
IP sniffer source code for linux.
--~--~---------~--~----~------------~-------~--~----~



Network Monitoring

by brs » Wed, 29 Oct 2008 19:34:53 GMT


 You could try to read

/proc/self/net/dev
/proc/self/net/snmp

to get interface and protocol level stats. I guess since this is not
part of the public API, there is not guarantee that these formats
won't change, but for now at least this information might be what you
are looking for.

Bernhard



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Network Monitoring

by blues » Thu, 30 Oct 2008 02:57:18 GMT


 Can we read from Java? Any permission is required?

Blues




--~--~---------~--~----~------------~-------~--~----~



Network Monitoring

by brs » Thu, 30 Oct 2008 12:01:29 GMT


 No special permissions needed as far as I know - just read them like a
regular file. For example, I was using code like this for a prototype
network monitoring app (I am no java expert - this is mostly cut &
paste):

FileReader fstream;
try {
 fstream = new FileReader("/proc/self/net/dev");
} catch (FileNotFoundException e) {
...
}
BufferedReader in = new BufferedReader(fstream, 500);
String line;
try {
 while ((line = in.readLine()) != null) {
...


Bernhard







--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. HTC Incredible reboot when downloading massive files.

Our app need download a lot of files. Current it works on Samsung
Galaxy but always makes HTC incredible reset with a sad
announcement"Droid".

Does anybody know if HTC incredible has some limitation on network
connections, downloading files/size, or memory leaking with
downloading etc. issues?

thanks,

-- 

2. physics engine with great demos

Hi,

I am a newbie "thinking" of writing a physics game app.  I did see
some engines, but most of them have no good demos or docs.

So can you guys please point me to any physics engine with lot of
demos/sample codes?

Thanks

-- 

3. About the character encoding

4. gingerbread unboxing

5. Live wallpaper - sendWallpaperCommand and BroadcastReceiver

6. Intent, launchmodes, intent-flags etc.: How to and best practices for starting/handling Activities

7. Create TabBar in android at the bottom