<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Process information from GET$JPI seems inconsistent in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323847#M15941</link>
    <description>Thank you Hein. Be assured, I am under no misconception that we have done this right and VMS is wrong - I'm a z/OS mainframe guy by breeding (some 30 years now), so I never assume that anything that appears to be wrong is the fault of the operating system.  &lt;BR /&gt;&lt;BR /&gt;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.</description>
    <pubDate>Tue, 16 Dec 2008 12:47:59 GMT</pubDate>
    <dc:creator>Nick Varley</dc:creator>
    <dc:date>2008-12-16T12:47:59Z</dc:date>
    <item>
      <title>Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323834#M15928</link>
      <description>We build and sell software that retrieves performance data from many operating systems (Windows UNIX Linux z/OS), including VMS systems.  We are *not* VMS experts by a long shot, but we have built some software that retrieves useful information from VMS systems.  We are however somewhat confused by the results of program that issues repeated GET$JPI calls to obtain details of running processes.  We see a couple of odd things.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Any ideas or pointers as to what is going on would be gratefully received.</description>
      <pubDate>Tue, 16 Dec 2008 10:02:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323834#M15928</guid>
      <dc:creator>Nick Varley</dc:creator>
      <dc:date>2008-12-16T10:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323835#M15929</link>
      <description>Hi Nick&lt;BR /&gt;&lt;BR /&gt;first of all, welcome to the HP OpenVMS Forum.&lt;BR /&gt;&lt;BR /&gt;Your problem sounds very strange. &lt;BR /&gt;&lt;BR /&gt;PID's are absolutely unique within same cluster.&lt;BR /&gt;&lt;BR /&gt;Also the problem you have with getjpi sounds impossible for me.&lt;BR /&gt;&lt;BR /&gt;Could you supply some example code? Until now I can only assume a coding problem.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Geni</description>
      <pubDate>Tue, 16 Dec 2008 11:04:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323835#M15929</guid>
      <dc:creator>Heinz W Genhart</dc:creator>
      <dc:date>2008-12-16T11:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323836#M15930</link>
      <description>Thanks for the reply.  I've attached some of the code.</description>
      <pubDate>Tue, 16 Dec 2008 11:17:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323836#M15930</guid>
      <dc:creator>Nick Varley</dc:creator>
      <dc:date>2008-12-16T11:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323837#M15931</link>
      <description>...and also some output from the routine, for process ISEE$MAD.  3 different processes, all with different start dates and times, all with the same PID.</description>
      <pubDate>Tue, 16 Dec 2008 11:18:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323837#M15931</guid>
      <dc:creator>Nick Varley</dc:creator>
      <dc:date>2008-12-16T11:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323838#M15932</link>
      <description>Nick,&lt;BR /&gt;&lt;BR /&gt;welcome to the OpenVMS ITRC forum.&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;$ ANAL/SYS&lt;BR /&gt;SDA&amp;gt; READ SYSDEF&lt;BR /&gt;SDA&amp;gt; SET PROC/IND=&lt;PID-OF-PROCESS&gt;&lt;BR /&gt;SDA&amp;gt; EXA PHD+PHD$L_CPUTIM&lt;BR /&gt;SDA&amp;gt; EXIT&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Volker.&lt;/PID-OF-PROCESS&gt;</description>
      <pubDate>Tue, 16 Dec 2008 11:18:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323838#M15932</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2008-12-16T11:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323839#M15933</link>
      <description>Hi Nick&lt;BR /&gt;&lt;BR /&gt;for me it seems that this is basic code. &lt;BR /&gt;I dont have a basic compiler and I did not use basic the last 25 years. &lt;BR /&gt;&lt;BR /&gt;That means that I can't help you.&lt;BR /&gt;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&lt;BR /&gt;&lt;BR /&gt;Sorry for no better help&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Geni</description>
      <pubDate>Tue, 16 Dec 2008 11:43:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323839#M15933</guid>
      <dc:creator>Heinz W Genhart</dc:creator>
      <dc:date>2008-12-16T11:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323840#M15934</link>
      <description>Thanks for the ideas so far.  It has always been my thought that we're not doing it right, I'm just not sure where to go to find a better way.  I have spent quite of lot of time already with my best friend Dr. Google...</description>
      <pubDate>Tue, 16 Dec 2008 11:48:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323840#M15934</guid>
      <dc:creator>Nick Varley</dc:creator>
      <dc:date>2008-12-16T11:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323841#M15935</link>
      <description>Your program is buggy. You use sys$getjpi instead of sys$getjpiW which causes your program to continue while getjpi is still working on the data. And you specify an IOSB without bothering to check it....&lt;BR /&gt;&lt;BR /&gt;So, use sys$getjpiw and check the both the return status AND the status in the iosb.&lt;BR /&gt;&lt;BR /&gt;Jur.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Dec 2008 11:59:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323841#M15935</guid>
      <dc:creator>Jur van der Burg</dc:creator>
      <dc:date>2008-12-16T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323842#M15936</link>
      <description>Nick,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;And note that the 3 different ISEE$MAD processes have only increasing values in their CPUTIM fields...&lt;BR /&gt;&lt;BR /&gt;Volker.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Dec 2008 12:02:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323842#M15936</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2008-12-16T12:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323843#M15937</link>
      <description>Nick,&lt;BR /&gt;&lt;BR /&gt;without digging deeper into the code (and installing a BASIC compiler) a few things come to mind when looking at your code:&lt;BR /&gt;&lt;BR /&gt;- where do you construct the item list passed to $GETJPI?&lt;BR /&gt;- IOSB seems to be undefined/uninitialized&lt;BR /&gt;- 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).&lt;BR /&gt;&lt;BR /&gt;This should give you a start to improve the code you posted. If more problems show up, get back here.&lt;BR /&gt;&lt;BR /&gt;Good luck &amp;amp; regards,&lt;BR /&gt;Hans.</description>
      <pubDate>Tue, 16 Dec 2008 12:09:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323843#M15937</guid>
      <dc:creator>H_Bachner</dc:creator>
      <dc:date>2008-12-16T12:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323844#M15938</link>
      <description>The code was just a snip, the items mentioned are properly initialised further up the program. I have re-posted the whole code should anyone be interested in seeing it all&lt;BR /&gt;.&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Thanks again to all who have so far responded.</description>
      <pubDate>Tue, 16 Dec 2008 12:11:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323844#M15938</guid>
      <dc:creator>Nick Varley</dc:creator>
      <dc:date>2008-12-16T12:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323845#M15939</link>
      <description>In addition to the synchronization issue, some of the data from the process may be missing/not updated due to the &lt;BR /&gt; JPI$M_NO_TARGET_INSWAP&lt;BR /&gt;flag (which itself of course is a good thing).&lt;BR /&gt;See the system services manual for details.</description>
      <pubDate>Tue, 16 Dec 2008 12:36:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323845#M15939</guid>
      <dc:creator>Joseph Huber_1</dc:creator>
      <dc:date>2008-12-16T12:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323846#M15940</link>
      <description>I'm sure that GETJPIW solved the coding problem, but just in case it does not...&lt;BR /&gt;&lt;BR /&gt;$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.&lt;BR /&gt;&lt;BR /&gt;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".&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;The output should be 95% the same as the test program output file. Any and all difference might help explain what is going wrong.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Dec 2008 12:42:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323846#M15940</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-12-16T12:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323847#M15941</link>
      <description>Thank you Hein. Be assured, I am under no misconception that we have done this right and VMS is wrong - I'm a z/OS mainframe guy by breeding (some 30 years now), so I never assume that anything that appears to be wrong is the fault of the operating system.  &lt;BR /&gt;&lt;BR /&gt;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.</description>
      <pubDate>Tue, 16 Dec 2008 12:47:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323847#M15941</guid>
      <dc:creator>Nick Varley</dc:creator>
      <dc:date>2008-12-16T12:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323848#M15942</link>
      <description>Hello Hein,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; In fact "SHOW SYSTEM" and the proposed program are so close&lt;BR /&gt;&amp;gt; that I wonder why the program was even written?! &lt;BR /&gt;&lt;BR /&gt;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. &lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt; &lt;BR /&gt;Remember SHOW SYSTEM showing delta times instead of used CPU time? Guy Peleg fixed this a couple of years ago for "SETI at Home" :-)&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hans.</description>
      <pubDate>Tue, 16 Dec 2008 14:20:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323848#M15942</guid>
      <dc:creator>H_Bachner</dc:creator>
      <dc:date>2008-12-16T14:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Process information from GET$JPI seems inconsistent</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323849#M15943</link>
      <description>"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 !"&lt;BR /&gt;&lt;BR /&gt;On a quick look, I vote for Volker being correct, and you are using f$faol incorrectly; I suggest you check the unformatted values.</description>
      <pubDate>Tue, 16 Dec 2008 15:05:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/process-information-from-get-jpi-seems-inconsistent/m-p/4323849#M15943</guid>
      <dc:creator>Richard Brodie_1</dc:creator>
      <dc:date>2008-12-16T15:05:24Z</dc:date>
    </item>
  </channel>
</rss>

