Revision 902eb29f
b/Makefile.am | ||
---|---|---|
1144 | 1144 |
test/data/proc_drbd83_sync.txt \ |
1145 | 1145 |
test/data/proc_drbd83_sync_want.txt \ |
1146 | 1146 |
test/data/proc_drbd83_sync_krnl2.6.39.txt \ |
1147 |
test/data/proc_meminfo.txt \ |
|
1148 |
test/data/proc_cpuinfo.txt \ |
|
1147 | 1149 |
test/data/qa-minimal-nodes-instances-only.json \ |
1148 | 1150 |
test/data/sys_drbd_usermode_helper.txt \ |
1149 | 1151 |
test/data/vgreduce-removemissing-2.02.02.txt \ |
b/test/data/proc_cpuinfo.txt | ||
---|---|---|
1 |
processor : 0 |
|
2 |
vendor_id : GenuineIntel |
|
3 |
cpu family : 6 |
|
4 |
model : 58 |
|
5 |
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz |
|
6 |
stepping : 9 |
|
7 |
microcode : 0x13 |
|
8 |
cpu MHz : 1200.000 |
|
9 |
cache size : 3072 KB |
|
10 |
physical id : 0 |
|
11 |
siblings : 4 |
|
12 |
core id : 0 |
|
13 |
cpu cores : 2 |
|
14 |
apicid : 0 |
|
15 |
initial apicid : 0 |
|
16 |
fpu : yes |
|
17 |
fpu_exception : yes |
|
18 |
cpuid level : 13 |
|
19 |
wp : yes |
|
20 |
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms |
|
21 |
bogomips : 5188.22 |
|
22 |
clflush size : 64 |
|
23 |
cache_alignment : 64 |
|
24 |
address sizes : 36 bits physical, 48 bits virtual |
|
25 |
power management: |
|
26 |
|
|
27 |
processor : 1 |
|
28 |
vendor_id : GenuineIntel |
|
29 |
cpu family : 6 |
|
30 |
model : 58 |
|
31 |
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz |
|
32 |
stepping : 9 |
|
33 |
microcode : 0x13 |
|
34 |
cpu MHz : 1200.000 |
|
35 |
cache size : 3072 KB |
|
36 |
physical id : 0 |
|
37 |
siblings : 4 |
|
38 |
core id : 0 |
|
39 |
cpu cores : 2 |
|
40 |
apicid : 1 |
|
41 |
initial apicid : 1 |
|
42 |
fpu : yes |
|
43 |
fpu_exception : yes |
|
44 |
cpuid level : 13 |
|
45 |
wp : yes |
|
46 |
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms |
|
47 |
bogomips : 5188.22 |
|
48 |
clflush size : 64 |
|
49 |
cache_alignment : 64 |
|
50 |
address sizes : 36 bits physical, 48 bits virtual |
|
51 |
power management: |
|
52 |
|
|
53 |
processor : 2 |
|
54 |
vendor_id : GenuineIntel |
|
55 |
cpu family : 6 |
|
56 |
model : 58 |
|
57 |
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz |
|
58 |
stepping : 9 |
|
59 |
microcode : 0x13 |
|
60 |
cpu MHz : 1200.000 |
|
61 |
cache size : 3072 KB |
|
62 |
physical id : 0 |
|
63 |
siblings : 4 |
|
64 |
core id : 1 |
|
65 |
cpu cores : 2 |
|
66 |
apicid : 2 |
|
67 |
initial apicid : 2 |
|
68 |
fpu : yes |
|
69 |
fpu_exception : yes |
|
70 |
cpuid level : 13 |
|
71 |
wp : yes |
|
72 |
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms |
|
73 |
bogomips : 5188.22 |
|
74 |
clflush size : 64 |
|
75 |
cache_alignment : 64 |
|
76 |
address sizes : 36 bits physical, 48 bits virtual |
|
77 |
power management: |
|
78 |
|
|
79 |
processor : 3 |
|
80 |
vendor_id : GenuineIntel |
|
81 |
cpu family : 6 |
|
82 |
model : 58 |
|
83 |
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz |
|
84 |
stepping : 9 |
|
85 |
microcode : 0x13 |
|
86 |
cpu MHz : 1200.000 |
|
87 |
cache size : 3072 KB |
|
88 |
physical id : 0 |
|
89 |
siblings : 4 |
|
90 |
core id : 1 |
|
91 |
cpu cores : 2 |
|
92 |
apicid : 3 |
|
93 |
initial apicid : 3 |
|
94 |
fpu : yes |
|
95 |
fpu_exception : yes |
|
96 |
cpuid level : 13 |
|
97 |
wp : yes |
|
98 |
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms |
|
99 |
bogomips : 5188.22 |
|
100 |
clflush size : 64 |
|
101 |
cache_alignment : 64 |
|
102 |
address sizes : 36 bits physical, 48 bits virtual |
|
103 |
power management: |
|
104 |
|
b/test/data/proc_meminfo.txt | ||
---|---|---|
1 |
MemTotal: 7870584 kB |
|
2 |
MemFree: 1549012 kB |
|
3 |
Buffers: 227328 kB |
|
4 |
Cached: 4647780 kB |
|
5 |
SwapCached: 2988 kB |
|
6 |
Active: 2787880 kB |
|
7 |
Inactive: 3160328 kB |
|
8 |
Active(anon): 1951852 kB |
|
9 |
Inactive(anon): 2007648 kB |
|
10 |
Active(file): 836028 kB |
|
11 |
Inactive(file): 1152680 kB |
|
12 |
Unevictable: 36 kB |
|
13 |
Mlocked: 32 kB |
|
14 |
SwapTotal: 8077308 kB |
|
15 |
SwapFree: 8029968 kB |
|
16 |
Dirty: 84 kB |
|
17 |
Writeback: 0 kB |
|
18 |
AnonPages: 1070164 kB |
|
19 |
Mapped: 194876 kB |
|
20 |
Shmem: 2886396 kB |
|
21 |
Slab: 226092 kB |
|
22 |
SReclaimable: 169140 kB |
|
23 |
SUnreclaim: 56952 kB |
|
24 |
KernelStack: 4232 kB |
|
25 |
PageTables: 40184 kB |
|
26 |
NFS_Unstable: 0 kB |
|
27 |
Bounce: 0 kB |
|
28 |
WritebackTmp: 0 kB |
|
29 |
CommitLimit: 12012600 kB |
|
30 |
Committed_AS: 7618508 kB |
|
31 |
VmallocTotal: 34359738367 kB |
|
32 |
VmallocUsed: 374800 kB |
|
33 |
VmallocChunk: 34359352560 kB |
|
34 |
HardwareCorrupted: 0 kB |
|
35 |
AnonHugePages: 0 kB |
|
36 |
HugePages_Total: 0 |
|
37 |
HugePages_Free: 0 |
|
38 |
HugePages_Rsvd: 0 |
|
39 |
HugePages_Surp: 0 |
|
40 |
Hugepagesize: 2048 kB |
|
41 |
DirectMap4k: 96448 kB |
|
42 |
DirectMap2M: 7983104 kB |
b/test/py/ganeti.hypervisor_unittest.py | ||
---|---|---|
57 | 57 |
self.assertEqual(fn(["a"]), "a") |
58 | 58 |
self.assertEqual(fn(["a", "b"]), "a; b") |
59 | 59 |
|
60 |
def testGetLinuxNodeInfo(self): |
|
61 |
meminfo = testutils.TestDataFilename("proc_meminfo.txt") |
|
62 |
cpuinfo = testutils.TestDataFilename("proc_cpuinfo.txt") |
|
63 |
result = hv_base.BaseHypervisor.GetLinuxNodeInfo(meminfo, cpuinfo) |
|
64 |
|
|
65 |
self.assertEqual(result["memory_total"], 7686) |
|
66 |
self.assertEqual(result["memory_free"], 6272) |
|
67 |
self.assertEqual(result["memory_dom0"], 2722) |
|
68 |
self.assertEqual(result["cpu_total"], 4) |
|
69 |
self.assertEqual(result["cpu_nodes"], 1) |
|
70 |
self.assertEqual(result["cpu_sockets"], 1) |
|
71 |
|
|
60 | 72 |
|
61 | 73 |
if __name__ == "__main__": |
62 | 74 |
testutils.GanetiTestProgram() |
Also available in: Unified diff