LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 04: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, 04: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: 332Reputation: 332Reputation: 332Reputation: 332
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, 06: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, 04:30 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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, 02: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, 10:22 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:21 PM
Weird filesystem behavior, please help. mvorlov Linux - General 5 04-20-2010 08:12 AM
Weird behavior!! surfer41 Linux - Networking 1 04-25-2006 08:53 AM
Weird behavior Bassy Linux - Software 2 10-20-2005 02:32 PM
Weird entries in log file KennyK Linux - Security 4 10-17-2003 09:28 PM


All times are GMT -5. The time now is 02:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration