Sponsored Content
Top Forums Shell Programming and Scripting Sync Solaris System Clock With PDC Using Cron Post 302387683 by jamba1 on Monday 18th of January 2010 02:34:34 AM
Old 01-18-2010
Sync Solaris System Clock With PDC Using Cron

Hi,

I currently use the ntpdate and date command to sync the internal clock source of my Solaris systems to the primary domain controller.


Code:
 
admin@myserver # ntpdate -d -u 192.168.???.???
14 Jan 17:42:02 ntpdate[929]: ntpdate 3-5.93e+sun 03/06/05 23:16:45 (1.4)
transmit(192.168.???.???)
receive(192.168.???.???)
transmit(192.168.???.???)
receive(192.168.???.???)
transmit(192.168.???.???)
receive(192.168.???.???)
transmit(192.168.???.???)
receive(192.168.???.???)
transmit(192.168.43.1)
server 192.168.???.???, port 123
stratum 1, precision -6, leap 00, trust 000
refid [LOCL], delay 0.04144, dispersion 0.00035
transmitted 4, in filter 4
reference time:    cef8b7b1.ac10624d  Thu, Jan 14 2010  7:20:49.672
originate timestamp: cef9493b.f4000000  Thu, Jan 14 2010 17:41:47.953
transmit timestamp:  cef9494a.90dee000  Thu, Jan 14 2010 17:42:02.565
filter delay:  0.04189  0.04146  0.04144  0.04146
                   0.00000  0.00000  0.00000  0.00000
filter offset: -14.6115 -14.6121 -14.6125 -14.6128
                   0.000000 0.000000 0.000000 0.000000
delay 0.04144, dispersion 0.00035
offset -14.612542
14 Jan 17:42:02 ntpdate[929]: step time server 192.168.???.??? offset -14.612542 sec


I then take the output of the offset and use the following to slowly sync

Code:
date -a -14.612542

Is it possible to run a .sh executable script that would combine both commands and take the offset value of the ntpdate command and automatically insert the value into the date -a command. I would then like to run in a cron.

Thanks in advance
 

10 More Discussions You Might Find Interesting

1. Solaris

cron sync

hi all , i have a E4900 server cluster that consists of 2 Servers (Cluster1 and cluster2 ) all of my crons are located under /var/spool/cron/crontabs . I am trying to put them on a shared place , so thati dont have to edit both crons on every system . thank you cheers (3 Replies)
Discussion started by: ppass
3 Replies

2. Solaris

How do I sync passwords between Samba and Solaris?

Hi, everyone. I have recently installed Samba version 3.0.23d on my Solaris 10 box. I am attempting to sync Samba's passwords with the UNIX passwords on the system. I read about using a pam module that is included with the samba tar called pam_smbpass.so. The instructions say to issue the make... (0 Replies)
Discussion started by: lazytech
0 Replies

3. AIX

AIX 5.3 12 Hour System Clock

Hello Everyone, I have a Domino application running on AIX 5.3 that does time conversions worldwide. It uses the operating system time as a reference for the conversion. My problem is that I need the AIX OS clock to be a 12 hour clock (AM/PM) rather than a 24 hour clock. I have tried the date... (2 Replies)
Discussion started by: RTwitchell
2 Replies

4. AIX

Sync AIX system time with Windows Domain Controller

Yeah so, I have setup a domain controller (windows 2003) active directory machine and it is managing couple of windows servers and workstation. I also have couple of AIX machines that need to have the same time as other windows server and workstation hanging off of that domain controller. Now... (1 Reply)
Discussion started by: murderfly
1 Replies

5. Solaris

R-sync for solaris?

Hi Gurus I ave a Prod,standby and DR server(All Sol 5.9) and i need to sync the Application running in prod,standby and DR. The Application vests in a filesystem(a directory) and syncing the directory would server my purpose. I came across rsync utility and am planning to implement it. But... (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies

6. Solaris

NTP time sync in Solaris 10

Ok, I have 4 production systems. There is one NTP server for all four systems. In each system there is one Solaris 10 box that points to that NTP server. All of the other machines in the system point to the Solaris 10 machine to get their time sync. All four Solaris 10 machines have essentially... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

7. Solaris

Solaris as PDC

Just wondering: Is it wise to have two OSOL boxes with one being a cifs kernel server and the other one a genuine samba & LDAP to serve as a PDC for the windows clients in the network? (5 Replies)
Discussion started by: PatrickBaer
5 Replies

8. SCO

System Clock running at half speed

SCO Openserver 6.0.0 had an issue with a NIC losing it's config on reboot. Netconfig would not allow "view protocol" and apparently zeroed out the existing IP info. Repaired from console. After this event, however, the system clock seems to lose 30 seconds for every RTC minute that passes. As a... (1 Reply)
Discussion started by: DoublePanic
1 Replies

9. Shell Programming and Scripting

cron: Clock generating

Hello. I would like to do this : A_VAR_FLAG = "ABCD" +------------+...................................+---------+ ...............................|.................|...................................|.............|... (7 Replies)
Discussion started by: jcdole
7 Replies

10. UNIX for Advanced & Expert Users

Xt timer call, XtAppAddTimeout, hangs on system clock jump backwards

Hi, I've got an issue which I've been 'google-fu'ing without much luck. We have a legacy program which has been plagued by an issue for a long time and I've been tasked to investigate/fix. The program uses XMotif2.1 (required due to dependency on an old GUI designer) and runs on a RHEL7... (4 Replies)
Discussion started by: altrefrain
4 Replies
tgt-setup-lun(8)					      System Manager's Manual						  tgt-setup-lun(8)

NAME
tgt-setup-lun - creates a target, adds a device to the target and defines initiators that can connect to the target SYNOPSIS
tgt-setup-lun -d device -n target_name [initiator_IP1 initiator_IP2 ...] [-h] DESCRIPTION
Starts tgtd if necessary and creates a target according to the supplied target_name. The format of the target name is as follows: iqn.2001-04.com.<hostname>-<target_name> The target name must be unique. The script then adds the requested device to the target. If specific IP addresses are defined, it adds them to the list of allowed initia- tors for that target. If no IP addresses is defined, it defines that the target accepts any initiator. EXAMPLES
Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81: tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81 and 192.168.10.82: tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 192.168.10.82 Create a target that uses /dev/sdb1 and allows connections from any initiator: tgt-setup-lun -d /dev/sdb1 -n my_target Display help: tgt-setup-lun -h AUTHOR
Written by Erez Zilber REPORTING BUGS
Report bugs to <erezz@voltaire.com>. COPYRIGHT
Copyright (C) Voltaire Ltd. 2008. tgt-setup-lun(8)
All times are GMT -4. The time now is 04:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy