Issue #8439 has been updated by Daniel Pittman.
Josh Cooper wrote: > Daniel Pittman wrote: > > > The processor and processorcount facts on Linux refer to the number of > > > virtual/logical processors, which may include multicore or hyperthreaded > > > processors. On Windows, WMI provides the Win32_Processor class which > > > represents an instance of a physical processor. On 2003 and earlier it is > > > impossible to distinguish between physical and virtual processors. > > > > Does that mean a two physical, four virtual core machine would give > > "four" on that OS? > > On 2008, it would report 2 Win32_Processor instances, each representing a > physical processor, but on 2003, it would report 4, each representing a > logical processor. However, if this > [hotfix](http://support.microsoft.com/kb/932370) is installed, then 2003 > behaves like 2008. OK. So, I think that is fine. We can recommend the HotFix if we really find someone cares, maybe in the documentation for the fact or something, or a FAQ somewhere about Win32. The "failure mode" isn't that terrible. Worst case, someone ends up with four threads rather than two in their pool, or whatever. > > > On 2008, > > > you can obtain the number of logical, but there’s no > > > Win32_LogicalProcessor, > > > to actually give you details about the processor. In other words it does > > > not > > > appear to be possible to provide the same semantics for the processor fact > > > on Windows, though processorcount (logical) and physicalprocessorcount > > > could > > > be supported on 2008. > > > > Assuming that the first is true, I think a failure mode of > > over-estimating physical processors on Win2003 is quite acceptable. > > Even a failure mode of underestimating them (eg: virtual == physical) > > is probably acceptable. > > Would you expect the "processor0" fact to refer to the physical processor > instance or should it refer to the logical processor instance like Linux does? Ideally, we should have consistent behaviour on all our platforms, but if we don't then "informational" facts like this are relatively unimportant in the bigger picture. Given the format is very loose even on supported platforms, having to deal with it conditionally on "is this a Win32 machine" isn't a big deal. So: consistency, if possible, but not such a big deal for that fact if we get it wrong. > > However, I would absolutely expect the "ps" fact to either be confined > > to platforms where it works or, better, to be implemented for Win32. > > The concept (foolish as it is) of that fact would imply that either > > `tasklist` or `tlist` (if we support before XP) should be the right > > thing; IIRC, `tasklist /v` should be approximately the same thing. > > (Maybe with `/fo table` as well.) > > tasklist is available on both 2003 and 2008 which are the only platforms we > are supporting. Does it matter that the output of tasklist differs from ps, > e.g. the columns and their order? For example, tasklist doesn't output ppid. > If not, then this is easy to add. I shouldn't think so. At least Darwin will have very different output from Linux in the existing facts, so callers would need to deal with that anyway. Plus, that looks to be a mostly internal fact or something, and the consumers in our codebase will need Win32 support anyhow. (...but I didn't check that assumption :) ---------------------------------------- Feature #8439: Basic facter on Windows https://projects.puppetlabs.com/issues/8439 Author: Josh Cooper Status: Accepted Priority: Normal Assignee: Josh Cooper Category: windows Target version: Telly Affected Puppet version: Keywords: Branch: The following facts are commonly available on non-Windows platforms and need to be implemented: * architecture * interfaces * ipaddress6 * memory * netmask * network * physicalprocessorcount * processor * is_virtual * virtual Also note the ps fact is wrong on Windows (reports ps -ef) -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
