Server :: Synchronizing Server Time With Ntpdate Command In Cron?
Jul 14, 2011we are synchronizing server time with ntpdate command in cron.how often should it run?
View 3 Replieswe are synchronizing server time with ntpdate command in cron.how often should it run?
View 3 RepliesWhat is the right way to keep updated the time on a server? Using ntpd daemon or ntpdate by crontab? I've two server in two different locations.. I've used
Quote: # ntpdate ntp1.ien.it
on both server, and the two times were staggered by ten minutes. How is it possible?
I am trying to synchronize the time of a PC using NTP using a server on LAN. Both the PCs do not have internet. I have made changes to the /etc/ntp.conf file of both the server and client . But still on rebooting is shows Synchronizing with time server failed. I am attaching the ntp.conf file of both server and client.
View 13 Replies View RelatedI want to create 2 cron jobs daily
1st cron: Every day by 13(1pm) I want to stop the httpd service
2nd cron: Every day by 13:30(1.30pm) I want to start the httpd service
I tried but only 1 cron job can able to run at a time.
I have a very simple gawk script to add commas to numbers to make them more readable:
It works perfectly from the command line, but when run from cron it doesn't add the commas.
I want my server to automatically shutdown at 23:59 and startup at 8:00. The startup is handled through by bios but the shutdown is to be managed through cron. I thought I had this working, I actually swear I had it working because I thought the uptime command showed the appropriate uptime. I happened to be up and was streaming a movie from my server when at the time it should've shutdown it actually just restarted. If I run the shutdown -h now command by itself it works well but the scheduled command just restarts the server. Here is the what is shown when I enter crontab -e.
View 9 Replies View RelatedI have RHEL 5 joined to windows Domain and lately has been delaying in time like 20 - 30 mins off the domain controller. Any ideas why? It suddenly started this delays. I have to login and restart ntpd in order to sync and so users can login. Here is the output of ntpq -p:
[Code]....
I wonder is the * means that its syncing with itself? if yes how to make it to sync with my remote server dc1 (2nd line?)
I'm trying to synchronize a client with an ntpdate server. The ntp.conf file from the server has the following lines: # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
[Code]...
I have 16 linux servers that use /etc/hosts files to see and talk with each other. I'm adding servers to this pool of servers. It is required to do host resolution via the /etc/hosts files. DNS or NIS are not alternatives. Aside from manually editing each of the 16+ /etc/hosts files every time I add a server or editing one /etc/hosts file on one server then scp'ing it to all the other servers, is there anyway to edit the /etc/hosts on one server and "push" it onto the other servers that need the new /etc/hosts file?
Everywhere I've looked on the Net, there hasn't been any suggestion except for the options I mention here.
Or am I just whistling in the wind?
I can't update my ubuntu clock with my server. If i run the command ntpdate domain.local, it gives me this erro (no server suitable for synchronization found) if i run the command nslookup domain.local it works well and found my server
View 3 Replies View Relatedlogging in a server through putty in the same network when i executed last command its showing system ip logged in time and logged out time the output as followsthis is my system
oot pts1 xx.xx.xx day month date time in time out timeand similarly am geeting other than this likeroot :0day month date time still logged in this is from more than 3 days its logged in
i like to ask something regarding network time protocol.... if i use "ntpdate [URL]"..it shows the time synchronized with [URL]. but if i want to reset my time should i use 'ntpdate' only or another command?
View 1 Replies View RelatedIt seems to be simple one, but couldn't figure out exactly. Say I copy a file preserving its original modification time using the command
Code:
cp -p file1 file2
Now later, I want to know when file2 was copied... How do I find it ?
iam trying to sync file server data into backup server machine by command- rsync -avu path/of/data ipaddress-of-backup-server:/path/where/to/save after running it ask for root password and manually it is successful.but i want to make it automatic.for that i also tried cronjob and also generated authentication key but iam not successful in login automatically..anybody know how to authenticate root to login for storing data in backup server.
View 14 Replies View RelatedI am working on linux server with below specifications.Linux EDT 2008 i686 i686 i386 GNU/LinuxWhile checking the status of the server using the command 'opmnctl status' and when server is down the output is not getting redirected to file.I m using the command as,opmnctl status > abc.txt.
View 2 Replies View RelatedCan anyone tell me what command can be used so that the Linux Centos Server starts mysqld, httpd and ftpd services at boot time automatically?
View 2 Replies View RelatedI have a set of machines on a disconnected network. Periodically, one of the machines connects to the internet and synchronizes its time with a time server that is not known until the connection is established. (The machine queries a central command server for the address of the time server it should synchronize to.)
I then use a custom tool to do some calculations to call adjtimex() and adjust the clock so that it runs fairly accurately.
I know ntpd is supposed to be able to handle disconnected networks but I thought you had to preconfigure the servers in the configuration file.
My intent is to run ntpd on this machine (without configured "server"s) so that it can serve time to the internal network. (Periodic synchronization using ntpdate from the internal machine to the bridge machine.)
The problem: ntpd wants to fuss with the values I set using adjtimex(). I want it to quit thinking it needs to adjust the clock and just serve time to the internal network. (Maybe I have a GPS time source hooked directly to the machine!)
I have been able to find enough information that I need to enable 'time-udp' in /etc/xinetd.d/ But there isn't an entry for time-udp. How do I enable time-udp (Time of Day server) on a Red Hat system? It's RHEL 5.6 64bit.
View 1 Replies View RelatedI have 2 servers each one with a RAID and I want them mirror they data so if one of them goes down the other one take the job with out disruption. I've heard of multipath by I want to know it in detail or learn of more options.
View 2 Replies View RelatedI would like to connect to Linux Server remotely over LAN in graphical modeBut I need access for several users in real time. Everyone must have its own desktop.
View 2 Replies View RelatedI have been having trouble figuring this out. I have a machine running CentOS 5 and I want to setup an SMTP server behind a router on a home broadband connection. I've read many guides but nothing too specific as to what I need to do. I want to use either sendmail or postfix, but I don't know if I should purchase an SMTP relay. If anyone could point me in the right direction it would be great. I also have bought a domain name that I want to use, but I just cant put all these pieces together as of right now.
View 5 Replies View RelatedI have several file servers in our offices and I am relatively new to Ubuntu / Linux. I get notices that there are updates for the server software from time to time. Is it typical to update everything when available or should I follow "If it ain't broke, don't fix it..." mentality?I would hate for everything to be working fine and then have an update throw me a curve.
View 9 Replies View RelatedI want to make a cron job for my webserver, only it seems not to work...
I have now the followig to test (every 16th minute of the hour, write test to a file), but it doesn't show up. When I write out the cron, it is done to the file: /tmp/crontab.QXsBIO/crontab . How to make cron work? It must be very easy, but I have real troubles getting it fired up.
My Linux version is debian lenny and the cron file looks like (crontab -e):
(with trailing empty line at the end)
I have a cron job to run every 15 minutes. The cron job is running per /var/log/cron. It lists the job every 15 minutes.
[Code]...
I do not see any errors. I also looked in /var/log/messages for any errors and it does not list any. I added a line to the script that is running to send an email to me to see if it is running or not. When I run the script from the command line, the script runs without error and I get an email. I have searched and can not find what it going on. Is there some where else errors might be? Could there be a permission issue? The cron job is not being added by the root user.
Cron on one of my boxes isn't running and I failed to determine why.
Here are what I have found so far:
Password:
I have a crontab related question which I am hoping someone can answer. I recently took over a Redhat Enterprise 5 Server, and I was told by the previous Server Admin that there is a cron job that does the backups. I ran the following command to get a list of all users:
Code:
cat /etc/passwd | grep "/home" |cut -d: -f1
I then ran the following command for each of those users to see if they have any crontabs associated with them:
Code:
crontab -u USER -l
It doesn't show any crontab entries for any users (including root). But I am positive that there is a scheduled job somewhere because the backups are still running every night.
My question is how do I get a cron job to pick up the user's ~/.my.cnf? If the user runs the shell script, everything is fine. The cron entry has the same user run the job, and I've tried #!/bin/bash -l in the shell script with no success.
Here are the details:
I have a bash shell script that launches a Python program. The python program issues an external shell mysql -e command.
I don't want the python code to use use -u user-name -pMyPassword, db-name, because this is contained in ~/.my.cnf. The python code doesn't have to use these parameters if run interactively, but does have to if run from cron.
I am hosting two Virtual Servers both running Centos 5.3 on a host machine also running the same OS. The VM software in use is Xen, as supplied with the OS.The host machine's time and date is fine, however both Virtual Servers are running ahead of real time consitantly.Running /etc/init.d/ntpd restart will resolve the issue however one of these is running MailScanner and when the time suddenly goes backwards, sometimes by as much as an hour, it stops working properly.
View 1 Replies View RelatedTheres this php script which is to be run every 10 minutes :- php -q /var/www/extra/cron/cron.php
View 3 Replies View RelatedHow would I set a cron job to run every 7 minutes between 7pm and 11pm?
View 4 Replies View Related