cpu_info v0.2.2 CpuInfo

CpuInfo: get CPU information, including a type, number of processors, number of physical cores and logical threads of a processor, and status of simultaneous multi-threads (hyper-threading).

Link to this section Summary

Functions

Show all profile information on CPU and the system. The results are a map that contains the following keys

Link to this section Functions

Show all profile information on CPU and the system. The results are a map that contains the following keys:

  • compiler: its corresponding value is a map that contains the following keys:

    • apple_clang: (only on macOS) its corresponding value is a list of maps whose values contain the information of the Apple Clang compiler that is on /usr/bin;
    • apple_clang++: (only on macOS) its corresponding value is a list of maps whose values contain the information of the Apple Clang++ compiler that is on /usr/bin;
    • cc_env: its corresponding value is a list of a map whose values contain the information of the C compiler that the environment variable CC points;
    • cflags_env: this is the value of the environment variable CFLAGS;
    • clang: its corresponding value is a list of maps whose values contain the information of the Clang compilers that are executable along PATH;
    • clang++: its corresponding value is a list of maps whose values contain the information of the Clang++ compilers that are executable along PATH;
    • cxx_env its corresponding value is a list of a map whose values contain the information of the C++ compiler that the environment variable CXX points;
    • cxxflags_env: this is the value of the environment variable CXXFLAGS;
    • gcc: its corresponding value is a list of maps whose values contain the information of the GCC compilers that are executable along PATH;
    • g++: its corresponding value is a list of maps whose values contain the information of the G++ compilers that are executable along PATH;
    • ldflags_env: this is the value of the environment variable LDFLAGS
    • each information of a compiler contains the following keys:

      • bin: path to the executable;
      • type: :clang, :gcc, :apple_clang, :unknown, or :undefined;
      • release: the release version of the release
      • version: the full name of the version
  • cpu: its corresponding value is a map that contains the following keys:

    • cpu_model: a string of the cpu model;s
    • cpu_models: a list of strings that corresponding to each thread (in case of Linux);
    • cpu_type: according to :erlang.system_info(:system_architecture);
    • hyper_threading: :enable or :disable;
    • num_of_cores_of_a_processor: the number of cores of a processor;
    • num_of_processors: the number of processors;
    • num_of_threads_of_a_processor: the number of threads of a processor;
    • total_num_of_cores: total number of cores;
    • total_num_of_threads: total number of threads;
  • cuda: its corresponding value is a map that contains the following keys:

    • bin: path to executables of CUDA;
    • cuda: existence of CUDA (true or false)
    • include: path to include files of CUDA;
    • lib: path to libraries of CUDA;
    • nvcc: path to the executable of nvcc;
    • version: CUDA version number
  • elixir: its corresponding value is a map that contains the following keys:

    • version: Elixir version
  • erlang: its corresponding value is a map that contains the following keys:

    • otp_version: OTP version
  • kernel: its corresponding value is a map that contains the following keys:

    • kernel_release: the release version of kernel;
    • kernel_version: the full name of the version of kernel;
    • os_type: type of OS (:macos, :linux, :windows, :freebsd or :unknown);
    • system_version: the os or distribution name
  • metal: its corresponding value is a map that contains the following keys:

    • metal: existence of Metal (true or false)