04-12-2016
You can't force a running program to flush its internal buffers, close a file, and open a new file unless the code for that program was written with code to make that happen. Some system monitoring programs are designed to rotate log files when they receive a certain signal. The documentation for your system monitoring program should describe any such mechanism it provides. If your developer didn't provide such a mechanism and you need it to satisfy your users, file an enhancement request.
This User Gave Thanks to Don Cragun For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How can I kill mount connection(NFS , made by automount) if remote filesystem is down?
I tried:
fuser -ku /auto
/auto:
umount /auto
nfs umount: ERROR: /auto is busy
If I try cd /auto - I get - /auto: Stale remote file handle.
I know that reboot will help but I cannot reboot this... (2 Replies)
Discussion started by: kazimir
2 Replies
2. UNIX for Advanced & Expert Users
Hi, I get an error saying "Stale NFS file handle"
how can I solve this? Is it possible to do this with a umount/ mount command? (5 Replies)
Discussion started by: rein
5 Replies
3. Programming
All,
I am having three function
1.open
2.process
3.close.
Open will open a file and process will process a file and close will close the file ..
I can able to close the file by its filehandler.Is there is anyway that i can get the file name by filehandle and remove it after... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
4. Shell Programming and Scripting
I have a FILE a.txt which has the following data
113901.94,113901.94,56950.97,56950.97,NOT MATCHING,NOT MATCHING
10693.04,10693.04,5346.52,5346.52,NOT MATCHING,NOT MATCHING
1901.94,1901.94,550.97,550.97,NOT MATCHING,NOT MATCHING
103.04,103.04,53.52,53.52,NOT MATCHING,NOT MATCHING
#### This... (2 Replies)
Discussion started by: ksmbabu
2 Replies
5. UNIX for Dummies Questions & Answers
Hi
I am accessing a file on nfs mounted device, after completing using of the file, i am tring to restore the access time and modification times of the file.
So i got the previous modified time of the file using stat() function and trying to set the date and time for the file, To set these... (6 Replies)
Discussion started by: deepthi.s
6 Replies
6. Shell Programming and Scripting
Hi,
I want to write a shell script which handle an oracle alert log so that when it changes month, the script generates a new file with month in the filename.
Thanks in advance.
Leim (4 Replies)
Discussion started by: leim
4 Replies
7. Solaris
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
Discussion started by: kchinnam
12 Replies
8. Shell Programming and Scripting
Hi,
I'm using csh, grep, and awk to sum up the third field from a file.
Unfortunately, this results in a very large number and csh
creates a floating point value such as 3.11745e+06.
I was hoping to get 3117450.
I get this error when I run this portion of the csh script and I suspect the... (5 Replies)
Discussion started by: daffy
5 Replies
9. Shell Programming and Scripting
does any one know how to turn the equivalent of this command:
awk '/2011 John Doe 8344/,0' /tmp/ops.log | egrep -c "received request"
to
something that would use egrep instead of awk?
What the awk command does is, it searches the ops.log file for "2011 John Doe 8344". When it finds it,... (4 Replies)
Discussion started by: SkySmart
4 Replies
10. Red Hat
does anyone know how to force ssh/ssl to use the hosts file instead of DNS? I have disabled the DNS servers but ssh still will not resolve a host in the hosts file.
thanks in advance for the help!
DS (3 Replies)
Discussion started by: derrell simpson
3 Replies
LEARN ABOUT DEBIAN
logprn
logprn(1) logtools logprn(1)
NAME
logprn - merge Common-Log Format web logs based on time-stamps
SYNOPSIS
logprn logfile idle-time[:max-wait] command
DESCRIPTION
The logprn program is designed to print new data that is appended to log files. It will wait until a specified amount of time has elapsed
since the last write to the file before printing the data. It will print the data by pipeing it to a specified command. The command will
be run by popen(3) so the usual shell commands will operate (whether this is a bug or a feature is a matter of opinion).
OPTIONS
logfile
specifies a file to read data from. It should be a regular file not a pipe, device, or anything else.
idle-time
max-wait
command
EXIT STATUS
0 Never happens, this program will run forever.
1 Bad command-line parameters or couldn't stat the log file on startup - couldn't start the program.
2 File disappeared or became unreadable at run-time.
3 Can't run the specified command.
AUTHOR
This program, its manual page, and the Debian package were written by Russell Coker <russell@coker.com.au>.
BUGS
Uses popen (3) but I consider this a feature not a bug.
SEE ALSO
popen(3)
Russell Coker <russell@coker.com.au> 0.06 logprn(1)