$! T4$COLLECT .... Version: X-28 IDENT 'X-28' 21-May-2008 $! $! $! $! Copyright 2000-2008 Hewlett-Packard Development Company, L.P. $! $! Confidential computer software. Valid license from HP and/or its $! subsidiaries required for possession, use, or copying. $! $! Consistent with FAR 12.211 and 12.212, Commercial Computer Software, $! Computer Software Documentation, and Technical Data for Commercial $! Items are licensed to the U.S. Government under vendor's standard $! commercial license. $! $! Neither HP nor any of its subsidiaries shall be liable for technical $! or editorial errors or omissions contained herein. The information in $! this document is provided "as is" without warranty of any kind and is $! subject to change without notice. The warranties for HP products are $! set forth in the express limited warranty statements accompanying $! such products. Nothing herein should be construed as constituting an $! additional warranty. $! $! $! $! Facility: T4 - Total Timeline Tracking Tool $! $! Module: T4$COLLECT.COM $! $! Abstract: $! $! T4$COLLECT.COM is responsible for T4 data collection. $! $! $! $! Modification Log $! $! X-28 Tom Cafarella 21-May-2008 $! Change CSVPNG qualifier specification from /b to /border. $! This was required as /b is no longer a unique qualifier $! with the latest CSVPNG version (V1.0-145). $! $! X-27 Tom Cafarella 16-Jan-2008 $! Make 2 changes to CSVPNG commands based on input from Pat Moran. $! $! 1) Change the /p qualifier to /para. CSVPNG now has $! multiple qualifiers that begin with the letter "p", $! so, we must specify more letters for uniqueness. $! 2) Remove the parentheses around the value list for the $! /para qualifier. The syntax of /para does not allow $! for parentheses. $! $! X-26 Tom Cafarella 09-Jan-2008 $! Comment out use of MONITOR "no-drift" image. $! Since the image was built on a specific VMS version, $! it may no longer be in synch with the running SPISHR.EXE $! image. All 5 images comprising the MONITOR utility must $! run as a group. The result of being out of synch was the $! creation of a MONITOR DAT file that cannot be played back, $! summarized or extracted for use by T4. $! $! The right place for the no-drift capability is in the $! permanent MONITOR image. We hope to see this be included $! in a future VMS release. $! $! X-25 Ian Megarity 10-Aug-2006 $! Introduce TDC data collection. $! $! X-24 Ian Megarity 01-Aug-2006 $! Zip all CSV files into one zip file and all $! the binary data files into another zip file. $! $! X-23 Ian Megarity 20-Mar-2006 $! Various minor edits. $! $! X-22 Graham Howland 12-May-2005 $! Added RDB stats $! $! X-21 Graham Howland 26-Apr-2005 $! Package all files into a zip archive at end $! Fixed up Image Ident reporting for IA64 $! $! X-20 Graham Howland 22-Apr-2005 $! Change name of DPL CSV file to follow T4 format $! $! X-19 Graham Howland 13-Apr-2005 $! Until issue with SPL$DEBUG is resolved $! NEVER unload spl. $! $! X-18 Graham Howland 08-aPR-2005 $! Procedure name changed from t4$collect_v34.com $! to T4$collect.com $! $! X-17 Graham Howland 07-Apr-2005 $! Modified CSVPNG /width from 800 to 600 $! If SPL then define SDA$INIT to NL: $! prevent accidental running of users sda$init $! If RESUBMIT and SPL don't unload SPL$DEBUG $! $! X-16 Ian Megarity 04-Apr-2005 $! Collect FC stats. $! $! X-15 Graham Howland 23-Mar-2005 $! Latest version of CSVPNG has a help option $! change /h= to /height= to resolve ambiguity $! CSVPNG change buffer to buffered $! was collecting mscp stats goal was buffered io. $! On large systems symbol T4_Config_Data_SCOM $! exceeded DCL token size. As a work around on 8.2 $! systems set the process/token=extended (40000 bytes) $! Change T4 version to T4_Version_Data to be the kit version $! this is interpereted by T4EXTR into the CSV file. $! $! X-14 Graham Howland 17-Mar-2005 $! Moved set priv to begining of file, after set ver. $! to ensure could read files in t4$sys: $! $! Updated output copyright $! $! x-13 Graham Howland 15-Mar-2005 $! Ensure all log files writtent to Work Directory passed in p7 $! Updated Copyright... $! $! X-12 Graham Howland 01-Mar-2005 $! Use Zip to save individual SPL TXT files in a daily archive. $! Fix bug in retstart logic. $! Change TCP/IP version lookup so works on IA64 as well as alpha $! $! X-11 Graham Howland 15-Feb-2005 $! Use Tom C's monitor no drift $! or Christian M ? monitor_tv on V7 systems $! $! X-10 Graham Howland 03-Feb-2005 $! $! Re Merger Debess SPL code originally a special case 3.2 kit $! $! X-9 Ian Megarity 31-Jan-2005 $! If restarting after a crash, ensure that data is $! collected properly for the period between the restart $! time and the end of the current collection period. $! $! X-8 Ian Megarity 25-Jun-2004 $! 1. Ensure that all collection process names include $! the string "T4". $! 2. Extract process data for "*T4*". $! These changes will ensure that T4 collects data about itself. $! $! X-7 Pat Moran 11-May-2004 $! 1. Added CSVPNG section in Send_email: routine $! to generate charts from T4 CSV file and email charts to 'p5' $! $! X-6 Ian Megarity 07-Apr-2004 $! 1. Change process name so that it contains $! the string "V34". $! 2. Extract process data for "*BATCH*" and *ASSEM*. $! $! X-5 Ian Megarity 26-Feb-2004 $! 1. Extract TCPIP version using slightly $! different method. $! 2. Use TCP_MON from TCPIP$EXAMPLES. $! $! X-4 Ian Megarity 31-Dec-2003 $! 1. Move "SET NOON" so that it's nearer to the $! to the beginning of the file. $! 2. Extract preferred cpus for "BUS" and "SCOM" $! devices along with values of various SYSGEN $! parameters. $! 3. Add "COMP" to the end of the name of the $! final .CSV filename so that these files $! can be easily identified. $! 4. Generate separate log files for all the $! various sub-processes. Type them so that $! they are all in the main log file before $! deleting them. $! $! X-3 Ian Megarity 30-June-2003 $! Modify copyright notice plus some header comments. $! $! X-2 Ian Megarity 14-May-2003 $! 1. Change from SYS$T4 to T4$SYS. $! 2. Extract process data for "*PRODOPER*". $! $! X-1 Ian Megarity 17-April-2003 $! 1. Change IDENT in preparation for checkin onto $! the EVMS master pack. $! 2. Change name to T4$COLLECT_V34.COM. $! 3. Define logical T4$COLLECT_ENTRY_NUMBER. $! 4. Check for existence of TCPIP Services by $! using "TCPIP SHOW INTERFACE". $! $! V3.2-19 IanM 25-Feb-2003 $! Amend check for TCPIP version so that field test versions $! are allowed. $! $! V3.2-18 IanM 25-Feb-2003 $! Extract process data for "*LMD0*" instead of just "LMD0". $! $! V3.2-17 IanM 24-Jan-2003 $! Extract "*SHAD*" process data from the MONITOR file. $! Also reorg this modification log. $! $! V3.2-16 IanM 16-Jan-2003 $! Use a space instead of a ":" to separate the $! date and time elements of an OpenVMS ascii $! date-time string. $! $! V3.2-15 IanM 01-Oct-2002 $! Extract the SCS stats into a separate .CSV file $! before ZIPing it. $! $! V3.2-14 IanM 17-Sep-2002 $! Output a copyright message. $! $! V3.2-12 IanM 17-Sep-2002 $! Don't extract the DISK stats into the normal output $! output file. Instead, extract them in a separate $! operation and create a separate zip file, which is $! not emailed anywhere. $! $! V3.2-11 IanM 16-Sep-2002 $! Add /CLASS=(All,NoRMS) qualifier to T4EXTR. $! $! V3.2-10 IanM 12-Sep-2002 $! Change copyright notice. $! $! V3.2-9 IanM 11-Sep-2002 $! Ensure that the jobs submitted for the next collection $! run are not deleted in the event of a queue reset. $! $! V3.2-8 IanM 06-Sep-2002 $! Ensure that START_TIME and END_TIME contain no extraneous $! spaces or tabs. $! $! V3.2-7 IanM 29-Aug-2002 $! Add /COMMENT to MONITOR so that we capture the hardware $! model name, memory size and available cpu count for later use. $! $! V3.2-6 IanM 28-Aug-2002 $! Add extra information to the logical name T4$VERSION $! that was introduced in "V3.2-5" above. $! Also extract the TCPIP version and only start TCP_MON $! if it's at least V5.1. $! $! V3.2-5 IanM 27-Aug-2002 $! Define the job logical name T4$VERSION to point to $! the current version of this command procedure, the $! intention being that it get picked up by T4EXTR who $! will then write to the first record of the .CSV file. $! $! V3.2-4 IanM 23-Aug-2002 $! Allow LCK73_MON to run on 7.2-2 systems. $! Also tidy up the version-comparision code. $! $! V3.2-3 IanM 20-Aug-2002 $! Amend the header line to include the string "Version:". $! $! V3.2-2 IanM 19-Aug-2002 $! Move the "BATCH" check to the start of the code and $! amend the associated comments. $! $! V3.2-1 IanM 09-Aug-2002 $! Move the "SET PREFIX" command further up this commmand $! procedure. $! Also fix problem with RE_SUBMIT start time when $! START_TIME="NOW". $! Allow this command procedure to be invoked with P5 = "". $! Change of name to HP_T4_V32.COM. $! If job is aborted and if auto-resubmission is enabled, then $! delete the relevant batch job. $! $! V3.1-10 IanM 07-Aug-2002 $! Allow this command procedure to be invoked with P4 = "". $! $! V3.1-9 IanM 06-Aug-2002 $! 1. Determine the start and end times of the next $! collection event as soon as data collection has $! been started and re-submit the batch job for the $! next day's collection at that stage. $! 2. Add copyright notice. $! 3. Collect TCP_MON stats. $! $! V3.1-8 IanM 05-Aug-2002 $! Ensure that only files for the current node are $! are deleted during the file management phase. $! $! V3.1-7 IanM 03-Aug-2002 $! Ensure that this command procedure can NEVER be $! invoked interactively. $! Abort unless all eight parameters are non-empty. $! Also check that P8 is not empty before attempting $! to delete any files. $! $! V3.1-6 IanM 24-Jul-2002 $! Add /NOLOGICALS/NOSYMBOLS to all SPAWN commands. $! Change name to HP_T4_V3.COM. $! $! V3.1-5 IanM 12-Jul-2002 $! Remove the collection of the RESPONSE data. $! Comment out the version string at the "MANAGE_STORAGE:" line, $! which was causing DCL to complain. $! $! V3.1-4 IanM 20-May-2002 $! Check that the output file from XFC_MON exists $! before attempting to use APRC on it. $! Also enhance the version check prior to collecting $! LCK73 stats. $! $! V3.1-3 Debess Rogers-Grabazs $! 22-Apr-2002 $! Add storage Management and file retention parameters $! Add in 3 parameters to manage file retention periods and the clean up of $! old raw data files, logs, and intermediate csv files from disk. $! $! V3.1-2 IanM 19-Apr-2002 $! Tell ACLG to use sampling_interval. $! $! V3.1-1 IanM 12-Apr-2002 $! Fix various bugs. $! $! V3.1 IanM 1-Aug-2001 $! Initial version. $! $! $! $! $! $! P1 = Start Time ( or "NOW" ) / End Time $! P2 = "MON" or "TDC" $! P3 = Queue Name (batch) $! P4 = Network Device Name List $! P5 = Address to email the results to $! P6 = Sampling interval in seconds (default is 60) $! P7 = Work directory (ie, directory to store data) $! P8 = Comma-separated list: $! [ 0] Number of days to retain raw data MONITOR.DAT files and T4 *.LOG files $! [ 1] Number of days to retain intermediate files $! [ 2] Number of days to retain reduced files $! [ 3] SPL_TL interval (between successive samples) [Spl_Sample_Rate] $! [ 4] SPL_TL size of trace buffers [SPL_BUFFER_SIZE] $! [ 5] SPL_TL time to allow for filling trace buffer [SPL_TIME_TO_FILL] $! [ 6] SPL_TL combine CSV files answer [SPL_COMBINE_CSV] $! [ 7] RDB sample interval [Rdb_Sample_Int] $! [ 8] RDB database name [RDB_DBroot] $! [ 9] Re-Submit daily job ... This previously was P8 $! [10] List of GGA devices [GG_ReqDev_List] $! [11] List of EVA options [GG_VevaOpts] $! $! V3.1-3 Added three new file retention related parameters into 8th parameter while retaining previous $! 8th parameter as final entry on the comma separated list $! $ $ Set Restart_Value = Start_Data_collection $ $ $! Ensure that this commmand procedure can only executed in BATCH $! mode and that all the parameters that should be non-empty $! actually are non-empty. $! $ Say == "Write Sys$OutPut " $ Say "" $ Say "© Copyright 2000-2005 Hewlett-Packard Development Company, L.P." $ Say "" $ If F$Mode() .Nes. "BATCH" $ Then $ Say "" $ Say "This procedure can only be invoked in BATCH mode." $ Say "Please use T4$CONFIG to configure T4 data collection." $ Say "" $ Exit $ EndIf $ $ If P1 .Eqs. "" Then Exit $ If P2 .Eqs. "" Then Exit $ If P3 .Eqs. "" Then Exit $ If P6 .Eqs. "" Then Exit $ If P7 .Eqs. "" Then Exit $ If P8 .Eqs. "" Then Exit $ $ $ Set Prefix "(!8%T) " $ Set Output_Rate=:0:05 $ Set Verify $ Arch_Name = F$Edit(F$GetSyi("Arch_Name"), "UPCASE") $ Set Noon $ $! Enable privelages $ Set Process/Priv=(All,NoBypass) $ $ This_Entry_Number = F$String(F$Getqui("Display_Job", "Entry_Number",,"This_Job")) $! Define/System T4$Collect_Entry_Number 'This_Entry_Number !gjh remove as causing errors on deassign when concurrent jobs $ $! Read the first line from the current command procedure $! to determine it's version and then define the job logical $! name T4$VERSION to point to this version string. $ $ This_Com_File = F$Environment("PROCEDURE") $ This_Com_File_Rdt = F$File_Attributes(This_Com_File, "RDT") $ This_Com_File_Name = F$Parse(This_Com_File,,,"NAME",) $ Open/Read/Share Com_Data 'F$Environment("PROCEDURE") $ Read Com_Data First_Line $ Close Com_Data $ If F$Locate("Version:", First_Line) .Ne. F$Length(First_Line) $ Then $ Vpos = F$Locate("Version:", First_Line) + F$Length("Version:") $ T4_Version_Data = F$Edit(F$Extract(Vpos, F$Length(First_Line) - Vpos, First_Line),"TRIM") $ Else $ T4_Version_Data = "''This_Com_File_Name (''This_Com_File_Rdt')" $ EndIf $ $! GJH test -Alternative version number from product $ Pipe Product Show Product T4 | Search/NoLog/NoNumber Sys$Input T4 | - ( Read Sys$Input line ; - T4ver = F$Element(3," ",line) ; - Define/Job T4$T4_Version &T4ver ) $ T4_Version_Data = F$TrnLnm("T4$T4_Version","Lnm$Job") $ $ VMS_Version = F$Edit(F$GetSyi("Version"),"COLLAPSE") $ T4_Version_Data = "T4 Version : " + T4_Version_Data + ",OpenVMS ''VMS_Version'" $ $! Say T4_Version_Data $ $ If (Arch_Name .Eqs. "VAX") Then Goto Get_Id_End $ $ T4_Image_List = "T4$ABORT,T4$ACLG,T4$APRC,T4$HIB,T4$LCK73,T4$MON_EXTRACT," + - "T4$NET_MON,T4$XFC_MON,T4$XFC_POST,T4$XFC_STAT,T4$FC_MONITOR," + - "T4$SPL_TL,T4$SPL2CSV,MONITOR_TV_NO_DRIFT" $ T4_ImageAlpha = "CSVPNG_ALPHA,HTMLDOC_ALPHA" $ T4_ImageIA64 = "CSVPNG_IA64,HTMLDOC_IA64" $ $ T4_Image_List = T4_Image_List + "," + T4_Image'Arch_Name' $ Element_Number = 0 $ $ Get_Id_Loop: $ Next_Image = F$Element(Element_Number, ",", T4_Image_List) $ If Next_Image .Eqs. "," Then Goto Get_Id_End $ If F$Search("T4$Sys:''Next_Image'.Exe;",1070) .Nes. "" $ Then $ If ( VMS_Version .Ges. "V8.2") $ Then $ Call Get_Image_Id_82 "T4$Sys:''Next_Image'.Exe" Image_Id LinkDT $ Else $ Call Get_Image_Id "T4$Sys:''Next_Image'.Exe" Image_Id $ EndIf $ T4_Version_Data = T4_Version_Data + ",''Next_Image' Id : ''Image_Id'" $ EndIf $ Element_Number = Element_Number + 1 $ Goto Get_Id_Loop $ $ Get_Id_End: $ $ Tcpip_Version = "" $! Tcpip Show InterFace $! Tcp_Status == $Status $! If Tcp_Status $ $ If F$TrnLnm("TCPIP$EXAMPLES","LNM$SYSTEM",,"EXECUTIVE") .Nes. "" $ Then $! Verstr = "OpenVMS Alpha Version " !gjh shorten to version for ia64 $ Verstr = "Version " $ Pipe TcpIp Show Version | Search/NoLog/NoNumber/Match=And Sys$Input: "Services","Version " | - (Read Sys$Input Line ; - Vpos=F$Loc(VerStr,line)+F$Len(VerStr) ; - Tcpip_Version=F$Ext(Vpos,F$Len(Line)-Vpos,Line) ; - Define/Job T4$TcpIp_Version &TcpIp_Version) $ Tcpip_Version = F$TrnLnm("T4$TcpIp_Version","Lnm$Job") $ Say "TcpIp version is ", TcpIp_Version $ Else $ Tcpip_Version = "" $ Say "TCP/IP Services is not installed on this machine" $ EndIf $ T4_Version_Data = T4_Version_Data + ",TCP Version: " + TcpIp_Version $ $ $ Say T4_Version_Data $ Say F$Length(T4_Version_Data) $ $ Define/Job/NoLog T4$Version "''T4_Version_Data'" $ Show Logical/Job T4$Version $ Say F$Length(F$Trnlnm("T4$VERSION")) $ $ $ P1_0 = F$Element (0, "/", P1) ! Start Time $ P1_1 = F$Element (1, "/", P1) ! End Time $ If (P1_0 .Nes. "NOW") $ Then $ Start_Time = P1_0 $ Else $ Start_Time = F$CvTime(,"ABSOLUTE","DATETIME") $ P1_0 = Start_Time $ EndIf $ Dhm = F$CvTime(P1_0, "ABSOLUTE", "DAY") + - F$CvTime(P1_0, "ABSOLUTE", "HOUR") + - F$CvTime(P1_0, "ABSOLUTE", "MINUTE") $ Set Process/Name="T4$V43_''Dhm'" $ $ Start_Proc: $! Set Restart_Value=Start_Proc $ $ Work_Dir = P7 $ Set Def 'Work_dir $! Set Process/Priv=(All,NoBypass) !gjh move earlier $ Base_Prio = F$GetJpi("","PRIB") $ This_Pid = F$GetJpi("","PID") $ Set Process/Priority=15 $ Say == "Write Sys$OutPut " $ This_Node = F$GetSyi("NodeName") $ Full_Version = F$GetSyi("Version") $ Version_For_Compare = 999999 $ If (F$Extract(0, 1, Full_Version) .Eqs. "V") $ Then $ If F$Locate ("-", Full_Version) .Eq. F$Length(Full_Version) $ Then $ Full_Version = Full_Version + "-0" $ EndIf $ Major_Version = F$Element(0, ".", Full_Version) $ Minor_Version = F$Element(0, "-", Full_Version) - Major_Version - "." $ Edit_Level = F$Extract(0, 1, F$Element(1,"-", Full_Version)) $ Major_Version = F$Extract(1, 1, Major_Version) $ Version_For_Compare = 100*Major_Version + 10*Minor_Version + Edit_Level $ Say " Full OpenVMS Version is : ", Full_Version $ Say "Major OpenVMS Version is : ", Major_Version $ Say "Minor OpenVMS Version is : ", Minor_Version $ Say " Edit Level is : ", Edit_Level $ Say " Version for Comparison : ", Version_For_Compare $ EndIf $ $ $ Manage_Storage: ! V3.1-3 $! Extract three retention parameters and delete files more than that number of days old in the $! Work directory specified by parameter P7 V3.1-3 $! $ Say "Managing storage - deleting "expired" files..." $ $! Extract three file retention parameters (and the Re_Submit parameter) from the list in P8 V3.1-3 $ $ If P8 .Eqs. "" Then Goto Manage_Storage_Completed $ $ Raw_Data_Retain = F$Element(0, ",", P8) ! applies to both *.DAT & *.LOG $ If Raw_Data_Retain .Eqs. "" Then Goto Manage_Storage_Completed $ Intermediate_Retain = F$Element(1, ",", P8) ! applies to intermediate CSV files $ If Intermediate_Retain .Eqs. "" Then Goto Manage_Storage_Completed $ Reduced_Retain = F$Element(2, ",", P8) ! applies to final composite T4 csv files $ If Reduced_Retain .Eqs. "" Then Goto Manage_Storage_Completed $ Re_Submit = F$Element(9, ",", P8) ! gjh change from 3 to 7 to accomadate SPL params $ If Re_Submit .Eqs. "" Then Goto Manage_Storage_Completed $ $! And now delete the raw data files, log files, and csv files whose retention period has expired V3.1-3 $ $ DELETE /LOG /NOCONFIRM /BEFORE="-''Raw_data_retain'-" T4_'This_Node'*_MON.DAT;* $ DELETE /LOG /NOCONFIRM /BEFORE="-''Raw_data_retain'-" HP_T4_V3*'This_Node'*.LOG;* $ DELETE /LOG /NOCONFIRM /BEFORE="-''Intermediate_retain'-" T4_'This_Node'_*ACLG.CSV;* $ DELETE /LOG /NOCONFIRM /BEFORE="-''Intermediate_retain'-" T4_'This_Node'_*LCK7.CSV;* $ DELETE /LOG /NOCONFIRM /BEFORE="-''Intermediate_retain'-" T4_'This_Node'_*NETM*.CSV;* $ DELETE /LOG /NOCONFIRM /BEFORE="-''Intermediate_retain'-" T4_'This_Node'_*XFC.CSV;* $ DELETE /LOG /NOCONFIRM - /BEFORE="-''Reduced_retain'-"/EXCLUDE=(T4*ACLG.CSV,T4*LCK7.CSV,T4*NETM*.CSV,T4*RSPT.CSV,T4*XFC.CSV) T4_'This_Node'*.CSV;* $ $! This last delete statement would delete summary composite CSV files created from the intermediate csv files. $! The default for this parameter is 9999 (i.e. keep these files forever). This is also the recommended setting $! for these files which amount to a consolidated and quite compact (relatively speaking) history of the performance $! on this system. V3.1-3 $ $ Manage_Storage_Completed: $ $ This_Node = F$GetSyi("NodeName") $ Say "This is node ''This_Node'" $ Version = F$Extract(0, 4, F$GetSyi("Version")) $ $ Today = F$CvTime(Start_Time, "ABSOLUTE", "DATE") $ If (F$Length(Today) .Eq. 10) $ Then $ Today = "0" + Today $ EndIf $ Today = Today - "-" - "-" $ $ End_Time = P1_1 $ $ Start_Time = F$Edit(Start_Time, "TRIM,COMPRESS") $ End_Time = F$Edit( End_Time, "TRIM,COMPRESS") $ Start_Time = F$Element(0," " ,Start_Time) + " " + F$Element(1," ", Start_Time) $ End_Time = F$Element(0," " ,End_Time) + " " + F$Element(1," ", End_Time) $ $ $ St = F$Fao("!5AS", F$CvTime(Start_Time,"ABSOLUTE","TIME")) - ":" $ Et = F$Fao("!5AS", F$CvTime( End_Time,"ABSOLUTE","TIME")) - ":" $ St_Et = "''St'_''Et'" $ $! gjh - 28-feb-2005 $! parse SPL parameters out of P8 $! Spl_Sample_Rate is used to indicate SPL tracing is enabled $! and is required here if we goto RESTART $! $ Spl_Sample_Rate = F$Element(3, ",", P8) $ SPL_Buffer_size = F$Element(4, ",", P8) $ SPL_Time_to_fill = F$Element(5, ",", P8) $ SPL_Combine_CSVs = F$Element(6, ",", P8) $ $ Rdb_Sample_Int = F$Element(7, ",", P8) $ RDB_DBroot = F$Element(8, ",", P8) $! $! If we are re-starting after a crash, then submit a collection $! job for the period between and now and the end of the current $! collection period, before going straight to the data $! consolidation phase. $! $ If $RESTART $ Then $! Say F$Cvtime( , "COMPARISON", "DATETIME") $! Say F$CvTime(P1_1, "COMPARISON", "DATETIME") $ If (F$Cvtime(,"COMPARISON","DATETIME") .Lts. F$CvTime(P1_1, "COMPARISON","DATETIME")) $ Then $ This_Queue_Name = F$Getqui("Display_Job", "Queue_Name",,"This_Job") $ This_Proc = F$Element(0, ";", F$Environment("PROCEDURE")) $ This_Proc_Name = F$Parse(This_Proc,,,"NAME") $ P8 = F$Extract(0, F$Length(P8)-1, P8) + "N" $ Submit/Notify/Restart/Keep/NoPrint/Log='Work_Dir''This_Proc_Name'_'This_Node' - 'This_Proc'/Queue='P3 - /Parameter=("NOW/"+P1_1, "''P2'", "''P3'", "''P4'", "''P5'", "''P6'", "''P7'", "''P8'") $ EndIf $ Goto 'BATCH$RESTART' $ EndIf $ $ Start_Data_Collection: $ $! First of all, spawn either MONITOR or TDC to collect the basic stats ... $! $ $ Mon_Tdc = F$Element(0, "/", P2) $ $ If (Mon_Tdc .Eqs. "MON") $ Then $ Mem_Size = "("+F$String(f$GetSyi("MemSize")/128)+"Mb" $ Avail_Cpus = " with ''F$GetSyi("AvailCpu_Cnt")' cpu(s))" $ $! Use the no drift version of MONITOR_TV $! $! X-26 Comment out the following lines so that the no-drift $! MONITOR version is not used. It can potentially cause $! a MONITOR .DAT file to be created which is unuseable. See $! details in module header at the top of this file. $! $! If (Version_For_Compare .Le. 732) $! Then $! Define Monitor_Tv T4$Sys:Monitor_Tv_No_Drift.exe $! EndIf $! If (Version_For_Compare .Eq. 820) $! Then $! If (Arch_Name .Eqs. "ALPHA") Then Define Monitor T4$Sys:Monitor_Alpha.Exe $! If (Arch_Name .Eqs. "IA64") Then Define Monitor T4$Sys:Monitor_IA64.Exe $! EndIf $ $! Drop the /NOLOGICALS from the call on MONITOR that follows, to be able to pass the new logical $! name for MONITOR_TV.EXE that gies us the no drift behavior $ $ Spawn/NoSymbols/NoWait/Process="T4''This_Pid'_MON" - /OutPut='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_Mon.Log - Monitor/Record=T4_'This_Node'_'Today'_'St_Et'_Mon.Dat - /Interval='P6 - /Flush_Interval='P6 - /Begin="''Start_Time'" - /End="''End_Time'" - /Comment="''F$GetSyi("Hw_Name")' ''Mem_Size'''Avail_Cpus'" - /NoDisplay All_Classes $ $ EndIf $ $ If (Mon_Tdc .Eqs. "TDC") $ Then $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_TDC" - /OutPut='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_Tdc.Log - @T4$Sys:T4$Tdc_Mon "''Start_Time'" "''P1_1'" "''St_Et'" 'P6 $ EndIf $ $ $! Secondly, spawn the XFC data collection ... $! But only VCC_FLAGS is non-zero. $ $ If ( F$GetSyi("Vcc_Flags") .Ge. 1 ) $ Then $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_XFC" - /OutPut='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_Xfc.Log - @T4$Sys:T4$Xfc_Mon "''Start_Time'" "''P1_1'" "''St_Et'" 'P6 $ EndIf $ $ $! Next, spawn the LCK73 data collection (but only on V7.2-2 and later). $! But only if there are at least 2 cpus on the system... $ $ If ( ( Version_For_Compare .Ge. 722 ) .And. ( F$GetSyi("AvailCpu_Cnt") .Ge. 2 ) ) $ Then $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_Lck7" - /OutPut='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_Lck7.Log - @T4$Sys:T4$Lck73_Mon "''Start_Time'" "''P1_1'" "''St_Et'" 'P6 $ EndIf $ $ $! Next, spawn the TCP data collection ... $ $ If (F$Search("TcpIp$Examples:TcpIp$Tcp_Mon.Exe;", 1234) .Nes. "") $ Then $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_TCP" - /OutPut='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_Tcp.Log - @T4$Sys:T4$Tcp_Mon "''Start_Time'" "''P1_1'" "''St_Et'" 'P6 $ EndIf $ $ $! Extract 3 SPL_TL parameters and spawn process if appropriate $! gjh need to extract params. earlier incase ercovering from crash. $! Sample_rate = F$Element(3, ",", P8) $! Buffer_size = F$Element(4, ",", P8) $! Time_to_fill = F$Element(5, ",", P8) $! Combine_CSVs = F$Element(6, ",", P8) $ If (Spl_Sample_Rate .Ne. 0) $ Then $! Ensure we don't load users SDA$INIT $ Define/Job SDA$INIT Nla0: $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_SPL" - /Output='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_SPL.Log - @T4$Sys:T4$SPL_TL_Mon 'Spl_Sample_Rate - 'SPL_Buffer_size 'SPL_Time_to_fill "''Start_Time'" "''End_Time'" "''P7'" $ EndIf $ $ If (Rdb_Sample_Int .Ne. 0) $ Then $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_RDB" - /Output='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_RDB.Log - @T4$Sys:T4$RDB_Mon "''Start_Time'" "''RDB_Sample_int'" "''End_Time'" "''RDB_DBroot'" - "''Work_Dir'T4_''This_Node'_''Today'_''St_Et'_RDB.Dat" "''F$Element(1, "/", P2)'" $ EndIf $ $! If there are FC devices on the system, then spawn $! the FC_MONITOR data collection sub-process ... $ $ If ( F$Device("_$%$%GA*", , , 10707070) .Nes. "" ) $ Then $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_FCM" - /OutPut='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_Fcm.Log - @T4$Sys:T4$Fc_Mon "''Start_Time'" "''P1_1'" "''St_Et'" 'P6 $ EndIf $ $! Spawn the VEVAMON (ie EVA) data collection ... $ $ GG_ReqDev_List = F$Element(10, ",", P8) $ GG_VevaOpts = F$Element(11, ",", P8) $ If (GG_ReqDev_List .Nes. "") $ Then $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_EVA" - /OutPut='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_Eva.Log - @T4$Sys:T4$Eva_Mon "''Start_Time'" "''P1_1'" "''St_Et'" 'P6 'GG_ReqDev_List 'GG_VevaOpts $ EndIf $ $ $! Last, but not least spawn a Network Monitor data collection event $! for each selected interface. $ $ If (P4 .Eqs. "") Then Goto End_Data_Collection $ $ Net_Device_Index = 0 $ Next_Net_Device: $ Net_Device = F$Element(Net_Device_Index, ",", P4) - ":" $ !Say P4 $ !Say Net_Device $ If (Net_Device .Eqs. ",") Then Goto End_Data_Collection !gjh merging SPL code $ Spawn/NoSymbols/NoLogicals/NoWait/Process="T4''This_Pid'_''Net_Device'" - /OutPut='Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_'Net_Device'.Log - @T4$Sys:T4$Net_Mon "''Start_Time'" "''P1_1'" "" "''Net_Device'" "''St_Et'" 'P6 $ Net_Device_Index = Net_Device_Index + 1 $ Goto Next_Net_Device $ $! $ End_Data_Collection: $ Set Process/Priority='Base_Prio $ $ Set Restart_Value=Post_Process_the_Data $ $! Before we do anything else, we determine the start and end times for the $! the next collection event and re-submit collection job for same time $! tomorrow. $ $ If (Re_Submit) $ Then $ Start_Coll_Time = F$CvTime(P1_0, "ABSOLUTE", "DATETIME") $ End_Coll_Time = F$CvTime(P1_1, "ABSOLUTE", "DATETIME") $ Next_Start = F$CvTime("''Start_Coll_Time'+1-","ABSOLUTE",) $ Next_End = F$CvTime("''End_Coll_Time'+1-","ABSOLUTE",) $ Next_Start_Minus_2mins = F$CvTime("''Next_Start'-0-00:02:00","ABSOLUTE",) $ $ Say Next_Start $ Say Next_End $ Say Next_Start_Minus_2mins $ $ This_Queue_Name = F$Getqui("Display_Job", "Queue_Name",,"This_Job") $ This_Proc = F$Element(0, ";", F$Environment("PROCEDURE")) $ This_Proc_Name = F$Parse(This_Proc,,,"NAME") $ $ Submit/Notify/Restart/Keep/NoPrint/Log='Work_Dir''This_Proc_Name'_'This_Node' - 'This_Proc'/Queue='This_Queue_Name - /After="''Next_Start_Minus_2mins'" - /Parameter=("''Next_Start'/''Next_End'","''P2'","''P3'","''P4'","''P5'","''P6'","''P7'","''P8'") $ Next_Queue_Entry = $Entry $ Show Entry/Full 'Next_Queue_Entry $ EndIf $ $ $ Start_Minute = F$Integer(F$CvTime(Start_Time, "ABSOLUTE", "MINUTE")) $ Start_Hour = F$Integer(F$CvTime(Start_Time, "ABSOLUTE", "HOUR")) $ End_Minute = F$Integer(F$CvTime( P1_1, "ABSOLUTE", "MINUTE")) $ End_Hour = F$Integer(F$CvTime( P1_1, "ABSOLUTE", "HOUR")) $ $ If (Start_Minute .Gt. End_Minute) $ Then $ End_Minute = End_Minute + 60 $ End_Hour = End_Hour - 1 $ EndIf $ $ Wait_Hours = End_Hour - Start_Hour $ Wait_Minutes = End_Minute - Start_Minute $ $ $! Now we HIBernate (ie WAIT) until the END_TIME. $ $ Set Command T4$Sys:T4$Hib $ T4Hib/Until="''F$CvTime(P1_1,"ABSOLUTE","DateTime")'" $ T4Hib_Exit_Status = $Status $ Say "T4HIB Exit status is ", T4Hib_Exit_Status $ $ $! We must now check to see if T4HIB was aborted, and if so, then $! we must abort all the collection sub-processes. $ $ Ss$_Abort = %X0000002C $ Jbc$_Abort = %X00048084 $ Jbc$_QueReset = %X000480EC $ If (T4Hib_Exit_Status .Eq. Ss$_Abort) Then Goto T4_Abort $ If (T4Hib_Exit_Status .Eq. Jbc$_Abort) Then Goto T4_Abort $ If (T4Hib_Exit_Status .Eq. Jbc$_QueReset) Then Goto T4_Abort $ Goto Await_Subp_Completion $ $ T4_Abort: $ Say "T4 has been aborted ... " $ If ((Re_Submit) .And. (T4Hib_Exit_Status .Ne. Jbc$_QueReset)) $ Then $ Show Entry/Full 'Next_Queue_Entry $ Delete/Entry='Next_Queue_Entry $ EndIf $ Set Command T4$Sys:T4$Abort $ Ctx = "" $ Temp = F$Context("PROCESS", ctx, "MASTER_PID", This_Pid, "EQL") $ $ Abort_Subp_Loop: $ Abort_Pid = F$PID(ctx) $ Say Abort_Pid $ If (Abort_Pid .Eqs. "") Then Goto Await_Subp_Completion $ If (Abort_Pid .Nes. This_Pid) Then T4Abort/Ident='Abort_Pid $ Goto Abort_Subp_Loop $ $ $ Await_Subp_Completion: $ SubProc_Count = F$GetJpi("","Prccnt") $ If (SubProc_Count .Eq. 0) Then Goto Post_Process_the_Data $ Say "Time is now ''F$Time()' ... " $ Show Process/Sub $ Wait 00:00:05.00 ! Wait for 5 seconds before re-checking ... $ Goto Await_Subp_Completion $ $ $ Post_Process_the_Data: $! $! Before doing anything Unload SDA SPL buffer $ $! Only unload if SPL timeline sampling has been part of this collection session $! Zero value for SPL Sample_rate parameter means no SPL timeline sampling $! DONT unload if JOB has been resubmitted $! gjh x-19 untill issue with SPL$DEBUG is resolved NEVER unload spl buffers $! If ( (Spl_Sample_Rate .Ne. 0) .and. (.not.Re_Submit) ) $! Then $! Analyze/System $! spl unload $! exit $! EndIf $! $! First thing we do is type all the sub-process log files before $! deleting them. $! $ Dire/Size=All/Date 'Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_*.Log; $ Type 'Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_*.Log; $ Delete/Log 'Work_Dir'T4_'This_Node'_'Today'_'St_Et'_Subp_*.Log;* $ $! $! We now generate the three T4$CONFIG_DATA* DCL symbols. $! $! Note on large systems these symbols may be large > 255bytes $! a temporary workaround for VMS 8.2+ systems is to increase the token size $! $ If (Version_For_Compare .Ge. 820) Then - Set Process/Token=Extended $ $ T4_Config_Data_Para = F$Fao("Sch_Ctl_Flags: !ZL", F$GetSyi("SCH_CTLFLAGS")) $ T4_Config_Data_Para = T4_Config_Data_Para + - F$Fao(",Io_Prefer_Cpus: %x!XL",F$Integer(F$GetSyi("IO_PREFER_CPUS"))) $ T4_Config_Data_Para = T4_Config_Data_Para + - F$Fao(",LckMgr_Mode: !ZL", F$Integer(F$GetSyi("LCKMGR_MODE"))) $ T4_Config_Data_Para = T4_Config_Data_Para + - F$Fao(",LckMgr_CpuId: !ZL ",F$Integer(F$GetSyi("LCKMGR_CPUID"))) $ $ Call Get_Pref_Cpu "BUS" 1210 T4_Config_Data_Bus $ Call Get_Pref_Cpu "SCOM" 1211 T4_Config_Data_Scom $ $ Say T4_Config_Data_Para $ Say T4_Config_Data_Bus $ Say T4_Config_Data_Scom $ Say F$Length(T4_Config_Data_Para) $ Say F$Length(T4_Config_Data_Bus) $ Say F$Length(T4_Config_Data_Scom) $ $ Zip :== $T4$Sys:Zip-'Arch_Name $! $! Next, we determine the ID of the primary CPU. $! $ Pipe Show Cpu | Search/NoLog/NoNumber Sys$Input: "Primary CPU = " | - (Read Sys$Input Line ; - Primary_CpuId==F$Edit(F$Element(1,"=",line),"COMPRESS,TRIM") ; - Define/Job T4$Primary_CpuId &Primary_CpuId) $ Primary_CpuId = F$TrnLnm("T4$PRIMARY_CPUID","Lnm$Job") $ $ $ Process_Name_List = """*FLEXUS*""" + "," + """*SHAD*""" + "," + - """*SAMIRA*""" + "," + """*BATCH*""" + "," + - """TCPIP$S*""" + "," + """TCPIP$R*""" + "," + """*""" $ If (Mon_Tdc .Eqs. "MON") $ Then $! Now, we extract the MONITOR data using T4EXTR ... $ $ Ss$_TooManyUnits = %X02CBA $ Set Command T4$Sys:T4$Mon_Extract $ T4Extr T4_'This_Node'_'Today'_'St_Et'_Mon.Dat - /Csv_File=T4_'This_Node'_'Today'_'St_Et'_Comp.Csv - /Format=Extended - /Class=(All,NoScs,NoDisk,NoRms) - /Process_Name=('Process_Name_List) $ T4Extr_Status = $Status $ $ $! Now extract the DISK data as a separate operation. $ $ T4Extr T4_'This_Node'_'Today'_'St_Et'_Mon.Dat - /Csv_File=T4_'This_Node'_'Today'_'St_Et'_Disk.Csv - /Class=(NoAll,Disk) $ T4Extr_Status = $Status $ $ $! Now extract the SCS data as a separate operation. $! But only if cluster member etc etc ... $ If ( F$GetSyi("Cluster_Member") .And. ( F$GetSyi("Cluster_Nodes") .Gt. 1 ) ) $ Then $ T4Extr T4_'This_Node'_'Today'_'St_Et'_Mon.Dat - /Csv_File=T4_'This_Node'_'Today'_'St_Et'_Scs.Csv - /Class=(NoAll,Scs) $ T4Extr_Status = $Status $ EndIf $ EndIf $ $ If (Mon_Tdc .Eqs. "TDC") $ Then $ Set Command T4$Sys:T4$Tdc.Cld; $ T4Tdc /Input=T4_'This_Node'_'Today'_'St_Et'_Tdc.Dat - /Csv_File=T4_'This_Node'_'Today'_'St_Et'_Comp.Csv - /Process_Name=('Process_Name_List) $ $ EndIf $ $! Reduce SPL_TL files $ $ If (Spl_Sample_Rate .Ne. 0) $ Then $ Set Command T4$Sys:T4$Spl2Csv $ T4$Spl2Csv/DIRECTORY='P7/NODE='This_Node/DATE='Today/START_TIME="''Start_Time'"/END_TIME="''End_time'" $! $! save TXT files in a daily ZIP archive, use followin zip options $! -m to move files into zip file (delete original files) $! -w append version numbers to stored name $! -u update, add changed or new files ,( given were deleteing this shouldn't be necessary) $! need to fudge end time as last will be created at end_time+Spl_Sample_Rate+abit $! $ Fudge = Spl_Sample_Rate + 5 $ Fudge_Mins = Fudge/60 $ Fudge_Secs = Fudge - (Fudge_Mins*60) $ Pipe Directory/NoHeader/NoTrailer/Since="''Start_Time'"/Before="''End_Time'+:''Fudge_Mins':''Fudge_Secs'" - 'This_Node'_SPL_'Today'*.TXT | Zip -uwm T4_'This_Node'_'Today'_'St_Et'_SPL_TXT -@ $ EndIf $ $ If ( Rdb_Sample_Int .Ne. 0 ) $ Then $ T4$Rdb2Csv :== "$T4$Sys:T4$Rdb2Csv.Exe" $ T4$Rdb2Csv T4_'This_Node'_'Today'_'St_Et'_RDB.dat T4_'This_Node'_'Today'_'St_Et'_RDB.csv; $! Zip T4_'This_Node'_'Today'_'St_Et'_RDB T4_'This_Node'_'Today'_'St_Et'_RDB.csv; $! Delete/Log T4_'This_Node'_'Today'_'St_Et'_RDB.csv; $ EndIf $ $! Next it's the turn of the Accounting Login/Logout data .. $ $ Pipe Show Accounting | Search/NoLog/Output=Nl: Sys$Input: "any process termination" $ If ( $Status .Eq. %X10000001 ) $ Then $ If (F$Search(F$Parse("ACCOUNTNG", "Sys$Manager:.Dat",,,), 121212) .Nes. "") $ Then $ month = f$element(f$cvtime("yesterday",,"month"),"/","/JAN/FEB/MAR/APR/MAY/JUN/JUL/AUG/SEP/OCT/NOV/DEC/") $ File_name = "SYS$MANAGER:NELL" + f$cvtime("yesterday",,"day") + month + f$cvtime("yesterday",,"year") + ".DAT" $ Set Command T4$Sys:T4$Aclg $ T4Aclg /Begin="''Start_Time'" - /End="''P1_1'" - /Csv_File=T4_'This_Node'_'Today'_'St_Et'_Aclg.Csv; - /Sampling_Interval='P6 'file_name' $ EndIf $ EndIf $ $! Last, but not least, we glue all the .CSV records together $! horizontally. This is done using T4$APRC, which takes two $! parameters (P1 and P2), where each record in file P1 is prefixed $! with a comma and then appended to the end of the corresponding $! record in file P2, and the resulting record is written out to a $! new version of file P2. $ $ Set Command T4$Sys:T4$ApRc $ $ If F$Search("T4_''This_Node'_''Today'_''St_Et'_Aclg.Csv", 124123) .Nes. "" $ Then $ T4Aprc T4_'This_Node'_'Today'_'St_Et'_AcLg.Csv; - T4_'This_Node'_'Today'_'St_Et'_Comp.Csv; $ Delete/Log T4_'This_Node'_'Today'_'St_Et'_AcLg.Csv; $ EndIf $ $ If F$Search("T4_''This_Node'_''Today'_''St_Et'_Xfc.Csv", 124124) .Nes. "" $ Then $ T4Aprc T4_'This_Node'_'Today'_'St_Et'_Xfc.Csv; - T4_'This_Node'_'Today'_'St_Et'_Comp.Csv $ Delete/Log T4_'This_Node'_'Today'_'St_Et'_Xfc.Csv; $ EndIf $ $ If F$Search("T4_''This_Node'_''Today'_''St_Et'_Lck7.Csv", 124125) .Nes. "" $ Then $ T4Aprc T4_'This_Node'_'Today'_'St_Et'_Lck7.Csv; - T4_'This_Node'_'Today'_'St_Et'_Comp.Csv $ Delete/Log T4_'This_Node'_'Today'_'St_Et'_Lck7.Csv; $ EndIf $ $ $ If F$Search("T4_''This_Node'_''Today'_''St_Et'_Tcp.Csv", 124126) .Nes. "" $ Then $ T4Aprc T4_'This_Node'_'Today'_'St_Et'_Tcp.Csv; - T4_'This_Node'_'Today'_'St_Et'_Comp.Csv $ Delete/Log T4_'This_Node'_'Today'_'St_Et'_Tcp.Csv; $ EndIf $ $ If F$Search("T4_''This_Node'_''Today'_''St_Et'_Disk.Csv", 124126) .Nes. "" $ Then $ T4Aprc T4_'This_Node'_'Today'_'St_Et'_Disk.Csv; - T4_'This_Node'_'Today'_'St_Et'_Comp.Csv $ Delete/Log T4_'This_Node'_'Today'_'St_Et'_Disk.Csv; $ EndIf $ $ $ If (SPL_Combine_CSVs .Eqs. "Y") $ Then $ If F$Search("''This_Node'_''Today'*SPL.Csv") .Nes. "" $ Then $ T4Aprc 'This_Node'_'Today'_'St_Et'_SPL.Csv; - T4_'This_Node'_'Today'_'St_Et'_Comp.Csv $ Delete/Log 'This_Node'_'Today'_'St_Et'_SPL.Csv; $ EndIf $ EndIf $ $ $ Net_Device_Index = 0 $ Aprc_Next_Net_Device: $ Net_Device = F$Element(Net_Device_Index, ",", P4) - ":" $ Say Net_Device $ If (Net_Device .Eqs. "") Then Goto Send_Email $ If (Net_Device .Eqs. ",") Then Goto Send_Email $ T4Aprc T4_'This_Node'_'Today'_'St_Et'_NetM_'Net_Device'.Csv; T4_'This_Node'_'Today'_'St_Et'_Comp.Csv $ Delete/Log T4_'This_Node'_'Today'_'St_Et'_NetM_'Net_Device'.Csv; $ Net_Device_Index = Net_Device_Index + 1 $ Goto Aprc_Next_Net_Device $ $ $ Send_Email: $ Purge/Log T4_'This_Node'_'Today'_'St_Et'_Comp.Csv $ $ If F$Search("T4$SYS:CSVPNG_''Arch_Name'.EXE") .Eqs. "" $ Then $ Say "T4$SYS:CSVPNG_''Arch_Name'.EXE not found" $ Else $ CSVPNG :== $T4$SYS:CSVPNG_'Arch_Name'.EXE $ If F$Search("*''This_Node'*.png") .Nes. "" then delete *'This_Node'*.png;* $ If F$Search("T4$SYS:csvpng.lis") .Nes. "" $ Then $ CSVPNG /para=T4$SYS:csvpng.lis /i /line /border=1 /width=600 /height=200 /z /u='This_Node'.htm - T4_'This_Node'_'Today'_'St_Et'_comp.CSV $ Else $ CSVPNG /para="CPU Busy","MP synch","Interrupt State",direct,buffered /i /line /border=1 - /width=600 /height=200 /z /u='This_Node'.htm - T4_'This_Node'_'Today'_'St_Et'_comp.CSV $ EndIf $ EndIf $! $! Zip up all files created during this collection run. $! $ Zip "-umV" T4_'This_Node'_'Today'_'St_Et'_Comp - T4_'This_Node'_'Today'_'St_Et'*.Csv; - T4_'This_Node'_'Today'_'St_Et'*Eva.Zip; - T4_'This_Node'_'Today'_'St_Et'*_SPL_TXT*.Zip; $ Zip "-umV" T4_'This_Node'_'Today'_'St_Et'_Dat T4_'This_Node'_'Today'_'St_Et'*.Dat;* $ $ $! Zip T4_'This_Node'_'Today'_'St_Et'_Comp T4_'This_Node'_'Today'_'St_Et'_Comp.Csv $! Zip T4_'This_Node'_'Today'_'St_Et'_Disk T4_'This_Node'_'Today'_'St_Et'_Disk.Csv $! Zip T4_'This_Node'_'Today'_'St_Et'_Scs T4_'This_Node'_'Today'_'St_Et'_Scs.Csv $! Delete/Log T4_'This_Node'_'Today'_'St_Et'_Comp.Csv;* $! Delete/Log T4_'This_Node'_'Today'_'St_Et'_Disk.Csv;* $! Delete/Log T4_'This_Node'_'Today'_'St_Et'_Scs.Csv;* $ $ $ If P5 .Nes. "" $ Then $ Uuen :== $T4$Sys:Tcpip$UuEncode_'Arch_Name' $ Uuen T4_'This_Node'_'Today'_'St_Et'_Comp.Zip T4_'This_Node'_'Today'_'St_Et'_Comp.Uue; $ Mail/NoSelf/Subject="T4_''This_Node'_''Today'_''St_Et'" - T4_'This_Node'_'Today'_'St_Et'_Comp.Uue; "''P5'" $ Delete/Log T4_'This_Node'_'Today'_'St_Et'_Comp.Uue;* $ $! $! -------------------------------------------------------------------------------------- $! Process the CSV file with CSVPNG $! (requires CSVPNG_'Arch_Name'.EXE in T4$SYS) $! $! This will generate charts from the T4 CSV file, ZIP the HTM file and PNG Charts, $! Uuencode the ZIP and email it to 'P5' $! To customize the required parameters, create a file, T4$SYS:CSVPNG.LIS, $! and enter whatever parameters are required (one per line) $! $ If F$Search("T4$SYS:CSVPNG_''Arch_Name'.EXE") .Eqs. "" $ Then $ Say "T4$SYS:CSVPNG_''Arch_Name'.EXE not found" $ Else $ ZIP T4_CHARTS_'This_Node'_'Today'.ZIP 'This_Node'.htm *'This_Node'*.png $ Uuen T4_CHARTS_'This_Node'_'Today'.ZIP T4_CHARTS_'This_Node'_'Today'.uue $ Mail/NoSelf/Subj="T4 Charts for ''This_Node'" T4_CHARTS_'This_Node'_'Today'.uue; "''p5'" $ Say "" $ Say "CSVPNG T4 Charts have been emailed to ''p5'" $ Say "" $ EndIf $ Else $ Say "**********" $ Say "" $ Say "Output .CSV file(s) have been ZIPed into this file :- T4_''This_Node'_''Today'_''St_Et'_Comp.Zip" $ Say "" $ Say "**********" $ EndIf $ $ $ Exit_and_ReSubmit: $ $ Delete T4_CHARTS_'This_Node'.*;* $ If F$Search("''This_Node'.htm") .Nes. "" Then Delete/Log 'This_Node'.htm;* $ If F$Search("*''This_Node'*.png") .Nes. "" Then Delete/Log *'This_Node'*.png;* $ If F$Search("T4_*.Lis") .Nes. "" Then Delete T4_*.Lis;* $! DeAssign/System T4$Collect_Entry_Number $ $ Exit $ $ $ $ $ $! DCL subroutine to extract the IMAGE_ID from a given image. $! (Taken from DECC$SHOW_VERSIONS.COM.) $! $! Parameters are :- $! P1 = image name string (input) $! P2 = Image ID string (output) $! $! $ Get_Image_ID: SUBROUTINE $ $ Save_Proc_Verify = F$Environment("VERIFY_PROCEDURE") $ Save_Image_Verify = F$Environment("VERIFY_IMAGE") $ Set NoVerify $ $ wrk_image_id = "" $ Open/Read/Share/Error=gii_no_read i_file 'p1' $ Read/End=gii_bad_file/Error=gii_no_read i_file record $ Close/NoLog i_file $ $! $! For VAX, the 1st 2 bytes are size of header and will show a size $! of 48 or larger. For Alpha, this is part of the version field. $! $ if f$cvui(0,16,f$ext(0,2,record)) .lt. 48 $ then ! We have an ALPHA image $ ptr = f$cvui(0,32,f$ext(24,4,record)) ! Get image name offset $! ! (EIHD$L_IMGIDOFF) $ if ptr .eq. 0 then goto gii_no_id ! ID area defined? $! $! Setup id offset appropriate for version of VMS file. $! $ offset = 56 ! Set default offset $! ! (EIHI$T_IMGID) $ tmp = f$cvui(0,32,f$ext(0,8,record)) ! Get major/minor id $! ! (EIHD$L_MAJORID/EIHD$L_MINORID) $ if tmp .eq. 2 then offset = 56 ! V1 file $ ptr = ptr + offset ! Bump pointer to id area $ fis = f$cvui(0,8,f$ext(ptr,1,record)) ! Get length of image id $ fi = "''f$ext(ptr+1,fis,record)'" ! Get image id $ wrk_image_id = "''f$edit(fi,"compress,trim")'" $ else ! We have a VAX image $ ptr = f$cvui(0,16,f$ext(6,2,record)) ! Get image name offset $! ! (IHD$W_IMGIDOFF) $ if ptr .eq. 0 then goto gii_no_id ! ID area defined? $! $! Setup id offset appropriate for version of VMS file. $! $ offset = 40 ! Set default offset $! ! (IHI$T_IMGID) $ tmp = "''f$ext(12,4,record)'" ! Get major/minor id $! ! (IHD$W_MAJORID/IHD$W_MINORID) $ if tmp .Eqs. "0204" then offset = 16 ! V3 file $ if tmp .Eqs. "0205" then offset = 40 ! V4/V5 file $ ptr = ptr + offset ! Bump pointer to id area $ fis = f$cvui(0,8,f$ext(ptr,1,record)) ! Get length of image id $ fi = "''f$ext(ptr+1,fis,record)'" ! Get image id $ wrk_image_id = "''f$edit(fi,"compress,trim")'" $ EndIf $ 'p2 == wrk_image_id $ Goto Get_Image_Id_Exit $! $ gii_no_id: $ write sys$output "File ''p1' contains no ident string." $ Goto Get_Image_Id_Exit $ $ gii_no_file: $ if p2 .Eqs. "" $ then $ write sys$output "File ''p1' not found." $ else $ 'p2 == "not installed" $ EndIf $ Goto Get_Image_Id_Exit $ $ gii_no_read: $ close/nolog i_file $ write sys$output "Cannot read file ''p1'" $ Goto Get_Image_Id_Exit $ $ gii_bad_file: $ close/nolog i_file $ write sys$output "File ''p1' is empty" $ $ Get_Image_Id_Exit: $ Temp = F$Verify(Save_Proc_Verify, Save_Image_Verify) $ exit $ ENDSUBROUTINE $ $ $ $ $! DCL subroutine that determines the preferred CPU for all $! devices in the input Device Class (P1). $! The actual data is appended to the P3 parameter. $! $! Parameters are :- $! P1 = Device Class (Input) $! P2 = Stream ID (Input) $! P3 = Config_Data (Output) $! $! $ Get_Pref_Cpu: SUBROUTINE $ $ Save_Proc_Verify = F$Environment("VERIFY_PROCEDURE") $ Save_Image_Verify = F$Environment("VERIFY_IMAGE") $ Set NoVerify $ $ Device_Name = "" $ Count = 0 $ Cpu_Mask_Value = 1 $ Cpu_Mask_Data = "1" $ 'P3 == "" $ $ Setup_Cpu_Mask_Data: $ Count = Count + 1 $ If (Count .Gt. 31) Then Goto End_Setup_Cpu_Mask_Data $ Cpu_Mask_Value = Cpu_Mask_Value*2 $ Cpu_Mask_Data = Cpu_Mask_Data + "," + F$String(Cpu_Mask_Value) $ Goto Setup_Cpu_Mask_Data $ $ End_Setup_Cpu_Mask_Data: $! Say Cpu_Mask_Data $ $ Get_Next_Device: $ Device_Name = F$Device("*0:", "''P1'", , 'P2) $ If Device_Name .Eqs. "" Then Goto Get_Pref_Cpu_Exit $ Pref_Cpu_Mask = F$GetDvi(Device_Name, "PREFERRED_CPU") $ If Pref_Cpu_Mask .Ne. 0 $ Then $ Count = 0 $ Cpu_Number = "" $ Cpu_Mask_Loop: $ Cpu_Mask = F$Element(Count, ",", Cpu_Mask_Data) $! Say Count, ": ", Cpu_Mask, " ... ", Pref_Cpu_Mask $ If (Cpu_Mask .Eqs. ",") $ Then $ 'P3 == 'P3 + ",Pref CPU mask for ''Device_Name' : " + F$String(Pref_Cpu_Mask) $ Goto Get_Next_Device $ Else $ If (Pref_Cpu_Mask .Eq. F$Integer(Cpu_Mask)) $ Then $ Cpu_Number = Count $ Goto Display_Cpu_Number $ EndIf $ EndIf $ Count = Count + 1 $ Goto Cpu_Mask_Loop $ $ Display_Cpu_Number: $ 'P3 == 'P3 + ", Pref CPU for ''Device_Name' " + F$String(Cpu_Number) $ EndIf $ Goto Get_Next_Device $ $ Get_Pref_Cpu_Exit: $ Temp = F$Verify(Save_Proc_Verify, Save_Image_Verify) $ Exit $ ENDSUBROUTINE $!------------------------------------------------------------------------------ $! DCL subroutine to extract the IMAGE_ID and Link time for a given image $! Using 8.2 anal/image/nout functionality to define symbols $! $! Parameters are :- $! P1 = image name string (input) $! P2 = Image ID string (output) $! P3 = Link date string (output) $! $ Get_Image_Id_82: SUBROUTINE $ $ Save_Proc_Verify = F$Environment("VERIFY_PROCEDURE") $ Save_Image_Verify = F$Environment("VERIFY_IMAGE") $! Set NoVerify $ $ Analyze/Image/NoOutput/Select=(Identification=Image,Link_Time) 'P1 $ 'P2 == 'ANALYZE$IDENTIFICATION $ 'p3 == ANALYZE$LINK_TIME $ $ ! Temp = F$Verify(Save_Proc_Verify, Save_Image_Verify) $ Exit $ ENDSUBROUTINE