Sponsored Content
Full Discussion: Time synch monitoring
Top Forums Shell Programming and Scripting Time synch monitoring Post 302988351 by jim mcnamara on Saturday 24th of December 2016 09:42:17 AM
Old 12-24-2016
stomp's approach is also valid for a lot of situations. In all cases you still need to tell us what you want.

You have three valid answers depending on context.
 

8 More Discussions You Might Find Interesting

1. HP-UX

Scripts for monitoring real time for the error code

Hi ! I wish extract one information(error code) from the machine which is running on the HP-UX platform. Can anyone help me? Wanted to write a scripts that monitor real time at the error code and transfer the information out from the machine. The information is then process and SMS out to the... (9 Replies)
Discussion started by: JOHNSON
9 Replies

2. Shell Programming and Scripting

Monitoring system available time

Hi, I am new to Unix. I have an application which i need to monitor it for the available system time. If the system is down, i need to send an email notifying the downtime. Can someone provide a sample code or shell script to perform the above activity. Thanks (3 Replies)
Discussion started by: borncrazy
3 Replies

3. Shell Programming and Scripting

Synch only directory sturcture- Help

Hi All, I am trying to synchronize two folders(test and test1) using rsync. "test" has some sub folders and all of the have some files also. I just want to sync the directory structure not the files in the first folder with the second. i tried the following script. rsync -av --include '*/'... (5 Replies)
Discussion started by: Tuxidow
5 Replies

4. Shell Programming and Scripting

How to stop monitoring of servers at the time of reboot through shell scripting?

We have number of servers which belongs to platforms Solaris, AIX,HP-UX and LINUX. Monitoring tool 'Patrol Agent' process run on the servers to check for the server health and communicate with the Patrol server through the port 5181. During scheduled reboot and maintenance of servers we do receive... (1 Reply)
Discussion started by: subharai
1 Replies

5. Shell Programming and Scripting

Monitoring a users log in time?

how do i start with this guys? Sample run: $ LOGTIME it2015678 <enter> User it2015678 is CRUZ Tommy H And has logged on to the system for: 8 hours 12 minutes from the time this script was run. (1 Reply)
Discussion started by: skypigeon
1 Replies

6. Shell Programming and Scripting

how to synch 2 processes to start at the same time

Hey Excuse me if this question is repeated everywhere but I am still new with scripting and I couldn't apply what I found to my case :confused::confused: I am trying to run a rec process on a ssh client and at the same time play a file from my computer so i tried this #!/bin/bash echo... (3 Replies)
Discussion started by: Antaha
3 Replies

7. Shell Programming and Scripting

Process monitoring for a fixed time

Hi Gurus, I have a scenario where i need to monitor for a process which starts at a particular time. I need to check if the process has started at the specified time and keep checking this for 5 minutes only and then want to alert me. ps -ef | grep -i process.sh | grep -v grep >... (5 Replies)
Discussion started by: jayadanabalan
5 Replies

8. Red Hat

NTPD service restart and time synch

I am using ntpd service to sync our RHEL 5.9 system to synch with GPS clock. When I change the RHEL system time more than 7 seconds than the present system time (through "Datetime" command), ntpd service does not adjust the system time to the present GPS time.But if the time is with in 7 seconds,... (6 Replies)
Discussion started by: Anjan Ganguly
6 Replies
setclock(3)						     Library Functions Manual						       setclock(3)

NAME
setclock - Sets value of system-wide clock LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/timers.h> int setclock( int clktyp, struct timespec *val) ; PARAMETERS
Specifies a system-wide clock whose symbolic name must be TIMEOFDAY. Points to the location where the value of the time to set into the clock specified by the clktyp parameter is stored. DESCRIPTION
The setclock() function sets a time value into the system-wide clock whose symbolic name is specified by the clktyp parameter, which must be TIMEOFDAY, defined in the sys/timers.h header file. The source of the current value of time set into the system-wide time-of-day clock by this function is stored in space reserved by a type timespec structure pointed to by the val parameter. This time information is the amount of time since the epoch. The epoch is referenced to 00:00:00 GMT (Greenwich Mean Time) 1 Jan 1970. The timespec structure, which is also defined in the sys/timers.h header file has the fol- lowing members: unsigned long tv_sec Time of day since the epoch in seconds. long tv_nsec Time of day fraction of a second (expressed in nanoseconds). NOTES
Trial use RETURN VALUES
Upon successful completion, the setclock() function returns a value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
If the setclock() function fails, errno may be set to one of the following values: The clktyp parameter does not specify a known system- wide clock, the information pointed to by the val parameter is outside the permissible range for the clock specified by the clktyp parame- ter, or a nanosecond value less than zero or greater than or equal to 1000 million is specified by the information pointed to by the val parameter. An error occurred while accessing the clock specified by the clktyp parameter. The requesting process does not have the appro- priate privilege to set the clock specified by the clktyp parameter. RELATED INFORMATION
Functions: getclock(3), gettimer(3), time(3) delim off setclock(3)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy