Changeset 4651 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 10, 2007 9:11:52 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r4650 r4651 1549 1549 && (details == VMINFO_STATISTICS || details == VMINFO_FULL)) 1550 1550 { 1551 ComPtr <IGuest> Guest;1551 ComPtr <IGuest> guest; 1552 1552 ULONG statVal; 1553 1553 1554 rc = console->COMGETTER(Guest)( Guest.asOutParam());1554 rc = console->COMGETTER(Guest)(guest.asOutParam()); 1555 1555 if (SUCCEEDED(rc)) 1556 1556 { 1557 rc = Guest->GetStatistic(0, GuestStatisticType_CPULoad_Idle, &statVal);1557 rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_Idle, &statVal); 1558 1558 if (SUCCEEDED(rc)) 1559 1559 RTPrintf("CPU%d: CPU Load Idle %-3d%%\n", 0, statVal); 1560 1560 1561 rc = Guest->GetStatistic(0, GuestStatisticType_CPULoad_Kernel, &statVal);1561 rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_Kernel, &statVal); 1562 1562 if (SUCCEEDED(rc)) 1563 1563 RTPrintf("CPU%d: CPU Load Kernel %-3d%%\n", 0, statVal); 1564 1564 1565 rc = Guest->GetStatistic(0, GuestStatisticType_CPULoad_User, &statVal);1565 rc = guest->GetStatistic(0, GuestStatisticType_CPULoad_User, &statVal); 1566 1566 if (SUCCEEDED(rc)) 1567 1567 RTPrintf("CPU%d: CPU Load User %-3d%%\n", 0, statVal); 1568 1568 1569 rc = Guest->GetStatistic(0, GuestStatisticType_Threads, &statVal);1569 rc = guest->GetStatistic(0, GuestStatisticType_Threads, &statVal); 1570 1570 if (SUCCEEDED(rc)) 1571 1571 RTPrintf("CPU%d: Threads %d%%\n", 0, statVal); 1572 1572 1573 rc = Guest->GetStatistic(0, GuestStatisticType_Processes, &statVal);1573 rc = guest->GetStatistic(0, GuestStatisticType_Processes, &statVal); 1574 1574 if (SUCCEEDED(rc)) 1575 1575 RTPrintf("CPU%d: Processes %d%%\n", 0, statVal); 1576 1576 1577 rc = Guest->GetStatistic(0, GuestStatisticType_Handles, &statVal);1577 rc = guest->GetStatistic(0, GuestStatisticType_Handles, &statVal); 1578 1578 if (SUCCEEDED(rc)) 1579 1579 RTPrintf("CPU%d: Handles %d%%\n", 0, statVal); 1580 1580 1581 rc = Guest->GetStatistic(0, GuestStatisticType_MemoryLoad, &statVal);1581 rc = guest->GetStatistic(0, GuestStatisticType_MemoryLoad, &statVal); 1582 1582 if (SUCCEEDED(rc)) 1583 1583 RTPrintf("CPU%d: Memory Load %d%%\n", 0, statVal); 1584 1584 1585 rc = Guest->GetStatistic(0, GuestStatisticType_PhysMemTotal, &statVal);1585 rc = guest->GetStatistic(0, GuestStatisticType_PhysMemTotal, &statVal); 1586 1586 if (SUCCEEDED(rc)) 1587 1587 RTPrintf("CPU%d: Total physical memory %-4d MB\n", 0, statVal); 1588 1588 1589 rc = Guest->GetStatistic(0, GuestStatisticType_PhysMemAvailable, &statVal);1589 rc = guest->GetStatistic(0, GuestStatisticType_PhysMemAvailable, &statVal); 1590 1590 if (SUCCEEDED(rc)) 1591 1591 RTPrintf("CPU%d: Free physical memory %-4d MB\n", 0, statVal); 1592 1592 1593 rc = Guest->GetStatistic(0, GuestStatisticType_PhysMemBalloon, &statVal);1593 rc = guest->GetStatistic(0, GuestStatisticType_PhysMemBalloon, &statVal); 1594 1594 if (SUCCEEDED(rc)) 1595 1595 RTPrintf("CPU%d: Memory balloon size %-4d MB\n", 0, statVal); 1596 1596 1597 rc = Guest->GetStatistic(0, GuestStatisticType_MemCommitTotal, &statVal);1597 rc = guest->GetStatistic(0, GuestStatisticType_MemCommitTotal, &statVal); 1598 1598 if (SUCCEEDED(rc)) 1599 1599 RTPrintf("CPU%d: Committed memory %-4d MB\n", 0, statVal); 1600 1600 1601 rc = Guest->GetStatistic(0, GuestStatisticType_MemKernelTotal, &statVal);1601 rc = guest->GetStatistic(0, GuestStatisticType_MemKernelTotal, &statVal); 1602 1602 if (SUCCEEDED(rc)) 1603 1603 RTPrintf("CPU%d: Total kernel memory %-4d MB\n", 0, statVal); 1604 1604 1605 rc = Guest->GetStatistic(0, GuestStatisticType_MemKernelPaged, &statVal);1605 rc = guest->GetStatistic(0, GuestStatisticType_MemKernelPaged, &statVal); 1606 1606 if (SUCCEEDED(rc)) 1607 1607 RTPrintf("CPU%d: Paged kernel memory %-4d MB\n", 0, statVal); 1608 1608 1609 rc = Guest->GetStatistic(0, GuestStatisticType_MemKernelNonpaged, &statVal);1609 rc = guest->GetStatistic(0, GuestStatisticType_MemKernelNonpaged, &statVal); 1610 1610 if (SUCCEEDED(rc)) 1611 1611 RTPrintf("CPU%d: Nonpaged kernel memory %-4d MB\n", 0, statVal); 1612 1612 1613 rc = Guest->GetStatistic(0, GuestStatisticType_MemSystemCache, &statVal);1613 rc = guest->GetStatistic(0, GuestStatisticType_MemSystemCache, &statVal); 1614 1614 if (SUCCEEDED(rc)) 1615 1615 RTPrintf("CPU%d: System cache size %-4d MB\n", 0, statVal); 1616 1616 1617 rc = Guest->GetStatistic(0, GuestStatisticType_PageFileSize, &statVal);1617 rc = guest->GetStatistic(0, GuestStatisticType_PageFileSize, &statVal); 1618 1618 if (SUCCEEDED(rc)) 1619 1619 RTPrintf("CPU%d: Page file size %-4d MB\n", 0, statVal);
Note:
See TracChangeset
for help on using the changeset viewer.