close
Lab

1. using cron

job runs every ten minutes today between the hours of 0800 and 1700

#crontab -e
*/10 8-17 * * * /usr/bin/free

#Mail to user
*/10 8-17 * * * /usr/bin/free|mail -s test-cron root

移除crontab file
#crontab -r


2. using ntp

#vi /etc/ntp.conf

add line
server 192.168.0.254

#ntpdate server1.example.com

啟動服務
#service ntpd start
#chkconfig ntpd on

#ntpq

[root@server118 nfs]# ntpq
ntpq> peer
remote refid st t when poll reach delay offset jitter
==============================================================================
192.168.0.254 .STEP. 16 u 777 1024 2 0.397 0.661 0.001
*LOCAL(0) .LOCL. 10 l 7 64 377 0.000 0.000 0.001
ntpq>
arrow
arrow
    全站熱搜

    aquatower 發表在 痞客邦 留言(0) 人氣()