VirtualBox

Changeset 4656 in vbox


Ignore:
Timestamp:
Sep 10, 2007 11:16:21 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
24303
Message:

Display memory balloon and statistics interval settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r4652 r4656  
    15461546        }
    15471547    }
    1548     if (    console
    1549         &&  (details == VMINFO_STATISTICS || details == VMINFO_FULL))
     1548    if (console)
    15501549    {
    15511550        ComPtr <IGuest> guest;
    1552         ULONG statVal;
    15531551
    15541552        rc = console->COMGETTER(Guest)(guest.asOutParam());
    15551553        if (SUCCEEDED(rc))
    15561554        {
    1557             rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_Idle, &statVal);
     1555            ULONG statVal, val;
     1556
     1557            RTPrintf("Guest:\n");
     1558
     1559            rc = guest->COMGETTER(MemoryBalloonSize)(&val);
    15581560            if (SUCCEEDED(rc))
    1559                 RTPrintf("CPU%d: CPU Load Idle          %-3d%%\n", 0, statVal);
    1560 
    1561             rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_Kernel, &statVal);
     1561                RTPrintf("Configured memory balloon size %d MB\n", val);
     1562
     1563            rc = guest->COMGETTER(StatisticsUpdateInterval)(&val);
    15621564            if (SUCCEEDED(rc))
    1563                 RTPrintf("CPU%d: CPU Load Kernel        %-3d%%\n", 0, statVal);
    1564 
    1565             rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_User, &statVal);
    1566             if (SUCCEEDED(rc))
    1567                 RTPrintf("CPU%d: CPU Load User          %-3d%%\n", 0, statVal);
    1568 
    1569             rc = guest->GetStatistic(0, GuestStatisticType_Threads, &statVal);
    1570             if (SUCCEEDED(rc))
    1571                 RTPrintf("CPU%d: Threads                %d\n", 0, statVal);
    1572 
    1573             rc = guest->GetStatistic(0, GuestStatisticType_Processes, &statVal);
    1574             if (SUCCEEDED(rc))
    1575                 RTPrintf("CPU%d: Processes              %d\n", 0, statVal);
    1576 
    1577             rc = guest->GetStatistic(0, GuestStatisticType_Handles, &statVal);
    1578             if (SUCCEEDED(rc))
    1579                 RTPrintf("CPU%d: Handles                %d\n", 0, statVal);
    1580 
    1581             rc = guest->GetStatistic(0, GuestStatisticType_MemoryLoad, &statVal);
    1582             if (SUCCEEDED(rc))
    1583                 RTPrintf("CPU%d: Memory Load            %d%%\n", 0, statVal);
    1584 
    1585             rc = guest->GetStatistic(0, GuestStatisticType_PhysMemTotal, &statVal);
    1586             if (SUCCEEDED(rc))
    1587                 RTPrintf("CPU%d: Total physical memory  %-4d MB\n", 0, statVal);
    1588 
    1589             rc = guest->GetStatistic(0, GuestStatisticType_PhysMemAvailable, &statVal);
    1590             if (SUCCEEDED(rc))
    1591                 RTPrintf("CPU%d: Free physical memory   %-4d MB\n", 0, statVal);
    1592 
    1593             rc = guest->GetStatistic(0, GuestStatisticType_PhysMemBalloon, &statVal);
    1594             if (SUCCEEDED(rc))
    1595                 RTPrintf("CPU%d: Memory balloon size    %-4d MB\n", 0, statVal);
    1596 
    1597             rc = guest->GetStatistic(0, GuestStatisticType_MemCommitTotal, &statVal);
    1598             if (SUCCEEDED(rc))
    1599                 RTPrintf("CPU%d: Committed memory       %-4d MB\n", 0, statVal);
    1600 
    1601             rc = guest->GetStatistic(0, GuestStatisticType_MemKernelTotal, &statVal);
    1602             if (SUCCEEDED(rc))
    1603                 RTPrintf("CPU%d: Total kernel memory    %-4d MB\n", 0, statVal);
    1604 
    1605             rc = guest->GetStatistic(0, GuestStatisticType_MemKernelPaged, &statVal);
    1606             if (SUCCEEDED(rc))
    1607                 RTPrintf("CPU%d: Paged kernel memory    %-4d MB\n", 0, statVal);
    1608 
    1609             rc = guest->GetStatistic(0, GuestStatisticType_MemKernelNonpaged, &statVal);
    1610             if (SUCCEEDED(rc))
    1611                 RTPrintf("CPU%d: Nonpaged kernel memory %-4d MB\n", 0, statVal);
    1612 
    1613             rc = guest->GetStatistic(0, GuestStatisticType_MemSystemCache, &statVal);
    1614             if (SUCCEEDED(rc))
    1615                 RTPrintf("CPU%d: System cache size      %-4d MB\n", 0, statVal);
    1616 
    1617             rc = guest->GetStatistic(0, GuestStatisticType_PageFileSize, &statVal);
    1618             if (SUCCEEDED(rc))
    1619                 RTPrintf("CPU%d: Page file size         %-4d MB\n", 0, statVal);
     1565            {
     1566                if (val == 0)
     1567                    RTPrintf("Statistics update disabled\n");
     1568                else
     1569                    RTPrintf("Statistics update interval %d seconds\n", val);
     1570            }
     1571
     1572            if (details == VMINFO_STATISTICS || details == VMINFO_FULL)
     1573            {
     1574                RTPrintf("\nGuest statistics:\n");
     1575
     1576                rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_Idle, &statVal);
     1577                if (SUCCEEDED(rc))
     1578                    RTPrintf("CPU%d: CPU Load Idle          %-3d%%\n", 0, statVal);
     1579
     1580                rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_Kernel, &statVal);
     1581                if (SUCCEEDED(rc))
     1582                    RTPrintf("CPU%d: CPU Load Kernel        %-3d%%\n", 0, statVal);
     1583
     1584                rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_User, &statVal);
     1585                if (SUCCEEDED(rc))
     1586                    RTPrintf("CPU%d: CPU Load User          %-3d%%\n", 0, statVal);
     1587
     1588                rc = guest->GetStatistic(0, GuestStatisticType_Threads, &statVal);
     1589                if (SUCCEEDED(rc))
     1590                    RTPrintf("CPU%d: Threads                %d\n", 0, statVal);
     1591
     1592                rc = guest->GetStatistic(0, GuestStatisticType_Processes, &statVal);
     1593                if (SUCCEEDED(rc))
     1594                    RTPrintf("CPU%d: Processes              %d\n", 0, statVal);
     1595
     1596                rc = guest->GetStatistic(0, GuestStatisticType_Handles, &statVal);
     1597                if (SUCCEEDED(rc))
     1598                    RTPrintf("CPU%d: Handles                %d\n", 0, statVal);
     1599
     1600                rc = guest->GetStatistic(0, GuestStatisticType_MemoryLoad, &statVal);
     1601                if (SUCCEEDED(rc))
     1602                    RTPrintf("CPU%d: Memory Load            %d%%\n", 0, statVal);
     1603
     1604                rc = guest->GetStatistic(0, GuestStatisticType_PhysMemTotal, &statVal);
     1605                if (SUCCEEDED(rc))
     1606                    RTPrintf("CPU%d: Total physical memory  %-4d MB\n", 0, statVal);
     1607
     1608                rc = guest->GetStatistic(0, GuestStatisticType_PhysMemAvailable, &statVal);
     1609                if (SUCCEEDED(rc))
     1610                    RTPrintf("CPU%d: Free physical memory   %-4d MB\n", 0, statVal);
     1611
     1612                rc = guest->GetStatistic(0, GuestStatisticType_PhysMemBalloon, &statVal);
     1613                if (SUCCEEDED(rc))
     1614                    RTPrintf("CPU%d: Memory balloon size    %-4d MB\n", 0, statVal);
     1615
     1616                rc = guest->GetStatistic(0, GuestStatisticType_MemCommitTotal, &statVal);
     1617                if (SUCCEEDED(rc))
     1618                    RTPrintf("CPU%d: Committed memory       %-4d MB\n", 0, statVal);
     1619
     1620                rc = guest->GetStatistic(0, GuestStatisticType_MemKernelTotal, &statVal);
     1621                if (SUCCEEDED(rc))
     1622                    RTPrintf("CPU%d: Total kernel memory    %-4d MB\n", 0, statVal);
     1623
     1624                rc = guest->GetStatistic(0, GuestStatisticType_MemKernelPaged, &statVal);
     1625                if (SUCCEEDED(rc))
     1626                    RTPrintf("CPU%d: Paged kernel memory    %-4d MB\n", 0, statVal);
     1627
     1628                rc = guest->GetStatistic(0, GuestStatisticType_MemKernelNonpaged, &statVal);
     1629                if (SUCCEEDED(rc))
     1630                    RTPrintf("CPU%d: Nonpaged kernel memory %-4d MB\n", 0, statVal);
     1631
     1632                rc = guest->GetStatistic(0, GuestStatisticType_MemSystemCache, &statVal);
     1633                if (SUCCEEDED(rc))
     1634                    RTPrintf("CPU%d: System cache size      %-4d MB\n", 0, statVal);
     1635
     1636                rc = guest->GetStatistic(0, GuestStatisticType_PageFileSize, &statVal);
     1637                if (SUCCEEDED(rc))
     1638                    RTPrintf("CPU%d: Page file size         %-4d MB\n", 0, statVal);
     1639            }
     1640            RTPrintf("\n");
    16201641        }
    16211642        else
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