Log's not updating as expected


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Log's not updating as expected
# 1  
Old 02-17-2016
Log's not updating as expected

hi guys,

so i have a number of log files of different applications, databases and systems.

im curious, what conclusions can i come to if the log file(s) of any application, database or system is not being updated at the regularly intervals it is known to?

what underlying possible problems could this be indicating??
# 2  
Old 02-18-2016
Well i would suspect there are no errors or warnings to log Smilie

You can check the log file with fuser or lsof and determine which process is keeping the file open.

Other then that, you will have to login to your app/db/system and determine what is going on and how it is configured to log.

There could be various reasons such as :
Missing disk space.
Files removed with rm while process is attached (you will not see the file anymore, but the process is still writing in it and taking up space until you restart it).
Inode exhaustion (rare on modern filesystems, limits are quite high).
Wrong files/log cleanup (badly configured logrotate and such).
etc.

What is 'expected log update?'. Can you elaborate on this ?
# 3  
Old 02-18-2016
Quote:
Originally Posted by Peasant
Well i would suspect there are no errors or warnings to log Smilie

You can check the log file with fuser or lsof and determine which process is keeping the file open.

Other then that, you will have to login to your app/db/system and determine what is going on and how it is configured to log.

There could be various reasons such as :
Missing disk space.
Files removed with rm while process is attached (you will not see the file anymore, but the process is still writing in it and taking up space until you restart it).
Inode exhaustion (rare on modern filesystems, limits are quite high).
Wrong files/log cleanup (badly configured logrotate and such).
etc.

What is 'expected log update?'. Can you elaborate on this ?

suppose you have a production server. and the /var/log/messages file typically gets updated quite frequently. but all of a sudden, its being updated now every 5 minutes, when before, hardly 30 seconds can go by without it being updated. what would this type of scenario be telling you?

and this is just an example. /var/log/messages can be any log file (application, database, network, system)
# 4  
Old 02-18-2016
Another possibility (although unusual for a process that is writing a log file as opposed to normal output from a short lived process) is that the process writing the log is using fully buffered (instead of line buffered) standard I/O buffering. (With fully buffered I/O, the program writing the log won't update the file until its internal buffer for that file is full. With a fully buffered file, the buffer is typically a multiple of 1024 bytes somewhere in the range of sizes from 1K to 32K bytes; but can be any size the process chooses.)
# 5  
Old 02-18-2016
when the log of an application, database, or system is not updating as it is known to or expected to given its history, here's what i was hoping you guys would be alluding to:

1. the application that normally logs to that log file is not functioning properly. it is sluggish and most likely to be crashing in the near future.

2. a new change has been applied to the application or database which has caused it to behave different. if you didn't make the change, then, u would want to know about this.

3. a hack attempt. someone hacked into the database, application, system and screwed around with it. this can be linked to 2.

4. a lack of activity could mean some part of a web site is not functioning right. i.e. page not loading, or taking too slow, causing users to give up.


hopefully, these can point you guys in the direction i was thinking. and i'm hoping you can add more or suggest other possible reasons.
# 6  
Old 02-18-2016
Quote:
Originally Posted by SkySmart
here's what i was hoping you guys would be alluding to:
All that is possible - plus a whole lot of ther things and their opposites in addition.

How are we supposed to anlyse your problem based on the vague "suppose i have something and it does something while previously it did something else". Perhaps the problem is - you guessed it: something! then again, maybe something else.

Describe your environment (applications, OS, versions, topology and whatever might be of influence) and then show some log files and what exactly changed.

You do not call a doctor (mind you, via phone) and ask him for a diagnose based on "i feel different today than i felt yesterday". You go there show to him where it hurts and let him examine.

Until you tell us some necessary information it is all wild guessing and conjecture. An because every guess is as good as any other as long there are no facts to measure it against, here is mine: when the moon is in the seventh house, and Jupiter aligns with Mars....

I hope this helps.

bakunin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Ubuntu

16.04 not updating

Just installed the latest version on my hp stream, was tired of windows. Of the few times I've used Linux, this is the first time it won't update. Im connected to the net the updater recognizes that the OS needs 21 updates. But it won't download/install the updates. It also won't load the... (1 Reply)
Discussion started by: DabblingMadman
1 Replies

2. Shell Programming and Scripting

Log file is not updating when I run shell scripts scheduled thru crontab

Hi Forum, Good Day! I have created an empty html file wtih permissoin 777 created shell script(with permission 777) , code is below. #=======================start============== . /data09/oracle/apps_st/appl/D_oraapp095.env rm -rf /home/mnp/Test_log.txt echo... (1 Reply)
Discussion started by: kartheekbk
1 Replies

3. Shell Programming and Scripting

prepend timestamp to continiously updating log file

Hi, I have a process which outputs to a log. Below is the code snippet: process &> $LOGFILE& The log file keeps on updating whenever a transaction is processed. The log file has a time stamp added so every time I kill the process and start the process a new log file is... (4 Replies)
Discussion started by: rajkumarme_1
4 Replies

4. UNIX for Dummies Questions & Answers

Updating a database

i've got a database setup that references user inputs to see if they are already inputted. What I am wanting to do is allow the user to update the database by typing "update: name" where name is someone already in the database. echo "Enter your name." read NAME location=`find . -name... (2 Replies)
Discussion started by: fufaso
2 Replies

5. Red Hat

/var/log/messages and secure not updating

Hello all, I recently deleted some lines from the messages and secure files, in /var/log and now they are not keeping a log anymore. The last update shows the date of when I deleted the lines. I had to delete some failed login attempts to stop denyhosts from blocking the ips (probably not the... (3 Replies)
Discussion started by: z1dane
3 Replies

6. UNIX for Advanced & Expert Users

/var/log/maillog isn't updating. Postfix related

can someone please help me figure how i can get maillog to start updating again? it just all of a sudden stopped. and postfix isn't writing to it anymore. I'm running a Ubuntu box 8.04 thanks (2 Replies)
Discussion started by: SkySmart
2 Replies

7. Shell Programming and Scripting

awk updating one file with another, comparing, updating

Hello, I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^ Here is what I'm trying to achieve : file1: test filea 3495; test fileb 4578; test filec 7689; test filey 9978; test filez 12300; file2: test filea... (11 Replies)
Discussion started by: mecano
11 Replies

8. Shell Programming and Scripting

TO know whether file is updating or not

Hi All, I am new to scripting. my requirement is , I want to know whether the file(i.e., log file) is updating or not. It should search for every 15 min. If it is not updating means it needs to send out a automatic mail. can you please help me in this. (2 Replies)
Discussion started by: raj333
2 Replies

9. UNIX for Dummies Questions & Answers

Constantly updating log files (tail -f? grep? awk?)

I have a log file which is continuously added to, called log.file. I'd like to monitor this file, and when certain lines are found, update some totals in another file. I've played around with tail -f, grep, and awk, but can't seem to hit the right note, so to speak. The lines I'm... (0 Replies)
Discussion started by: nortonloaf
0 Replies
Login or Register to Ask a Question