Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Process Uptime

 
SOLVED
Go to solution
smsc_1
Regular Advisor

Process Uptime

Hi all,
is there a way to check the process uptime?

With "Show System" command I'll see only CPU time, but not the up time of the single process.

Thanks.
./ Lucas
7 REPLIES
Volker Halle
Honored Contributor
Solution

Re: Process Uptime

$ SHOW PROC/ACC/ID= will show you the 'Connect time:'. This is the process uptime.

$ WRITE SYS$OUTPUT F$GETJPI("","LOGINTIM")

will show you the process creation time. You can easily calcuate the uptime with F$DELTA_TIME, if you're running on a recent version of OpenVMS.

$ write sys$output f$delta_time(f$getjpi("","LOGINTIM"),F$CVTIME(,"ABSOLUTE"))

Volker.
smsc_1
Regular Advisor

Re: Process Uptime


volker, you are the man! :)
SHOW PROC/ACC/ID=20230756 works fine!

Thanks!
./ Lucas
Jon Pinkley
Honored Contributor

Re: Process Uptime

You didn't ask this, but sometimes is it useful to know how long an image has been running. This only works if image accounting is enabled, and there is no $getjpi access to the info, so you will need SDA or a privileged program to get the information.

$! with appropriate privs
$ analyze/system
SDA> set process/id= ! the target PID
SDA> examine/time ctl$gq_istart

There are also CTL$Gx_I* cells that have snapshot values of the CPU time, DirIO, BufIO, etc. at the time the image started. When the image accounting record is written, the delta values are what is written. In other words, CTL$GL_ICPUTIM contains the process CPU time when the image was activated; it doesn't get updated by the HWCLK interrupt. I am not sure about the workingset peak CTL$GL_IWSPEAK, as it isn't obvious to me how a snapshot at image activation time would be meaningful to the image, but the working set size changes much less frequently than the CPU time, so I would guess that both process and image peaks are maintained when the workingset is increased.

These are some of the image accounting related cells in the process control region.

CTL$GQ_ISTART
CTL$GL_IBIOCNT
CTL$GL_ICPUTIM
CTL$GL_IDIOCNT
CTL$GL_IFAULTIO
CTL$GL_IFAULTS
CTL$GL_IPAGEFL
CTL$GL_IVOLUMES
CTL$GL_IWSPEAK

I wish these cell were updated regardless of whether image accounting was enabled, and that there was $GETJPI access to them.

Jon
it depends
Jess Goodman
Esteemed Contributor

Re: Process Uptime

If you're looking for a SHOW SYSTEM like utility but with output that shows each process's uptime, you might wannt to try my SSYS program. Attached is a .ZIP file containing sources and VAX/ALPHA binaries.

$ SSYS/INTERACTIVE
list of processes found on node AX99 at 17-JUL-2008 21:37:19
pid process state login time %cpu pflt/sec bio/sec dio/sec
78A8916A GOODMAN CUR 2 I 7 06:27:14 0.02 0.126 0.237 0.210
78AE25BD _TNA135: LEF I 0 09:17:46 0.02 0.207 0.205 0.078
I have one, but it's personal.
smsc_1
Regular Advisor

Re: Process Uptime


Jess, thanks for your utility.
But i got some problem to use it.

%DCL-W-ACTIMAGE, error activating image SYS$LOGIN:SSYS.EXE
-CLI-E-IMGNAME, image file DSA0:[SMSC]ssys.exe;1
-IMGACT-F-NOT_I64, image is not an HP OpenVMS Industry Standard 64 image

I'm running OpenVMS V8.3-1H1 on HP rx2660 (1.59GHz/6.0MB)

May I recompile it?? However I don't know how! :(
./ Lucas
Duncan Morris
Honored Contributor

Re: Process Uptime

Jess did indicate that the ZIP files contained only ALPHA and VAX binaries.

It would appear that you are trying to run it on an itanium platform.

The zip files contains the source files, but you will need a FORTRAN compiler if you want to recompile the program for itanium.

Duncan
smsc_1
Regular Advisor

Re: Process Uptime


You are right Duncan, I execute it on wrong machine!!! ^_^
On Alpha server works fine....

Ok I'll use SHOW PROC/ACC/ID= command on itanium and ssys on alpha!

Thanks to all!
./ Lucas