VMware vSphere

 View Only
  • 1.  How to get ESXi CPU model through command line??

    Posted May 24, 2017 10:14 PM

    Hello,

    Does anyone know how to collect the ESXi host CPU model through command line? I do not want to use Get-VM or PowerCLI. I need it to be via esxcli or something similar.

    Thanks in advance.

    Victor Fonseca.



  • 2.  RE: How to get ESXi CPU model through command line??

    Posted May 25, 2017 02:24 AM

    Try below commands

    esxcli hardware cpu global get

    hardware cpu list



  • 3.  RE: How to get ESXi CPU model through command line??

    Posted May 25, 2017 11:13 AM

    Hello,

    Thanks for answering.
    I had already tried these commands .. See the result:

    ~ # esxcli hardware cpu global get

       CPU Packages: 2

       CPU Cores: 12

       CPU Threads: 24

       Hyperthreading Active: true

       Hyperthreading Supported: true

       Hyperthreading Enabled: true

       HV Support: 3

       HV Replay Capable: true

       HV Replay Disabled Reasons:

    ~ #

    The processor model, which is what I need, does not appear ..

    =(

    Any suggestion?

    Thanks,

    Victor Fonseca.



  • 4.  RE: How to get ESXi CPU model through command line??

    Posted May 25, 2017 11:51 AM

    I don't think the esxcli would give you a friendly name such as Intel Xeon E5-2650L v3.

    The other command

    esxcli hardware cpu list

    will give you the family, model, type, stepping, clock speed, and L2/L3 cache sizes. Good luck in trying to find out using the numbers :smileylaugh:

    Alternatively is to use

    esxcli hardware platform get

    will give you the manufacturer and serial number.

    Depending on the manufacturer, you might be able to look at their support site and use the serial number to see what was originally shipped.

    esxcfg-info -w | less -i

    will consolidate many of the different hardware related esxcli hardware, lspci and other hardware related configuration; but again it may not necessarily present a friendly names such as one would see in Windows Device Manager.



  • 5.  RE: How to get ESXi CPU model through command line??

    Posted May 25, 2017 12:49 PM

    Try this command

    vim-cmd hostsvc/hosthardware



  • 6.  RE: How to get ESXi CPU model through command line??

    Posted May 25, 2017 01:48 PM

    Hi!

    The command 'vim-cmd hostsvc/hosthardware' returns me a very large number of information. I'd like to filter only this part:

      (vim.host.CpuPackage) {
         dynamicType = <unset>,
         index = 1,
         vendor = "intel",
         hz = 3058999441,
         busHz = 132999952,
         description = "Intel(R) Xeon(R) CPU       X5675  @ 3.07GHz",
         threadId = (short) [

    Do you know a way to do this?

    I used the command below and it almost worked, but I'm forcing 'grep' to search for 'Xeon', which is not ideal.

    ~ # vim-cmd hostsvc/hosthardware | grep 'Xeon' | awk 'NR==1{print $3,$4,$6,$7,$8}'

    "Intel(R) Xeon(R) X5675 @ 3.07GHz",

    Any ideias? =D

    Thanks,

    Victor.



  • 7.  RE: How to get ESXi CPU model through command line??
    Best Answer

    Posted May 25, 2017 02:19 PM

    Try vim-cmd hostsvc/hostsummary | grep cpuModel



  • 8.  RE: How to get ESXi CPU model through command line??

    Posted May 25, 2017 02:34 PM

    Hummm.. Very good.

    Look this command.. =)

    ~ # vim-cmd hostsvc/hostsummary | grep cpuModel | cut -d '"' -f2

    Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz

    I think that will help me!

    Thanks a lot, man.

    Victor Fonseca.