- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Need DCL help
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
08-09-2005 10:56 AM
08-09-2005 10:56 AM
I have only beginner level knowledge in DCL. I am trying write a script that would track a process that goes into a loop ( CUR state with no I/O ) I know the process name starts with SRV. I need this to be done quickly as we have a problem that causes this. (This is ofcourse a temproary thing until the vendor fixes the application bug that is causing this)
Your help would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 11:33 AM
08-09-2005 11:33 AM
Re: Need DCL help
The command file gives a good example of how check all processes on a system. F$GETJPI can provide the I/O numbers you're looking for.
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 01:27 PM
08-09-2005 01:27 PM
Re: Need DCL help
Maybe instead of scripts you should look at tools or utilities?
Like
$moni proc/topcpu
and
$moni proc/cont/id...
Do you want to catch a program as soon as possible after it gets into a computable loop? I suspect this is a standard function of tools like DECamds or Openview, but do not really know.
I suppose you could write a dcl script to loop over all processes with F$GETJPI.
For each process grab cputime. Subtract prior cpu time stored in cpu_'pid. If within 95% of loop interval, report potential problem. After test remember the cpu time in a symbol cpu_'pid. After last process wait 10 seconds and try again.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 04:00 PM
08-09-2005 04:00 PM
SolutionI've attached a sample command procedure which looks for processes owned by a specified username (optional) with a process name starting with a specified prefix, it saves the DIOCNT and BIOCNT for each process discovered. When seen again, the state is checked. If CUR or COM, with no change in DIOCNT or BIOCNT, a mail message is sent to a specified user.
Modification to you exact specifications left as an exercise, usual disclaimers...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 04:03 PM
08-09-2005 04:03 PM
Re: Need DCL help
Since this procedure creates two new symbols for each matching process found, if you leave it running long enough, especially if you have many processes, or high process turnover, it could potentially fill your symbol table.
Probably a good idea to stop and restart every so often!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 08:12 PM
08-09-2005 08:12 PM
Re: Need DCL help
at first glance, your dcl procedure has a little error:
$ IF(state.EQS."CUR".OR.state.EQS."COM").AND.
- (dio-dio'pid'.EQ.0).AND.(bio-bio'pid'.EQ.0)
where dio-dio'pid' and bio-bio'pid' don't seem assigned in elsewhere.
I guess you want to write
$ IF(state.EQS."CUR".OR.state.EQS."COM").AND.
- (dio'pid'.EQ.dio).AND.(bio'pid'.EQ.bio)
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 09:11 PM
08-09-2005 09:11 PM
Re: Need DCL help
sorry, but I have to disagree.
John's procedure is entirely correct.
I think you confused the minus-sign with an underscore.
"dio - dio'pid' .eq. 0" is entirely equivalent with
"dio .eq. dio'pid'
The minus-sign in dio-'pid' is not, and can not be, a character in the name of a symbol, but always is the arithmetic "minus" function operator!.
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 09:33 PM
08-09-2005 09:33 PM
Re: Need DCL help
you are right. I confused minus with underscore because I don't use this form fo expression.
Thank you!
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 04:04 AM
08-10-2005 04:04 AM
Re: Need DCL help
Andy, I was looking at that lexical and trying to understand it. I will look at the examples from sys$examples.
Hi Hein, thats what I am doing for now, watch mon proc/topc interactively until I put a dcl script in place.
John, thanks a bunch for sharing a DCL command procedure. I was thinking along that lines to get and compare the DIOCNT and BIOCNT. will try to use it as an example since i do not have much time to start monitoring the looping process.
Anotnio/Jan , thanks for your efforts.
All, I am allocating the points and once again thanks for your quick responses.
I will update here with progress or questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 11:04 AM
08-10-2005 11:04 AM
Re: Need DCL help
It works great. I only had to modify it to send page messge and email.
Thanks
James