Files
oracle/vdh/cpu_table.sh

19 lines
379 B
Bash
Raw Permalink Normal View History

2026-03-12 21:23:47 +01:00
#!/bin/bash
gawk '
BEGIN {
FS = ":"
printf "%5-s %6-s %4-s\n", "OS ID", "Socket", "Core"
printf "%5-s %6-s %4-s\n", "-----", "------", "----"
}
{
if ($1 ~ /processor/) {
PROC = $2
} else if ($1 ~ /physical id/) {
PHYID = $2
} else if ($1 ~ /core id/) {
CID = $2
printf "%5s %6s %4s\n", PROC, PHYID, CID
}
}' /proc/cpuinfo