Pular para o conteúdo principal

A menos que bons registros sejam mantidos quando os produtos VOS são instalados, determinar a revisão de todos os produtos em um módulo pode ser uma tarefa assustadora. Alguns programas têm parâmetros que podem ser usados para exibir as informações da versão atual. Há também ferramentas que exibirão informações do programa como display_program_module e get_pm_version, mas atualmente não há nada que tente fazer isso para todos os produtos de software instalados.

This is why I created the following command macro that can be executed on your module to provide some of this information. It has one optional parameter (-long) that can be specified to list all the software products being checked and the minimum <major>.<minor> release of VOS required for the product.

 
 

 

& Beginning of modification history
& Written 08Feb2011 by Paul Farley to help determine installed software.
& End of modification history
&begin_parameters
  long        switch(long)
  debug       switch(debug),secret
&end_parameters
&if &debug& &then &echo macro_lines command_lines input_lines
&else &echo no_command_lines no_input_lines no_macro_lines
&set_string MyName list_software_revisions
&
& Set a version, in case future modifications are desired.
&set_string macro_version  1.0_08Feb2011
&display_line
!display_line (string &MyName&: version &macro_version&)
&
&set_string GPMV (master_disk)>system>maint_library>get_pm_version.pm
&if (exists -file &GPMV&) = 0 &then &do
  display_line &MyName&: Unable to locate get_pm_version.pm, exiting.
  &return
&end
&set_string LSRCM (referencing_dir)>list_software_revisions.cm
set_ready -format off
&set_string temp (process_dir)>lsr-file
&
&set_string ModRel (substr (after (module_info system_release) 'Release ') 1 4)
&
& Need to set starting line number higher than the following code
& to keep from finding these test strings.
&
&set line_num 100
&
&label NEXT_LSR_LINE
 &set_string inline (contents &LSRCM& &line_num& -hold)
 &set CS (command_status)
 &if &CS& ^= 0 &then &do
  display_line &MyName&: Unable to locate software table in macro file.
  set_ready
  &return
 &end
 &if (index &$inline& 'Start_Of_Software_Table') > 0
 &then &set SOST &line_num&
 &if (index &$inline& 'End_Of_Software_Table') > 0 &then &do
  &set EOST &line_num&
  &goto Found_SW_Table
 &end
 &set line_num &line_num& + 1
 &goto NEXT_LSR_LINE
&
&label Found_SW_Table
display_line
display_line Current Module: (current_module) &+
 '('(module_info cpu_type)')' (module_info system_release)
display_line
&if &long& &then &do
 display_line &+
'SW-Bit Min-VOS Product Description             Product Revision'
 display_line &+
'------ ------- ------------------------------- -----------------------'
&end
&else &do
 display_line &+
'SW-Bit Product Description                     Product Revision'
 display_line &+
'------ --------------------------------------- -----------------------'
&end
&set SWTline (calc &SOST& + 1)
& Macro 'while' processing has problems in earlier VOS
& releases ( <14.7 ). Need to do it the old way for now..
& &while &SWTline& < &EOST&
&label WhileLoop
 &set SWTline (calc &SWTline& + 1)
 & Pick up SWBit
 &set_string inline (contents &LSRCM& &SWTline& -hold)
 &eval &set_string &inline&
 &set SWTline (calc &SWTline& + 1)
 & Pick up SWDesc
 &set_string inline (contents &LSRCM& &SWTline& -hold)
 &eval &set_string &inline&
 &set SWTline (calc &SWTline& + 1)
 & Pick up SWTestPm
 &set_string inline (contents &LSRCM& &SWTline& -hold)
 &eval &set_string &inline&
 &set SWTline (calc &SWTline& + 1)
 & Pick up SWMinRel
 &set_string inline (contents &LSRCM& &SWTline& -hold)
 &eval &set_string &inline&
 &set SWTline (calc &SWTline& + 1)
 &
 &if (software_purchased &SWBit&) = 0 &then &do
  &if &ModRel& < &SWMinRel& &then &do
   &if &long& = 0 &then &goto DSR_Done
   &set_string SwRev * Bit not set. ModRel<MinRel *
   &goto DSR_Display
  &end
  &if &long& &then &do
   &set_string SwRev * Software bit not set *
   &goto DSR_Display
  &end
  &goto DSR_Done
 &end
 &if (exists -file &SWTestPm&) = 0 &then &do
  &if &ModRel& < &SWMinRel& &then &do
   &if &long& = 0 &then &goto DSR_Done
   &set_string SwRev * Not installed. ModRel<MinRel *
   &goto DSR_Display
  &end
  &if &long& &then &do
   &set_string SwRev * Product not installed *
   &goto DSR_Display
  &end
  &goto DSR_Done
 &end
 !attach_default_output &temp& ; &GPMV& &SWTestPm& ;
 &set_string cs (command_status)
 !detach_default_output
 &if &cs& ^= 0 &then &do
  &if &long& &then &do
   &set_string SwRev * Error &cs& returned *
   &goto DSR_Display
  &end
  &goto DSR_Done
 &end
 &set_string SwRev (contents &temp& 1)
 &if (substr &$SwRev& 1 1) ^= (byte 39)
 &then &set_string SwRev (ltrim (after &$SwRev& ' '))
 &
 &if &ModRel& < &SWMinRel&
 &then &set_string SwRev * &SwRev& {&ModRel& < &SWMinRel&}
 &label DSR_Display
 &if &long&
 &then &set_string SWBD '('&SWBit&')' &+
 (copy ' ' (calc 7 - (length &SWMinRel&)))&SWMinRel& &+
  &SWDesc& &+
  '                                                        '
 &else &set_string SWBD '('&SWBit&')' &SWDesc& &+
  '                                                        '
 &set_string OutLine (substr &$SWBD& 1 47)(unquote &SwRev&)
 &display_line &OutLine&
 &
 &label DSR_Done
