macmon icon indicating copy to clipboard operation
macmon copied to clipboard

Show number of cores in JSON output

Open aliasaria opened this issue 8 months ago • 3 comments

In the CLI monitor, you can see the number of cores at the top, e.g.:

4E+10P+30GPU 96GB

But when you call macmon to get pipe output like this:

./macmon pipe -s 1 -i 0

The cores don't show up anywhere in the JSON output

{
  "timestamp": "2025-02-24T20:38:15.427569+00:00",
  "temp": {
    "cpu_temp_avg": 43.73614,         // Celsius
    "gpu_temp_avg": 36.95167          // Celsius
  },
  "memory": {
    "ram_total": 25769803776,         // Bytes
    "ram_usage": 20985479168,         // Bytes
    "swap_total": 4294967296,         // Bytes
    "swap_usage": 2602434560          // Bytes
  },
  "ecpu_usage": [1181, 0.082656614],  // (Frequency MHz, Usage %)
  "pcpu_usage": [1974, 0.015181795],  // (Frequency MHz, Usage %)
  "gpu_usage": [461, 0.021497859],    // (Frequency MHz, Usage %)
  "cpu_power": 0.20486385,            // Watts
  "gpu_power": 0.017451683,           // Watts
  "ane_power": 0.0,                   // Watts
  "all_power": 0.22231553,            // Watts
  "sys_power": 5.876533,              // Watts
  "ram_power": 0.11635789,            // Watts
  "gpu_ram_power": 0.0009615385       // Watts (not sure what it means)
}

Would be great if you could add them as a field.

aliasaria avatar Apr 24 '25 19:04 aliasaria

Hi @aliasaria, I saw your PR. I'm not sure it's a good idea to include all this information in every update message, since it doesn't change anyway. It might be better to create a separate pipe-info command that can be called once to return the required information.

vladkens avatar May 15 '25 01:05 vladkens

Hi! Ok I changed the PR so that it only shows the extra info if you pass --soc-info like this:

macmon pipe -s 1 -i 500 --soc-info | jq

aliasaria avatar May 29 '25 15:05 aliasaria

Hi @aliasaria, thanks for the PR! I’ve released this feature in v0.6.1.

vladkens avatar Jun 02 '25 20:06 vladkens