Tony’s Twitter Updates for 2009-08-11
- How Retailers Use Lighting To Confuse HDTV Buyers http://bit.ly/Lgmt0 #
- Discovered a new podcast, App Judgment. iPhone and Gphone app reviews http://bit.ly/4e0Ui #
Here are some of my favorite UNIX commands for GeekTool.
–CPU Utilization–
echo CPU
top -l 1| awk ‘/CPU usage/ {print $8, $9}’
top -l 1| awk ‘/CPU usage/ {print $10, $11}’
top -l 1| awk ‘/CPU usage/ {print $12, $13}’

–Top CPU–
top -FR -l2 -o cpu | grep -v 0.0% | cut -c 7-24| sed -n ‘15, $p’

–Memory–
top -orsize -FR -l1 | grep % | grep -v Load | grep -v COMMAND | cut -c 7-19,64-69

–Top Memory–
echo Memory
top -l 1 | awk ‘/PhysMem/ {print “Used: ” $8}’
top -l 1 | awk ‘/PhysMem/ {print “Free: ” $6+$10″M”}’
top -l 1 | awk ‘/PhysMem/ {print “Used: ” $8 ” Free: ” $10}’

–Bandwidth Monitor–
This requires you to have Perl on your computer.
Most OSX machines already have it.
You can download the Perl Script here
After downloading, open Terminal and type the following:
open /usr/bin
It should open up a new Finder window for you and you can just drag and drop
the “BandwidthMonitor.perl” file into the folder.
It may require some authentication so it’ll ask for your password.
Now all you need to do is go back to Geek Tool
Select: Shell
Type on Command:
perl /usr/bin/BandwidthMonitor.perl
Remember to set the refresh rate.

To display your public IP Address use:
curl -s www.whatismyip.com/automation/n09230945.asp | awk {‘print “Public IP : ” $1′}
–Network Activity–
#!/bin/sh
# get the current number of bytes in and bytes out
myvar1=`netstat -ib | grep -e “en1″ -m 1 | awk ‘{print $7}’` # bytes in
myvar3=`netstat -ib | grep -e “en1″ -m 1 | awk ‘{print $10}’` # bytes out
#wait one second
sleep 1
# get the number of bytes in and out one second later
myvar2=`netstat -ib | grep -e “en1″ -m 1 | awk ‘{print $7}’` # bytes in again
myvar4=`netstat -ib | grep -e “en1″ -m 1 | awk ‘{print $10}’` # bytes out again
# find the difference between bytes in and out during that one second
subin=$(($myvar2 – $myvar1))
subout=$(($myvar4 – $myvar3))
# convert bytes to kilobytes
kbin=`echo “scale=2; $subin/1024;” | bc`
kbout=`echo “scale=2; $subout/1024;” | bc`
# print the results
echo Network
echo “In: $kbin Kb/sec”
echo “Out: $kbout Kb/sec”
![]()
I have been using the Mophie Juice Pack Air for over two weeks now and have to say this thing great. I am now able to get through the entire day without having to charge my iPhone. It syncs and charges via a microUSB cable so you don’t have to take your iPhone out of the case to charge or sync with iTunes. Also Mophie will be releasing a hip holster that fits with the Mophie Juice pack Air. I have been looking everywhere for a hip case that would fit the Mophie, and now my search is over.
juice pack air™ – iPhone 3G & 3G S
Integrated circuits with no standby power could be in use by year’s end originally appeared on Engadget on Sun, 19 Jul 2009 20:56:00 EST.