performancecopilot / xsos-pcp

Performance Co-Pilot xsos-inspired script for fast sosreport diagnostics
1 stars 3 forks source link

pcp-xsos should also include Hyper-V balloon usage information #13

Open PinakR90 opened 1 month ago

PinakR90 commented 1 month ago

Hyper-V Balloon Usage Information:

cat /sys/kernel/debug/hv-balloon

host_version : 2.0
capabilities : enabled hot_add state : 1 (Initialized) page_size : 4096 / HV Page Size / pages_added : 0 / Pages added with hot_add to the Guest / pages_onlined : 0 / Pages that are "onlined"/used from pages_added / pages_ballooned : 3276800 / Pages we have given back to host / total_pages_committed : 4026223
max_dynamic_page_count: 4706304

Here's the corresponding kernel source code: drivers/hv/hv_balloon.c

/**

struct hv_dynmem_device { struct hv_device *dev; enum hv_dm_state state; struct completion host_event; struct completion config_event;

    /*
     * Number of pages we have currently ballooned out.
     */
    unsigned int num_pages_ballooned;          <<< - - - 

Refer Jira: https://issues.redhat.com/browse/RHEL-45715

natoscott commented 1 month ago

I've added the following metrics to PCP:

$ pminfo hyperv.balloon
hyperv.balloon.state
hyperv.balloon.pagesize
hyperv.balloon.added
hyperv.balloon.onlined
hyperv.balloon.ballooned
hyperv.balloon.total_committed

Does anyone else have spare cycles to add the pcp-xsos reporting of these?