Sponsored Content
Top Forums Shell Programming and Scripting Monitoring script to check if cm cluster is up or not. Post 302387203 by sparcguy on Friday 15th of January 2010 12:03:24 AM
Old 01-15-2010
Monitoring script to check if cm cluster is up or not.

hi guys have this little problem, need some help from script gurus.

basically I'm running hpux cmviewcl command, cmviewcl command will produce

Code:
    db1pkg         up           running      enabled      box1


my script
Code:
PSV='box1'
STAT='up'

check_db1pkg()
{
# assign cmviewcl output to x
x=`cmviewcl | grep db1pkg`
#
# setup an array 'ARR' to do matching
#
set -A ARR $x
#test 'up'
if [${ARR[1]} -ne ${STAT}] -o [${ARR[4]} -ne ${PSV}];then
send_sms;
else
echo "db1pkg all fine as at `date`" > /var/tmp/heartbeat
fi

when I run this script it will says

Code:
check_db1pkg[9]: [up:  not found

am I missing or did something wrong here? Smilie

Last edited by pludi; 01-15-2010 at 02:23 AM.. Reason: code tags, please...
 

10 More Discussions You Might Find Interesting

1. High Performance Computing

Building a Solaris Cluster Express cluster in a VirtualBox on OpenSolaris

Provides a description of how to set up a Solaris Cluster Express cluster in a VirtualBox on OpenSolaris. More... (0 Replies)
Discussion started by: Linux Bot
0 Replies

2. Shell Programming and Scripting

how to check all the applications are in cluster using shell script

Hi I have an application running in four different node.The server is tomcat.Each node in each tomcat server.How do i check whether all the nodes are in cluster using shell script. any command to check this would be of great use.:) (2 Replies)
Discussion started by: ahamed
2 Replies

3. UNIX for Dummies Questions & Answers

How to check if the server is on a Cluster

Hi im connecting to a datacenter remotely. is there a command to know if the server is on a cluster? i want to know the command to use in these OS(hp-ux,solaris,linux) Thanks (6 Replies)
Discussion started by: jinslick25
6 Replies

4. Shell Programming and Scripting

How to check whether server is up or down by monitoring PID?

we have a server, which becomes down at times and we dont get any notification mail. Can we monitor PID for that server run and create a script to send notification to a mail id? I have URL for the server, which I can use. Please let me know if more information is required from my end to... (2 Replies)
Discussion started by: vandana.parwani
2 Replies

5. Shell Programming and Scripting

script to check if another script is running and if so, then sleep for sometime and check again

Hi, I am a unix newbie. I need to write a script to check wheteher another script is still running. If it is, then sleep for 30m and then check again if the script is running. If the script has stopped running then, I need to come out of the loop. I am using RHEL 5.2 (2 Replies)
Discussion started by: mathews
2 Replies

6. Linux

Cluster check

I am working on a Linux server and want to check the cluster status. I dont know how many server is in cluster and what is the command to check. could you please help me to get the cluster status? (4 Replies)
Discussion started by: anshu ranjan
4 Replies

7. AIX

How to check if a filesystem is part of a cluster

Hello, - How do I know if a filesystem is part of a cluster? - Or do I have to check if the vg related to the fs is part of a cluster instead? if so, how do I check it? - I would also need to check if there are vxfs type inside aix machines and if there are, how do I know if that type of... (2 Replies)
Discussion started by: asanchez
2 Replies

8. UNIX for Advanced & Expert Users

ldapsearch in monitoring script without bind password written in script

Hi I do a very simple monitoring of our OpenLDAP (runs in cronjob and generate alerts if unsuccessfull) $ ldapsearch -h hostname.domain -D "cn=monitor_user,ou=People,dc=organisation" -w "password" -b "dc=organisation" -x "(&(cn=monitor_user)(ou=People))" dn | grep -v version dn:... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

9. High Performance Computing

How to check performance of your HPC cluster?

Hello Everybody, I have few queries : Do you have any idea how to check the performance of HPC cluster having mpich on top of centos 6.2? Are there any standard programs (like FFT, graphics rendering etc) to check the performance of mpi cluster with single node and multiple nodes? Can we... (4 Replies)
Discussion started by: albertspade
4 Replies

10. Solaris

Sun cluster 4.0 - zone cluster failover doubt

Hello experts - I am planning to install a Sun cluster 4.0 zone cluster fail-over. few basic doubts. (1) Where should i install the cluster s/w binaries ?. ( global zone or the container zone where i am planning to install the zone fail-over) (2) Or should i perform the installation on... (0 Replies)
Discussion started by: NVA
0 Replies
cmviewconf(1m)															    cmviewconf(1m)

NAME
cmviewconf - view Serviceguard cluster configuration information SYNOPSIS
cmviewconf [-o output_file] DESCRIPTION
cmviewconf collects and displays the cluster configuration information, in ASCII format, from the binary configuration file for an existing cluster. Optionally, the output can be written to a file output_file. This command can be used as a troubleshooting tool to identify the configuration of a cluster. To view cluster information, a user must be superuser(UID=0), or have an access policy of MONITOR allowed in the cluster configuration file, or have a policy of PACKAGE_ADMIN in a package's configuration file. See access policy in cmquerycl(1m) or cmmakepkg(1m). NOTE: When this command is run by an authorized user who is not the superuser(UID=0), only those entries that match the user running the command and the node where the command is run are displayed. Options cmviewconf supports the following options: -o output_file Log configuration information to a specified output file. If this option is not specified, the information will be directed to stdout. RETURN VALUE
cmviewconf returns the following value: 0 Successful completion. 1 Command failed. EXAMPLES
To dump the contents of the binary configuration file to the file /tmp/viewconf.log: cmviewconf -o /tmp/viewconf.log To dump the contents of the binary configuration file to the screen: cmviewconf AUTHOR
cmviewconf was developed by HP. SEE ALSO
cmquerycl(1m), cmmakepkg(1m), cmcheckconf(1m), cmviewcl(1m), cmscancl(1m). Requires Optional Serviceguard Software cmviewconf(1m)
All times are GMT -4. The time now is 03:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy