Sponsored Content
Full Discussion: Shell script for alert
Top Forums Shell Programming and Scripting Shell script for alert Post 302948836 by Smiling Dragon on Thursday 2nd of July 2015 09:44:36 PM
Old 07-02-2015
Hi there,

you'll want something like this:
Code:
while true
do
  if [ -s "rep_exception.log]
  then
    mail -s "Exception found for replication on `hostname`" $targetemailaddress < rep_exception.log && cat /dev/null > rep_exception.log
  fi
  sleep $SecondsBetweenChecks
done

Not tested
This User Gave Thanks to Smiling Dragon For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

Shell script to send email alert for core dump

Friends, I am in search for a shell script that is capable of running as a cronjob and have to send out an email when ever there is a CORE DUMP. Please post the hints to achieve my goal. Thanks in advance. (1 Reply)
Discussion started by: rtatineni
1 Replies

2. Shell Programming and Scripting

shell script not getting current error messages with time from alert.log

Hi All, I need to get current error messages with time from alert.log.Below is my shell script but it's not working to meet this objective. could anyone pls share on the above issue for resolution: #################################################################### ## ckalertlog.sh ##... (2 Replies)
Discussion started by: a1_win
2 Replies

3. Shell Programming and Scripting

Filesystem alert shell script not working!!

Hi All, My below shell script is not capturing %used value in the filesystem alert in the subject of the mail alert: #!/bin/bash export DBALIST="abc@xyz.com" df -k /oradata/xyz/archive > dfk.result archive_capacity=`awk -F" " '{ print $5 }' dfk.result|grep -i %| cut -c 1-4` if ] then... (5 Replies)
Discussion started by: a1_win
5 Replies

4. Shell Programming and Scripting

Unix Shell Script to automate email alert

Hi all, I have a task on my plate which is of high priority. I need an automated email alert that checks FTP notices subdirectory on a daily basis and forwards any word files to a group of people. This word files gets created whenever there is an issue with FTP connectivity. Please help...... (1 Reply)
Discussion started by: stunnerz_84
1 Replies

5. Shell Programming and Scripting

Shell script to capture ORA errors from Alert Log

Hi, as the title says, I am after a simple script, which will open the Alert log from an 11.2.0.1 Linux environment and mail the error message and description to a recipient email address. I can then schedule this job via cron and let it run every 15 minutes. I have searched online... (16 Replies)
Discussion started by: jnrpeardba
16 Replies

6. Shell Programming and Scripting

shell script to alert cpu memory and disk usage help please

Hi all can any one help me to script monitoring CPU load avg when reaches threshold value and disk usage if it exceeds some % tried using awk but when df -h out put is in two different lines awk doesnt work for the particular output in two different line ( output for df -h is in two... (7 Replies)
Discussion started by: robo
7 Replies

7. Shell Programming and Scripting

shell script to alert if a file has been modified

Hi , I want a script who will send alert the moment someone edit any file in a directory in LINUX. Can some one throw some light on this please.!! (4 Replies)
Discussion started by: d8011
4 Replies

8. Shell Programming and Scripting

Shell script to send mail alert

HI Guys, I am writing one shell script to send the mail alert to some email id's if the file not modified in last 10 mins but its not working, I believe MTIME is null string is wrong . can you please assist me on this. script :- filename="abc.txt" echo "Filename is $filename"... (1 Reply)
Discussion started by: abhigrkist
1 Replies

9. UNIX for Beginners Questions & Answers

Shell script to send mail alert

Hi I have below shell script to send mail alert , however I want to add more functionality in this script and that is , script should only check that file between 9 am to 5pm , and if there is no activity in this time 9 am to 5 pm for 2hours then it should give me mail alert, please help... (2 Replies)
Discussion started by: scazed
2 Replies

10. Shell Programming and Scripting

Filesystem alert shell script not working!!

Hi All, My below shell script is not capturing %used value in the filesystem alert in the subject of the mail alert: Code: #!/bin/bash export DBALIST="abc@xyz.com" df -k /oradata/xyz/archive > dfk.result archive_capacity=`awk -F" " '{ print $5 }' dfk.result|grep -i %| cut -c 1-4` if... (6 Replies)
Discussion started by: harveyclayton
6 Replies
SLURPD(8C)																SLURPD(8C)

NAME
slurpd - Standalone LDAP Update Replication Daemon SYNOPSIS
/usr/sbin/slurpd [-d debug-level] [-f slapd-config-file] [-r slapd-replog-file] [-t temp-dir] [-o] [-k srvtab-file] DESCRIPTION
Slurpd is used to propagate changes from one slapd database to another. If slapd is configured to produce a replication log, slurpd reads that replication log and sends the changes to the slave slapd instances via the LDAP protocol. slurpd is typically invoked at boot time, usually out of /etc/rc.local. Upon startup, slurpd normally forks and disassociates itself from the invoking tty, then reads the replication log (given either by the replogfile directive in the slapd config file, or by the -r command-line option). If the replication log file does not exist or is empty, slurpd goes to sleep. It periodically wakes up and checks to see if there are any changes to be propoagated. When slurpd notices that there are changes to propagate to slave slapd instances, it locks the replication log, makes its own private copy, releases the lock, and forks one copy of itself for each replica slapd to be updated. Each child process binds to the slave slapd as the DN given by the binddn option to the replica directive in the slapd config file, and sends the changes. See slapd(8) for details on the standalone LDAP daemon. OPTIONS
-d debug-level Turn on debugging as defined by debug-level. If this option is specified, even with a zero argument, slurpd will not fork or disas- sociate from the invoking terminal. Some general operation and status messages are printed for any value of debug-level. debug-level is taken as a bit string, with each bit corresponding to a different kind of debugging information. See <ldap.h> for details. -f slapd-config-file Specifies the slapd configuration file. The default is /etc/openldap/slapd.conf. -r slapd-replog-file Specifies the name of the slapd replication logfile. Normally, the name of the replication log file is read from the slapd configu- ration file. The file should be located in a directory with limited read/write/execute access. The -r option allows you to over- ride this. In conjunction with the -o option, you can process a replication log file in a "one-shot" mode. For example, if slurpd has encountered errors in processing a replication log, you can run it in one-shot mode and give the rejection file name as the argument to the -r option, once you've resolved the problem which caused the replication to fail. -o Run in "one-shot" mode. Normally, slurpd processes the replog file and then watches for more replication entries to be appended. In one-shot mode, slurpd processes a replication log and exits. -t temp-dir slurpd copies the replication log to a working directory before processing it. The directory permissions should limit read/write/execute access as temporary files may contain sensitive information. This option allows you to specify the location of these temporary files. The default is /var/lib/ldap. -k srvtab-file Specify the location of the kerberos srvtab file which contains keys for the replica slapd instances. Overrides the srvtab argument to the replica directive in the slapd configuration file. EXAMPLES
To start slurpd and have it fork and detach from the terminal and process the replication logs generated by slapd, just type: /usr/sbin/slurpd To start slurpd with an alternate slapd configuration file, and turn on voluminous debugging which will be printed on standard error, type: /usr/sbin/slurpd -f /etc/openldap/slapd.conf -d 255 SEE ALSO
ldap(3), slapd.replog(5), slapd(8) "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/) ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.0.27-Release 20 August 2000 SLURPD(8C)
All times are GMT -4. The time now is 05:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy