It could be a miss. But most of the devices I used have the / proc file system. You should be able to get the necessary statistics from one of / proc / net / entries. For example, to get netstat:
Process proc = Runtime.getRuntime().exec(new String[] {"cat", "/proc/net/netstat"}); BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream())); String line = null; while ((line = reader.readLine()) != null) {
Nic Strong Oct 11 '10 at 11:08 2010-10-11 11:08
source share