- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: application crons in 2 node cluster
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
01-23-2001 12:14 PM
01-23-2001 12:14 PM
application crons in 2 node cluster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 12:38 PM
01-23-2001 12:38 PM
Re: application crons in 2 node cluster
I have had to create a solution to this, and I have all the pieces except the 'trigger' to invoke my script. Basically, I have written a script that does a crontab -l > file, rcp's that file to the backup server, starts cron on the backup server (using remsh), and then disables cron on the 'downed' server. Then the reverse happens once the 'downed' server comes back up.
Oh, and to disable cron, I am just submitting an empty crontab file.
Hope this helps,
Mo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 01:17 PM
01-23-2001 01:17 PM
Re: application crons in 2 node cluster
My thought was to setup the cron on both the servers. Inside the script run by cron I would check if the package was running on the server via cmviewcl or some other way. If the package was not running it would exit out of the script otherwise it would continue and run the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2001 12:25 AM
01-24-2001 12:25 AM
Re: application crons in 2 node cluster
I think Brad`s suggestion is a good way. In our 2 node cluster i had the same problem. On every node several cron-jobs are to run. Since 1 year i use the attached script rip (run in package) and roh (run on host). The 2 crontabs are identical, I only edit the crontab file at the one node and do an rcp (by cron) once a day to the other node.
The script is very easy, so i think i do not have to translate the comments.
sorry, i only can attach one file, so i'll cat rip roh >>rip+roh
Regards , Lothar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2001 09:10 AM
02-07-2001 09:10 AM
Re: application crons in 2 node cluster
I got curious about this. Though it' not a ServiceGuard failing, others have asked about it.
Maureen mentioned a 'trigger' to determine when to switch cron jobs. I can't think of a good trigger.
Brad's suggestion to use cron appealed to me.
Here is a simple script cron can call that may help:
#!/sbin/sh
#
# The purpose of this script is to demonstrate one way that
# the system can be programmed to determine if the local host
# should be cron'd to run special instructions based on whether
# a ServiceGuard package is running on the local host.
#
P_NAME=aclk <-- (put your package name here)
PKG_LOC=`cmviewcl -p $P_NAME | grep $P_NAME | awk '{print $5}'`
HOST=`uname -n`
if [[ $PKG_LOC != $HOST ]]
then /usr/bin/crontab /root/cron/std_crontab
else /usr/bin/crontab /root/cron/pkg_crontab
fi
# pkg_crontab contains everything in std_crontab plus extra commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2001 06:51 AM
02-09-2001 06:51 AM
Re: application crons in 2 node cluster
I created UXSGKBQA00000066 describing one way to implement matching cron jobs to package location.
Hope it helps.
-Stephen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2001 10:03 AM
02-09-2001 10:03 AM
Re: application crons in 2 node cluster
# Script to run on Server if PKG is running
PKG=
PKG_LOC=`cmviewcl -p $PKG | grep $PKG | awk '{print $5}'`
HOST=`uname -n`
if [[ $PKG_LOC != $HOST ]]; then
exit
fi
# run cmds on server.
This can be implemented without changing Service Guard, testing failover and creating two crontab files for each server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2001 02:15 PM
02-13-2001 02:15 PM
Re: application crons in 2 node cluster
If you are handing out points - give them to Brad for his elegant approach!
Brad, if you don't mind, I'll replace my document with your idea!
-Stephen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2001 07:43 PM
03-07-2001 07:43 PM
Re: application crons in 2 node cluster
Sorry I don't have the script for this - took an early retirement and didn't have time to get all my scripts...
This only works with a unique application-id that moves from node to node.
Peggy