# MCn18.ctl:243: Collects Netra FT1800 Information # $Id: MCn18.ctl,v 1.5 2015/05/29 11:41:06 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EXPLORER/MCn18.ctl,v 1.5 2015/05/29 11:41:06 RDA Exp $ # # Change History # 20150527 KRA Improve the documentation. =head1 NAME EXPLORER:MCn18 - Collects Netra FT1800 Information. =head1 DESCRIPTION Collects Netra FT1800 Information. The following reports can be generated and are regrouped under C: =cut use Mrc # Initialization var $VALIDATE = true keep $VALIDATE section begin var $ERR = '---## Associated Errors' var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' var $WRN = ' * Links point to files that have been collected in their \ original format. Opening them directly in your browser can \ present risks. To prevent them, access the file outside the \ browser or use the link to save them and use an adequate \ viewer.' run EXPLORER:XPLRlib('u4ft') # ----------------------------------------------------------------------------- # XPLR_u4ft section # ----------------------------------------------------------------------------- section XPLR_u4ft # Validate the execution context if !${B_GLOBAL:true} return call log_run('Processing N18 sections ...') if !?testDir('d','/usr/platform/SUNW,Ultra-4FT/SUNWftmu') return log_info('Not a Netra FT1800 System') pretoc '2: Netra FT1800' =head2 n18_dev - Devices For each device returned by the driver control utility C collects the following commands: =over 2 =item o C =item o C =item o C =item o C =item o C =back =cut pretoc '3: Commands' debug ' Inside N18 collection, gathering Netra FT1800 commands' if ?testFile('x','/usr/platform/SUNW,Ultra-4FT/SUNWcms/lib/u4ftctl') {var $pgm = lastTestCommand() var $rpt = 'u4ft/Misc/all-device-states.u4ftctl' report n18_dev title '---+!! Device Information' title $TOC loop $dev (command(concat($pgm,' find /'))) {write '---++ ',$dev call addBlock('E','T',$rpt) call writeComment($dev) loop $arg ('get_driver','get_instance','get_path','get_state','get_tag') {var $cmd = join(' ',$pgm,$arg,quote($dev)) prefix {write '---+++ ',ucfirst(substr($arg,4)) write '---## Using: ',encode($cmd) } call collectCommand({nam=>concat('u4ft/Misc/',$dev,'/',$arg),\ out=>{blk=>true,flt=>true,idx=>true,dup=>['T',$rpt],rpt=>${CUR.O_REPORT}},\ err=>{blk=>true,flt=>true,hdr=>$ERR,rpt=>${CUR.O_REPORT}}\ },$cmd) if hasOutput(true) write $TOP } call addBlock('E','T',$rpt) call writeComment('') } if isCreated(true) toc '4:[[',getFile(),'][rda_report][Devices]]' } =head2 n18_eeprom - EEPROM Data Collects EEPROM information using the following command: =over 2 =item o C =back where the location holds for each value of the list: C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C. =cut if ?$pgm = testFile('x','/usr/platform/SUNW,Ultra-4FT/SUNWcms/sbin/cmsfruinfo') {report n18_eeprom title '---+!! EEPROM Information' title $TOC loop $loc ('A-CAF', 'A-CPU', 'A-DSK', 'A-MBD', 'A-PCI0','A-PCI1','A-PCI2',\ 'A-PCI3','A-PCI4','A-PCI5','A-PCI6','A-PCI7','A-PSU0','A-PSU1',\ 'A-PSU2','A-RMM', 'B-CAF', 'B-CPU', 'B-DSK', 'B-MBD', 'B-PCI0',\ 'B-PCI1','B-PCI2','B-PCI3','B-PCI4','B-PCI5','B-PCI6','B-PCI7',\ 'B-PSU0','B-PSU1','B-PSU2','B-RMM') call do_exec([concat('u4ft/fru_eeproms/',$loc),\ $pgm,concat('-i -l ',$loc,' EE_EEPROM'),\ concat('---++ ',$loc)]) if isCreated(true) toc '4:[[',getFile(),'][rda_report][EEPROM Data]]' } =head2 n18_ftmu - Firmware Upgrade Collects Firmware Upgrade information using the following command: =over 2 =item o C =back =cut if ?testDir('d','/usr/platform/SUNW,Ultra-4FT/SUNWftmu') {report n18_ftmu call do_exec(['u4ft/Firmware/firmware-ls-lR',\ '/usr/bin/ls','-lR /usr/platform/SUNW,Ultra-4FT/SUNWftmu',\ '---+ /usr/platform/SUNW,Ultra-4FT/SUNWftmu Listing']) if isCreated(true) toc '4:[[',getFile(),'][rda_report][Firmware Upgrade]]' } =head2 n18_split - Split Mode Collects Split Mode information using the following command: =over 2 =item o F =back =cut if ?$pgm = testFile('x','/usr/platform/SUNW,Ultra-4FT/SUNWcms/sbin/splitinfo') {report n18_split title '---+!! Split Mode Information' call do_exec (['u4ft/Splitmode/splitinfo',$pgm,undef,\ '---++ Domain-related Information']) if isCreated(true) toc '4:[[',getFile(),'][rda_report][Split Mode]]' } # Adjust the table of contents unpretoc =head2 n18_config - Configuration Files Collects the following configuration files: =over 2 =item o F =item o F =item o F =item o F =item o F =item o F =item o F =item o F =item o F (All Contents) =back =cut debug ' Inside N18 collection, gathering Netra FT1800 configuration files' report n18_config title '---+!! Configuration Files' title $TOC title $WRN var %tbl = () # Add split mode files var $tbl{'---+ Split Mode'} = [\ ['u4ft/Splitmode/splitd.conf','/etc/splitd.conf'],\ ['u4ft/SplitMode', '/etc','','','^config\.icn','n']] # Add firmware upgrade files if ?testDir('d','/usr/platform/SUNW,Ultra-4FT/SUNWftmu') var $tbl{'---+ Firmware Upgrade'} = [\ ['u4ft/Firmware/u4ft_compatDB', '/etc/SUNWftmu/u4ft_compatDB'],\ ['u4ft/Firmware/u4ft_syspartno','/etc/SUNWftmu/u4ft_syspartno']] # Add SEVM files var $tbl{'---+ Sun StorEdge Volume Manager'} = [\ ['u4ft/ft1800_sevm/etc_default_vxassist', '/etc/default/vxassist'],\ ['u4ft/ft1800_sevm/etc_rc2.d_vxvm-recover','/etc/rc2.d/S95vxvm-recover'],\ ['u4ft/ft1800_sevm/etc_vx_sbin_vxaltstale','/etc/vx/sbin/vxaltstale']] # Add operating system release file var $tbl{'---+ Operating System Release'} = [\ ['u4ft/Misc/etc_release','/etc/release']] # Add configuration management system files var $tbl{'---+ Configuration Management System'} = [\ ['u4ft/etc_SUNWcms_.config','/etc/SUNWcms/.config','','','^\.+$','nv']] # Collect the files loop $ttl (keys(%tbl)) {prefix {write $ttl write '|*File Path*| *Size*|*Last Modified Date*|' } call do_collect_fil(@{$tbl{$ttl}}) if hasOutput(true) write $TOP } # Add the report in the table of content if isCreated(true) toc '3:[[',getFile(),'][rda_report][Configuration Files]]' =head2 n18_logs - Log Files Collects the following log files: =over 2 =item o F =item o F =item o F All Contents =item o F All Contents =item o F All Contents =back =cut debug ' Inside N18 collection, gathering Netra FT1800 log files' report n18_logs title '---+!! Log Files' title $TOC title $WRN # Collect status log files prefix {write '---+ Status Log Files' write '|*File Path*| *Size*|*Last Modified Date*|' } call do_collect_dir('u4ft/var_SUNWlogu','/var/SUNWlogu') if hasOutput(true) write $TOP # Collect COD log files prefix {write '---+ COD Log Files' write '|*File Path*| *Size*|*Last Modified Date*|' } call do_collect_dir('u4ft/etc_SUNWftmu_u4ftcod','/etc/SUNWftmu/u4ftcod') call do_collect_dir('u4ft/var_SUNWftmu_u4ftcod','/var/SUNWftmu/u4ftcod') if hasOutput(true) write $TOP # Collect system logging utility log files prefix {write '---+ System Logging Utility' write '|*File Path*| *Size*|*Last Modified Date*|' } call do_collect_fil(\ ['u4ft/Misc/debug,nodelay','/dev/u4ftlog:debug,nodelay'],\ ['u4ft/Misc/nvlog,nodelay','/dev/u4ftlog:nvlog,nodelay']) if hasOutput(true) write $TOP # Add the report in the table of content if isCreated(true) toc '3:[[',getFile(),'][rda_report][Log Files]]' # Adjust the table of contents unpretoc =head1 SEE ALSO L, L =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut