Sponsored Content
Top Forums Shell Programming and Scripting Continiously monitor the log file Post 302568376 by arumon on Thursday 27th of October 2011 07:02:05 AM
Old 10-27-2011
Thanks rcdwayx :-)

Have some doubts on this.

1. As this new monitor.log file will have all time entries and the cron job will execute every 5 sec, I think this will send the old error messages again and again.
2. Also i need to avoid the same erros to be send frequently if it is happening continiously.

Please help me.

Regards,
Arumon
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash tail monitor log file

Hi there, I have a problem here that involves bash script since I was noob in that field. Recently, I have to monitor data involve in logs so I just run command tail -f for the monitoring. The logs was generate every hour so I need to quickly change my logs every time the new hour hits according... (2 Replies)
Discussion started by: kriezo
2 Replies

2. Shell Programming and Scripting

Monitor log file and execute command

I would like to monitor a log file using a shell script and as soon as a line with a certain string in it appears I would like to run a program. I have been playing around with doing this using tail -f, but cannot get it to work. I found something similar here:... (1 Reply)
Discussion started by: danielsbrewer
1 Replies

3. Shell Programming and Scripting

Script to monitor the pattern in the log file

hi All, how to find a pattern in the log file & display the above and below line for example in the log file, i have many lines, whenever i search for "Category" it should display the above line with only few parameter like i want only the location name & department name Thu Jul 02 11:05:23... (2 Replies)
Discussion started by: rithick256
2 Replies

4. Shell Programming and Scripting

Monitor dynamic log file for a particular Error

Hi Folks, I need help in creating a script to monitor a continuously updating log for one particular error. If the the script finds the error it should send out an email. Thanks for all ur help (2 Replies)
Discussion started by: a12ka4
2 Replies

5. HP-UX

Script to monitor /var/opt/resmon/log/event.log file

AM in need of some plugin/script that can monitor HP-UX file "/var/opt/resmon/log/event.log" . Have written a scrip in sh shell that is working fine for syslog.log and mail.log as having standard format, have interrogated that to Nagios and is working as I required . But same script failed to... (3 Replies)
Discussion started by: Shirishlnx
3 Replies

6. Shell Programming and Scripting

How to monitor log file for a Error and generate the e-mail ( Please help)

This is my log file and this is live log. Any abnormal error other than following I need to generate the email. Log path : /DER/app/admin/ABC/bdump/erg.log Current log# 2 seq# 103046 mem# 0: /ora2/oradata/ABC/redo02a.log Current log# 2 seq# 103046 mem# 1:... (7 Replies)
Discussion started by: hishanms
7 Replies

7. Shell Programming and Scripting

Script to monitor log file

Hi, Have written a script to monitor linux non standard log file based on line numbers, so each check store $otalinenum .. then in next check after 10 minutes it compre the current_total_line_num > last_total_line_num then it will parse the log file from last_total_line_num to... (0 Replies)
Discussion started by: Shirishlnx
0 Replies

8. Shell Programming and Scripting

Monitor log file

Hi, I need to amend an existing ksh script so that it runs a process (stop weblogic) and in parallel needs to monitor a log file (startup.log) in the background for a certain string (e.g. unable to stop weblogic). If the string appears in the log i need to kill the stop weblogic process. ... (5 Replies)
Discussion started by: dholmaster
5 Replies

9. Shell Programming and Scripting

prepend timestamp to continiously updating log file

Hi, I have a process which outputs to a log. Below is the code snippet: process &> $LOGFILE& The log file keeps on updating whenever a transaction is processed. The log file has a time stamp added so every time I kill the process and start the process a new log file is... (4 Replies)
Discussion started by: rajkumarme_1
4 Replies

10. UNIX for Beginners Questions & Answers

How do I add a log file path to a vi file to monitor all the changes made to the file?

I'm curious to know how do I add an empty log file (test1.log) to an existing text file to monitor all the changes made to a.txt. Is this expression export PATH=$PATH:/home/test1.log right to be added to the text file a.txt? (5 Replies)
Discussion started by: TestKing
5 Replies
faxrunq(1)						       mgetty+sendfax manual							faxrunq(1)

NAME
faxrunq - send fax jobs queued by faxspool(1) SYNOPSIS
faxrunq DESCRIPTION
Run the fax queue set up by faxspool(1), try to send all faxes, record result, remove job and send notify mails. faxrunq looks for all the jobs queued by faxspool(1) to /var/spool/fax/outgoing/*. For each job in the queue, faxrunq tries to send it, using sendfax(8). If the send succeeds, the job is removed from the queue, and a "success" mail is sent to the originator of the spooled job. If the send fails, it's logged, and faxrunq proceeds to the next job. If the job fails five times "fatally", that is, not with a locked or engaged line, but with "NO CARRIER" (no fax machine, or line noise), the job is suspended, and the requestor gets a mail, telling him so. faxrunq can be run from the command line (but make sure the user doing this has write access to the modem device and to the fax queue, that is, usually this should be done by "fax" or "root"). In a production environment, it's more useful to start faxrunq from cron(8) in regu- lar intervals, like "run it every 5 minutes". See the cron(8) and/or crontab(1) man pages for this (which man page exists depends on your system). OPTIONS
-q Tells faxrunq to be quiet, that is, suppress all status messages. Error messages will still be printed. FILES
/var/spool/fax/outgoing/stop if this file exists, faxrunq (and faxrunqd) will do nothing. You can use this to stop queue processing while testing something, or if you know that the modem(s) are unavailable and do not want to run into oany error messages, etc. /var/spool/fax/outgoing/faxqueue_done Every time faxrunq (or faxrunqd) run the fax queue, a time stamp is written into that file. It is used by faxspool to display a warning if the queue hasn't been run recently (so faxes may get stuck). CONFIGURATION FILE
Some aspects of the behaviour of faxrunq can be controlled by a configuration file, /etc/mgetty+sendfax/faxrunq.config. In this file, you can use the following options: success-send-mail [y/n] A boolean parameter that controls whether a mail will be sent after successful completition of the fax job. failure-send-mail [y/n] A boolean parameter that controls whether a mail will be sent after the fax job has failed more than the maximum number of times. success-call-program <name> Here, you can specify a program that will be run when the fax has been successfully sent. It will be passed two command line parame- ters. The first is the full path to the fax JOB file (see faxq(5)), the second is the last exit code from sendfax (for success-call- program, this is always "0"). failure-call-program <name> Similar to the "success-call-program", this program will be run when the fax has been failed too often and faxrunq gives up. This script could, for example, print out the fax on a printer so that it can be sent manually on a paper fax machine. maxfail-costly <n> This specifies the number of times that a fax may fail "fatally", that is, causing telephone costs (explained above). The default value is 5. maxfail-total <m> This is the absolute maximum number of times that faxrunq will try to send any given fax. The default value is 10. (Right now, it's not yet implemented). delete-sent-jobs [y/n] Determines whether faxrunq should delete jobs after sending, or leave them in the fax queue (while moving the "JOB" file to "JOB.done") so that they can be seen at by "faxq -o". The default value is "do not delete sent faxes". acct-log <path> Specifies where faxrunq should protocol success and failure of each try to send a fax job. The default location is /var/spool/fax/outgoing/acct.log. There are some other options that are allowed, but ignored. These are: max-modems, and faxrunqd-log. They are used by faxrunqd(8) (which reads the same config file, but has more options). BUGS
faxrunq doesn't handle proper time scheduling yet Don't use faxrunq if you have malevolent users with access to the fax spool. It doesn't handle all cases of file movement tricks cor- rectly. Use faxrunqd(8) instead, which does it correctly (this point is mostly moot if the fax queue is set up correctly - that is, owned by 'fax', mode 755, and faxrunq(1) is also run as user 'fax'). SEE ALSO
faxspool(1), sendfax(8), faxq(1), faxqueue(5), faxrunqd(8) AUTHOR
faxrunq is Copyright (C) 1993-2002 by Gert Doering, <gert@greenie.muc.de>. greenie 23 Nov 02 faxrunq(1)
All times are GMT -4. The time now is 01:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy