- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Process information from GET$JPI seems inconsisten...
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
12-16-2008 02:02 AM
12-16-2008 02:02 AM
1. The same process apparently using less CPU in consecutive intervals, e.g. at 10:00 CPU=6957 at 10:15 CPU=4173, at 10:30 CPU=7132. We thought the CPU used values would be "gas meters", i.e. they only get bigger until the process ends. Calculating the CPU time used during an interval by a process results in negative values - and that can't be right.
2. Process IDs are duplicated - that seems odd too. I would have thought that every process in a given system would have a unique PID. We see that a process also has a start date/time and have used that provide a unique key, but even so, processes that we know are running don't appear to be present in every interval in the data we get back from GET$JPI.
Any ideas or pointers as to what is going on would be gratefully received.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 03:04 AM
12-16-2008 03:04 AM
Re: Process information from GET$JPI seems inconsistent
first of all, welcome to the HP OpenVMS Forum.
Your problem sounds very strange.
PID's are absolutely unique within same cluster.
Also the problem you have with getjpi sounds impossible for me.
Could you supply some example code? Until now I can only assume a coding problem.
Regards
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 03:17 AM
12-16-2008 03:17 AM
Re: Process information from GET$JPI seems inconsistent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 03:18 AM
12-16-2008 03:18 AM
Re: Process information from GET$JPI seems inconsistent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 03:18 AM
12-16-2008 03:18 AM
Re: Process information from GET$JPI seems inconsistent
welcome to the OpenVMS ITRC forum.
1. the used CPU time in a process is stored in the process header (PHD$L_CPUTIM) in 10 ms units and can only increment during the life of a process. You can look at the data in memory with:
$ ANAL/SYS
SDA> READ SYSDEF
SDA> SET PROC/IND=
SDA> EXA PHD+PHD$L_CPUTIM
SDA> EXIT
2. Process IDs are guaranteed to be unique within a system and even within a cluster. The fact that you don't get all the process data in each interval, may be caused by issues with the state of the process being queried, as some of the GETJPI calls may need to run in the context of that process and the state of that process may prevent such code to be executed immediately.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 03:43 AM
12-16-2008 03:43 AM
Re: Process information from GET$JPI seems inconsistent
for me it seems that this is basic code.
I dont have a basic compiler and I did not use basic the last 25 years.
That means that I can't help you.
But you can search some example code on google. Do a search for + openvms +basic + lib$getjpi and you will find a solution for your problem
Sorry for no better help
Regards
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 03:48 AM
12-16-2008 03:48 AM
Re: Process information from GET$JPI seems inconsistent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 03:59 AM
12-16-2008 03:59 AM
Re: Process information from GET$JPI seems inconsistent
So, use sys$getjpiw and check the both the return status AND the status in the iosb.
Jur.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 04:02 AM
12-16-2008 04:02 AM
Re: Process information from GET$JPI seems inconsistent
did you check, wheter a real process exists in the monitored system with a PID of 00153AB8 ? I bet this is some P0 space address in your program and not a real PID ! Just use $ SHOW SYSTEM, it will show you a list of the processes including their PID in column 1.
And note that the 3 different ISEE$MAD processes have only increasing values in their CPUTIM fields...
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 04:09 AM
12-16-2008 04:09 AM
Re: Process information from GET$JPI seems inconsistent
without digging deeper into the code (and installing a BASIC compiler) a few things come to mind when looking at your code:
- where do you construct the item list passed to $GETJPI?
- IOSB seems to be undefined/uninitialized
- you are using the asynchronous version of $GETJPI, but don't synchronize with an event flag and/or check the IOSB. You'd better use $GETJPIW in this case (unless you want to issue multiple calls in parallel - in which case I'm not sure how scanning the process list would work out).
This should give you a start to improve the code you posted. If more problems show up, get back here.
Good luck & regards,
Hans.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 04:11 AM
12-16-2008 04:11 AM
Re: Process information from GET$JPI seems inconsistent
.
I think the GET$JPIW route sounds the most hopeful, and I will talk to our developers to create version that uses that routine rather than GET$JPI.
Thanks again to all who have so far responded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 04:36 AM
12-16-2008 04:36 AM
Re: Process information from GET$JPI seems inconsistent
JPI$M_NO_TARGET_INSWAP
flag (which itself of course is a good thing).
See the system services manual for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 04:42 AM
12-16-2008 04:42 AM
Solution$GETJPI works. Period. It has been working for 30 years and no 'rookie' OpenVMS user is going to find a glaring bug in it today.
So if someone writes "Process information from GET$JPI seems inconsistent" then I read that as: "we have created a broken program and woudl like help figuring out what we did wrong".
Using that as a starting point and focussing on "what could we possibly have done wrong" is more productive than speculating as to whether a core OpenVMS system call might have gone wrong on you.
If you still have a problem, then consider adding a LIB$SPAWN call to the program (outside the loop) to perform a SHOW SYSTEM into a file at the same time the program.
The output should be 95% the same as the test program output file. Any and all difference might help explain what is going wrong.
In fact "SHOW SYSTEM" and the proposed program are so close that I wonder why the program was even written?! The only significant difference is "IO" vs "DIRIO" and I wonder whether it is fully understood what the difference between those tow is (BUFIO) and which would be more appropriate.
Now IF you opt to waste development cycles on rolling your own SHOW SYSTEM, then consider adding USER/EXEC/KERNEL cputim, as that is a missing feature from SHOW SYSTEM and can help a lot when trying to understand system behaviour.
Cheers,
hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 04:47 AM
12-16-2008 04:47 AM
Re: Process information from GET$JPI seems inconsistent
Your idea is really good and will help us to cross-reference our results with the official version. We have our own deep dark reasons for doing it this way which I won't bore you with right now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 06:20 AM
12-16-2008 06:20 AM
Re: Process information from GET$JPI seems inconsistent
> In fact "SHOW SYSTEM" and the proposed program are so close
> that I wonder why the program was even written?!
in his first posting, Nick mentioned that the goal was to collect performance data from various operating systems. This sounds like issuing DCL commands and looking at the result is not an option, rather than getting the information in machine readable format.
If my assumption is correct, I think going the $GETJPI(W) way is far superiour to scanning the output of a DCL command - which may change across versions, and with uncertain behaviour if some field overflows the allocated width or intended value range.
Remember SHOW SYSTEM showing delta times instead of used CPU time? Guy Peleg fixed this a couple of years ago for "SETI at Home" :-)
Cheers,
Hans.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2008 07:05 AM
12-16-2008 07:05 AM
Re: Process information from GET$JPI seems inconsistent
On a quick look, I vote for Volker being correct, and you are using f$faol incorrectly; I suggest you check the unformatted values.