- uptime
#!/bin/sh
uptime| \
awk '{printf "Uptime: " $3 " " $4 " " $5 " "}'; top -l 1 | \
awk '/PhysMem/ {printf "RAM : " $8 ", " }' ; top -l 2 | \
awk '/CPU usage/ && NR > 5 {print $6, $7=":", $8, $9="user", $10, $11="sys", $12, $13}' 2> /dev/null
- ps
ps -axr -o %cpu,%mem,user,comm | head -n 21
- getaddr
#!/bin/bash
echo "Active Network Interfaces"
for netif in `netstat -rn -f inet | awk '{print $6}' | sort | uniq`;do
echo ${netif} | egrep "en|ppp" > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo -n ${netif}" : "
ipconfig getifaddr ${netif}
fi
done
- resolv.conf
cat /var/run/resolv.conf | egrep '^(nameserver|domain)'
- df
df -Hg -T smbfs,hfs,fusefs,msdos,afpfs,cd9660
- Time (calendar)
LC_ALL=C date +%H:%M:%S
- day (calendar)
LC_ALL=C date +%a.%B.%d
- calendar
LC_ALL=C cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"
- sockstat
#!/bin/sh
echo "socket status"
lsof -i | awk '{print $1,"\t",$5,$8,$9,$10}'
- Battery Status
echo "Battery Status" ; pmset -g ps | tail -n 1 | tr -d ";" | awk '{print "Percentage: " $2, "\n" "Status: " $3}'
- AirPort Status
echo 'AirPort Status' ; /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | egrep "(\ SSID)|Rate|channel" | sort | awk '{print $1, $2}'
2011-01-17
GeekToolの設定
別エントリで書いていたGeekToolの設定。
0 件のコメント:
コメントを投稿