& &end  & This is the end of the 'while'
&if &SWTline& < &EOST& &then &goto WhileLoop
&
&set_string xline (contents &LSRCM& &line_num& -close)
set_ready
&return
& Each Product consists of five lines of data and they require
& The following static labels for the macro to function properly;
& & comment line to breakup the products
& SWBit <software product code>
& SWDesc <software description>
& SWTestPm <product program path>
& SWMinRel <minimum VOS major.minor required version>
&
& The labels Start Of Software Table and End Of Software Table
& also must be present for the macro to function properly..
&
&label Start_Of_Software_Table
&
SWBit S006
SWDesc Transaction Processing Services
SWTestPm (master_disk)>system>command_library>tp_overseer.pm
SWMinRel 1.0
&
SWBit S008
SWDesc Forms Management System
SWTestPm (master_disk)>system>cl>nls_edit_form.pm
SWMinRel 1.0
&
SWBit S009
SWDesc X.25 Network Facility
SWTestPm (master_disk)>system>command_library>x25.pm
SWMinRel 1.0
&
SWBit S017
SWDesc SNA
SWTestPm (master_disk)>system>sna_command_library>sna_appc.pm
SWMinRel 1.0
&
SWBit S020
SWDesc COBOL Compiler
SWTestPm (master_disk)>system>command_library>cobol.pm
SWMinRel 1.0
&
SWBit S024
SWDesc PL/I Compiler
SWTestPm (master_disk)>system>command_library>pl1.pm
SWMinRel 1.0
&
SWBit S026
SWDesc FORTRAN 77 Compiler
SWTestPm (master_disk)>system>command_library>fortran.pm
SWMinRel 1.0
&
SWBit S028
SWDesc Pascal Compiler
SWTestPm (master_disk)>system>command_library>pascal.pm
SWMinRel 1.0
&
SWBit S030
SWDesc C Compiler
SWTestPm (master_disk)>system>command_library>c.pm
SWMinRel 1.0
&
SWBit S037
SWDesc BRASS SNMP Manager for VOS
SWTestPm (master_disk)>system>vsnmpmgr>bin>brassd.pm
SWMinRel 14.7
&
SWBit S040
SWDesc Screen Editor
SWTestPm (master_disk)>system>command_library>unformatted_edit.pm
SWMinRel 1.0
&
SWBit S041
SWDesc Text Editor
SWTestPm (master_disk)>system>command_library>formatted_edit.pm
SWMinRel 1.0
&
SWBit S048
SWDesc RPC/XDR for VOS V-Series
SWTestPm (master_disk)>system>rpc>stcp>command_library>portmap.pm
SWMinRel 15.1
&
SWBit S049
SWDesc IPSEC and IKE
SWTestPm (master_disk)>system>stcp>command_library>ipsec_key_admin.pm
SWMinRel 15.3
&
SWBit S080
SWDesc Debugging Support
SWTestPm (master_disk)>system>command_library>mp_debug.pm
SWMinRel 1.0
&
SWBit S081
SWDesc Sightline Power Agent for Vos
SWTestPm (master_disk)>system>sightline>bin>datamgr.pm
SWMinRel 1.0
&
SWBit S090
SWDesc DES Subroutines
SWTestPm (master_disk)>system>des_library>encrypt.pm
SWMinRel 1.0
&
SWBit S099
SWDesc Tools
SWTestPm (master_disk)>system>itl_command_library>add_copyright.pm
SWMinRel 1.0
&
SWBit S115
SWDesc STREAMS TCP
SWTestPm (master_disk)>system>stcp>command_library>ping.pm
SWMinRel 1.0
&
SWBit S238
SWDesc DATAKIT
SWTestPm (master_disk)>system>datakit>command_library>dkstat.pm
SWMinRel 1.0
&
SWBit S266
SWDesc Apache Web Server
SWTestPm (master_disk)>system>apache_install_dir>bin>httpd.pm
SWMinRel 14.3
&
SWBit S266
SWDesc Apache Web Server
SWTestPm (master_disk)>system>apache2>bin>httpd.pm
SWMinRel 15.2
&
SWBit S266
SWDesc Apache with PHP for OpenVOS
SWTestPm (master_disk)>opt>apache>bin>httpd.pm
SWMinRel 17.0
&
SWBit S268
SWDesc RADIUS Support
SWTestPm (master_disk)>system>command_library>radius_admin.pm
SWMinRel 14.4
&
SWBit S269
SWDesc SAMBA
SWTestPm (master_disk)>system>samba>command_library>smbd.pm
SWMinRel 14.4
&
SWBit S269
SWDesc Samba for OpenVOS
SWTestPm (master_disk)>opt>samba>sbin>smbd.pm
SWMinRel 17.0
&
SWBit S270
SWDesc OpenSSL and OpenSSH for VOS
SWTestPm (master_disk)>system>openssl>bin>ssh.pm
SWMinRel 14.7
&
SWBit S270
SWDesc OpenVOS Internet Security Pack
SWTestPm (master_disk)>opt>openssl>bin>ssh.pm
SWMinRel 17.0
&
SWBit S272
SWDesc MySQL for OpenVOS
SWTestPm (master_disk)>opt>mysql>bin>mysql.pm
SWMinRel 15.2
&
SWBit S273
SWDesc Kona for OpenVOS
SWTestPm (master_disk)>opt>java>latest>bin>java.pm
SWMinRel 17.1
&
SWBit S293
SWDesc Open StrataLink
SWTestPm (master_disk)>system>command_library>osl_server.pm
SWMinRel 1.0
&
SWBit S294
SWDesc ftServer V Series SDK
SWTestPm (master_disk)>system.14.7>command_library.p4be>bind.pm
SWMinRel 14.7
&
SWBit S456
SWDesc VOS Standard C Compiler
SWTestPm (master_disk)>system>command_library>cc.pm
SWMinRel 1.0
&
SWBit S581
SWDesc VOS NIO for V-Series
SWTestPm (master_disk)>system>nio>command_library>nio_admin.pm
SWMinRel 15.0
&
SWBit S683
SWDesc VOS Enterprise Backup Agent
SWTestPm (master_disk)>system>ndmpd>bin>ndmpd.pm
SWMinRel 15.2
&
SWBit S684
SWDesc EMANATE SNMP Master Agent for VOS
SWTestPm (master_disk)>system>vsnmpmgr>emanate>basic>vos.bin>snmpd.pm
SWMinRel 15.2
&
SWBit S776
SWDesc WMQ
SWTestPm (master_disk)>opt>mqm>bin>crtmqm.pm
SWMinRel 17.0
&
SWBit S844
SWDesc WMQC for OpenVOS
SWTestPm (master_disk)>opt>mqm>bin>amqicdir.pm
SWMinRel 17.0
&
SWBit S877
SWDesc GNU C/C++ and GNU Tools
SWTestPm (master_disk)>system>gnu_library>bin>g++.pm
SWMinRel 14.3
&label End_Of_Software_Table

 

