How to read a fast written log file at Real time speed?
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 characters.
I have tried using tail -F, but it always lags behind the speed at which the file is being written.
Could you suggest anything else I can use to read the file line by line quickly at Realtime speed ?
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)
Hello,
I have a Apache webserver running on RedHat. Its primary function is a proxy server for users accessing the internet. I have a transaction log that logs every transactions of every users. For users trying to access certain sites/content the transactions goes into a 302 redirect loop and... (2 Replies)
Hi,
I'm trying to figure out the best solution to the following problem, and I'm not
yet that much experienced like you. :-)
Basically I have to read a fairly large file, composed of "messages" , in order
to display all of them through an user interface (made with QT).
The messages that... (3 Replies)
I analysed disk performance with blktrace and get some data:
read:
8,3 4 2141 2.882115217 3342 Q R 195732187 + 32
8,3 4 2142 2.882116411 3342 G R 195732187 + 32
8,3 4 2144 2.882117647 3342 I R 195732187 + 32
8,3 4 2145 ... (1 Reply)
The following is a piece of code to rename LOG_FILE_NEW to LOG_FILE once you get a result (either RUNNING or SHUTDOWN)
RESULT=""
sleep 30
while ; do
sleep 10
RESULT=`sed -n '/RUNNING/'p ${LOG_FILE_NEW}`
if ; then
RESULT=`sed -n '/SHUTTING_DOWN/'p ${LOG_FILE_NEW}`
fi
done
mv... (3 Replies)
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)
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)
Hi,
I have a log file that gets updated every second. Currently the size has grown to 20+ GB. I need to have a command/script, that will try to get the actual size of the file and will remove 50% of the data that are in the log file. I don't mind removing the data as the size has grown to huge... (8 Replies)
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
uugetty
uugetty(1M)uugetty(1M)NAME
uugetty - set terminal type, modes, speed and line discipline
SYNOPSIS
timeout] line [speed [type [linedisc]]]
file
DESCRIPTION
The commands, including are targeted for removal from HP-UX; see the below.
sets terminal type, modes, speed and line discipline. It is similar to except that supports using the line in both directions (see
getty(1M)). This allows users to log in, but, if the line is free, and can dial out (see uucico(1), cu(1), and ct(1)). When devices are
used with and lock files are created. Therefore, when the call to returns (see open(2)) (or the first character is read when the option is
used), the status of the lock files indicates whether the line is used by or someone trying to log in. See getty(1M) for more information.
Note that with the option, several carriage-return characters might be required before the login message is output. When is trying to log
in, it can be instructed to enter numerous carriage-return characters with the following login script:
where ... represents whatever would normally be used for the login sequence.
An entry for an intelligent modem or direct line that has a on each end must use the option (this causes uugetty to wait to read a charac-
ter before it enters the login message, thus preventing two instances of from looping). If there is a on one end of a direct line, there
must be a on the other end as well.
EXAMPLES
The following line is an entry using on an intelligent modem or direct line:
WARNINGS
Use of commands, including is discouraged because they are targeted for removal from HP-UX. Use ftp(1) or rcp(1) instead.
does not work when is used with an intelligent modem such as a Penril or a Ventel.
FILES SEE ALSO ct(1), cu(1), login(1), uucico(1M), getty(1M), init(1M), ioctl(2), gettydefs(4), inittab(4), tty(7).
Tim O'Reilly and Grace Todino,
O'Reilly & Associates, Inc. USA.
Grace Todino and Dale Dougherty,
O'Reilly & Associates, Inc. USA.
TO BE OBSOLETED uugetty(1M)