PINFO function
syntax: PINFO (pin, “item” [,status] )where PIN can be a string, “[#P]nnn[.tin]”, or a simple integer, “0” is “me”
66 unique items: Alive, IPAddr, Parent, Child, Children, Proctype, WorkGroup, SecondaryThreads, NumOpenFiles, ProgramName, etc.
status parm is a variable name. If passed, CI sets status to PINFO error return -- normal CI error handling bypassed
can see non-sensitive data for any user process on system
follows SHOWPROC’s rules for sensitive data
Notes:
- documented in 7.0 Express 1 Communicator or on Jazz at: http://jazz.external.hp.com/papers/Communicator/7.0/exp1/ci_enhancements.html
- :help PINFO provides all of the items, security rules and some examples.
- if PINFO ( HPPIN, “Info”) = “PRINT” then … # info=“PRINT” was specified for your process...
- if PINFO ( 547, “IPADDR”) <> “” then # This process is connected via the network
- if PINFO ( target_pin, “SchedQ”) = “DS” then # ‘target_pin’ is currently in the DS dispatcher queue
- walk down process tree: setvar p PINFO ( 0, “jsmainPin”) while p <> 0 do setvar p PINFO ( p, “child”) endwhile
- walk up process tree: setvar p 0 while PINFO ( p, “proctype”) <> “JSMAIN” do setvar p PINFO ( p, “parent”) endwhile
- find state of each descendant process: setvar kids PINFO ( 0, “children”) setvar kids word(kids,”/”,2) # get rid of count field setvar k 0 while setvar(p,word(kids,,setvar(k,k+1))) <> “” and PINFO (p, ‘alive’) do echo Pin: !p, state=![PINFO (p, “procState”)] endwhile