Reply
Thread Tools
Posts: 27 | Thanked: 6 times | Joined on Dec 2009
#1
Some application on my N900 is connecting to internet every now and then (matter of minutes). This uses massive battery but I am not able to track wich application is connecting.

How can I track wich application is using network (and possibly how frequent and how intensive the connections are)?
Is there a network monitoring command like "top" is for cpu and memory? Or some statistic log, to know usage, or at least wich application started the gsm connection?

Perhaps I set up wrongly some parameter in some application.. It keeps connecting way too often! I do not have internet-related widgets on my (only one) desktop. And now all chatting accounts are disabled. So?

Also, the connection seemps to be kept open even if no transfer is made.

Any ideas?

Thank, -Gus- (p.s. sorry for my lacking english)

Last edited by G_Gus; 2009-12-10 at 19:59.
 
Posts: 479 | Thanked: 641 times | Joined on Dec 2007 @ Switzerland
#2
open a terminal
type:

netstat -i

this should give you a list of processes and their currently active connections.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#3
Originally Posted by lorelei View Post
netstat -i

this should give you a list of processes and their currently active connections.
The -i option just shows the interfaces (similar to ifconfig), and the busybox version of netstat doesn't even support it. "lsof -i" works though.
 
Posts: 27 | Thanked: 6 times | Joined on Dec 2009
#4
I did it, but the output is huge (I had to find a way to input the pipe and use |more, and decrease the font size to fit all the text), and have near to no sense to me.. is there a way to track wich application is doing what? or an app that can analyze those logs? or a manual so I can understand something more? thanks


EDIT: found out that
Code:
lsof -i
does output something more sensible.
I was about to try to sniff all the network and analyze it on a standard PC!

Last edited by G_Gus; 2009-12-12 at 13:32.
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#5
netstat -p -A inet (with netstat from net-tools, not sure about Busybox netstat):

-p, --program
Show the PID and name of the program to which each socket belongs.
--protocol=family , -A
Specifies the address families (perhaps better described as low level protocols) for which connections are to be shown. family is a comma (',')
separated list of address family keywords like inet, unix, ipx, ax25, netrom, and ddp. This has the same effect as using the --inet, --unix (-x),
--ipx, --ax25, --netrom, and --ddp options.

The address family inet includes raw, udp and tcp protocol sockets.
Some information may not be readable by your current user and may require root access.

I've tried lsof -i which is a suitable alternative to netstat -p -A inet although the -c flag in netstat refreshes the information every few seconds; hence top-like. You can get similar functionality with lsof by issuing the -r flag. Something like iptraf or ntop may also be suitable alternative, or simply logging output of lsof/netstat.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:50.