- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Monitoring SYS$BATCH queues via email
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-27-2009 09:00 AM
тАО02-27-2009 09:00 AM
Thanks for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 09:50 AM
тАО02-27-2009 09:50 AM
SolutionThere are tools that do DECscheduler (does that still exist?) and JAMS come to mind.
Other freeware and real solutions surely exist.
If you want to roll your own, then you could parse out $SHOW QUEUE and SHOW ENTRY output, but you should look at F$GETQUI.
This is NOT the easiest, in fact it is the hardest, lexical function to use, so be sure to google for examples.
Mind you, it is all to easy to spend days on getting a mostly working solution to one that is robust and works all the time and as needed. So you really should try to find an existing tool, be it free or paid for.
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 11:46 AM
тАО02-27-2009 11:46 AM
Re: Monitoring SYS$BATCH queues via email
$ SET QUEUE SYS$BATCH /RETAIN=ERROR
Run as a detached process a DCL monitoring script similar to this:
$ SET NOON
$ DJ := DISPLAY_JOB
$ FZ := FREEZE_CONTEXT
$OLOOP:
$ IF (F$GETQUI("DISPLAY_QUEUE","RETAINED_JOB_COUNT",-
"SYS$BATCH","WILDCARD") .GT. 0)
$ THEN
$ILOOP:
$ RETAIN = F$GETQUI(DJ,"JOB_RETAINED",,"ALL_JOBS")
$ IF (RETAIN)
$ THEN
$ JOB_NAME = F$GETQUI(DJ,"JOB_NAME",,FZ)
$ FINAL_STATUS = F$GETQUI(DJ,"CONDITION_VECTOR",,FZ)
$ ENTRY_NUMBER = F$GETQUI(DJ,"ENTRY_NUMBER",,FZ)
$ DELETE /ENTRY='ENTRY_NUMBER'
$ MAIL NL: mymail-
/SUBJ="Job ''JOB_NAME' failed; STATUS=%X''FINAL_STATUS'"
$ DUMMY = F$GETQUI("CANCEL_OPERATION")
$ GOTO OLOOP
$ ENDIF
$ IF (RETAIN .NES. "") THEN GOTO ILOOP
$ ENDIF
$ WAIT 00:00:30
$ DUMMY = F$GETQUI("CANCEL_OPERATION")
$ GOTO OLOOP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 11:58 AM
тАО02-27-2009 11:58 AM
Re: Monitoring SYS$BATCH queues via email
What about the queue manager, anything there that may help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 12:29 PM
тАО02-27-2009 12:29 PM
Re: Monitoring SYS$BATCH queues via email
no the queue manager won't help here , as hein has mentioned it's either use a scheduling tool there are a number available at various price points or use something like jess's example.
you might want to retro fit a standardised error handling routine with smtp mail alerts into your current dcl scripts and use for all future as a template.
fwiw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2009 01:50 PM
тАО02-27-2009 01:50 PM
Re: Monitoring SYS$BATCH queues via email
(Yes, there is something called a class scheduler, but that's not intended for this purpose.)
Freeware packages include a cron port and an updated version of kronos. Or you manage it from batch or your own DCL or other such hackery. Or you acquire and install one of the commercial packages. (DECscheduler is now CA ScheduleIT or some such, last I looked.)
Some scheduling-related topics:
http://64.223.189.234/node/97
http://64.223.189.234/node/501
http://64.223.189.234/node/872
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2009 12:46 PM
тАО03-01-2009 12:46 PM
Re: Monitoring SYS$BATCH queues via email
I have all queues set to RETAIN=ERROR so that failed jobs remain on the queue until explicitly deleted.
I also have a job that runs daily on all systems scanning queues, looking for jobs in unexpected states, and jobs where the command procedures has been updated. It sends a mail message if any are found.
I've included some sample code from the procedure as an attachment. It isn't complete, getting it to work in your environment left as an exercise.
The code to automatically resubmit a job where the command procedure has been updated is omitted, it's not something that should be done blindly, and the sanity checks I perform aren't applicable to other sites.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2009 12:47 PM
тАО03-01-2009 12:47 PM
Re: Monitoring SYS$BATCH queues via email
(wouldn't it be nice if HP replaced this system with something reliable?)