- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: regarding cluster status
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2013 10:31 PM
09-21-2013 10:31 PM
regarding cluster status
i need to write the script for pakage down
below find the below ouput
$ /usr/sbin/cmviewcl
CLUSTER STATUS
rkdbclu01 up
NODE STATUS STATE
rkdb001 up running
PACKAGE STATUS STATE AUTO_RUN NODE
dbPE1 up running enabled rkdb001
NODE STATUS STATE
rkdb002 up running
$
in this above output we need to write the script for two condition
condition 1- when ever pakage down we need to send the mail to respective team
conditon 2 - we need to run the pakage on primary node only rkdb001, if any thing wrong we need to send a mail to respective team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2013 04:48 PM
09-22-2013 04:48 PM
Re: regarding cluster status
>condition 1- when ever package down we need to send the mail to respective team
>condition 2 - we need to run the package on primary node only rkdb001, if any thing wrong we need to send a mail
Perhaps something like this:
package=dbPE1
node=rkdb001
/usr/sbin/cmviewcl | awk -v package_check=$package -v node_check=$node '
$1 == "CLUSTER" {
getline
cluster = $1
cluster_status = $2
# logic here?
if (cluster_status != "up") {
print "Cluster", cluster, "is not up:", cluster_status
}
next
}
$1 == "NODE" {
getline
node = $1
node_status = $2
node_state = $3
# logic here?
if (node_status != "up") {
print "Node", node, "is not up:", node_status
}
next
}
$1 == "PACKAGE" {
getline
package = $1
package_status = $2
package_state = $3
# logic here?
if (package_status != "up") {
print "Package", package, "is not up:", package_status
if (package == package_check) {
# invoke mailx here
}
} else { # package is up, check node
if (package == package_check && node != node_check) {
# invoke mailx here
}
}
next
}'
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2013 10:38 AM
10-01-2013 10:38 AM
Re: regarding cluster status
IN that secton you can put logic that checks what node the package is running on and runs commands if it is not the primary node.
In modular packges in the package start and stop function in the external script you can put the same type of shell script code to accomplish this.
Instructor Storage, Servers, HP-UX and Partner Courses
Hewlett Packard Enterprise Education Services
Ask me about training on StoreServ (3PAR) StoreOnce, StoreEasy, StoreAll, StoreVirtual, HP-UX, ServiceGuard and HPE Partner Ready Certification Training
internet: Linkedin: http://www.linkedin.com/in/emilvelez
HPE Master ASE Server Solutions Architect V3
HPE Master ASE Storage Solutions Architect V2
HP UNIX Certified (ASE HPUX 11iv3 Administration V1)
Certified HPE Instructor
HPE Product Certified - OneView [2016]
HP Sales Certified -Servers, Converged Systems and Services [2015]
HPE Product Certified - Converged Solutions [2017]