find ./ -type f -name '*source-string*'

linux | ntp | date | time

# ---------------------------------------------------------
# ---    : DATE EXAMPLES 
#
date +%Y-%m-%d
# --- 2014-06-12
date +%Y-%m-%d -d "-1 day"
# --- 2014-06-11
date +%Y-%m-%d -d "-1 year -3 month -52 day"
# --- 2013-01-19
date "+%Y-%m-%d %H:%M" -d "-1 day 13:00"
# --- 2014-06-11 13:00
echo "~/.profile | $(date '+%Y.%m.%d %H:%M:%S %N')"
# --- ~/.profile | 2015.07.29 14:15:05 770972091


# ---------------------------------------------------------
# The hardware clock can be updated in UTC (coordinated universal time) or your local time. It is # standard practice to update it in UTC.
hwclock --show
hwclock --utc -- systohc

hwclock
# --- Sat 10 Aug 2013 08:26:12 AM PDT  -0.312862 seconds
hwclock -r
# --- Sat 10 Aug 2013 08:20:54 AM PDT  -0.109748 seconds
hwclock --show
# --- Sat 10 Aug 2013 08:21:12 AM PDT  -0.640982 seconds

hwclock --systohc
# --- “system to hardware clock”
# [ [email protected] ~]$ date && hwclock -r
# Thu Apr 10 13:23:07 CEST 2014
# Thu 10 Apr 2014 01:22:42 PM CEST  -0.496495 seconds
# [ [email protected] ~]$ date && hwclock -r
# Thu Apr 10 13:24:19 CEST 2014
# Thu 10 Apr 2014 01:24:20 PM CEST  -0.186334 seconds

hwclock --set --date 8/11/2013
hwclock --set --date "8/11/2013 23:10:45"
#-----------------------------------------------------
#-----------------------------------------------------
ntpdate -s time1.google.com
ntpdate -s time2.google.com
ntpdate -s time3.google.com
ntpdate -s time4.google.com

service ntp stop
# ntpdate -s time.nist.gov
# ha nincs szerer megadva az vi /etc/ntp.conf
ntpd -gq
service ntp start

[[email protected]] systemctl stop ntpd.service
[[email protected]] ntpdate -u 192.168.1.100
# --- Looking for host 192.168.1.100 and service ntp
# --- host found : bigboy.my-site.com
# --- 12 Aug 08:03:38 ntpdate[2472]: step time server 192.168.1.100 offset 28993.084943 sec
[[email protected]] ntpdate -u 192.168.1.100
# --- Looking for host 192.168.1.100 and service ntp
# --- host found : bigboy.my-site.com
# --- 12 Aug 08:03:40 ntpdate[2472]: step time server 192.168.1.100 offset 2.467652 sec
[[email protected]] ntpdate -u 192.168.1.100
# --- Looking for host 192.168.1.100 and service ntp
# --- host found : bigboy.my-site.com
# --- 12 Aug 08:03:42 ntpdate[2472]: step time server 192.168.1.100 offset 0.084943 sec
[[email protected]] systemctl start ntpd.service

[[email protected]] ntpq -p
# ---      remote          refid       st t when poll reach  delay   offset   jitter
# --- ==============================================================================
# --- -jj.cs.umb.edu   gandalf.sigmaso  3 u   95 1024  377  31.681  -18.549    1.572
# --- milo.mcs.anl.go  ntp0.mcs.anl.go  2 u  818 1024  125  41.993  -15.264    1.392
# --- -mailer1.psc.edu ntp1.usno.navy.  2 u  972 1024  377  38.206   19.589   28.028
# --- -dr-zaius.cs.wis ben.cs.wisc.edu  2 u  502 1024  357  55.098    3.979    0.333
# --- +taylor.cs.wisc. ben.cs.wisc.edu  2 u  454 1024  347  54.127    3.379    0.047
# --- -ntp0.cis.strath harris.cc.strat  3 u  507 1024  377 115.274   -5.025    1.642
# --- *clock.via.net   .GPS.            1 u  426 1024  377 107.424   -3.018    2.534
# --- ntp1.conectiv.c  0.0.0.0         16 u    - 1024    0   0.000    0.000  4000.00

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch24_:_The_NTP_Server

1 Kommentar zu linux | ntp | date | time

  1. [email protected]:~> for i in {1..6};do echo ^] | telnet x${i}.app.test.domain.com 4444 2> /dev/null | grep ‚Connected to‘;done
    Connected to x1.app.test.domain.com.
    Connected to x2.app.test.domain.com.
    Connected to x3.app.test.domain.com.
    Connected to x4.app.test.domain.com.
    Connected to x5.app.test.domain.com.
    Connected to x6.app.test.domain.com.
    [email protected]:~> for x in {1..2};do for i in {1..6};do echo ^] | telnet x${i}.z800${x}.soa.baintern.de 4444 2> /dev/null | grep ‚Connected to‘;done;done
    Connected to x1.app.test.domain.com.
    Connected to x2.app.test.domain.com.
    Connected to x3.app.test.domain.com.
    Connected to x4.app.test.domain.com.
    Connected to x5.app.test.domain.com.
    Connected to x6.app.test.domain.com.
    Connected to x1.app2.test.domain.com
    Connected to x2.app2.test.domain.com
    Connected to x3.app2.test.domain.com
    Connected to x4.app2.test.domain.com
    Connected to x5.app2.test.domain.com
    Connected to x6.app2.test.domain.com

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.