Current version: 0.7
Note: this step can be skipped if you’re using the gem.
Copy files to a directory in your PATH. I recommend /usr/local/bin
. This will make the commands accessible by just typing the name of it. Be sure to give them permissions (755 should be fine).
Displays your system’s uptime.
uptime | awk '{print "Uptime : " $3 " " $4 " " $5 }' | sed -e 's/.$//g'
Uptime : 25 days, 8:28
Displays your Wifi or Ethernet IP. Also see IP script
ifconfig en1 | grep "inet " | awk '{print $2}'
192.168.1.2
Displays your external IP
curl -s www.whatismyip.com/automation/n09230945.asp | awk {'print "External : " $1'}
External: 72.45.123.12
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"
July 2009 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 ## 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Prints out total Memory Usage
top -l 1 | awk '/PhysMem/ {print "Used: " $8}' top -l 1 | awk '/PhysMem/ {print "Inactive: " $6+$10"M"}'
Used: 1769M
Inactive: 688M
top -l 1| awk '/CPU usage/ {print $6, $7, $8, $9, $10, $11, $12, $13}'
CPU usage: 22.22% user, 71.11% sys, 6.67% idle
echo CPU usage 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}'
CPU usage
22.22% user,
71.11% sys,
6.67% idle
Yweather is recommended for this. Because Yweather creates a local copy of the weather from Yahoo, it needs write permissions. Please place the script somewhere it can do this (ie, /Users/nic/bin/yweather.pl
)
Yweather is not included in this package, but you can download it from Google Code. Please read the help file when using this script. I did not write it and will not provide support for it.
/Users/nic/bin/yweather.pl -ft1
81
/Users/nic/bin/yweather.pl -ft1
Partly Cloudy
This script requires a username and password. You must edit it before use. Replace USERNAME
& PASSWORD
with your username and password.
Credits to Greg Newman for this script
gmail
3 Unread
ipaddress
Ethernet : INACTIVE
Airport : 161.45.27.132
More info for this script. There have been instances where users have needed Xcode for Perl to compile modules correctly.
sudo cpan install WebService::RTMAgent
rtm --authorise
Copy and paste the link into your browser and authorize it. Use rtm --help
for more info
todo
- Overdue - Turn in Fall Net tech and LTL list to payroll Format computers in Smith for Cummings - Next 7 Days - Turn in Payroll - Other - resnet payroll system Internship Journal Buy 4 quarts oil
airport
Network: DD-WRT
A few examples are provided in the tzones
file. You will need to edit this file to add more timezones.
tzones
Hawaii : 04:04 PM Fri
UK : 02:04 AM Sat
London : 03:04 AM Sat
Sweden : 04:04 AM Sat
Germany : 04:04 AM Sat
Maylasia : 10:04 AM Sat
Credits to Chris Helming
network
In: 598 kb/s
Out: 13 kb/s