Cpu
sys_cpu_slots¶
Print the number of physical CPU sockets. Tries lscpu, then dmidecode, then /proc/cpuinfo; defaults to 1. Note: /sys physical_package_id files are unreliable and are not used.
Exit codes¶
- 0: Always
Output on stdout¶
- Number of physical CPU sockets
sys_cpu_cores¶
Print the number of cores per socket. Tries lscpu, then dmidecode, then /proc/cpuinfo; defaults to 1. Note: /sys core_id files are unreliable and are not used.
Exit codes¶
- 0: Always
Output on stdout¶
- Number of cores per socket
sys_cpu_cores_enabled¶
Print the number of enabled cores per socket, if determinable. Only dmidecode exposes this detail; relevant for software licensed per enabled core. Falls back to sys_cpu_cores when the information is unavailable.
Exit codes¶
- 0: Always
Output on stdout¶
- Number of enabled cores per socket
sys_cpu_threads¶
Print the number of hardware threads per core. Tries lscpu, then /proc/cpuinfo thread/sibling counts, then /sys topology; defaults to 1.
Exit codes¶
- 0: Always
Output on stdout¶
- Number of threads per core
sys_cpu_count¶
Print the total vCPU count (slots x cores x threads).
Exit codes¶
- 0: Always
Output on stdout¶
- Total vCPU count
sys_cpu_mhz¶
Print the CPU clock speed in MHz. Tries lscpu, then /sys cpufreq, then parses the model name in /proc/cpuinfo. Assumes all sockets run at the same speed.
Exit codes¶
- 0: Always
Output on stdout¶
- CPU speed in MHz (integer)
sys_cpu_manufacturer¶
Print the CPU vendor/manufacturer string from /proc/cpuinfo. Assumes all sockets have the same vendor; only the first result is used.
Exit codes¶
- 0: Always
Output on stdout¶
- CPU vendor string, e.g. "GenuineIntel" or "AuthenticAMD"
sys_cpu_model¶
Print the CPU model name string from /proc/cpuinfo. Assumes all sockets have the same model; only the first result is used.
Exit codes¶
- 0: Always
Output on stdout¶
- CPU model name, e.g. "AMD Ryzen 7 PRO 6850U with Radeon Graphics"
sys_cpu¶
Dispatcher for CPU information sub-commands. With no argument, prints a one-line summary.
Arguments¶
- $1 (string): Sub-command: slots, cores, cores-enabled, threads, count, mhz, manufacturer, model
Exit codes¶
- 0: Always
Output on stdout¶
- Requested value, or summary line