- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- serviceguard scripting
Operating System - HP-UX
1753856
Members
7334
Online
108809
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО10-06-2010 09:53 AM
тАО10-06-2010 09:53 AM
hi all
i have a script in cron (cant put it into the package yet) that i need to run that checks if the package actually failed over then does what it has to do. it supposed to look for a filesystem, then go into action. im having a problem with the mechanics there. has anyone done that?
thx in advance
i have a script in cron (cant put it into the package yet) that i need to run that checks if the package actually failed over then does what it has to do. it supposed to look for a filesystem, then go into action. im having a problem with the mechanics there. has anyone done that?
thx in advance
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2010 10:42 PM
тАО10-06-2010 10:42 PM
Solution
You could check if the package filesystem is listed in the output of the "mount" command, or simply check for the existence of a file or directory you *know* exists within the package filesystem.
Check for filesystem:
if mount | grep -q "/packagemountpoint"; then
echo "the package is here, can proceed"
# add commands to do here
else
echo "the package is not active on this node"
fi
Check for a directory inside the filesystem:
if [ -d /packagemountpoint/somedirectory ]; then
echo "the package is here, can proceed"
# add commands to do here
else
echo "the package is not active on this node"
fi
MK
Check for filesystem:
if mount | grep -q "/packagemountpoint"; then
echo "the package is here, can proceed"
# add commands to do here
else
echo "the package is not active on this node"
fi
Check for a directory inside the filesystem:
if [ -d /packagemountpoint/somedirectory ]; then
echo "the package is here, can proceed"
# add commands to do here
else
echo "the package is not active on this node"
fi
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2010 04:53 AM
тАО10-08-2010 04:53 AM
Re: serviceguard scripting
thx i put it in cron on the adoptive node, works perfeclty.
one problem:
i put it for every 5mins, so it sees the filesystem and brings the services up and down (every 5mins). is there a way to say if u see this filesystem, do this one time
and stop?
thx again
one problem:
i put it for every 5mins, so it sees the filesystem and brings the services up and down (every 5mins). is there a way to say if u see this filesystem, do this one time
and stop?
thx again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2010 05:24 AM
тАО10-08-2010 05:24 AM
Re: serviceguard scripting
Use a flagfile to determine if you need to run. When you start on the primary node, remove the flag file. Check on adoptive node if the directory is mounted, and the file doesn't exist, touch the file and do what you need.
if [ -d /pkgmount/pkgdir ] ; then
if [ ! -f /pkgmount/pkgdir/flagfile ] ; then
touch /pkgmount/pkgdir/flagfile
domythang
fi
fi
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP