Power Global

Power Global

Connect, learn, share, and engage with IBM Power.


#TechXchangePresenter
 View Only
  • 1.  How to see all levels of patches on Vios?

    Posted 5 days ago

    I have the note below.  There is supposed to be no spacing between lines.  When I paste from { to } it pastes something else.  It's like special characters got Worded or some such thing.  What is the current snippet to doing this?

    # Use the following snippet from the oem_setup_env prompt to see all the levels on a particular VIOS:

    {

    for i in $(lsdev -C -F name | egrep "fcs|ent|hdisk|pdisk|sissas" | tr '\n' ' ')

    do

    ct=$(lsdev -Cl $i | wc -l)

    if [[ $ct -ne 0 ]]

    then

    lvl=$(lsmcode -c -d $i 2>/dev/null | awk 'NF>0' | tr '\n' ' ')

    if [[ "${lvl}" == "" ]]

    then

    lvl="virtual hardware"

    fi

    printf "$i : $lvl\n"

    fi

    done

    }



    ------------------------------
    Robert Berendt IBMChampion
    Business Systems Analyst, Lead
    Dekko
    Fort Wayne
    ------------------------------


  • 2.  RE: How to see all levels of patches on Vios?

    Posted 4 days ago

    Robert,

    Hi, good day to you.

    I copied your text from the first "{" to the last "}" and pasted it "as is" onto my VIOS command line which returned the following, all seems to work.

    # {
    >
    > for i in $(lsdev -C -F name | egrep "fcs|ent|hdisk|pdisk|sissas" | tr '\n' ' ')
    >
    > do
    >
    > ct=$(lsdev -Cl $i | wc -l)
    >
    > if [[ $ct -ne 0 ]]
    >
    > then
    >
    > lvl=$(lsmcode -c -d $i 2>/dev/null | awk 'NF>0' | tr '\n' ' ')
    >
    > if [[ "${lvl}" == "" ]]
    >
    > then
    >
    > lvl="virtual hardware"
    >
    > fi
    >
    > printf "$i : $lvl\n"
    >
    > fi
    >
    > done
    >
    > }
    ent0 : The current microcode level for ent0 is 30100310.
    ent1 : The current microcode level for ent1 is 30100310.
    ent2 : The current microcode level for ent2 is 30100310.
    ent3 : The current microcode level for ent3 is 30100310.
    ent4 : virtual hardware
    ent5 : virtual hardware
    ent6 : virtual hardware
    fcs0 : The current microcode level for fcs0 is 00012000040025700030.
    fcs1 : The current microcode level for fcs1 is 00012000040025700030.
    fcs2 : The current microcode level for fcs2 is 00012000040025700030.
    fcs3 : The current microcode level for fcs3 is 00012000040025700030.
    hdisk0 : virtual hardware
    hdisk1 : virtual hardware
    hdisk2 : virtual hardware
    #

    What do you get as I'm presuming this isn't what you're seeing?

    Thanks, Steve



    ------------------------------
    Steve Munday
    AIX, IBMi, HMC, PowerVM, PowerVS, Ansible automation engineering
    ------------------------------



  • 3.  RE: How to see all levels of patches on Vios?

    Posted 4 days ago

    IDK if it was stress yesterday, or if it was the pause on

    }> > >

    that had me hitting Ctrl-C instead of enter, but it's working today.



    ------------------------------
    Robert Berendt IBMChampion
    Business Systems Analyst, Lead
    Dekko
    Fort Wayne
    ------------------------------



  • 4.  RE: How to see all levels of patches on Vios?

    Posted 4 days ago

    Robert,

    Hi, glad you're all sorted :-)

    Steve



    ------------------------------
    Steve Munday
    AIX, IBMi, HMC, PowerVM, PowerVS, Ansible automation engineering
    ------------------------------



  • 5.  RE: How to see all levels of patches on Vios?
    Best Answer

    Posted 4 days ago

    Other ways to list all microcode levels

    At the # prompt

    lsmcode -A

    At the $ prompt

    lsfware -all

    Doug

     



    ------------------------------
    Doug Hill
    ------------------------------