Active Topics

 



Notices


Reply
Thread Tools
Posts: 123 | Thanked: 33 times | Joined on Jan 2010 @ Stockholm
#101
God was written in awk.

Here's your internal and external IP (they might be identical):
Code:
echo `/sbin/ifconfig | grep inet | grep -v 127.0.0.1 | awk '{split($2,a,":");print a[2]}'` / `wget -q -O - api.myiptest.com | awk -F "\"" '{print $4}'`
/P
 
Posts: 68 | Thanked: 36 times | Joined on Dec 2009
#102
Originally Posted by jakiman View Post
Here's a script I'm using for Rootfs usage info. Hope someone finds it useful.
Very nice. But I have switched it to df -k so I get more precise info on how much space an app eats up. This way testing an app for optification becomes more or less trivial... with this on my desktop I will notice right away if an app eats up too much space.

Last edited by feydrutha; 2010-01-28 at 17:37.
 
Posts: 1,427 | Thanked: 2,077 times | Joined on Aug 2009 @ Sydney
#103
Originally Posted by Palleman View Post
Here's a proposal for a new batt-level cmd line:
Code:
if `hal-device | grep is.charging | awk '{print $3}'`; then echo Charging; else hal-device | grep charge_level.percentage | awk '{print $3 "%"}'; fi
I made mine 16 wide and changed "Battery:" to "Batt" and "Charging" to "Chrg", making it smaller.
Nice. Might try it out. But use lshal instead of hal-device as lshal is much quicker.

I'm very happy to some more scripts others are using. Let's keep them coming!
 
Posts: 123 | Thanked: 33 times | Joined on Jan 2010 @ Stockholm
#104
Originally Posted by jakiman View Post
Nice. Might try it out. But use lshal instead of hal-device as lshal is much quicker.
Isn't it the other way around? At least on my phone it is. lshal takes about five seconds, while hal-device takes about three seconds.

Edit: Measured it with time a couple of times:

lshal:
3,82
3,53
3,58
3,90
3,47

hal-device
2,32
2,30
2,24
2,56
2,55

I wasn't that good at counting seconds, but at least I got the proportions right...

/P

Last edited by Palleman; 2010-01-29 at 01:06.
 
Posts: 1,427 | Thanked: 2,077 times | Joined on Aug 2009 @ Sydney
#105
Originally Posted by Palleman View Post
Isn't it the other way around? At least on my phone it is. lshal takes about five seconds, while hal-device takes about three seconds.
lol. I was half asleep when I wrote that I think. Yeah, it's the other way around.
 
jkq's Avatar
Posts: 251 | Thanked: 131 times | Joined on Oct 2009 @ USA
#106
Originally Posted by jakiman View Post
But use lshal instead of hal-device as lshal is much quicker.
Try "hal-device bme".

real 0m0.149s
user 0m0.000s
sys 0m0.008s

-jkq
__________________
Class .. : Quiet One
Humor .. : [*********-] Alignment: Chaotic Good
Patience : [******----] Weapon(s): Python scripts
Agro ... : [***-------] Relic(s) : N900
 
Posts: 188 | Thanked: 34 times | Joined on Dec 2009
#107
Originally Posted by jakiman View Post
Here's a script I'm using for Rootfs usage info. Hope someone finds it useful.

Title: Rootfs Usage:

Code:
df -h | grep ubi0 | awk '{print $5,"used",",",$4"B","free"}'
example output:

Rootfs Usage: 82% used , 40.9MB free
thanks using it now, this can be a life saving.
 
Posts: 13 | Thanked: 3 times | Joined on Jan 2010
#108
Noob here.

Thanks a lot for this widget and helpful scripts to all.

I have a few suggestions:

1.
Just wandering if you would consider creating dedicated page with list of scripts and descriptions what are they for (for noobs like me).

For example:

"Rootfs Usage" script shows 80% on my n900. I'm not sure what that means but I assume that this is not very good sign. Could somebody explain what is it and how I can rectify the situation?


2.
I was wandering if it is possible to add one more optional command to widget config that would be evaluated for true/false and depending on the value would use different colors for real command output (colors can be configurable).

Example:

For "Rootfs Usage" script this command would check if space left is less then 20Mb and if so change font color to red, otherwise blue.


Thanks again to all contributors.

BugHunter
 
Posts: 313 | Thanked: 247 times | Joined on Jan 2010 @ USA
#109
Originally Posted by BugHunter View Post
Noob here.

Thanks a lot for this widget and helpful scripts to all.

I have a few suggestions:


"Rootfs Usage" script shows 80% on my n900. I'm not sure what that means but I assume that this is not very good sign. Could somebody explain what is it and how I can rectify the situation?

BugHunter
That means your root file system is 80% full (out of 256MB total). If it gets too full, you may not be able to use your N900. Try not to install too many non-optified apps. For more information on N900 file system and opt issue, see here - http://wiki.maemo.org/N900_filesystem & http://wiki.maemo.org/Opt_Problem
 

The Following User Says Thank You to dsawhney For This Useful Post:
Posts: 13 | Thanked: 3 times | Joined on Jan 2010
#110
@dsawhney Thank you for explanation.
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:17.