Sponsored Content
Full Discussion: Time synch monitoring
Top Forums Shell Programming and Scripting Time synch monitoring Post 302988224 by rbatte1 on Thursday 22nd of December 2016 04:57:55 AM
Old 12-22-2016
You can look at the last line of output from ntpdate -d which gives you the offset from the time servers defined either on the command line on in /etc/ntp.conf

Does that help?



Robin
 

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
clock_gettime(3)					     Library Functions Manual						  clock_gettime(3)

NAME
clock_gettime, clock_settime - Obtains or sets the time for the specified clock (P1003.1b) LIBRARY
Realtime Library (librt.so, librt.a) SYNOPSIS
#include <time.h> int clock_gettime ( clockid_t clock_id, struct timespec *tp); int clock_settime ( clockid_t clock_id, const struct timespec *tp); PARAMETERS
clock_id The clock type used to obtain the time for the clock that is set. The CLOCK_REALTIME clock is supported and represents the TIME-OF-DAY clock for the system. *tp A pointer to a timespec data structure. DESCRIPTION
The clock_gettime function returns the current time (in seconds and nanoseconds) for the specified clock. The clock_settime function sets the specified clock. The CLOCK_REALTIME clock measures the amount of time elapsed since 00:00:00:00 January 1, 1970 Greenwich Mean Time (GMT), otherwise known as the Epoch. Time values that fall between two non-negative integer multiples of the resolution are truncated down to the smaller multiple of the resolution. You must have superuser privileges to use the clock_settime function. RETURN VALUES
On a successful call to the clock_gettime or clock_settime functions, a value of 0 (zero) is returned. On an unsuccessful call, a value of -1 is returned and errno is set to indicate that an error occurred. ERRORS
The clock_gettime and clock_settime functions fail under the following conditions: [EINVAL] The clock_id argument does not specify a known clock. The value pointed to by the tp argument to the clock_settime function is outside the range for the given clock_id. The tp argument specified a nanosecond value less than zero or greater than or equal to 1000 million. [EPERM] The requesting process does not have the appropriate privilege to set the specified clock. RELATED INFORMATION
Functions: time(1), clock_getres(3), ctime(3), timer_gettime(3) Guide to Realtime Programming delim off clock_gettime(3)
All times are GMT -4. The time now is 09:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy