Home > |
---|
Set the date and time using NTP
sysconf ntp ntpdate <hostname_or_ipaddress> [-key <keyid>] [-version <version>]
Parameter | Shortcut | Description |
---|---|---|
<hostname_or_ipaddress> | Specifies the hostname or IP address of the NTP server. | |
-key | -k |
NTP Authentication Keyid Range: 1 to 65535 |
-version | -v |
Specifies the NTP version Valid values: 3 or 4 |
[myluna] lunash:> sysconf ntp ntpdate 127.127.1.0
This command sets the date and time using ntp server "127.127.1.0" if NTP daemon is not running.
NTP daemon is running. You can stop ntpd using the "service stop ntp" command before running this command.
Command Result : 0 (Success)
[myLuna] lunash:>
[myLuna] lunash:>service stop ntp
Shutting down ntp: [ OK ]
Command Result : 0 (Success)
[myluna] lunash:>
[myluna] lunash:> sysconf ntp ntpdate 127.127.1.0
This command sets the date and time using ntp server "127.127.1.0" if NTP daemon is not running.
Current time before running ntpdate: Wed Oct 12 20:47:17 PDT 2011
Current time after running ntpdate: Wed Oct 12 20:47:33 PDT 2011
Command Result : 0 (Success)
[myLuna] lunash:>
[myLuna] lunash:>service start ntp
Starting ntp: [ OK ]
Command Result : 0 (Success)