home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!gatech!news.byu.edu!hamblin.math.byu.edu!arizona.edu!mvb.saic.com!vmsnet-sources
- Newsgroups: vmsnet.sources
- Subject: another version of nodeinfo.com
- Message-ID: <10360362@MVB.SAIC.COM>
- From: mailrus!samsung!ulowell!aspen.ulowell.edu!welchb@uunet.UU.NET
- Date: Wed, 27 Jan 1993 21:58:04 GMT
- Followup-To: vmsnet.sources.d
- Organization: University of Lowell
- Approved: Mark.Berryman@Mvb.Saic.Com
- Lines: 217
-
- Submitted-by: mailrus!samsung!ulowell!aspen.ulowell.edu!welchb@uunet.UU.NET
- Posting-number: Volume 4, Issue 55
- Archive-name: nodeinfo/part01
- Supersedes: nodeinfo: Volume 4, Issue 19,34
-
- Yet another version of nodeinfo.com. Stop me if you are all sick of this,
- or if it does not work for most sites.
- --
- Brendan Welch, UMass/Lowell, W1LPG, welchb@woods.ulowell.edu
-
- $! ------------------ CUT HERE -----------------------
- $ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
- $!
- $! This archive created by VMS_SHARE Version 8.2
- $! On 27-JAN-1993 13:53:50.71 By user BERRYMAN
- $!
- $! The VMS_SHARE software that created this archive
- $! was written by Andy Harper, Kings College London UK
- $! -- December 1992
- $!
- $! Credit is due to these people for their original ideas:
- $! James Gray, Michael Bednarek
- $!
- $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
- $! AND EXECUTE AS A COMMAND PROCEDURE ( @name )
- $!
- $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
- $! 1. NODEINFO.COM;1
- $!
- $set="set"
- $set symbol/scope=(nolocal,noglobal)
- $f=f$parse("SHARE_UNPACK_TEMP","SYS$SCRATCH:."+f$getjpi("","PID"))
- $e="write sys$error ""%UNPACK"", "
- $w="write sys$output ""%UNPACK"", "
- $ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
- $ ve=f$getsyi("version")
- $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
- $ e "-E-OLDVER, Must run at least VMS 4.4"
- $ v=f$verify(v)
- $ exit 44
- $unpack: subroutine ! P1=filename, P2=checksum, P3=attributes
- $ if f$parse(P1) .nes. "" then $ goto dirok
- $ dn=f$parse(P1,,,"DIRECTORY")
- $ w "-I-CREDIR, Creating directory ''dn'"
- $ create/dir 'dn'
- $ if $status then $ goto dirok
- $ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
- $ delete 'f'*
- $ exit
- $dirok:
- $ x=f$search(P1)
- $ if x .eqs. "" then $ goto file_absent
- $ e "-W-EXISTS, File ''P1' exists. Skipped"
- $ delete 'f'*
- $ exit
- $file_absent:
- $ w "-I-UNPACK, Unpacking file ", P1
- $ n=P1
- $ if P3 .nes. "" then $ n=f
- $ if .not. f$verify() then $ define/user sys$output nl:
- $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='n'
- PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
- SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;
- PROCEDURE SkipPartsep LOOP EXITIF MARK(NONE)=END_OF(b);EXITIF INDEX(ERASE_LINE,
- "-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;PROCEDURE ProcessLine LOCAL c,s,l,b,
- n,p;c := ERASE_CHARACTER(1);s := ERASE_LINE;IF c = "X" THEN SPLIT_LINE; ENDIF;
- MOVE_HORIZONTAL(-1);l := LENGTH(s);p := 1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);
- p := p+1;CASE c FROM ' ' TO '`' ['`']: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[
- ' ']: p:=p+1;[INRANGE,OUTRANGE]: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;
- PROCEDURE Decode POSITION(BEGINNING_OF(b));LOOP EXITIF MARK(NONE)=END_OF(b);
- IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
- MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
- SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
- COMMAND_LINE,"file_name");b:=CREATE_BUFFER(f,f);Decode;WRITE_FILE(b,GET_INFO(
- COMMAND_LINE,"output_file"));QUIT;
- $ if p3 .eqs. "" then $ goto dl
- $ open/write fdl &f
- $ write fdl "RECORD"
- $ write fdl P3
- $ close fdl
- $ w "-I-CONVRFM, Converting record format to ", P3
- $ convert/fdl=&f &f-1 &P1
- $dl: delete 'f'*
- $ checksum 'P1'
- $ if checksum$checksum .nes. P2 then $ -
- e "-E-CHKSMFAIL, Checksum of ''P1' failed."
- $ exit
- $ endsubroutine
- $start:
- $!
- $ create 'f'
- X$`20say`20:=`20write`20sys$output
- X$`20say`20"You`20are`20on`20a`20",`20f$getsyi("HW_NAME"),`20"`20named`20",`20f
- V$getsyi("NODENAME"),`20"."
- X$`20say`20"It`20was`20last`20booted`20on`20",`20f$getsyi("boottime"),"."
- X$`20say`20"This`20system`20has`20",`20f$getsyi("availcpu_cnt"),"`20cpu(s);"
- V`20-
- X`20,`20"`20",`20f$getsyi("activecpu_cnt"),"`20is/are`20active."
- X$`20if`20.not`20f$getsyi("cluster_member")
- X$`20then
- X$`20`20say`20"It`20is`20not`20a`20member`20of`20a`20VAXCluster."
- X$`20else
- X$`20`20say`20"It`20is`20a`20member`20of`20a`20VAXcluster`20containing`20"-
- X`20`20`20,`20f$getsyi("cluster_nodes"),"`20nodes."
- X$`20`20say`20"This`20VAXcluster`20has`20a`20total`20cluster`20quorum`20of`20"-
- V
- X`20`20`20,`20f$getsyi("cluster_quorum"),"`20votes,`20and`20"
- X$`20`20say`20"`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20",f$getsyi
- V("cluster_votes"),`20"`20total`20cluster`20vote(s)."
- X$`20`20say`20"This`20node's`20quorum`20value`20is`20",`20f$getsyi("node_quorum
- V")-
- X`20`20`20,"`20and`20it`20has`20",`20f$getsyi("node_votes"),"`20vote(s)."
- X$`20endif
- X$`20say`20"`20"
- X$`20say`20"We`20will`20now`20execute`20the`20equivalent`20of`20showing`20F$GET
- VSYI(*)"
- X$`20say`20f$getsyi("activecpu_cnt"),`20`20"`09`20`09`09=activecpu_cnt"
- X$`20say`20f$getsyi("availcpu_cnt"),`20`20"`09`20`09`09=availcpu_cnt"
- X$`20say`20f$getsyi("archflag"),`20`20`09`20"`09`20`09`09=archflag"
- X$`20say`20f$getsyi("boottime"),`20`20`09`20"`09=boottime"
- X$`20say`20f$getsyi("character_emulated"),`20`09`20"`09`20`09`09=character_emul
- Vated"
- X$`20say`20f$getsyi("contig_gblpages"),`20`09`20"`20`09`09`09=contig_gblpages"
- X$`20say`20f$getsyi("cpu"),`20`20`09`20"`09`20`09`09=cpu"
- X$`20say`20f$getsyi("decimal_emulated"),`20`09`20"`09`20`09`09=decimal_emulated
- V"
- X$`20say`20f$getsyi("d_float_emulated"),`20`09`20"`09`20`09`09=d_float_emulated
- V"
- X$`20say`20f$getsyi("f_float_emulated"),`20`09`20"`09`20`09`09=f_float_emulated
- V"
- X$`20say`20f$getsyi("free_gblpages"),`20`09`20"`09`20`09`09=free_gbl_pages"
- X$`20say`20f$getsyi("free_gblsects"),`20`09`20"`09`20`09`09=free_gbl_sects"
- X$`20say`20f$getsyi("g_float_emulated"),`20`09`20"`09`20`09`09=g_float_emulated
- V"
- X$`20say`20f$getsyi("pagefile_free"),`20`09`20"`09`20`09`09=pagefile_free"
- X$`20say`20f$getsyi("pagefile_page"),`20`09`20"`09`20`09`09=pagefile_page"
- X$`20say`20f$getsyi("sid"),`20`20`09`20"`09`20`09=sid"
- X$`20say`20f$getsyi("swapfile_free"),`20`09`20"`09`20`09`09=swapfile_free"
- X$`20say`20f$getsyi("swapfile_page"),`20`09`20"`09`20`09`09=swapfile_page"
- X$`20say`20f$getsyi("version"),`20`20`09`20"`09`20`09=version"
- X$`20say`20"`20"
- X$`20say`20f$getsyi("cluster_fsysid"),`20`20"`09`20`09=cluster_fsysid"
- X$`20say`20f$getsyi("cluster_ftime"),`20`20`20"`09`20=cluster_ftime"
- X$`20say`20f$getsyi("cluster_member"),`20`20"`09`09`09`20=cluster_member"
- X$`20say`20f$getsyi("cluster_nodes"),`20`20`20"`09`09`09`20=cluster_nodes"
- X$`20say`20f$getsyi("cluster_quorum"),`20`20"`09`09`09`20=cluster_quorum"
- X$`20say`20f$getsyi("cluster_votes"),`20`20`20"`09`09`09`20=cluster_votes"
- X$`20say`20f$getsyi("hw_model"),`20`20`20`20`20`20`20`20"`09`09`09`20=hw_model"
- V
- X$!`20hw_model`20>`201023`20is`20an`20ALPHA;`20otherwise`20VAX
- X$`20say`20f$getsyi("hw_name"),`20`20`20`20`20`20`20`20`20"`09`09`20=hw_name"
- X$`20say`20f$getsyi("nodename"),`20`20`20`20`20`20`20`20"`09`09`09`20=nodename"
- V
- X$`20nn`20=`20f$getsyi("nodename")`09!`20for`20use`20below
- X$`20say`20f$getsyi("node_area"),`20`20`20`20`20`20`20"`09`09`09`20=node_area"
- X$`20say`20f$getsyi("node_csid"),`20`20`20`20`20`20`20"`09`09`20=node_csid"
- X$`20say`20f$getsyi("node_hwtype"),`20`20`20`20`20"`09`09`09`20=node_hwtype"
- X$`20say`20f$getsyi("node_hwvers"),`20`20`20`20`20"`09=node_hwvers"
- X$`20say`20f$getsyi("node_number"),`20`20`20`20`20"`09`09`09`20=node_number"
- X$`20say`20f$getsyi("node_quorum"),`20`20`20`20`20"`09`09`09`20=node_quorum"
- X$`20say`20f$getsyi("node_swincarn"),`20`20`20"`09`20=node_swincarn"
- X$`20say`20f$getsyi("node_swtype"),`20`20`20`20`20"`09`09`09`20=node_swtype"
- X$`20say`20f$getsyi("node_swvers"),`20`20`20`20`20"`09`09`09`20=node_swvers"
- X$`20say`20f$getsyi("node_systemid"),`20`20`20"`09`20=node_systemid"
- X$`20say`20f$getsyi("node_votes"),`20`20`20`20`20`20"`09`09`09`20=node_votes"
- X$`20say`20f$getsyi("scs_exists"),`20`20`20`20`20`20"`09`09`09`20=scs_exists"
- X$`20say`20f$getsyi("system_rights"),`20`20`20"`09`20=system_rights"
- X$`20say`20f$getsyi("vector_emulator"),`20"`09`09`09`20=vector_emulator"
- X$`20say`20f$getsyi("vp_mask"),`20`20`20`20`20`20`20`20`20"`09`09`09`20=vp_mask
- V"
- X$`20say`20f$getsyi("vp_number"),`20`20`20`20`20`20`20"`09`09`09`20=vp_number"
- X$`20say`20"================================================================="
- X$`20say`20"We`20will`20now`20execute`20`20$SHOW`20CPU/FULL"
- X$`20on`20error`20then`20continue
- X$`20show`20cpu/full
- X$`20say`20"================================================================="
- X$`20say`20"We`20will`20try`20to`20show`20Internet`20address."
- X$!`20Another`20way`20would`20be`20to`20telnet`20to`20nn`20(which`20gives`20its
- V`20address),`20then
- X$!`20ctrl-`5D,`20then`20`20exit
- X$!`20and`20another`20way`20would`20be`20$`20ucx`20show`20host`20'nn',`20where
- V`20nn`20was`20saved`20above.
- X$`20ucx`20show`20host`20'f$trnlnm("ucx$inet_host")
- X$!Last`20line`20suggested`20by`20Shawn`20Clifford.
- X$`20say`20"================================================================="
- X$`20say`20"We`20will`20try`20to`20show`20DECnet`20Physical`20Working`20Etherne
- Vt`20address."
- X$`20mcr`20ncp`20show`20exec`20stat
- X$`20say`20"================================================================="
- X$`20say`20"We`20will`20try`20to`20show`20Hardware`20Ethernet`20address."
- X$!`20Obtain`20line`20from`20$mcr`20ncp`20sho`20kno`20line
- X$assign/user`20nodeinfoscratch.`20sys$output
- X$mcr`20ncp`20sho`20kno`20line
- X$!
- X$open/read`20scratch`20nodeinfoscratch.`09!attempting`20to`20rewind`20the`20fi
- Vle
- X$close`20scratch`09`09`09`09!attempting`20to`20rewind`20the`20file
- X$!
- X$open/read`20scratch`20nodeinfoscratch.
- X$recno=0
- X$readloop:
- X$read`20scratch`20rec
- X$write`20sys$output`20rec
- X$recno`20=`20recno`20+`201
- X$if`20recno`20.ne.`207`20`20then`20goto`20readloop
- X$knownline`20=`20f$extract(2,5,rec)`09!gets`20name`20like`20BNA-0`20on`20our
- V`20system
- X$sho`20sym`20knownline
- X$`20`20`20`20`20`20`20`20`20`20mcr`20ncp`20sho`20line`20'knownline`20char
- X$done:
- X$delete`20nodeinfoscratch..*
- X$`20say`20"================================================================="
- X$`20say`20"We`20will`20try`20to`20show`20node`20characteristics."
- X$`20mcr`20ncp`20show`20node`20'nn`20char
- $ call unpack NODEINFO.COM;1 1617715488 ""
- $ v=f$verify(v)
- $ exit
-