Operating System - HP-UX
1833873 Members
1801 Online
110063 Solutions
New Discussion

Re: Don´t show me hour when creating file in filesystem mounted NFS

 
SOLVED
Go to solution

Don´t show me hour when creating file in filesystem mounted NFS

Hi,

I have a problem, when I created(way touch, vi and cat) one file in the filesystem mounted way NFS, don´t show me the hour the file created.

Note: This filesystem is mounted way NFS of the one NAS.

Thanks.

Claudemir.
11 REPLIES 11
Patrick Wallek
Honored Contributor
Solution

Re: Don´t show me hour when creating file in filesystem mounted NFS

What does it show? An 'ls -l' listing of the file would be helpful.

Other information that would be helpful: HP-UX version, NFS version, tcp or udp

Do you have the latest NFS patches for whatever version of HP-UX you are using?

Re: Don´t show me hour when creating file in filesystem mounted NFS

I attached the file with the information request. ;o)

tks
A. Clay Stephenson
Acclaimed Contributor

Re: Don´t show me hour when creating file in filesystem mounted NFS

Note that your ls -l display would be perfectly normal if the system date were somehow off. Post the output of the date command and the output of "locale LC_TIME".
If it ain't broke, I can fix that.

Re: Don´t show me hour when creating file in filesystem mounted NFS

The output is:

sgfho02:/prodbrt# date
Tue Apr 17 18:15:42 SAT 2007
sgfho02:/prodbrt# locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_MESSAGES="C"
LC_ALL=


This is correct?
A. Clay Stephenson
Acclaimed Contributor

Re: Don´t show me hour when creating file in filesystem mounted NFS

Okay, let's determine if this is an ls problem or something more fundamental such as the stat() system call returning bogus data.

perl -e '$a = (stat("/xxx/yyy/filename")) [9]; print scalar localtime($a),"\n";'

This will print the modification time of file /xxx/yyy/filename in the same format as the date command.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: Don´t show me hour when creating file in filesystem mounted NFS

What type of NAS system is the NFS share exported from? What OS does it run?

Re: Don´t show me hour when creating file in filesystem mounted NFS

Stephenson,

okay, take a look in the output command line:
sgfho02:/home/root# perl -e '$a = (stat("/xxx/yyy/filename")) [9]; print scalar localtime($a),"\n";'

Wed Dec 31 21:00:00 1969

thanks a lot of

C.
A. Clay Stephenson
Acclaimed Contributor

Re: Don´t show me hour when creating file in filesystem mounted NFS

Earth to Claudemir:

Replace "/xxx/yyy/filename" with one of your NFS mounted files. For comparison, I would also try one of your local files.
If it ain't broke, I can fix that.
Sandman!
Honored Contributor

Re: Don´t show me hour when creating file in filesystem mounted NFS

Is this localized only to that particular NFS mountpoint? What happens when you create a file similarly on a local filesystem?

Re: Don´t show me hour when creating file in filesystem mounted NFS

Stepheson,

I´m so sorry....I am sleeping (heheeh)...

sgfho02:/prodbrt# perl -e '$a = (stat("/prodbrt/trash1"))[9]; print scalar localtime($a),"\n";'

Tue Apr 17 22:08:26 2007


thanks.


Sandman,

In filesystem /tmp show me hour when I created file, for i.e.

C.
A. Clay Stephenson
Acclaimed Contributor

Re: Don´t show me hour when creating file in filesystem mounted NFS

OK, something appears strange to me. When I had you run the date command earlier and I compare it to the Perl display of the files mtime, it seems (and doing a little math about the times of postings) that you have created a file newer than the system time. ls -l is behaving exactly right. This was pilot error and the "problem" will magically "fix" itself when the system time catches up with your file's modification time.

This could also be caused if the NFS server and client are not running NTP and the times are not in sync. It is vital that these systems synchronize their times (even if running in different timezones because the systems keep time in seconds since 00:00:00 1-Jan-1970 UTC) or chaotic behavior will result.

It appears that my original hypothesis was correct.
If it ain't broke, I can fix that.