Advertisement
esalant

Untitled

May 18th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. node FalconStats/scripts/diskspace.js
  2.  
  3. let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
  4. let secs=$((${upSeconds}%60))
  5. let mins=$((${upSeconds}/60%60))
  6. let hours=$((${upSeconds}/3600%24))
  7. let days=$((${upSeconds}/86400))
  8. UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"`
  9.  
  10. # get the load averages
  11. read one five fifteen rest < /proc/loadavg
  12.  
  13. echo "$(tput setaf 2)
  14. `date +"%A, %e %B %Y, %r"`
  15. `uname -srmo`$(tput setaf 1)
  16.  
  17. Uptime.............: ${UPTIME}
  18. Memory.............: `cat /proc/meminfo | grep MemFree | awk {'print $2'}`kB (Free) / `cat /proc/meminf$Load Averages......: ${one}, ${five}, ${fifteen} (1, 5, 15 min)
  19. Running Processes..: `ps ax | wc -l | tr -d " "`
  20. IP Addresses.......: `/sbin/ifconfig eth0 | /bin/grep "inet\b" | awk '{print $2}'`
  21. Weather............: `curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp?metric=2&locCode=2941$$(tput sgr0)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement