dnaeon / py-vpoller

Distributed vSphere API Proxy
Other
84 stars 31 forks source link

How to get host "Private memory" counter? #197

Closed leweafan closed 6 years ago

leweafan commented 8 years ago

As I know Private = Consumed - Overhead Consumption. How I can get host Private or Overhead Consumption memory counter? There is mem.overhead.kiloBytes.average but it returns 0. P.S. I'm using vSphere 6.0

dnaeon commented 8 years ago

No troubles getting the mem.overhead.kiloBytes.average performance counter here.

Here's the command I'm using.

$ vpoller-client --method host.perf.metric.get --vsphere-host <vcenter-fdqn> --name <esxi-fdqn> --counter mem.overhead.kiloBytes.average --max-sample 3 | jq '.'

Which returns the following result.

{
  "success": 0,
  "msg": "Successfully retrieved performance metrics",
  "result": [
    {
      "value": 967688,
      "counterId": "mem.overhead.kiloBytes.average",
      "interval": 20,
      "instance": "",
      "timestamp": "2016-06-27 14:31:00+00:00"
    },
    {
      "value": 967408,
      "counterId": "mem.overhead.kiloBytes.average",
      "interval": 20,
      "instance": "",
      "timestamp": "2016-06-27 14:31:20+00:00"
    },
    {
      "value": 967408,
      "counterId": "mem.overhead.kiloBytes.average",
      "interval": 20,
      "instance": "",
      "timestamp": "2016-06-27 14:31:40+00:00"
    }
  ]
}

You are using vSphere 6.0? Is that the vCenter and ESXi hosts version or both?

leweafan commented 8 years ago

Yeah I'm using vSphere 6.0 (latest) with vcenter. I'm using the same command and getting the following output

{
  "msg": "Successfully retrieved performance metrics",
  "result": [
    {
      "timestamp": "2016-06-27 15:43:20+00:00",
      "counterId": "mem.overhead.kiloBytes.average",
      "interval": 20,
      "value": 0,
      "instance": ""
    },
    {
      "timestamp": "2016-06-27 15:43:40+00:00",
      "counterId": "mem.overhead.kiloBytes.average",
      "interval": 20,
      "value": 0,
      "instance": ""
    },
    {
      "timestamp": "2016-06-27 15:44:00+00:00",
      "counterId": "mem.overhead.kiloBytes.average",
      "interval": 20,
      "value": 0,
      "instance": ""
    }
  ],
  "success": 0
}

I have tested this command on two different installations and it's always 0.

dnaeon commented 8 years ago

Is the actual value different when you check the vsphere client?

Do you have any 5.x hosts you can query as well?

leweafan commented 8 years ago

It's definitely different. Unfortunately I do not have 5.x hosts.

dnaeon commented 8 years ago

Cannot reproduce this on a vCenter 6.x with connected ESXi 5.x hosts.

Will try to get an ESXi 6.x these days and see if I can reproduce this one. Could be related to ESXi 6.x, but still need to verify this.

rdeusser commented 7 years ago

@dnaeon Did you figure this one out?

dnaeon commented 7 years ago

@iamthemuffinman no, not really. Unfortunately, I didn't find some spare time to troubleshoot this one. I'd appreciate any help if anyone can troubleshoot it.

dnaeon commented 6 years ago

Closing issue, as I was not able to reproduce it.