• FYI: Determine HMC, CEC and LPAR ID from AIX LPAR

    From Hajo Ehlers@21:1/5 to All on Wed Jan 27 05:05:54 2016
    # Will build a command to access a AIX LPAR via console.

    node=
    # Determine HMC
    hmc=$(ssh root@$node lsrsrc -x -t IBM.MCP HMCIPAddr | tail -1 )

    # Determine CEC
    cec=$(ssh root@$node lsattr -El sys0 -a modelname -F value | cut -f2 -d, ) cec="${cec}*"$(keyssh root@$node lsattr -El sys0 -a systemid -F value | cut -f2 -d, | cut -b3- )

    # Determine LPAR Name or ID
    lparname=$(ssh root@$node uname -L | awk '{print $2 }' )
    lparid=$(ssh root@$node uname -L | awk '{print $1 }' )
    echo ssh hscroot@$hmc mkvterm -m \'${cec}\' --id ${lparid}

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)