06-27-2014
May be hard to execute any kind of cleanup with new data added every second.
One theory for cleanup...
determine the line count, assuming each update is on its own line
divide that number in half
use a tail command to copy the 2nd half of the list to a new file
then copy it back to the original filename
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi....
how i can configurator a log file on real time....on unix solaris....
thanks a lot....
Best Regards... (3 Replies)
Discussion started by: chanfle
3 Replies
2. Shell Programming and Scripting
When I run "/etc/myApp" I am presented with continuous output, just about once per second.
However when I try to get the information in Perl via a piped open, it waits till the end to give me anything... my code:
open (OUTPUT,"/etc/myApp |");
while (<OUTPUT>){
print $_;
}... (2 Replies)
Discussion started by: jjinno
2 Replies
3. Shell Programming and Scripting
Hi all,
i would like to write the shell script program, it can monitor the access_log "real time"
when the access_log writing the line contain "abcdef" the program will be "COPY" this line into a file named "abcdef.txt", do the same thing if the contain "123456" "COPY" it into a file named... (3 Replies)
Discussion started by: eric_wong_ch
3 Replies
4. HP-UX
Hey all, I have a problem I was hoping to get some help on. So I have my two auditfiles, audfile1 and audfile2 that can be written to, I want to have the text version of them write to an NFS mount that I have set up. So i already know that i can do .secure/etc/audsp audfile1 > //nfsmount/folder/... (5 Replies)
Discussion started by: CleverRiver6
5 Replies
5. Shell Programming and Scripting
Hi people
I have a bash script with a line like this:
python example.py >> log &
But i can't see anything in the log file while python program is running only if the program ends seems to write the log file.
"$ cat log" for example don't show anything until the program ends.
Is there... (4 Replies)
Discussion started by: Tieso
4 Replies
6. UNIX for Advanced & Expert Users
Hello All,
I am building a real time parser for a log file in my application.
The log file is continuously written at a very fast pace and gets rolled over every 10 minutes.
I have measured the speed and observed that around 1000 lines are written to it every second, each line about 30-40... (7 Replies)
Discussion started by: cool.aquarian
7 Replies
7. Shell Programming and Scripting
Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below.
function log2syslog
{
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local1.notice -t bash -i -- "$USER:$COMMAND"
}
trap... (12 Replies)
Discussion started by: invinzin21
12 Replies
LEARN ABOUT HPUX
pthread_cleanup_push
pthread_cleanup_pop(3T) pthread_cleanup_pop(3T)
NAME
pthread_cleanup_pop(), pthread_cleanup_push() - remove or register a cancellation cleanup handler
SYNOPSIS
PARAMETERS
routine Routine registered as a cancellation cleanup handler.
arg Parameter to be passed to the cancellation cleanup handler
execute Indicates if the popped cancellation cleanup handler is to be executed.
DESCRIPTION
installs the cancellation cleanup handler routine onto the calling thread's cancellation cleanup stack. This handler will be popped from
the calling thread's cancellation cleanup stack and called with the arg parameter when any of the following occur:
(a) the thread calls or returns from its start routine.
(b) the thread acts upon a cancellation request.
(c) the thread calls with a non-zero execute argument.
When a thread terminates, it will execute each of the cancellation cleanup handlers on its cancellation cleanup stack. These handlers will
be popped and executed in the reverse order that they were installed (
removes the cancellation cleanup handler at the top of the calling thread's cancellation stack. If execute is non-zero, the cancellation
cleanup handler is called after it is removed from the cancellation stack. If execute is zero, the cancellation cleanup handler is simply
removed and will not be called.
and must appear as statements and in pairs within the same lexical scope. These functions may be macros which contain the opening '{' in
the push function and the closing '}' in the pop function.
Calling or is undefined if there have been any calls to or made without the matching call since the jump buffer was filled.
Calling or from inside a cancellation cleanup handler results in undefined behavior unless the corresponding or was also done inside the
cancellation cleanup handler.
RETURN VALUE
The and functions must be used as statements. They do not have return values or errors.
ERRORS
None.
WARNINGS
The functions and must be called in the same lexical scope or the result is undefined behavior.
AUTHOR
and were derived from the IEEE POSIX P1003.1c standard.
SEE ALSO
pthread_cancel(3T), pthread_setcancelstate(3T).
STANDARDS CONFORMANCE
Pthread Library pthread_cleanup_pop(3T)