Sponsored Content
Full Discussion: Script to adjust system time
Top Forums Shell Programming and Scripting Script to adjust system time Post 302500077 by methyl on Saturday 26th of February 2011 06:50:29 PM
Old 02-26-2011
It is not advisible to change the system time in the manner proposed in post #1. Hard setting the date/time should only be done in single user mode armed with full knowledge of the effects on programs such as System Accounting and any Database Engines you may have.

What are you trying to do? We seem to have a proposed solution without knowing the problem.

If your system clock is a little bit fast, there should be a clock drift function (see "man date"). Or if you have access to a Time Server, use NTP as ctsgnb advises.

(Post drafted before seeing post #4). There has to be a better way which does not involve messing with the system clock.

Last edited by methyl; 02-26-2011 at 07:57 PM..
This User Gave Thanks to methyl For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adjust the db script

Enclosing a script that is used everyday for database shutdown. In here you will find some code that checks oracle version. That part is very unnecessary since we use only 8.1.7 and will never go back.. Can anyone help me by modifying the code, to never use that part and readjust so script does... (1 Reply)
Discussion started by: ST2000
1 Replies

2. Shell Programming and Scripting

How to adjust spacing

Is there a way to adjust spacing of a line using k shell? e.g I have a file below $ cat file1 AAA BBB CCC A B C AAAA BB CC I want each word to be adjusted with spaces to have 10 character length like below: AAA BBB CCC A B C AAAA BB CC Any... (4 Replies)
Discussion started by: stevefox
4 Replies

3. Shell Programming and Scripting

System time comparison to fixed defined time

I have a requirement of checking the current system time and performing certain actions in a shell script. example: if the current system time is greater than 1400 hrs, then perform step 1,2,3 if the current system time is greater than 1000 hrs, then perform step 1,2 if the current system time... (2 Replies)
Discussion started by: zainravi
2 Replies

4. Solaris

getting time independent of system time in solaries

i am using function gethrtime() in sun solaries to get the time independent of the system time.Problem with this function is if we restart the system time will change to '0'.is there any other way to resolve this problem. thanks & regards suresh (3 Replies)
Discussion started by: suresh_rtp
3 Replies

5. Shell Programming and Scripting

Script to adjust network settings

Hello, Newbie question on scripting - I'm looking to create a simple script that will work on RHEL5 that will adjust the network settings: ip address, default gateway, and subnet mask. If anything else needs to be done (service network stop / start) or should be done to make settings active - I... (4 Replies)
Discussion started by: rojizo
4 Replies

6. Solaris

can't adjust time : not owner

Hi experts, I m new to solaris. I am getting following errror in /var/adm/messages file on one of the solaris 10 zones - xntpd: Can't set time of day: Not owner xntpd daemon is online. Any help on this ? (3 Replies)
Discussion started by: sunadmin
3 Replies

7. Solaris

System time and Cron time stamp not matching

On Solaris 10 server the system date won't match with the timestamp on files created by a cron jobs, Please help here is what i get when i check for system date infodba-ie10ux014:/tcpdv1_ie10/tcadmin/bin\n\r-> date Tue Apr 24 15:27:43 GMT 2012at same time i executed a cron job, and checked... (4 Replies)
Discussion started by: karghum
4 Replies

8. Shell Programming and Scripting

what would a script include to find CPU's %system time high and user time high?

Hi , I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( . how to find cpu's system high time and user time high in a script?? thanks , help would be appreciated ! :) (9 Replies)
Discussion started by: sushwey
9 Replies

9. Shell Programming and Scripting

Additional time to system time

Hi All, Is there any command to add additional time to date command. I need to add 5 hours to the present system time. I am getting the time by using date command. WORKFLOW_START_TIME=`date +%m/%d/%Y\ %H:%M:%S` Thanks (8 Replies)
Discussion started by: nag_sathi
8 Replies

10. Linux

Time: Hwclock and System Time

Hey everyone. Upon studying linux trying to learn it inside and out, I'm reading about the issue of time. Hardware clock time vs the more commonly referenced System Time. What causes the two to grow apart, and what causes the time itself to stray away from UTC? at present my clock is a second and... (1 Reply)
Discussion started by: Lost in Cyberia
1 Replies
sys_attrs_autofs(5)						File Formats Manual					       sys_attrs_autofs(5)

NAME
sys_attrs_autofs - autofs subsystem attributes DESCRIPTION
This reference page lists and describes attributes for the AutoFS (autofs) kernel subsystem. Refer to the sys_attrs(5) reference page for an introduction to the topic of kernel subsystem attributes. Specifies the duration (in seconds) that a file system is to remain mounted when not in use. This is analogous to the automount com- mand's -tl option. Default value: 300 (seconds) Minimum value: 1 Maximum value: 100000000 Specifies the interval (in seconds) between attempts to unmount file systems that have exceeded their idle_timeout limit. This is analogous to the automount command's -tw option. Default value: 60 (seconds) Minimum value: 1 Maximum value: 100000000 Specifies the duration (in seconds) for which a mount failure is cached, preventing a retry of the mount during this time. Default value: 30 (seconds) Minimum value: 0 Maximum value: 100000000 Specifies the maximum amount of time (in seconds) a process waits for an auto-mounted file system or subtree to become available. Default value: 120 (seconds) Minimum value: 1 Maximum value: 100000000 Specifies the amount of time (in seconds) the autofsd daemon waites for an individual NFS server to respond to a mount request. Default value: 30 (seconds) Minimum value: 0 Maximum value: 100000000 Specifies the size of the AutoFS hash table used to find all AutoFS directories and symlinks system-wide. The size is calculated at boot time based upon the value of max_vnodes. Default value: 32 (lists) Minimum value: 32 Maximum value: 8192 SEE ALSO
sys_attrs(5) System Configuration and Tuning sys_attrs_autofs(5)
All times are GMT -4. The time now is 05:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy