LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-10-2011, 03:44 AM   #1
JTS911
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Rep: Reputation: 0
Smile weird behavior of log file


Hi All

This is my first post ;-)

I have a VERY weird log file behavior.

1) When I cat the file I can see all info inside. (to current time)
2) When I tail the file (tail -f ) I don't see the end of the file. Last info inside the file is a few days/hour old.
3) But if I do a ls -l it has the current date/time (file is being updated)
4) When I VI the file I cant go to the end of the file and get this message just as I open the file "file.log [noeol] 2444996L, 190001152C "


I have restarted the process and it fixes it for a while, but hen start acting like this again.

I cant restart the linux server as its in production (probably only in 2 weeks )

Any idea what it could be ? All other log files seems ok

Thanks
C
 
Old 10-10-2011, 03:58 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Has the log file been rotated? If so, the 'tail -f' may be following the old file. In that case, use 'tail -F' (capital 'F') or '--follow=name' to track the file by name not descripter.
 
Old 10-10-2011, 05:39 AM   #3
JTS911
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Original Poster
Rep: Reputation: 0
hi macemoneta

No it did not rotate, but thanks for the -F switch :-)


Seems I wil just have to wait and do a reboot
 
Old 10-10-2011, 03:30 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Looks like buffering; all programs do this to some extent, and if the log file isn't being written to often, it (tail -f) can appear to be 'behind the curve'
Similarly, if the file is open and being written to, then it may well have 'noeol' = no end-of-line char.
Nothing to worry about.
According to the output, that's 2.4 million lines
 
Old 10-11-2011, 01:47 AM   #5
JTS911
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Original Poster
Rep: Reputation: 0
Hi thanks for the reply's I found the problem, it was a mount point that was 100% full although a different process that was started up as root user could still write to same mount point. That lead me to believe it was an process/application issue.
 
Old 10-11-2011, 09:22 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
By default the ext3, ext4 Linux fs reserves 5% for use by root on each disk to help fix issues like this and to reduce fragmentation.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird behavior with grep - getting ^M in output when they are not in the file Stephanie Seney Programming 1 10-04-2011 12:21 PM
Weird filesystem behavior, please help. mvorlov Linux - General 5 04-20-2010 07:12 AM
Weird behavior!! surfer41 Linux - Networking 1 04-25-2006 07:53 AM
Weird behavior Bassy Linux - Software 2 10-20-2005 01:32 PM
Weird entries in log file KennyK Linux - Security 4 10-17-2003 08:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration