unix

UNIX Team Knowledge Base:
code punifiunx100:/usr/local/nagios/etc/objects/servers/Hobbit> egrep "UPR:app.*Web" *cfg | grep indigo - OR - egrep "UPR:app:indigo:Web" *cfg

To get hostnames: egrep "UPR:app:indigo:Web" *cfg | awk -F. '{print $1}'

code

Install Perl Module
@http://www.cpan.org/modules/INSTALL.html code copy Config.pm to the server cp Config.pm /opsw/Server/\@/nunififac100/files/root/usr/lib/perl5/*/CPAN/

cpan -i cpan App::cpanminus cpanm Spreadsheet::WriteExcel code

Create cwiz Template
code cd /home/common/ServiceDesk/cwiz/SOP/SVMMirror vi SVMMirror.{Desc,Impl,Val,Back} code

Install Opsware Agent on Solaris sparc
code format="bash" In Opsware: cd /var/opt/opsware/agent_installers/ then scp the appropriate file to the server

On Server: To get the gateway - cat /etc/opt/opsware/agent/opswgw.args

./opsware-agent-* -c -s -f --force_full_hw_reg --force_sw_reg --opsw_gw_addr_list {INSERT THE CORRECT GATEWAY} code

Decommission (Retire) a Server
code deactivate in opsware: right click on server pull down to deactivate remove from Hobbit: /usr/local/hobbit/server/etc/bb-hosts on punifiunx100 remove from server db: go to server DB, search for server then delete remove from RHN: login to RHN. search for server, delete server (twice) remove netgroup: go to punifirds010, /usr/local/scripts/ldapNetgroupdel.sh servername code

Restarting Kana
code format="bash" On hemlock-cc and cedar-cc

/cust/kana/response/bin/kana stop ps -ef | grep -i kana /cust/kana/response/bin/kana start code
 * 1) Stop the app
 * 1) Make sure all processes are stopped
 * 1) Start the app

Flying Tarball
code format="bash" cd $MP; tar cpfE - `ls $MP | egrep -v "swapfile*|.dbf$"` | (cd /mnt; tar xpvf -) code

Use Flying Tarball to transfer files
code format="bash" mknod /tmp/scp p chmod 777 /tmp/scp cat /tmp/scp | tar xpvf -
 * 1) On destination

tar cpf - /home | ssh USER@DESTINATION "cat - > /tmp/scp" code
 * 1) On source

Check HP Drive Status
code format="bash" hpacucli ctrl all show config code

x