| | 1547 | } |
|---|
| | 1548 | if (details == VMINFO_STATISTICS || details == VMINFO_FULL) |
|---|
| | 1549 | { |
|---|
| | 1550 | ComPtr <IGuest> Guest; |
|---|
| | 1551 | ULONG statVal; |
|---|
| | 1552 | |
|---|
| | 1553 | CHECK_ERROR_RET(console, COMGETTER(Guest)(Guest.asOutParam()), rc); |
|---|
| | 1554 | |
|---|
| | 1555 | rc = Guest->GetStatistic(0, GuestStatisticType_CPULoad_Idle, &statVal); |
|---|
| | 1556 | if (rc == S_OK) |
|---|
| | 1557 | RTPrintf("CPU%d: CPU Load Idle %-3d%%\n", 0, statVal); |
|---|
| | 1558 | |
|---|
| | 1559 | rc = Guest->GetStatistic(0, GuestStatisticType_CPULoad_Kernel, &statVal); |
|---|
| | 1560 | if (rc == S_OK) |
|---|
| | 1561 | RTPrintf("CPU%d: CPU Load Kernel %-3d%%\n", 0, statVal); |
|---|
| | 1562 | |
|---|
| | 1563 | rc = Guest->GetStatistic(0, GuestStatisticType_CPULoad_User, &statVal); |
|---|
| | 1564 | if (rc == S_OK) |
|---|
| | 1565 | RTPrintf("CPU%d: CPU Load User %-3d%%\n", 0, statVal); |
|---|
| | 1566 | |
|---|
| | 1567 | rc = Guest->GetStatistic(0, GuestStatisticType_Threads, &statVal); |
|---|
| | 1568 | if (rc == S_OK) |
|---|
| | 1569 | RTPrintf("CPU%d: Threads %d%%\n", 0, statVal); |
|---|
| | 1570 | |
|---|
| | 1571 | rc = Guest->GetStatistic(0, GuestStatisticType_Processes, &statVal); |
|---|
| | 1572 | if (rc == S_OK) |
|---|
| | 1573 | RTPrintf("CPU%d: Processes %d%%\n", 0, statVal); |
|---|
| | 1574 | |
|---|
| | 1575 | rc = Guest->GetStatistic(0, GuestStatisticType_Handles, &statVal); |
|---|
| | 1576 | if (rc == S_OK) |
|---|
| | 1577 | RTPrintf("CPU%d: Handles %d%%\n", 0, statVal); |
|---|
| | 1578 | |
|---|
| | 1579 | rc = Guest->GetStatistic(0, GuestStatisticType_MemoryLoad, &statVal); |
|---|
| | 1580 | if (rc == S_OK) |
|---|
| | 1581 | RTPrintf("CPU%d: Memory Load %d%%\n", 0, statVal); |
|---|
| | 1582 | |
|---|
| | 1583 | rc = Guest->GetStatistic(0, GuestStatisticType_PhysMemTotal, &statVal); |
|---|
| | 1584 | if (rc == S_OK) |
|---|
| | 1585 | RTPrintf("CPU%d: Total physical memory %-4d MB\n", 0, statVal); |
|---|
| | 1586 | |
|---|
| | 1587 | rc = Guest->GetStatistic(0, GuestStatisticType_PhysMemAvailable, &statVal); |
|---|
| | 1588 | if (rc == S_OK) |
|---|
| | 1589 | RTPrintf("CPU%d: Free physical memory %-4d MB\n", 0, statVal); |
|---|
| | 1590 | |
|---|
| | 1591 | rc = Guest->GetStatistic(0, GuestStatisticType_PhysMemBalloon, &statVal); |
|---|
| | 1592 | if (rc == S_OK) |
|---|
| | 1593 | RTPrintf("CPU%d: Memory balloon size %-4d MB\n", 0, statVal); |
|---|
| | 1594 | |
|---|
| | 1595 | rc = Guest->GetStatistic(0, GuestStatisticType_MemCommitTotal, &statVal); |
|---|
| | 1596 | if (rc == S_OK) |
|---|
| | 1597 | RTPrintf("CPU%d: Committed memory %-4d MB\n", 0, statVal); |
|---|
| | 1598 | |
|---|
| | 1599 | rc = Guest->GetStatistic(0, GuestStatisticType_MemKernelTotal, &statVal); |
|---|
| | 1600 | if (rc == S_OK) |
|---|
| | 1601 | RTPrintf("CPU%d: Total kernel memory %-4d MB\n", 0, statVal); |
|---|
| | 1602 | |
|---|
| | 1603 | rc = Guest->GetStatistic(0, GuestStatisticType_MemKernelPaged, &statVal); |
|---|
| | 1604 | if (rc == S_OK) |
|---|
| | 1605 | RTPrintf("CPU%d: Paged kernel memory %-4d MB\n", 0, statVal); |
|---|
| | 1606 | |
|---|
| | 1607 | rc = Guest->GetStatistic(0, GuestStatisticType_MemKernelNonpaged, &statVal); |
|---|
| | 1608 | if (rc == S_OK) |
|---|
| | 1609 | RTPrintf("CPU%d: Nonpaged kernel memory %-4d MB\n", 0, statVal); |
|---|
| | 1610 | |
|---|
| | 1611 | rc = Guest->GetStatistic(0, GuestStatisticType_MemSystemCache, &statVal); |
|---|
| | 1612 | if (rc == S_OK) |
|---|
| | 1613 | RTPrintf("CPU%d: System cache size %-4d MB\n", 0, statVal); |
|---|
| | 1614 | |
|---|
| | 1615 | rc = Guest->GetStatistic(0, GuestStatisticType_PageFileSize, &statVal); |
|---|
| | 1616 | if (rc == S_OK) |
|---|
| | 1617 | RTPrintf("CPU%d: Page file size %-4d MB\n", 0, statVal); |
|---|