26-Aug-2005

Detecting the dreaded QFUL

I run this command procedure regularly to detect the dreaded QFUL condition on HSG80 controllers.


$       say := write sys$output
$       required_privs = "cmkrnl,sysnam"
$       old_privs = f$setprv (required_privs)
$       if .not. f$privilege (required_privs)
$       then
$           say "Required privs: " + required_privs
$           exit 36
$       endif
$       node = f$getsyi ("nodename")
$       if .not. f$trnlnm ("sm_qful_test_table", "lnm$system_directory",,,,"table")
$       then
$           create/name_table/parent=lnm$system_directory sm_qful_test_table
$       endif
$
$       temp_file1 = f$unique () + ".COM"
$       temp_file2 = f$unique () + ".COM"
$       open/write temp_file1 'temp_file1'
$       write temp_file1 "$     analyse/system"
$       write temp_file1 "$     deck"
$       write temp_file1 "set output ''temp_file2'"
$       write temp_file1 "fc stdt/all"
$       write temp_file1 "$     eod"
$       write temp_file1 "$     exit"
$       close temp_file1
$       @'temp_file1'
$       deletex/nolog 'temp_file1';*
$       start_found = 0
$       open temp_file2 'temp_file2'
$loop:
$       read/end_of_file=end_loop temp_file2 record
$       record = f$edit (record, "uncomment,trim,compress")
$       if f$length (record) .eq. 0
$       then
$           goto loop
$       endif
$       if f$locate ("5000.1FE1.", record) .eq. f$length (record)
$       then
$           goto loop
$       endif
$       wwid = f$element (2, " ", record) - "." - "." - "."
$       qf_seen = f$string (f$integer (f$element (18, " ", record)))
$       say wwid + "   " + qf_seen
$       last = f$trnlnm (wwid, "sm_qful_test_table")
$       if last .eqs. ""
$       then
$           define/table=sm_qful_test_table 'wwid' 'qf_seen'
$       else
$           if qf_seen .gt. last
$           then
$               define/table=sm_qful_test_table 'wwid' 'qf_seen'
$               say "QFUL seen on controller ''wwid'"   ! Send mail instead.
$           endif
$       endif
$       goto loop
$end_loop:
$       close temp_file2
$       deletex/nolog 'temp_file2';*
$       goto exit
$exit:
$       old_privs = f$setprv (old_privs)
$       exit
Posted at August 26, 2005 5:51 PM
Tag Set:
Comments

It looks like the f$trnlnm() test for table existence should ask for an item like "table_name", since translation would return null string even if table existed? It's not really hurting anything -- just trying to create table if it already exists, but defeats the (presumed)purpose of the check. Thanks for the example.

Posted by: tom crowley at October 3, 2005 9:45 AM

Thanks Tom, I never even noticed the omission. I've updated the procedure above.

Posted by: Jim Duff at October 3, 2005 6:03 PM

Comments are closed