{"action":"created","issue":{"url":"https://api.github.com/repos/threez/ruby-vmstat/issues/6","labels_url":"https://api.github.com/repos/threez/ruby-vmstat/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/threez/ruby-vmstat/issues/6/comments","events_url":"https://api.github.com/repos/threez/ruby-vmstat/issues/6/events","html_url":"https://github.com/threez/ruby-vmstat/issues/6","id":97360159,"number":6,"title":"CPU count off by 2","user":{"login":"Zapotek","id":375743,"avatar_url":"https://avatars.githubusercontent.com/u/375743?v=3","gravatar_id":"","url":"https://api.github.com/users/Zapotek","html_url":"https://github.com/Zapotek","followers_url":"https://api.github.com/users/Zapotek/followers","following_url":"https://api.github.com/users/Zapotek/following{/other_user}","gists_url":"https://api.github.com/users/Zapotek/gists{/gist_id}","starred_url":"https://api.github.com/users/Zapotek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zapotek/subscriptions","organizations_url":"https://api.github.com/users/Zapotek/orgs","repos_url":"https://api.github.com/users/Zapotek/repos","events_url":"https://api.github.com/users/Zapotek/events{/privacy}","received_events_url":"https://api.github.com/users/Zapotek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-26T23:58:36Z","updated_at":"2015-07-29T06:47:43Z","closed_at":null,"body":"Hello,\r\n\r\nI've noticed an inconsistency between `/etc/cpuinfo` and `Vmstat.snapshot.cpus`.\r\n\r\n`/etc/cpuinfo` reports 12 cores, with the last one being:\r\n```\r\nprocessor       : 11\r\nvendor_id       : GenuineIntel\r\ncpu family      : 6\r\nmodel           : 45\r\nmodel name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz\r\nstepping        : 7\r\nmicrocode       : 0x705\r\ncpu MHz         : 1200.000\r\ncache size      : 12288 KB\r\nphysical id     : 0\r\nsiblings        : 12\r\ncore id         : 5\r\ncpu cores       : 6\r\napicid          : 11\r\ninitial apicid  : 11\r\nfpu             : yes\r\nfpu_exception   : yes\r\ncpuid level     : 13\r\nwp              : yes\r\nflags           : 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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\r\nbogomips        : 6592.07\r\nclflush size    : 64\r\ncache_alignment : 64\r\naddress sizes   : 46 bits physical, 48 bits virtual\r\npower management:\r\n```\r\n\r\n`Vmstat.snapshot.cpus` reports 10:\r\n```\r\n    [9] {\r\n           :num => 9,\r\n          :user => 54308260,\r\n        :system => 22791214,\r\n          :nice => 368194,\r\n          :idle => 1597384752\r\n    }\r\n```\r\n\r\nAny idea?\r\n\r\nCheers"},"comment":{"url":"https://api.github.com/repos/threez/ruby-vmstat/issues/comments/125859655","html_url":"https://github.com/threez/ruby-vmstat/issues/6#issuecomment-125859655","issue_url":"https://api.github.com/repos/threez/ruby-vmstat/issues/6","id":125859655,"user":{"login":"threez","id":14623,"avatar_url":"https://avatars.githubusercontent.com/u/14623?v=3","gravatar_id":"","url":"https://api.github.com/users/threez","html_url":"https://github.com/threez","followers_url":"https://api.github.com/users/threez/followers","following_url":"https://api.github.com/users/threez/following{/other_user}","gists_url":"https://api.github.com/users/threez/gists{/gist_id}","starred_url":"https://api.github.com/users/threez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threez/subscriptions","organizations_url":"https://api.github.com/users/threez/orgs","repos_url":"https://api.github.com/users/threez/repos","events_url":"https://api.github.com/users/threez/events{/privacy}","received_events_url":"https://api.github.com/users/threez/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T06:47:43Z","updated_at":"2015-07-29T06:47:43Z","body":"Do you have meaningful numbers with the current output of vmstat lib? I wonder why cp_times is not available. Maybe this is a bug/problem with the linux version. But that is the source of the idle, system, user times.\r\n\r\nI looked ad the src of nproc, it has around 200 lines of code, just to figure out the cpu count based on cpu_sets. That would be an alternativei guess. Still the question would be where to get the idle, system and user times if no cp_times is available..."}}