QT 获取计算机当前cup 内存 等信息

http://blog.csdn.net/amars_ding/article/details/54580441

#include 
#define MB (1024*1024)
//! network
void MainWindow::on_network_clicked()
{
    SYSTEM_INFO systemInfo;
    GetSystemInfo(&systemInfo);
    qDebug() << QString::fromUtf8("处理器掩码:") << systemInfo.dwActiveProcessorMask;
    qDebug() << QString::fromUtf8("处理器个数:") << systemInfo.dwNumberOfProcessors;
    qDebug() << QString::fromUtf8("处理器分页大小:") << systemInfo.dwPageSize;
    qDebug() << QString::fromUtf8("处理器类型:") << systemInfo.dwProcessorType;
    qDebug() << QString::fromUtf8("最大寻址单元:") << systemInfo.lpMaximumApplicationAddress;
    qDebug() << QString::fromUtf8("最小寻址单元:") << systemInfo.lpMinimumApplicationAddress;
    qDebug() << QString::fromUtf8("处理器等级:") << systemInfo.wProcessorLevel;
    qDebug() << QString::fromUtf8("处理器版本:") << systemInfo.wProcessorRevision;

    qDebug() << "----------------------------------------";
    MEMORYSTATUSEX statex;
    statex.dwLength = sizeof (statex);
    GlobalMemoryStatusEx (&statex);
    qDebug() << /*QString::fromUtf8("物理内存使用率:") <<*/ statex.dwMemoryLoad;
    qDebug() <



你可能感兴趣的:(QT 获取计算机当前cup 内存 等信息)