The Lounge • GeekTool commands
GeekTool commands
Pages: 1
I thought it would be a nice gesture to share GeekTool commands with the forum in an effort to discover new ones that others might contribute. I'll start by showing some of mine, and hopefully others will join in on the fun.
First up, the packet loss detector (set refresh to 60):

Don't forget to use the icon gems on this one.
LOSS=`ping -q -A -c 15 www.google.com | grep "packet loss" | cut -d " " -f 7 | cut -d "%" -f1`
if [ $? -ne 0 ]; then
echo "WARNING: Ping failed!"
exit 1
fi
if [ $LOSS -gt 0 ]; then
echo "WARNING: Packet loss detected!"
exit 1
else
echo "No packet loss detected."
exit 0
fi
I use this to monitor my server rather than my internet connection. You can do the same by replacing www.google.com with your server/webhost if you have one.
netstat (set refresh to 15)
This monitors connections that are open. Expect lots of lines if you're running a torrent or Skype:
netstat -nl | grep tcp4
top (set refresh at 5, 10, or 15 depending on how okay with load you are)
top -n57 -l2 -o-CPU | tail -n66
I'll also accept requests for scripts if people want them. I'll see what I can do. Let me know if this helps.
I'm overcapacity on my dropbox, so it would be superb if you helped me get more space by signing up with my link :3
䷩䷼䷨ — Six in the second place, Nine in the Fifth.
thanks! ![]()
▛▞▞▟ Proud Member of the BLUE Team™ ▙▚▚▜
I'd like to see something that would display the weather and the shipping forecast (english versions too please)
There's bullet holes where my compassion used to be
▛▞▞▟ Proud Member of the BLUE Team™ ▙▚▚▜
For weather and conditions you can use lynx (of course you have to install that first)
lynx -dump http://printer.wunderground.com/cgi-bin … IPCODE|awk ‘/Temp/{printf $2, “: “; for (i=3; i<=3; i++) printf $i ” ” }’
lynx -dump http://printer.wunderground.com/cgi-bin … IPCODE|awk ‘/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i ” ” }’
Replace ZIPCODE with the proper zip for your area.
If you would like to know other ways just let me know...
It would be nice if Geektool got a minor update. I tried downloading the source to see if I could just play with it. And the source contains Project Builder files. Poor Geek tool, its development never got to see xCode.
kalel wrote:
For weather and conditions you can use lynx (of course you have to install that first)
. . .
Replace ZIPCODE with the proper zip for your area.
If you would like to know other ways just let me know...
What about for those of us not living in the US?
slighty insightful | tweets | MacHeisters
Maybe a Dingoo Ate Your Baby | Secrets | Doppelgängers | iPhone Fail | Don't Drink That
abeckstrom wrote:
kalel wrote:
For weather and conditions you can use lynx (of course you have to install that first)
. . .
Replace ZIPCODE with the proper zip for your area.
If you would like to know other ways just let me know...What about for those of us not living in the US?
i'd like to second this, i find the wunderground doesn't like english postcodes so much
anything for english shipping forecasts?
There's bullet holes where my compassion used to be
▛▞▞▟ Proud Member of the BLUE Team™ ▙▚▚▜
Hey yall, for those of you who love the points race here is a little script to show you the points total per team on macheist!
lynx -source http://macheist.seems.nl/access/csv.php?num=4 | awk '{split($0,a,","); print "(" a[2] ") " a[3] }'
Remember you need to install Lynx. Instructions are linked below...
Other scripts are on my blog (A bazillion of them!) http://thememymac.com/?p=12
Shadedjon wrote:
lynx -source http://macheist.seems.nl/access/csv.php?num=4 | awk '{split($0,a,","); print "(" a[2] ") " a[3] }'
Remember you need to install Lynx. Instructions are linked below...
You could do this with curl too.
curl -s http://macheist.seems.nl/access/csv.php?num=4 | awk '{split($0,a,","); print "(" a[2] ") " a[3] }'
A few others:
Your points total
curl -s http://rdic.mmnow.nl/api/txt/bot.php?user=craftyheist | grep Points | tr -d \<\>[a-zA-Z:\ ]
Your leaderboard position
curl -s http://rdic.mmnow.nl/api/txt/bot.php?user=craftyheist | grep Rank | tr -d \<\>[a-zA-Z:\ ]
Change 'craftyheist' to your own username.
The above 2 commands use the RDIC's feed data so please set the refresh to a high value to avoid hammering igodelaputa's server.
[edit: you can also get your points totals from the screen saver in my signature
]
Last edited by CraftyHeist (March 8, 2009 2:51 pm)
Here's a nice one to display the SMART status of your hard drive.
The command used is from here
First you need the name of the drives. Open terminal and type: diskutil list
Second add the command: 'diskutil info * | grep Verified > /dev/null' to GeekTool (replace the asterisk with your drive name
Third select the icon tab and click the default button.
Place the display next to the appropriate hard drive icon and you should get a nice green icon telling you that your hard drive's in order. If a SMART error is detected the icon should go red.
Last edited by CraftyHeist (March 10, 2009 8:52 am)
Pages: 1