VirtualBox

Changeset 4570 in vbox


Ignore:
Timestamp:
Sep 6, 2007 12:20:12 PM (17 years ago)
Author:
vboxsync
Message:

More guest statistics

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r4540 r4570  
    357357
    358358/** guest statistics values */
    359 #define VBOX_GUEST_STAT_CPU_LOAD            BIT(0)
    360 #define VBOX_GUEST_STAT_THREADS             BIT(1)
    361 #define VBOX_GUEST_STAT_PROCESSES           BIT(2)
    362 #define VBOX_GUEST_STAT_PHYS_MEM_TOTAL      BIT(3)
    363 #define VBOX_GUEST_STAT_PHYS_MEM_AVAIL      BIT(4)
    364 #define VBOX_GUEST_STAT_PHYS_MEM_BALLOON    BIT(5)
    365 #define VBOX_GUEST_STAT_PAGE_FILE_SIZE      BIT(6)
     359#define VBOX_GUEST_STAT_CPU_LOAD_IDLE       BIT(0)
     360#define VBOX_GUEST_STAT_CPU_LOAD_KERNEL     BIT(1)
     361#define VBOX_GUEST_STAT_CPU_LOAD_USER       BIT(2)
     362#define VBOX_GUEST_STAT_THREADS             BIT(3)
     363#define VBOX_GUEST_STAT_PROCESSES           BIT(4)
     364#define VBOX_GUEST_STAT_PHYS_MEM_TOTAL      BIT(5)
     365#define VBOX_GUEST_STAT_PHYS_MEM_AVAIL      BIT(6)
     366#define VBOX_GUEST_STAT_PHYS_MEM_BALLOON    BIT(7)
     367#define VBOX_GUEST_STAT_PAGE_FILE_SIZE      BIT(8)
    366368
    367369
     
    371373    /** Reported statistics */
    372374    uint32_t        u32StatCaps;
    373     /** CPU load (0-100) */
    374     uint32_t        u32CpuLoad;
     375    /** Idle CPU load (0-100) for last interval */
     376    uint32_t        u32CpuLoad_Idle;
     377    /** Kernel CPU load (0-100) for last interval */
     378    uint32_t        u32CpuLoad_Kernel;
     379    /** User CPU load (0-100) for last interval */
     380    uint32_t        u32CpuLoad_User;
    375381    /** Nr of threads */
    376382    uint32_t        u32Threads;
  • trunk/src/VBox/Main/GuestImpl.cpp

    r4529 r4570  
    270270    switch(statistic)
    271271    {
    272     case GuestStatisticType_CPULoad:
     272    case GuestStatisticType_CPULoad_Idle:
     273    case GuestStatisticType_CPULoad_Kernel:
     274    case GuestStatisticType_CPULoad_User:
    273275    case GuestStatisticType_Threads:
    274276    case GuestStatisticType_Processes:
     
    290292    switch(statistic)
    291293    {
    292     case GuestStatisticType_CPULoad:
     294    case GuestStatisticType_CPULoad_Idle:
     295    case GuestStatisticType_CPULoad_Kernel:
     296    case GuestStatisticType_CPULoad_User:
    293297    case GuestStatisticType_Threads:
    294298    case GuestStatisticType_Processes:
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r4533 r4570  
    404404        return VERR_INVALID_PARAMETER; /** @todo wrong error */
    405405
    406     if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_CPU_LOAD)
    407         guest->SetStatistic(GuestStatisticType_CPULoad, pGuestStats->u32CpuLoad);
     406    if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_CPU_LOAD_IDLE)
     407        guest->SetStatistic(GuestStatisticType_CPULoad_Idle, pGuestStats->u32CpuLoad_Idle);
     408
     409    if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_CPU_LOAD_KERNEL)
     410        guest->SetStatistic(GuestStatisticType_CPULoad_Kernel, pGuestStats->u32CpuLoad_Kernel);
     411
     412    if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_CPU_LOAD_USER)
     413        guest->SetStatistic(GuestStatisticType_CPULoad_User, pGuestStats->u32CpuLoad_User);
    408414
    409415    if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_THREADS)
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r4528 r4570  
    409409  <enum
    410410     name="GuestStatisticType"
    411      uuid="a7cffd08-665f-4156-b2e9-2b3c64e213da"
     411     uuid="42d6b94f-9b17-4a9c-8d6f-a837c383eed0"
    412412     >
    413     <const name="CPULoad"              value="0">
    414       <desc>
    415         Current CPU load (0-100%).
     413    <const name="CPULoad_Idle"         value="0">
     414      <desc>
     415        Idle CPU load (0-100%) for last interval.
    416416      </desc>
    417417    </const>
    418     <const name="Threads"              value="1">
     418    <const name="CPULoad_Kernel"       value="1">
     419      <desc>
     420        Kernel CPU load (0-100%) for last interval.
     421      </desc>
     422    </const>
     423    <const name="CPULoad_User"         value="2">
     424      <desc>
     425        User CPU load (0-100%) for last interval.
     426      </desc>
     427    </const>
     428    <const name="Threads"              value="3">
    419429      <desc>
    420430        Total number of threads in the system.
    421431      </desc>
    422432    </const>
    423     <const name="Processes"            value="2">
     433    <const name="Processes"            value="5">
    424434      <desc>
    425435        Total number of processes in the system.
    426436      </desc>
    427437    </const>
    428     <const name="PhysMemTotal"         value="3">
     438    <const name="PhysMemTotal"         value="6">
    429439      <desc>
    430440        Total physical memory in megabytes.
    431441      </desc>
    432442    </const>
    433     <const name="PhysMemAvailable"     value="4">
     443    <const name="PhysMemAvailable"     value="7">
    434444      <desc>
    435445        Free physical memory in megabytes.
    436446      </desc>
    437447    </const>
    438     <const name="PhysMemBalloon"       value="5">
     448    <const name="PhysMemBalloon"       value="8">
    439449      <desc>
    440450        Ballooned physical memory in megabytes.
    441451      </desc>
    442452    </const>
    443     <const name="PageFileSize"         value="6">
     453    <const name="PageFileSize"         value="9">
    444454      <desc>
    445455        Pagefile size in megabytes.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette