solaris 8 how to change time immediately

Posted on 2005-04-14
Last Modified: 2013-12-21
Hi gents

Today we did a restore excercise on our SUN netra 240 platform.

This is a 4 box redundant softswitch, meaning softswitch is contained in two boxes with a redundant pair.  
The element managing box, is sync'ed via NTP server and also acting as NTP server to the "slave boxes".

This was a twostep recovery, Flash-archive(flarcreate) and application as a normal GZ/tar thing.
However during Cd-rom boot (Solaris disk1) we bummed setting up the time. We set it up as CET, but we entered the time as CEST, so now we end up with an extra daylight savings hour, in other words we are 1 hour ahead in time.

We just thought wth - NTP will take care of this, and it will, but it takes ~ 16 hours to skew(right word else insert adjust) 1 hour.

If this was not our testsite, but in real life is there any other way to remedy this than:

Stop application and on SOLARIS level do a < date YYMMDDHHMSS

reboot necessary ?

Start application

Please note, that the application on the different boxes only allow 20 sec difference in between them.

Question by:stockhes
    LVL 10

    Accepted Solution

    on the "slaves"

    /etc/init.d/xntpd stop
    ntpdate <server>
    /etc/init.d/xntpd start

    ntpdate will set it even if far off, directly. however ntpd must not be running, when starting ntpd
    LVL 10

    Expert Comment

    oops... typo in my last sentence... must read

    ntpdate will set it even if far off, directly. however ntpd must not be running, when starting ntpdate
    LVL 8

    Author Comment

    Hi neteducation

    we did try something similar

    >/etc/init.d/xntp stop

    > cd /opt/BTSxntp/etc

    > check the server in ntp.conf

    >cd ../bin

    >./ntpdate (server IP address found from ntp.conf, ensure the IP address is
     input, command does not work for  hostname.)
    result is:
    14 Apr 23:30:23 ntpdate[29186]: step time server offset -1378.323763 sec
    root@slt6ssw1/opt/BTSxntp/bin #

    there is no :
    4 Jun 04:12:07 ntpdate[22555]: time reset (step) 1378.323763

    This is a "hardened" SOLARIS any impact ?

    We have no xntpd

    LVL 10

    Expert Comment

    the output looks good... did it set the time ?
    as you are not using ntpdate that comes with solaris... there are ntpdate's around that need an option (some sort of "force") if the ofset is to far off. if you do ntpdate without any parameters you'll find the syntax.
    LVL 8

    Author Comment

    Yes should be -b

    No avail
    LVL 8

    Author Comment

    Hi neteducation

    I'll award you the points, even if it did'nt help my specific case, but should do in a normal SOLARIS environment.

    However I obviously have proprietary solaris, so have to ask the supplier  

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now