Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1097891
  • 博文数量: 165
  • 博客积分: 5957
  • 博客等级: 大校
  • 技术积分: 2015
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-24 15:04
文章分类

全部博文(165)

文章存档

2014年(10)

2013年(14)

2012年(9)

2011年(22)

2010年(17)

2009年(17)

2008年(26)

2007年(34)

2006年(16)

我的朋友
wmi

分类: Windows平台

2013-07-03 16:53:18

获取cpu利用率,为啥就少了一行LoadPercentage呢:

点击(此处)折叠或打开

  1. >>> import wmi
  2. >>> c = wmi.WMI()
  3. >>> for s in c.Win32_Processor():
  4. ... print s
  5. ...

  6. instance of Win32_Processor
  7. {
  8.         AddressWidth = 64;
  9.         Architecture = 9;
  10.         Availability = 3;
  11.         Caption = "Intel64 Family 6 Model 26 Stepping 5";
  12.         CpuStatus = 1;
  13.         CreationClassName = "Win32_Processor";
  14.         CurrentClockSpeed = 1995;
  15.         CurrentVoltage = 12;
  16.         DataWidth = 64;
  17.         Description = "Intel64 Family 6 Model 26 Stepping 5";
  18.         DeviceID = "CPU0";
  19.         ExtClock = 4800;
  20.         Family = 179;
  21.         L2CacheSize = 1024;
  22.         L3CacheSize = 4096;
  23.         L3CacheSpeed = 0;
  24.         Level = 6;
  25.         Manufacturer = "GenuineIntel";
  26.         MaxClockSpeed = 1995;
  27.         Name = "Intel(R) Xeon(R) CPU E5504 @ 2.00GHz";
  28.         NumberOfCores = 4;
  29.         NumberOfLogicalProcessors = 4;
  30.         PowerManagementSupported = FALSE;
  31.         ProcessorId = "BFEBFBFF000106A5";
  32.         ProcessorType = 3;
  33.         Revision = 6661;
  34.         Role = "CPU";
  35.         SocketDesignation = "CPU1";
  36.         Status = "OK";
  37.         StatusInfo = 3;
  38.         SystemCreationClassName = "Win32_ComputerSystem";
  39.         SystemName = "FIS-TERMINAL01";
  40.         UpgradeMethod = 25;
  41.         Version = "";
  42. };


  43. instance of Win32_Processor
  44. {
  45.         AddressWidth = 64;
  46.         Architecture = 9;
  47.         Availability = 3;
  48.         Caption = "Intel64 Family 6 Model 26 Stepping 5";
  49.         CpuStatus = 4;
  50.         CreationClassName = "Win32_Processor";
  51.         CurrentClockSpeed = 1995;
  52.         CurrentVoltage = 12;
  53.         DataWidth = 64;
  54.         Description = "Intel64 Family 6 Model 26 Stepping 5";
  55.         DeviceID = "CPU1";
  56.         ExtClock = 4800;
  57.         Family = 179;
  58.         L2CacheSize = 1024;
  59.         L3CacheSize = 4096;
  60.         L3CacheSpeed = 0;
  61.         Level = 6;
  62.         Manufacturer = "GenuineIntel";
  63.         MaxClockSpeed = 1995;
  64.         Name = "Intel(R) Xeon(R) CPU E5504 @ 2.00GHz";
  65.         NumberOfCores = 4;
  66.         NumberOfLogicalProcessors = 4;
  67.         PowerManagementSupported = FALSE;
  68.         ProcessorId = "BFEBFBFF000106A5";
  69.         ProcessorType = 3;
  70.         Revision = 6661;
  71.         Role = "CPU";
  72.         SocketDesignation = "CPU2";
  73.         Status = "OK";
  74.         StatusInfo = 3;
  75.         SystemCreationClassName = "Win32_ComputerSystem";
  76.         SystemName = "FIS-TERMINAL01";
  77.         UpgradeMethod = 25;
  78.         Version = "";
  79. };

阅读(1173) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~