- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: serviceguard and crontab (associating crontab ...
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
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
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
тАО02-22-2005 07:10 AM
тАО02-22-2005 07:10 AM
Thanks,
Chuck Davis
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2005 07:13 AM
тАО02-22-2005 07:13 AM
Re: serviceguard and crontab (associating crontab files to packages)
cron does what you tell it to. It works for you.
You can right a cron job that only acts when the package is running on the node.
What I don't think you can do is this symlink thing.
Another thing you can do with cron is have it detect whether the node and or its packages are functioning correctly and change that circumstance.
Its all a matter of detecting the condition and then issuing the appropriate commands.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2005 07:15 AM
тАО02-22-2005 07:15 AM
Re: serviceguard and crontab (associating crontab files to packages)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2005 08:29 AM
тАО02-22-2005 08:29 AM
Re: serviceguard and crontab (associating crontab files to packages)
FWIW, the symlink directory hack works pretty well it just seems so inelegant (i've been doing it for over a year now). I am basically using the package start script to stop cron, change the dir symlink, then restart cron. The only crontab needed when the cluster/package is not running is root. It gets out of sync when I use "crontab -e". This is what's in the package start script:
/sbin/init.d/cron stop
rm /var/spool/cron/crontabs
(cd /var/spool/cron; ln -s crontabs.cluster_running crontabs)
/sbin/init.d/cron start
I have a similar entry for the package stop script which links to the crontabs.cluster_not_running directory.
I guess I'll probably stick to this strategy since it's in place alreay, fairly easy to maintain, and the developers can do whatever they want w/ their scripts. I'll probably write yet another cron script (yacs) to keep the root crontabs synched up.
Thanks a lot for the input.
Regards,
Chuck Davis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2005 10:34 AM
тАО02-22-2005 10:34 AM
Solution# clean up old PCT data
30 5 * * * [ -d /oracle/PRD/920_64 ] && /usr/local/bin/pct.clean >/dev/null 2>&1
Basically - it's an if statement in cron - if the directory /oracle/PRD/920_64 exists, then (&&) run my script /usr/local/bin/pct.clean
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2005 07:32 PM
тАО02-22-2005 07:32 PM
Re: serviceguard and crontab (associating crontab files to packages)
cmcronpkgpresent -p package command
like
00 18 * * 1-5 /usr/contrib/bin/cmcronpkgpresent -p MYPACKAGE /bin/su anotheruser -c "whoami"
The script only executes the command if the package in running on the node, but the cron-entry runs on all nodes.
Yet another script distribute the crontab from one of the nodes to the others every hour using crontab -l > distfile, distributing the distfile and enter the crontab on the other nodes using crontab -l < distfile
This way I do all cron maintainance on one of my nodes and ensures that the cron is always the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2005 01:51 AM
тАО02-23-2005 01:51 AM
Re: serviceguard and crontab (associating crontab files to packages)
Thanks again.
Regards,
Chuck Davis