VirtualBox

Changeset 4657 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 10, 2007 11:19:35 AM (17 years ago)
Author:
vboxsync
Message:

Update

File:
1 edited

Legend:

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

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