Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wie die Zeit eines NTP Servers abfragen?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Thu Jan 24, 2013 5:03 pm    Post subject: Wie die Zeit eines NTP Servers abfragen? Reply with quote

Hallo Zusammen,

gibt es eine Möglichkeit, die Zeit eines NTP Servers abzufragen, ohne zu synchronisieren?

Mir geht es nicht darum, einen NTP-Client einzurichten, sondern ich möchte nur verschiedene NTP-Server auf deren Zeit abfragen.

Geht so etwas und falls ja, wie?
Back to top
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Thu Jan 24, 2013 5:29 pm    Post subject: Reply with quote

Hi,
ich habe das jetzt so nie probiert, aber nach meinem Verständnis müsste es klappen:

net-misc/ntp

Code:

man ntpdate
[ ... ]
 -q     Query only - don't set the clock.
[ ... ]


Die Ausgabe gibt das aber nicht so richtig her, ob nun an der Uhr gedreht wird, oder nicht - geht aber als User und meckert nicht rum

Code:


[Do, 24.01.2013, 18:28:42]
[stell @ fightclub:~]% /usr/sbin/ntpdate -q zeit.fu-berlin.de
server 160.45.10.8, stratum 1, offset 0.001751, delay 0.05492
24 Jan 18:28:42 ntpdate[4099]: adjust time server 160.45.10.8 offset 0.001751 sec


Hilft Dir das?
_________________
- born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Thu Jan 24, 2013 5:33 pm    Post subject: Reply with quote

cryptosteve wrote:
[...] Hilft Dir das?


Danke, das werde ich mal testen. ;)
Back to top
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Thu Jan 24, 2013 5:34 pm    Post subject: Reply with quote

Mach das .. gib bitte bescheid, ob's ausreicht, sonst suche ich weiter. :)
_________________
- born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Thu Jan 24, 2013 6:38 pm    Post subject: Reply with quote

cryptosteve wrote:
Mach das .. gib bitte bescheid, ob's ausreicht ...


Danke, funktioniert. ;)

Schade ist nur, dass die Zeitserver das Jahr nicht mitsenden. :(

Code:
vdr01 ~ # ntpdate -q zeit.fu-berlin.de |grep : |cut -d " " -f1,2,3
24 Jan 19:35:52
vdr01 ~ #
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5165

PostPosted: Thu Jan 24, 2013 6:48 pm    Post subject: Reply with quote

mit ntpq bekommst du auch das jahr (http://serverfault.com/questions/220827/how-can-i-compare-an-ntp-servers-time-to-my-servers-time):
Code:
ntpq -c "rv 0 clock" zeit.fu-berlin.de

Quote:
clock=d4ac0019.862fb20d Thu, Jan 24 2013 19:46:49.524

_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Thu Jan 24, 2013 7:25 pm    Post subject: Reply with quote

THX @ firefly,

das ist ja noch besser. :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum