LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-16-2008, 10:43 AM   #1
s3ns4i
LQ Newbie
 
Registered: Jul 2008
Location: 127.0.0.1
Distribution: RedHat Enterprise
Posts: 12

Rep: Reputation: 0
Angry help with my tail -f problem


Hi guys/girls. I was wondering if anyone has see this issue I'm having on any of their Linux boxes. I'm running RedHat 7.1 on this box. The issue I'm having is when I use the tail -f filename it will not follow the file and stops halfway through reading the file. This is while going through a ssh connection. I can read the file just fine using the more or cat command and the file is not larger than 2gigs. It does this on all log files on the box. Any help or tips to help me solve this issue would be greatly appreciated.

Thanks,

Edit: the program I'm using to do the logging is working fine on all of my other 10 boxes running the same version of RedHat. Thanks again for any help.

Sensai

Last edited by s3ns4i; 07-16-2008 at 10:47 AM.
 
Old 07-16-2008, 10:55 AM   #2
pruneau
Member
 
Registered: Jul 2008
Location: Montreal
Distribution: Debian/Fedora/RHEL
Posts: 45

Rep: Reputation: 15
Could you give some precisions: when the tail hangs, are you sure it's a tail problem, or is the connections simply hanging ? Try to assess this by pressing ctrl-c and see if you get back to the prompt.
Otherwise, it could be a classical problem of log rotation: i.e. when you tail a file, and it's being rotated by some utility (like logrotate), then it changes name, and tail of course loses the trail, if you excuse the bad pun.
You could try and diagnose the problem by creating a debug log file of your doing by using a bash while() loop or a command like "iostat -k 10 > yourfile", and "tail -f yourfile" to see whether this is a general bug of tail.
Now, of course, one has to ask why you are using such an old distribution ?
 
Old 07-16-2008, 11:13 AM   #3
s3ns4i
LQ Newbie
 
Registered: Jul 2008
Location: 127.0.0.1
Distribution: RedHat Enterprise
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for your quick reply. I'm unable to upgrade because these are production machines and we are unable to upgrade at the moment. It seems that after further looking into the issue, that problem is indeed the log rotate issue. I have it working again now, again thanks for your help.

Last edited by s3ns4i; 07-16-2008 at 11:31 AM.
 
  


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
using pipe with tail -f mfofo Linux - Newbie 5 07-11-2008 01:53 PM
How to make newer "tail" behave like older "tail" rylan76 Linux - Software 4 12-07-2007 05:27 AM
Root-tail problem freelancer1766 Linux - Newbie 4 04-25-2005 07:54 PM
root-tail help! perry Linux - Software 3 07-25-2004 05:35 PM
tail -f dcoder Programming 8 09-01-2003 09:41 PM


All times are GMT -5. The time now is 10:19 PM.

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