Extract CPU and memory facts directly from /proc and
validate them with standard tooling. Cross-check raw kernel
state with lscpu and free -h so your
findings are usable in tickets and capacity discussions.
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.
/proc/cpuinfo.
/proc/cpuinfo.
lscpu.
MemTotal and MemAvailable from
/proc/meminfo.
free -h.
/proc as the raw interface to live kernel state
(CPU and memory).
lscpu
output.
MemTotal versus
MemAvailable and why “available” is not “free.”
/proc/meminfo).
/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
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.
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.
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 as
HugePages_Total and
Hugepagesize
.