- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Stopping User processes before Batch Cycle
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
тАО06-10-2009 06:37 AM
тАО06-10-2009 06:37 AM
Stopping User processes before Batch Cycle
Looking for suggestions on the best approach to stopping user processes prior to starting our batch cycle. We occassionally hit file and record locks where some users leave their terminal logged in and the application running overnight.
We have done some DCL script to stop processes for a specific job. Wondering if there's a better approach than custom DCL script. We have basic 7a-5p office hrs.
I've been working with the WATCHER utility from MadGoat for stopping idle processes, but haven't been successful with that yet.
Thanks,
John
Systems: Alpha AS800, DS20e, OpenVMS 8.3, PowerTerm VT Emulator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 07:35 AM
тАО06-10-2009 07:35 AM
Re: Stopping User processes before Batch Cycle
Next best is a lock lister / lock killer/ There is a good few OpenVMS Lock analyze programs out there that can help you determine which process perhaps should be killed (try FORCE-EXIT first!)
I know I have a few, and attached one I recently worked on for a specific problem, reporting (RMS) locks for a specific PID. Should be easy enough to modify to your needs. For mere money I'll be hapyy to do so :-).
You may want to consider alternatives.
For example, a customer I work with uses the (V)select tool from EGH (our OpenVMS friend John Santos) which can read indexed file records faster than RMS can, and can blow through locks. That works great for reports and extracts, but might not be the ticket for bulk updates.
Hope this helps a little,
Hein van den Heuvel
Hvdh Performance COnsuling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 01:16 PM
тАО06-10-2009 01:16 PM
Re: Stopping User processes before Batch Cycle
Matching environments are quite rare (everybody tends to have a unique system load), and process logout and idle process killer tools (IPK) tend to need customizations to match local expectations. What processes you can delete via $delprc and what you have to toss $forcex and what sessions or applications you might have to go over to the terminal and gracefully exit the session will vary. Widely.
The general approaches available here (beyond the access times in UAF) are the IPKs, or coding the applications to be better behaved with locks and holding same (eg: doorbells, or code that uses a timer to move off of a record, or code that doesn't take a lock when reading records and/or that handles read-write-modify), or moving the application over to a database with the concurrency features you're likely looking for here. None of these options are simple nor easy nor (without a local application review) entirely "safe", though having a database underneath has various advantages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 02:15 PM
тАО06-10-2009 02:15 PM
Re: Stopping User processes before Batch Cycle
For uncooperative code you have no other option than to kill the processes. This has some risk of data corruption, especially if locks are held, or transactions are in flight, so it's best to be as judicious as possible, killing only those processes that are in your way. That pretty much means a procedure customised to your site.
Hein's code to hunt down locks is one possibility, but realise that there are timing windows involved! Another option is to search for open files. Again there are timing windows.
However you select your processes, remember to $FORCEX to give the process a chance to cleanup before $DELPRC.
Since you're V8.3, you can use the DCL command STOP/IMAGE to perform a $FORCEX from the command line. You can also use the /EXIT=mode qualifier to control execution of exit handlers.
Typically you should scan processes using F$CONTEXT and F$PID, and/or parsing output of SHOW DEVICE/FILES to find your processes. Use STOP/IMAGE/IDENT on the first pass, and record the PIDs as you go. Allow at least 30 to 60 seconds for the processes to settle, then, if any processes still exist, do a second pass using just STOP/IDENT.
The simplest way I've found to (silently) determine if a process exists is:
$ PIPE pid1=F$GETJPI(pid,"PID") >nl: 2>nl:
$ IF $STATUS
$ THEN
$ ! process exists
$ ELSE
$ ! no such process
$ ENDIF
you can also compare:
$ IF "''pid1'".EQS.pid
$ THEN
$ ! process exists
$ ENDIF
Symbol substitution is necessary because pid1 is not assigned if the process doesn't exist. Also note that since there is only a single command, the PIPE is executed entirely in the context of the current process. It's only used as a simple way of redirecting the error message to null.
When writing application code in the future, make sure you implement some mechanism to remotely request a clean shutdown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 03:53 PM
тАО06-10-2009 03:53 PM
Re: Stopping User processes before Batch Cycle
This approach has worked well for us.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 02:49 AM
тАО06-11-2009 02:49 AM
Re: Stopping User processes before Batch Cycle
1. Terminating inactive processes
2. Terminating active processes but who are working outside the acceptable window.
Personally, I'd go the UAF route.
If there is user generated batch work then a STOP/QUE/NEXT on those queues, say, 30 minutes before your end-of-workday time; followed by a STOP/QUE/RESET 30 minutes later.
Craig