|
2009-09-25
, 06:24
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#22
|
The Following User Says Thank You to qwerty12 For This Useful Post: | ||
|
2009-09-25
, 09:29
|
Posts: 2,802 |
Thanked: 4,491 times |
Joined on Nov 2007
|
#23
|
Here's how to get the IP address for your device, whether you are on wlan, gprs, or adhoc.
Code:/sbin/ifconfig | grep "Mask:255.2" | cut -21-40 | tr -d " BcastP-\:"
But I just want to know my IP address...
/sbin/ifconfig | sed -n -e "/127\.0\.0\.1/d" -e "s/^.*addr:\([0-9.]*\).*$/\1/p"
ip addr list dev `ip route list exact 0/0 | cut -d" " -f5` | \ sed -ne "s/^.*inet \([0-9.]*\).*$/\1/p"
The Following 5 Users Say Thank You to lma For This Useful Post: | ||
|
2009-09-25
, 16:58
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#24
|
|
2009-09-25
, 17:10
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#25
|
The Following 3 Users Say Thank You to thp For This Useful Post: | ||
|
2009-09-25
, 17:13
|
|
Posts: 2,669 |
Thanked: 2,555 times |
Joined on Apr 2007
@ Halifax, Nova Scotia, Canada
|
#26
|
I've written something like that as statusbar applet for the Linux Desktop and OS2008 that screenscrapes my cellular operator's website and displays the data/voice usage:
http://thpinfo.com/2009/naranjito/
This currently only works for one operator, but could of course be extended to operators which allow the traffic to be seen from some (login-protected) website. Of course, modifying it to be a desktop widget should not be too hard, also...
The code is open source and available from the website.
|
2009-09-25
, 17:55
|
Posts: 547 |
Thanked: 1,383 times |
Joined on Sep 2009
@ Stockholm, Sweden
|
#27
|
While that's cool and thanks for showing it, I find it somewhat ironic that to find out how much bandwidth you've used, you've gotta use more.
|
2009-09-25
, 18:30
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#28
|
... in which case you probably want the IP address of the default route interface:
Code:ip addr list dev `ip route list exact 0/0 | cut -d" " -f5` | \ sed -ne "s/^.*inet \([0-9.]*\).*$/\1/p"
|
2009-09-25
, 18:38
|
|
Posts: 3,397 |
Thanked: 1,212 times |
Joined on Jul 2008
@ Netherlands
|
#29
|
|
2009-09-25
, 21:49
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#30
|
Tags |
cellular, data, widget proposal |
|
Here's how to get the IP address for your device, whether you are on wlan, gprs, or adhoc.
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!