![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| parsing logfiles (performance issue) | subin_bala | Shell Programming and Scripting | 4 | 05-06-2008 02:35 AM |
| Logfiles E-mailed | deep_kol | Shell Programming and Scripting | 4 | 06-25-2007 05:51 PM |
| Output all commands to logfiles ??? | fawqati | UNIX for Advanced & Expert Users | 2 | 06-21-2006 04:47 AM |
| Controlling I/O | bionicfysh | Filesystems, Disks and Memory | 1 | 10-01-2003 01:23 AM |
| Logfiles | brahill | UNIX for Dummies Questions & Answers | 3 | 10-16-2000 03:37 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I support an app that outputs alert and audit messages to one log file (vendor says they can't be separated). The script that I have written takes a copy (mv cmd) of the file to do the separation and reformatting. I have a problem that I loose records (messages are being written constantly, upto 3+ a second) between doing the mv and touch command on the log file. What could I do to stop these records being missed? feed the output straight into a script? Can I name pipes (this should allow for the script to read one message at a time)? any ideas would be great. Easier the better.
|
|
||||
|
Sounds good....I would luv to turn it off and keep it off but it is in a 24x7 app and I would have to turn it off every 10 minutes in order to keep file size down (plus, it takes about 3-5mins to start and stop).
How do you become a UNIX Daemon? Who do I have to fight.....bring it on. |
|
|||||
|
How about a script that when fired up, counts the number of lines in the log (`wc -l`) and then starts at the first of the file and has it processes log entries it deletes the log entries until the line count of the log file has been reached?
That way, you process messages, reduce the size of the log, but will not miss any added log entries, and because you start with the initial count of the lines of the log, you won't miss new log entries. The only problem that I can think of is a situation where you delete and the app writes at the exact same time. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|