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

Show Sys/State=SUSP

 
SOLVED
Go to solution
Max Pierre
Advisor

Show Sys/State=SUSP

Hi,

I would like to know what proc states a show system/state=SUSP is supposed to return.
For example :
VMSPOR > show sys/state=SUSP
OpenVMS V8.3 on node VMSPOR 12-NOV-2009 09:37:07.48 Uptime 0 02:00:22
Pid Process Name State Pri I/O CPU Page flts Pages
000000AF SYSTEM RWMBX 6 324460 0 00:06:01.20 49602 122
0000025B PIERRE SUSP 4 190 0 00:00:00.77 445 83

Gives processes in RWMBX and SUSP states.
The dcl dictionary book does not give any details about what system states would be returned when the SUSP state is "checked".

Thanks in advance

Pierre
9 REPLIES 9
Jur van der Burg
Respected Contributor
Solution

Re: Show Sys/State=SUSP

This are the possible states.

Jur.

'RWMBX' Mailbox full
'RWNPG' Non-paged pool
'RWPFF' Page file full
'RWPAG' Paged pool
'RWBRK' Waiting for BROADCAST to finish
'RWIMG' Image activation lock
'RWQUO' Pooled quota
'RWLCK' Lock ID data base
'RWSWP' Swap file space
'RWMPE' Modified page list empty
'RWMPB' Modified page writer busy
'RWSCS' SCS wait
'RWCLU' Cluster transition wait
'RWCAP' CPU capability required
'RWCSV' Cluster server
'RWSNP' System snapshot
'PSXFR' POSIX fork wait
'RWINS' Inner mode (semaphore) wait
'RWEXH' 'Exit Handling' wait
Max Pierre
Advisor

Re: Show Sys/State=SUSP

Jur,

Thanks for the list :-)

Regards,

Pierre
John Gillings
Honored Contributor

Re: Show Sys/State=SUSP

Pierre,

You'll occasionally see a command like

$ SHOW PROCESS/CONTINUOUS

return an error "Process is suspended", when the process is in a resource wait state, rather than in true SUSP state.

That's because the failure status from a $GETJPI on such a process is SS$_SUSPENDED. The definition of the state is

"The specified process is suspended or in a miscellaneous wait state, and the requested information cannot be obtained."

Jur's list of states looks complete as of latest version, V8.3, but be aware that some of these are fairly recent additions, so more may be added in future.

Explanation: Some (limited) information about processes can be determined from the "outside", everything else requires asking the process. The target process must execute a kernel AST to gather the information and return it to the requester. A process in SUSP or any of the resource wait states cannot execute this code, and therefore cannot return the extended information.

Unfortunately, the design decision in $GETJPI was to lump all these states together and call them all "suspended". This is confusing and misleading, but that's just the way it is.

If you want to list just the processes that are in "true" SUSP state, try:

PIPE SHOW SYSTEM/STATE=(SUSP,CUR) | -
(SHOW SYSTEM/NOPROCESS ; SEARCH SYS$PIPE " SUSP "/EXACT) | -
SEARCH SYS$PIPE "%SEARCH-I-NOMATCHES"/MATCH=NOR

(getting this to work for all cases is a bit ugly, and expensive. See if you can work out the reason for all the apparently extraneous stuff. There are still pathological cases where it will do strange things)
A crucible of informative mistakes
Max Pierre
Advisor

Re: Show Sys/State=SUSP

John,

Your explanations are crystal clear. Thanks for your time you spent to give this answer.

Have a nice day

Pierre
Jess Goodman
Esteemed Contributor

Re: Show Sys/State=SUSP

Add MUTEX to Jur's list since it is the one Miscellaneous Wait State that doesn't start with RW.

Also I believe that any process with that has the DELPEN bit set will also cause $GETJPI to return SS$_SUSPENDED, and would therefore show up with SHOW SYSTEM/STATE=SUSP. So under unusual circumstances you could see a process in various other states, including LEF[O] or COM[O].
I have one, but it's personal.
labadie_1
Honored Contributor

Re: Show Sys/State=SUSP

Pierre

You can often see some more states that will appear in future Vms versions with

$ lib/extract=$rsndef/out=rsn.mar sys$library:lib.mlb

will put in rsn.mar the list of states.

Have fun.

Gérard
Wim Van den Wyngaert
Honored Contributor

Re: Show Sys/State=SUSP

I once tried to find the suspended processes too. I used lexicals to find them and found all the mentioned states. So, I checked the "suspended" every second during 60 seconds and if they were still suspended I reported them as suspect. In 10 years only the real suspended came up as suspended.

fwiw

Wim
Wim
Hoff
Honored Contributor

Re: Show Sys/State=SUSP

As for another way toward spotting these cases...

set audit /enable=process=suspnd

These suspended processes can also arise in cases when OpenVMS system security is configured to suspend processes that are generating volumes of activity and when security-related system resources are scarce.
Max Pierre
Advisor

Re: Show Sys/State=SUSP

Thank you all !

As always, this forum is truly helpful.

As I want to monitor a system continuously, I'll give a try to something approaching the solution proposed by Wim.

Regards,

Pierre