I met a strange problem on one cluster with 10 nodes.
On any node, any file operation makes the access/modification/change time of that file in the future that is 1min52s after the current system time obtained from date. That makes all make command cannot work correctly.
Following command are tested: touch X, echo 123456 > X, using utimes(X,NULL) and utime(X,NULL) with a C program. All of them can reproduce this problem.
Is there anyway to solve the problem? Thanks.
The usual way to address this is to synchronize the clocks on all of the machines to a common time reference using ntp (usually to a reliable time server). The NTP FAQ and HOWTO is a good place to start.
For most Linux servers, just installing the ntp package takes you halfway. You may need to customize the configuration file (usually /etc/ntp.conf), as well as enable the service for ntpd (the NTP daemon).
Related
I'm working on a remote machine and while installing a software, I've encountered the "clock skew detected” warning, and whole things fails. I've used the "find . -exec touch {} \;" to update the timestamp of files but it still fails, and more wired, the time stamp is still ahead of real time. Is there any method to let make ignore timestamp?
You don't specify exactly what "working on a remote machine" means, or how you're sharing files between the local and remote systems, but I'll assume that you're using NFS or some other remote partition mounting facility. In that case nothing you can do on your local system will help. You have to synchronize the clocks on the local and remote systems.
The timestamps applied to modified files in an NFS share are controlled by the NFS server, not by your local system. So when your local system modifies a file, the modification time is the server's current time not your local system's current time.
If the two systems' clocks are not synchronized, then tools like make which work based on file modification times cannot work properly.
I have a small single board computer which will be running a linux distribution and some programs and has specific user configuration, directory structure, permissions settings etc.
My question is, what is the best way to maintain the system configuration for release? In my time thinking about this problem I've thought of a few ideas but each has its downsides.
Configure the system and burn the image to an iso file for distribution
This one has the advantage that the system will be configured precisely the way I want it, but committing an iso file to a repository is less than desirable since it is quite large and checking out a new revision means reflashing the system.
Install a base OS (which is version locked) and write a shell script to configure the settings from scratch.
This one has the advantage that I could maintain the script in a repository and update and config changes by pulling changes to the script and running it again, however now I have to maintain a shell script to configure a system and its another place where something can go wrong.
I'm wondering what the best practices are in embedded in general so that I can maybe implement a good deployment and maintenance strategy.
Embeddded systems tend to have a long lifetime. Do not be surprised if you need to refer to something released today in ten years' time. Make an ISO of the whole setup, source code, diagrams, everything... and store it away redundantly. Someone will be glad you did a decade from now. Just pretend it's going to last forever and that you'll have to answer a question or research a defect in ten years.
So, I have a collection of Windows Server 2016 virtual machines that are used to run some tests in pairs. To perform these tests, I copy a selection of scripts and files from the network on to the machine, before performing the tests.
I'm basically using a selection of scripts that have existed around here since before my time and whilst i would like to use other methods, so much of our infrastructure relies on these scripts that overhauling the system would be a colossal task.
First up, i sort out the mapped drives with
net use X: \\network\location1 /user:domain\user password
net use Y: \\network\location2 /user:domain\user password
and so on
Soon after, i use rsync to copy files from a location in /cygdrive/y/somewhere to /cygdrive/c/somewhere_else
During the rsync, i will get errors that "files have vanished" (I'm currently unable to post the exact error, I will edit this later to include this). When i check what's currently in the /cygdrive directory, all i see is /cygdrive/c and everything else has disappeared.
I've tried making a symbolic link to /cygdrive/y in a different location, I've tried including persistent:yes on the net use command, I've changed the power settings on the network card to not sleep. None of these work.
I'm currently looking into the settings for the virtual machines themselves at this point, but I have some doubts as we have other virtual windows machines that do not seem to have this issue.
Has anyone has heard of anything similar and/or knows of a decent method to troubleshoot this?
Right, so I've been working on this all day and finally noticed a positive change, but since my systems are in VMware's vCloud, this may not work for some people. It's was simply a matter of having the VM turned off and upgrading the Virtual Hardware Version to the latest version. I have noticed with this though, that upon a restart, one of the first messages that comes up mentions that the computer is "disabling group policies".
I did a bit of research into this and found out that Windows 8 and 10 (no mention of any Windows Server machines) both automatically update Group Policies in the background, disconnecting and reconnecting mapped drives to recreate them.
It's possible that changing the Group Policy drive from "recreate" to "update" should fix this issue, and that the Virtual Hardware update happened to resolve this in a similar manner.
I need to verify that a whole bunch of computers are within 50ms of ntp or nist time. Currently some are windows some are linux, and the windows machines are syncing with a domain controller that is pointed to ntp time, and each linux server is synced to a ntp pool server. Time does not seem to be a problem, but I need to prove it.
Any suggestions on methods to do this? I was hoping ntpd had some sort of logging capability, and that I could direct clients to query it and it then record the drift. I'd prefer it didn't act as authoritative time server, but just as a record keeper.
You could use a script to capture the values from ntpq and graph them in MRTG with RRD Tool.
The image below is taken from one of my Linux boxes - is that the sort of thing you are after? If you can provide some more info, and what OS the boxes you want to monitor are using I'll see if I can point you in the direction of the script I used, and provide some MRTG & RRD specific configs. My setup works on linux boxes only at the moment - and I've not had time to do any testing with Windows etc. If you where to adapt my solution to windows it would almost certainly require ntpd & ntpq rather than the standard Windows time client (as I don't believe you can get the sort of data you need from it).
Within ntpd.conf you can also enable statistics loopstats which will log data. You should check the ntpd documentation here for more info.
I am experiencing a very strange behavior with oracle, maybe somebody can help me, let me summarize it real quick:
My OS of choice is debian linux, I am using Oracle XE 11.0.2.0. On linux startup, I run a script file which is located under /etc/init.d/. I added the following line to make oracle start on system start:
/etc/init.d/oracle-xe start
Right after this line , I run my application from the script, my application heavily relies on the oracle db, therefore once oracle starts, I am positive that my application will run ok. Unfortunately my assumption seems wrong.Here's why: I set up similar set up in 3 machines, in 2 of them I see weird behavior, after system start oracle db is not responding to connection requests, Even though oracle-xe start command completed executing.
My observation is the following, if I run my application right after oracle-xe start is executed, I receive ora-12505 errors at least for a minute: "TNS listener does not currently know of SID" . After a minute everything stabilizes, and my application starts working ok. 1 minute without a db on system startup is not acceptable for me performance-wise, therefore I am trying to solve this problem.
Surprisingly it does not happen in one of the other linux boxes I have here, I am not quite sure what is different on that box. I compared ora files, but couldn't find any difference, it seems like a wild goose chase...
I would be so grateful if anybody has experienced and solved ths problem before and shares that valuable solution with me.
I think I found the problem, looks like I am starting oracle-xe instance before I assign network interfaces an IP address, in that case it takes some time for oracle to receive connections, that requires me to set static ip on the linux boxes, which is something I don't want. Is there a solution so that I can still assign IP addresses later on?