Figura 1 - list_revisions_software_revisions.cm Macro de Comando

Aqui está uma amostra da saída padrão da macro de comando de um módulo OpenVOS.

 
 

 

lista_revisões_de_software

list_software_revisions: versão 1.0_08Fev2011

Módulo atual: %es#m105 (G92200) Lançamento do OpenVOS 17.0.2ax
SW-Bit Descrição do produto Revisão do produto
------ --------------------------------------- -----------------------
(S006) Transaction Processing Services Release 17.0.2as
(S008) Versão 17.0.1 do Sistema de Gerenciamento de Formulários
(S009) X.25 Liberação de instalações de rede 17.0.1
(S017) SNA SNA2 Versão 9.0.0
(S020) Compilador COBOL Versão 17.0.1
(S024) Versão do Compilador PL/I 17.0.1
(S026) FORTRAN 77 Lançamento do Compilador 17.0.1
(S028) Pascal Versão do compilador 17.0.1
(S030) C Versão do compilador 17.0.1
(S040) Versão do editor de tela 17.0.1
(S041) Versão 17.0.1 do editor de texto
(S080) Versão 17.0.1 do suporte de depuração
(S090) DES Subrotinas Versão 2.1a
(S099) Ferramentas Versão 2.0fp
(S115) STREAMS TCP Versão 17.0.2ar
(S238) DATAKIT Release 15.3.0
(S266) Apache com PHP para OpenVOS 3.0.0
(S268) Versão 17.0.1 do suporte RADIUS
(S269) Samba para OpenVOS Versão 3.2.beta.aa
(S270) OpenSSL e OpenSSH para a versão 2.0.0m do VOS
(S272) MySQL para OpenVOS Versão 1.0.0
(S293) Open StrataLink Versão 17.0.2
(S456) Compilador VOS Padrão C Versão 17.0.1
(S684) EMANATE Agente Master SNMP para VOS Versão 16.2.0
(S877) GNU C/C++ e GNU Tools Release 3.4.0i

 

Figura 2 - Exemplo de lista_revisões_de_software_revisões.cm

A versão mais recente da macro também pode ser encontrada na página web de Ferramentas de Atendimento ao Cliente VOS; ftp://ftp.stratus.com/pub/cac/tools/tools.html.

© 2024 Stratus Technologies.