Tuesday, May 21, 2013

Download a script and run it and log output



Run on box a
ssh root@carebears-hv-01.pony.com "wget http://unicorn.com/test " -O - | sh - 2>&1 | tee log_file.txt"


File on box b "unicorn"

##cat test
#!/bin/sh

echo "this is a test"





output on box c "carebears"
# cat log_file.txt
this is a test

Look its magic

Monday, May 20, 2013

ppc64 lpar vios stuff

 Vios stuff

shows state of lpars

lssyscfg -r lpar -F lpar_id,name,state


activate lpars
chsysstate -o on -b norm -r lpar -n name

find out the name of the managed system
 lssyscfg -r sys -F name

Change the name of a managed system
chsyscfg -r sys -m Server-8406-xx-SNxxxxx -i "new_name=xxxx-xxxxx-xx-01"


 ppc64 lpar vios nic settings

remove bad settings


    $ oem_setup_env
    # ifconfig enX down detach
    # rmdev -dl enX
    # rmdev -dl entX
    # rm dev -dl etX
    # cfgmgr


    find out your cards

     $ lsdev | head -n 28


    show your mapping to sea nics

    $ lsmap -net -all


    mkvdev -sea ent0 -vadapter ent4 -default ent4 -defaultid 1


    mkvdev -sea ent1 -vadapter ent5 -default ent5 -defaultid 123

    chdev -dev ent0 -attr state=up -restoreroute


    Use smit to start dhcp on the nic



    get macs


    entstat en3