Ldom: count_vcpu, count_mem

count_vcpu

# ldm ls |grep -v ^NAME |nawk 'BEGIN{s=0} {s=s+$5} END{print s}'
# ldm ls -o cpu|grep -v "[a-zA-Z\-]"|nawk '{print $1}'|grep "^[0-9]"|wc -l

count_mem

# ldm ls |grep -v ^NAME |nawk 'BEGIN{s=0} {gsub("G","",$6);s=s+$6} END{print s}'

oder eben so mit “Boardmitteln” herausfinden, was noch frei ist…

# ldm ls-devices memory

# ldm ls-devices cpu   

# ldm ls-devices core

Leave a Reply

Your email address will not be published. Required fields are marked *