Issue #8439 has been updated by Josh Cooper.
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. > > 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? > > WMI provides access to free and total physical memory , but the > > Win32_PageFileSettings class, which contains total page file sizes, does not > > work when automatic page fie management is enabled (which it is by default). > > Just don't export the fact, in that case. It really isn't > super-important data for most people. Ok, I'll just export MemFree and MemTotal > > Finally, facter does not provide a way to say this fact is not supported on > > this platform. Instead you have to confine it to platforms where it is > > supported. And we can’t have the ps fact return nil or “” on windows, > > because facter will try a more general fact (the default one). So I don’t > > see a way to make this change without making a change to facter itself. > > You can set a priority on a fact, these days, which will weight it > above something with a longer set of platforms. > > 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. ---------------------------------------- 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.
