- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Package examples for MC/SG to test switching
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
Forums
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
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
03-07-2003 07:34 AM
03-07-2003 07:34 AM
Can anyone give me any ideas of Package examples I can set up.
I can't use Oracle or anything like that
just something simple
to test the switching
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 07:44 AM
03-07-2003 07:44 AM
SolutionThe following is a simple script that starts nothing stops nothing but monitors swagentd. If you kill swagentd process, it should failover to the other box. If you create a /tmp/lock file, then it won't monitor.
However, you will need to setup a service inorder to monitor the packages.
In the control file, add this
SERVICE_NAME[0]="test"
SERVICE_CMD[0]="/etc/cmcluster/test/test.sh monitor"
SERVICE_RESTART[0]=""
In the package config file, add this
SERVICE_NAME test
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
Packaget script - test.sh
#!/usr/bin/ksh
monitor_processes()
{
echo "monitoring the processes"
while true
do
if [ -f /tmp/lock ]
then
echo "Lock is there. would not monitor the processes"
sleep 5
else
ps -ef|grep swagentd|grep -v grep > /dev/null 2>&1
if [ $? = 0 ]
then
sleep 5
else
echo "swagented process is not running"
exit
fi
fi
done
}
case $1 in
start)
echo "starting the dummy"
;;
halt)
echo "halting the dummy"
;;
monitor) echo "monitoring the dummy"
monitor_processes
;;
esac
If you don't want to compilcate, comment out the monitor portion aand do not add the services.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 07:46 AM
03-07-2003 07:46 AM
Re: Package examples for MC/SG to test switching
Forgot to add that you will need to add startup and shutdown commands in your control file as well.
Under customer defined run commands area add
/etc/cmcluster/test/test.sh start
Under customer defined halt commands add
/etc/cmcluster/test/test.sh halt
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 07:50 AM
03-07-2003 07:50 AM
Re: Package examples for MC/SG to test switching
If you have any more info keep it coming...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 07:51 AM
03-07-2003 07:51 AM
Re: Package examples for MC/SG to test switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 07:52 AM
03-07-2003 07:52 AM
Re: Package examples for MC/SG to test switching
I believe a chat session is much better than a thread if you are trying to play with ServiceGuard. There is no end to the messages and it may not be the purpose of this forums?.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 08:03 AM
03-07-2003 08:03 AM
Re: Package examples for MC/SG to test switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 08:05 AM
03-07-2003 08:05 AM
Re: Package examples for MC/SG to test switching
Why MC/SG for SAP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 08:09 AM
03-07-2003 08:09 AM
Re: Package examples for MC/SG to test switching
1) read the Managing MC/ServiceGuard manual at:
http://docs.hp.com/hpux/ha
2) get on the Customer Education course for Sg
3) to test lan failover, just create3 a simple package that does nothing else except put an IP address out there, and then do your test.