SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

WHAT IS IT ?

nfstimesync - package for "sync" time on the nfs server and client without root privileges.

WHY SOMEBODY MAY NEED IT'S ?

Assume you home directory is nfs-mounted, and you use 'make' to build something.

If time on the nfs server and client out of sync (usually they are :(( )
make give a warning:

make: *** Warning: File xxx has modification time in the future ... make: *** Warning: Clock skew detected. Your build may be incomplete.

These messages make me nervous.

And it's really possible that build be incomplete or make enter endless loop rebuild files again and again.

The simplest solution is to syncronized nfs client and server times.

But ... sys admin is a person that should do it.

And if you working in the environment with a lot of computers and busy sys admins - almost sure time will be out of sync (Well, sourceforge servers are pretty syncronize, but everything else ? Ooops ... sourceforge servers out of sync too.)

What's now ?
Now you can use nfstimesync to your private time syncronization.

HOW IT WORKS ?

It's a library which wrap libc family of stat functions and utime function. Stat functions return information about file in the struct stat and wrapper will increment all times field to delta (NFS_CLIENT_TIME - NFS_SERVER_TIME).

And for utime time is decremented to this delta.

So, stat wrapper convert file times' to the "nfs client time" and utime convert it to the "nfs server time".

USAGE.

Just set following environment variables:

LD_PRELOAD - to the libnfstimesync.so location NTS_OFFSET - nfs_client_time - nfs_server_time (in seconds) NTS_DEVICE - nfs device (as in the st_dev entry in the stuct stat)

Instead of directly mess with environment variables you can put following lines in your startup scripts:

eval `ntssetup sh` # for /bin/sh (bash, ksh, etc) or
eval `ntssetup csh` # for /bin/csh (tcsh, etc)

And everything done.

One more way to use it:

nts <your command>

LICENSE.

Library distributed under LGPL.
Program - under GPL license

BUG REPORT.

You can report bugs and / or suggestions to <valery_reznic@users.sourceforge.net>


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.