Log file not getting updated


 
Thread Tools Search this Thread
Top Forums Programming Log file not getting updated
# 1  
Old 10-20-2008
Log file not getting updated

hi all, i'm a student and managing lab at my insti. there in one application in which log file has to be maintaine the number of bytes transferred and received. but after certain entries these two attributes stop getting updated and holds same values for rest of the session. This happens one time on running 15-20 times the appliccation. So, i am not sure what type of programming problem is this. I got a hold in the code but its too huge to start with. One more thing this problem gets regular after 3-4 hr and regularly can be reproduced. What kind of problem is this. Any suggestion will be very helpful....
# 2  
Old 10-20-2008
It sounds like some kind of progamming problem. Are you running out of disk space in the filesystem where the logfile lives? You should see errors about disk space.
Code:
cd /directory/to/logfile
df -b .

This shows the number of free bytes If it is a small number (<10000) you have a problem. YOu need to clean out unused files - move them off somewhere else or back them up to tape and then delete them.
# 3  
Old 10-20-2008
Maybe the logfile is getting updated but the application has reached steady state so receiving / sending rates remain the same.
Did you check out the mtime of the file?
# 4  
Old 10-21-2008
Hi jim, i used following command:
Quote:
[monti@blr ~]$ df -m /home/monti/log
Filesystem 1M-blocks Used Available Use% Mounted on
miacc:/export/home/monti/log
100827 62970 36849 64% /home/monti
/log

I think, there is enough disk space for a log file.

i'm not sure how to use mtime to find out logfile is getting updated. I have little idea abt mtime, with that i think, it'll print same value if its getting updated by some function or printing same value again and again.
# 5  
Old 10-21-2008
Code:
ls -lt

to see the mtime (second column from last).
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Log File updated time

hi can any one please help on below .im new to shell scrpting i need to write a shell script which will check particular log file is presented or not in specific location ,if yes how long it was not modified/not rolling ?if its not modified/log is not rolling script will have to send mail (9 Replies)
Discussion started by: 4Learning
9 Replies

2. Shell Programming and Scripting

How to find the any log which is not updated since particular date?

Hello, Iam running with one issue, since particular date looks like one of the script vanished from the system after restarting of the system. I dont know which scrit it was but definatelt there should be one. but might be some logs would be there which have not updated from that day. so... (2 Replies)
Discussion started by: ajju
2 Replies

3. Shell Programming and Scripting

Log search and mail it if the log is updated before 24 hours from the current time

Hi , We have around 22 logs , each has different entries. I have to automate this using shell script. The ideas which am sharing is given below 1) We use only TAIL -100 <location and name of the log> Command to check the logs. 2) We want to check whether the log was updated before 24... (13 Replies)
Discussion started by: Kalaihari
13 Replies

4. Shell Programming and Scripting

Is there any command to know what updated last in file?

Is there any command to know what updated last in file? (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

5. Shell Programming and Scripting

trying to check if the file is getting updated or not

#!/bin/sh #set -x Current_Date=`date +"%b %e"` Filepmdate=`ls -ltr /file/ | tail -5 | awk '{print $6,$7}'` if ; then echo " " exit 0 else echo "Log files are not updated please check" exit 0 fi done > sh -x l12.sh + + date +%b %e Current_Date=Aug... (2 Replies)
Discussion started by: arch12
2 Replies

6. Shell Programming and Scripting

Problem updated file with new entries

Hi, I have a file, fileA, that consists of two fields. Field 1 has an old object name, and field 2 has a new object name. I would like to search and replace a master file, FileB, by substituting the old object name (field 1 in fileA) with the new object name ( field 2 in fileA). FileA:... (16 Replies)
Discussion started by: pitccorp01
16 Replies

7. Shell Programming and Scripting

If File has been updated, do something??

Put this together from somewhere else on the forums, just modified it and added the loop. #!/bin/ksh localFile=$1 remoteFile=$2 #source FTP parameters . .ftp_put.cfg mylog=ftp_session.log echo "$(date "+%H:%M:%S") - Attempt to FTP $1 to $2" > $mylog machine="server1 server2... (5 Replies)
Discussion started by: cbo0485
5 Replies

8. UNIX for Dummies Questions & Answers

Find last updated file

Hi all, my problem is teh following: I need to move a file from a folder to another and I usually do it by the get command but in this case I have a list of file in the source folder and I have to select only the lust updated one. Ho to do this? All the files have the same name followed... (4 Replies)
Discussion started by: callimaco0082
4 Replies

9. Shell Programming and Scripting

Creating an updated file

Hi, I would like to define a script in order to update a file with the last updated records: I wrote : #!/bin/sh YEAR=$(date +%Y) MONTH=$(date +%m) DAY=$(date +%d) COMM=/usr/bin/comm for file in * ; do if ] ; then FILE=${DPSTY} UNIQUE=Unique_${FILE} ... (4 Replies)
Discussion started by: dbfree
4 Replies
Login or Register to Ask a Question