How to check if my log file is growing properly?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to check if my log file is growing properly?
# 8  
Old 08-20-2014
Quote:
Originally Posted by jim mcnamara
Some considerations.

Most modern kernels maintain a memory cache of pages written to files. The dirty (changed or added data) pages get written to disk physically - when the system does a fflush (or equivalent) call. Which is not always RIGHT NOW. Also file mtime and atime updates may be deferred until the file descriptor is actually closed. All of this is kernel-dependent and depends what kind of file system is in use (plus mount options).
Depending on the application writing the log file there can also be stdio buffers inside the program that delay data written by functions like printf() being given to the kernel (by a write() or similar system call).

On POSIX- and UNIX-conforming filesystems, the timestamp updates can be delayed until all file descriptors for a given file in processes system-wide are closed, or any application (such as ls -l) performs a stat() (or similar) system call to get the status of that file, whichever comes first. Of course, some systems provide mount options to delay timestamp updates as a performance enhancing "feature" (even though this "feature" can break applications such as the one being discussed in this thread). But, this only applies to timestamps marked for update in the kernel; timestamps are not marked for update by functions like printf(), unless the underlying stdio buffer is flushed to the kernel.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Incremental extract from growing log file.

We have a log file which has 16 million row. We want to read all the lines appended from the last time we read using sed command sed -n '<START_LINE>,<LAST_LINE>p' abc.csv I can store this last line line so I can give replace that with START_LINE in my next read. The problem is wc -l which... (2 Replies)
Discussion started by: one2connect
2 Replies

2. Shell Programming and Scripting

Error check for copying growing directories

I have a simple script which copies directory from one place to another and deleting the source . I am facing a situation when new files gets added when the script has started running. Its resulting in data loss Please suggest a way to avoid data loss. I googled a lot but most are perl... (11 Replies)
Discussion started by: ningy
11 Replies

3. Shell Programming and Scripting

Check log file size every 10 minute. Alert if log not update

How to check log size every 10min. by script (can use crontab) if log size not change with alert "Log not update" Base run on SunOS 5.8 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise logFiles="log1.log log2.log" logLocation="/usr/home/test/log/" Out put. Tue Jan 31... (3 Replies)
Discussion started by: ooilinlove
3 Replies

4. UNIX for Dummies Questions & Answers

Find the file which is growing at high speed

Hi, A log file which is growing at high speed, don't know the name of it. How to find the respective file? Many thanks. (2 Replies)
Discussion started by: venkatesht
2 Replies

5. Solaris

Growing a file system-SVM

Hi gurus Im a newbie in solaris..I need to extend file system space in solaris 10 which is using SVM..I have a file system /pin02 which is 93% full n needs to be extended..only 3.6 gb avail space left..the file system is not mirrored...normal ufs file system only..can u please tel me t... (6 Replies)
Discussion started by: madanmeer
6 Replies

6. Shell Programming and Scripting

FTP check if file exists and log it

Hi, I need to create a script that checks if a file exists on an offsite server which only has ftp enabled. I was originally going to use perls Net::FTP class but the client does not have perl installed nor wants it. So, I have to use a shell script which logs into the server, then ... (1 Reply)
Discussion started by: gseyforth
1 Replies

7. HP-UX

how to redirect the growing contents of log file to another file in unix

how to redirect the growing contents of log file to another file in unix (2 Replies)
Discussion started by: megh
2 Replies

8. UNIX for Dummies Questions & Answers

Find out the maximum growing file in a mount

I need to find the file that is growing in the mount. Say yesterday the utilised space was 95% but today that is 96%. How do i find the file that is growing in size. Have checked the same with du/df options but was not able to find much. Please suggest the best possible option. (3 Replies)
Discussion started by: raman1605
3 Replies

9. UNIX for Dummies Questions & Answers

.osm file growing

my /etc/.osm file is growing rapidly and logging large amounts of activity. Can anyone tell me what this file is for and what types of information is logged in this file. Thanks in advance for your help!! (1 Reply)
Discussion started by: golfs4us
1 Replies

10. UNIX for Advanced & Expert Users

How to check a file in UNIX is closed or growing?

We have a third party tool in UNIX to kick off a 'file copy' job based on a file existance. If a specific file exists in an UNIX directory, another process should start copy the file into another system for further processing. The issue is, the copy job is starting as soon as the file exists in... (6 Replies)
Discussion started by: kslakshm
6 Replies
Login or Register to Ask a Question