Scenario
A teammate claims a host is under-provisioned and insists it has fewer CPU threads and less memory than expected. You need to validate the facts from the kernel’s source of truth and confirm them using standard utilities that other admins will recognize.
Use /proc to verify claims quickly, then
cross-check with higher-level tooling so your results are
portable across teams, tickets, and incident notes.
Objective
-
Extract the CPU model name from
/proc/cpuinfo. -
Determine logical CPU count from
/proc/cpuinfo. -
Cross-check CPU facts with
lscpu. -
Read
MemTotalandMemAvailablefrom/proc/meminfo. -
Cross-check memory results using
free -h. - Inspect hugepage configuration when present.
Concepts
-
/procas the raw interface to live kernel state (CPU and memory). -
Logical CPUs versus cores and sockets, and how that maps to
lscpuoutput. -
Memory reporting:
MemTotalversusMemAvailableand why “available” is not “free.” - Cross-check methodology: confirm raw data, then present it using team-standard utilities.
-
Hugepages visibility for performance and virtualization
contexts (
/proc/meminfo).
Walkthrough
/proc/cpuinfo.
grep -m1 '^model name' /proc/cpuinfo
/proc/cpuinfo
exposes CPU details reported by the kernel. The model name
repeats for each logical processor, so pulling the first
match is usually sufficient.
# Expected output format:
model name : Intel(R) ...
/proc/cpuinfo.
grep -c '^processor' /proc/cpuinfo
Each processor line corresponds to one logical
CPU as seen by the kernel. This count should match
CPU(s)
reported by
lscpu.
# Example:
8
lscpu.
lscpu
lscpu
summarizes CPU topology (threads per core, cores per socket,
sockets). Use it to translate raw kernel data into the
vocabulary your team expects in tickets and capacity notes.
# Key fields to compare:
CPU(s): 8
Thread(s) per core: 2
Core(s) per socket: 4
Model name: Intel(R) ...
/proc/meminfo.
grep -E '^(MemTotal|MemAvailable)' /proc/meminfo
MemTotal
is total physical RAM detected by the kernel.
MemAvailable
is a best-effort estimate of memory available for new
workloads without swapping, accounting for reclaimable
cache.
# Example:
MemTotal: ... kB
MemAvailable: ... kB
free -h.
free -h
free
presents memory in a format most admins expect. Compare the
total
and
available
values to confirm they align with what you extracted from
/proc/meminfo.
# Focus on:
total
available
grep -E '^Huge' /proc/meminfo
Hugepages are common in performance and virtualization environments. Even when disabled, this confirms current hugepage size and whether any hugepages are reserved.
# Example:
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB
Common breakpoints
Confirm you are reading the correct fields and comparing the
right units. /proc/meminfo reports values in
kB, while free -h scales units for display.
grep -c '^processor' reports logical CPUs.
Cross-check with lscpu and report topology using
threads per core, cores per socket, and sockets.
MemAvailable is an estimate that accounts for
reclaimable cache and memory pressure. Use it as a capacity
signal, not a strict “free RAM” number.
Some environments expose different hugepage fields or
defaults. If hugepages matter for the workload, confirm
configuration via /proc/meminfo and align with
the platform’s provisioning requirements.
Cleanup checklist
This lab is read-only. Your cleanup is capturing the verified CPU and memory facts for your ticket or incident notes.
grep -m1 '^model name' /proc/cpuinfo
grep -c '^processor' /proc/cpuinfo
lscpu
grep -E '^(MemTotal|MemAvailable)' /proc/meminfo
free -h
grep -E '^Huge' /proc/meminfo
Your /proc extraction matches the summary values
from lscpu and free -h, and you can
report CPU and memory in a consistent format.
Reference
-
grep -m1 '^model name' /proc/cpuinfo: Prints the first CPU model name entry from kernel-exposed CPU information.-
-m1: Stops after the first match. -
/proc/cpuinfo: Kernel-exposed CPU information (per-logical CPU details).
-
-
grep -c '^processor' /proc/cpuinfo: Counts logical CPUs as seen by the kernel.-
-c: Prints the number of matching lines.
-
-
lscpu: Displays CPU architecture and topology (threads, cores, sockets, model name). -
grep -E '^(MemTotal|MemAvailable)' /proc/meminfo: Extracts memory totals and available memory estimates from kernel accounting.-
-E: Enables extended regular expressions. -
/proc/meminfo: Kernel-exposed memory accounting (totals, available, caches, hugepages).
-
-
free -h: Shows memory summary in human-readable units.-
-h: Scales units automatically.
-
-
grep -E '^Huge' /proc/meminfo: Shows hugepage-related fields when present.-
^Huge: Matches hugepage keys such asHugePages_TotalandHugepagesize.
-