# MCsvtg.ctl:220: Collects Service Tags Information # $Id: MCsvtg.ctl,v 1.5 2014/07/17 12:31:30 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EXPLORER/MCsvtg.ctl,v 1.5 2014/07/17 12:31:30 RDA Exp $ # # Change History # 20140710 PRA Add zones documentation. =head1 NAME EXPLORER:MCsvtg - Collects Service Tags Information =head1 DESCRIPTION This module collects Service Tags information. =cut use Mrc # Initialization var $VALIDATE = true keep $VALIDATE section begin var $ERR = '---## Associated Errors' var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' run EXPLORER:XPLRlib('servicetags') # ----------------------------------------------------------------------------- # XPLR_servicetags section # ----------------------------------------------------------------------------- section XPLR_servicetags # Validate the execution context if !${OS.solaris} return call log_run('Processing SVTG sections ...') =head2 Service Tags Information Gathers Service Tags information using the F command. =cut pretoc '2:Service Tags' # Perform the collection loop $rec (get_zones(true)) {if defined($nam = $rec->[0]) {var ($ttl,$pre,$exe) = (concat('From Zone ',$nam),\ concat('zones/',$nam),\ concat('/usr/sbin/zlogin ',$nam)) call log_info(concat('servicetags: RUNNING: zone ',$nam),\ concat(' Inside SVTG collection, collecting from zone ',$nam,\ ' (can take time)')) } else var ($ttl,$pre,$exe) = ('From Global Zone') var $top = $rec->[1] if ?testFile('x',catFile($top,'/usr/bin/stclient')) {report concat('svtg_z_',nvl($nam,'global')) title '---+!! ',$ttl title $TOC var $flg = grepCommand(join(' ',$exe,'/usr/bin/stclient -E 2>&1'),\ 'illegal option','f') call do_remote($pre,$exe,$top,\ ['service_tags.xml',\ '/usr/bin/stclient',cond($flg,'-x','-Ex'),\ cond($flg,'---+ Extracted Service Tags',\ '---+ Service Tags with Environmental Information'),\ cond(defined($pre),true,{out=>{ext=>'',tag=>'_sn_stclient_E_'}})]) # Add the report to the table of content if isCreated(true) toc '3:[[',getFile(),'][rda_report][',$ttl,']]' } } unpretoc =head2 Zones =for zone begin servicetags Collects Service Tags information using the F command from the global zone. Unless local zone collections are disabled, collects the Service Tags information using the F command from the selected local zones. =for zone end =head1 SEE ALSO L, 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