01-15-2020
Adding log file
Like the script file...where sometimes it encounters error when executing and so the errors are reported to a log file.... My question is how do I add the directory of the log file to a script file?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
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. Shell Programming and Scripting
Hi Friends,
I am trying to write a script which continiously monitor one specific error message from a log file. This script should continiously monitor the file for the error and send out the email when detect the error message. I tried the below command but fails. Please help me.
tail -f... (4 Replies)
Discussion started by: arumon
4 Replies
6. HP-UX
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
7. Shell Programming and Scripting
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:... (1 Reply)
Discussion started by: hishanms
1 Replies
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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
LEARN ABOUT DEBIAN
cmannotifyd
cmannotifyd(8) CMAN Notification Daemon cmannotifyd(8)
NAME
cmannotifyd - CMAN Notification Daemon
SYNOPSIS
cmannotifyd [-f] [-d]
DESCRIPTION
The cmannotifyd daemon talks to CMAN and provides a mechanism to notify external entities about cluster changes.
CMAN dispatches 3 kind of notifications:
- CMAN_REASON_TRY_SHUTDOWN when cman requests to all clients if it is allowed to shutdown.
- CMAN_REASON_STATECHANGE when cman detects a node joining or leaving the cluster.
- CMAN_REASON_CONFIG_UPDATE when a configuration change event has been detected/requested.
These notifications are then dispatched to the shell script cman_notify in the environment variable CMAN_NOTIFICATION.
cman_notify will then execute all the scripts in the configured notification directory (default: /etc/cluster/cman-notify.d) passing a very
minimal set of envvars including, of course, the CMAN_NOTIFICATION= type. The execution order is set by the filename as shown by "LC_ALL=C
ls -las".
cmannotifyd logs are stored in the default log file (/var/log/cluster/cmannotifyd.log).
cman_notify logs are stored in the default log file (/var/log/cluster/cman_notify.log). By default the output from the scripts executed by
cman_notify is redirected to /dev/null. Users can either set CMAN_NOTIFICATION_DEBUG=1 in their environment or set proper debug configura-
tion in cluster.conf to redirect scripts output to the cman_notify log file.
NOTES
cmannotifyd does not block on cman_notify nor check the exit status of the script.
Notifications are dispatched in the same order as they arrive, one by one.
CMAN_REASON_TRY_SHUTDOWN is passed to scripts for information only, they can not influence cman's decsion about whether or not to shut
down.
CMAN_REASON_STATECHANGE also implies CMAN_NOTIFICATION_QUORUM exported in the environment. CMAN_NOTIFICATION_QUORUM will be set to 1 (when
the node is part of a quorate cluster) or 0 (otherwise).
A template for cman_notify scripts can be found in the doc/ directory.
OPTIONS
-f Run in the foreground (do not fork / daemonize).
-d Enable debug output.
November 2008 cmannotifyd(8)