Sponsored Content
Full Discussion: Scripting an alarm
Top Forums Shell Programming and Scripting Scripting an alarm Post 302563791 by thegeek on Wednesday 12th of October 2011 07:18:40 AM
Old 10-12-2011
redirect the output to grep, if there is a match - let it show an alert.


Code:
echo "failure" | grep 'failure' && notify-send "there is a failure"

echo "success" | grep 'failure' && notify-send "there is a failure"

If you dont have notify-send, use some other alerting mechanism in your OS.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Alarm signal

Hi, when I execute a script on unix AIX, I've got an error message: "Execution: 85328 Signal d'alarme". If I edit this file with "vi", I ve got the same error after a while (about 1 minute). If I try with another user I still have the problem. But if I rename this file, no problem. My... (5 Replies)
Discussion started by: cgsteph
5 Replies

2. UNIX for Dummies Questions & Answers

alarm

Hello I have a server HP ES40 with unix 5.1B, and if i open from Start-Programs-IN Tools-GUI/pfmalarm/Alarm-start monitoring , I receive this error message "IOR : STRING IS TOO LONG ! MAXIMUM SIZE = 1024" Anybody heard about this error? Thanks Alin (0 Replies)
Discussion started by: tomaalin
0 Replies

3. Shell Programming and Scripting

Perl alarm signal

I am trying to write a signal to exit when a process times out. What I have come up with from poking around the web is this. #!/usr/bin/perl eval { local $SIG{ALRM} = sub { die "alarm clock restart" }; alarm 10; open(DSMADMC, "dsmadmc -se=tsmpc1 -id=XXXXX... (2 Replies)
Discussion started by: reggiej
2 Replies

4. Programming

Basic signal and alarm usage

I am trying to write a program that will; 1) Show the message "Snoozing now...zzzz" on the screen for 5 seconds 2) Then in the same position show the message "The ALARM is going off now!" for 5 seconds 3) Repeat 1) then 2) infinitely until user presses Ctrl C I can't make it work. Any hints... (17 Replies)
Discussion started by: enuenu
17 Replies

5. AIX

File Accessed Alarm ??

Hey, I want to ask a simple Question.... How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (1 Reply)
Discussion started by: varungupta
1 Replies

6. Shell Programming and Scripting

File Accessed Alarm ??

Hey, I want to ask a simple Question.... How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (16 Replies)
Discussion started by: varungupta
16 Replies

7. Shell Programming and Scripting

raise an alarm in Unix

Hi members, I am working in WebSphere in Unix environment. we are working with 500 odd servers and most of the times processes got down. Can i have any shell script through whih some popup with alarm get raised whenever some server get down. kindly help.. Thanks Rishi (1 Reply)
Discussion started by: rishi.madan
1 Replies

8. Programming

alarm signal processing

I'm writing a function right now, and I want to set an alarm to avoid a timeout, here's the general idea of my code: int amt = -2; alarm(10); amt = read(fd, &t->buf, TASKBUFSIZ - tailpos); //do a read when the alarm goes off, i want to check the value of "amt" ... (1 Reply)
Discussion started by: liaobert
1 Replies

9. Solaris

Sysedge alarm threshold

Hello, how can we determine alarm threshold from sysedge in a solaris box? can anybody please help me? Thanks, (1 Reply)
Discussion started by: Pouchie1
1 Replies

10. What is on Your Mind?

Alarm interrupt and multithreading

Hi Friends any know how became a friend in this Android Programming Language (0 Replies)
Discussion started by: ljarun
0 Replies
nsd-notify(8)							    nsd 3.2.12							     nsd-notify(8)

NAME
nsd-notify - program to send NOTIFY's to remote nameservers. SYNOPSIS
nsd-notify [-4] [-6] [-h] [-a address[@port]] [-p port] [-y key:secret[:algorithm]] -z zone servers DESCRIPTION
Nsd-notify is simple program to send NOTIFY's to remote nameservers. NSD is a complete implementation of an authoritative DNS nameserver. OPTIONS
-4 Only send to IPv4 addresses. -6 Only send to IPv6 addresses. -h Print help information and exit. -a address[@port] Specify the source address (and port) to send from. -p port Specify the port to send to. -y key:secret[:algorithm] Specify a TSIG key and base64 encoded secret to sign the notification with. If the TSIG algorithm is not defined, MD5 is used. z zone Specify the zone to notify about. servers List of nameservers to send to. EXAMPLES
To run this program the standard way type: # nsd-notify -z foobar.cz 1.2.3.4 SEE ALSO
nsd(8), nsdc(8), nsd.conf(5), nsd-checkconf(8), nsd-patch(8), nsd-xfer(8), zonec(8) AUTHORS
NSD was written by NLnet Labs and RIPE NCC joint team. Please see CREDITS file in the distribution for further details. NLnet Labs jul 19, 2012 nsd-notify(8)
All times are GMT -4. The time now is 06:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy