#!/bin/sh 

dstation=$( /bin/df --output=target,avail,pcent | /bin/fgrep "/ " | /usr/bin/tr -s " " | /usr/bin/cut -d" " -f2,3)
dvarwww=$( /bin/df | /bin/fgrep /var/www | /usr/bin/tr -s " " | /usr/bin/cut -d" " -f5,4)
dntpadjt=$( ntptime | /bin/fgrep ntp_adjtime | /usr/bin/tr -s " " | /usr/bin/cut -d" " -f5)
dntpstat=$( ntptime | /bin/fgrep status | /usr/bin/tr -s " " | /usr/bin/cut -d" " -f4)
tstamp=$(/bin/date -u +"%Y-%m-%d %H:%M")

(echo "$tstamp $dntpadjt $dntpstat $dstation $dvarwww ") > /var/www/html/stats/comp_state.log
(echo "$tstamp $dntpadjt $dntpstat $dstation $dvarwww ") >> /var/www/html/stats/comp_stats.log



