Server Staus offline to online -Shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Server Staus offline to online -Shell script
# 1  
Old 02-18-2010
Bug Server Staus offline to online -Shell script

Hi,

We put cron entry :whenever server is offline(checks every 5 minutes) it sends status to mailer group.

The number of messages (offline)were growing in our mailbox.How to avoid not to send offline messages after the first one through shell script.

Thanks in advance.

Chowdary
# 2  
Old 02-18-2010
In case of an error let the shell script touch an empty lock file somewhere, maybe /tmp/server_status.lck for example, so it can remember on next check, what former status was. Example:

server offline and no lock file -> new status so touch lock file and send mail
server offline and lock file exists -> do nothing, just a log entry
server online and lock file exists -> delete lock file and send mail that all is ok again
server online and lock file does not exist -> do nothing, just a log entry

Easy to cover with some "if/then/fi" and "else" constructs.
# 3  
Old 02-18-2010
Bug Nice Idea

Hi zaxxon,

Thanks for your speedy response.

Regards,
chowdary
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to copy a file from one server to anther server and execute the binary

Hi , Is there any script to copy a files (weblogic bianary + silent.xml ) from one server (linux) to another servers and then execute the copy file. We want to copy a file on multiple servers and run the installation. Thanks (1 Reply)
Discussion started by: Nawrajesh
1 Replies

2. Shell Programming and Scripting

Need help in getting the oracle instance name which is offline in 10g through shell scripting

:wall:Hi, I am not sure whether i can post this question in this forum or not. because it is not completely releated to unix, but also oracle. My question is, How can we know the instance name(particularly the last number, eg., in INST_DB12, i need 12) when it is OFFLINE(i.e., down)... (1 Reply)
Discussion started by: Dpu
1 Replies

3. UNIX for Advanced & Expert Users

Solaris: Fault Management Service toggles online, offline

I have two Solaris 10 T2000 systems. Platform sun8 has newer firmware than sun7. sun8/user$ prtdiag -v | grep OBP OBP 4.30.4.b 2010/07/09 13:48 sun7/user$ prtdiag -v | grep OBP OBP 4.30.4.a 2010/01/06 14:56 The platform (sun8) with the newer firmware (OBP 4.30.4.b) has a Fault... (2 Replies)
Discussion started by: DavidHalko
2 Replies

4. UNIX for Dummies Questions & Answers

How to recover services from offline to online?

Dear all, How to recover the Dns service from offline to online? I used the command " svcadm enable dns/client" the command is executing but again its showing service is offline. pls clarify and give me suggesstion... Thanks in advance (1 Reply)
Discussion started by: masthan25
1 Replies

5. UNIX for Advanced & Expert Users

how to find any device online/offline

what is the command for checking which device active and which is not active (1 Reply)
Discussion started by: RahulJoshi
1 Replies

6. Solaris

All dependicies of nfs service is online but nfs is offline

Hi all in my server all nfs dependices are online but nfs client is offline root@BIWAPP1 # svcs -a|grep nfs disabled Sep_05 svc:/network/nfs/server:default online Sep_05 svc:/network/nfs/rquota:default online Sep_05 svc:/network/nfs/mapid:default online ... (9 Replies)
Discussion started by: spandhan
9 Replies

7. UNIX for Advanced & Expert Users

script to Monitor raid staus --Sun Volume manager

We use Sun Volume manager to mirror root disks and other local disks... Is there any script to monitor raid status across all machines send output thru email? Help is appreciated. Thanks. (1 Reply)
Discussion started by: sriny
1 Replies

8. UNIX for Advanced & Expert Users

command for CPU online/offline status in bash shell

Hi , How do i check that the CPU is online/offline in a multi CPU machine in Linux ? i tired /proc/cpuinfo dmesg nothing gave me the currect CPU status. Pls help !! (5 Replies)
Discussion started by: sars
5 Replies

9. Solaris

Cluster group offline then online in 2 minutes

Hi , we are using Veritas cluster server on solaris 8. Suddenly one application group was offline and online after 2 minutes.. I have checked VCS log.. "VCS INFO V-16-1-50135 User reuters fired command: hares -offline middleman_proc server01 from 127.0.0.1" Does anyone faced this... (0 Replies)
Discussion started by: ddk2oo5
0 Replies
Login or Register to Ask a Question