brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: lscpu tells you cores, threads and virtualization support on linux

Linux
~/tips/tip-linux-lscpu-cores-virtualization

lscpu | grep -E 'Model name|Socket|Core|Thread|Virtualization'

Summarizes the CPU model, core and thread counts and virtualization flags.

I check the CPU layout before picking VM settings or a thread count.

lscpu | grep -E 'Model name|Socket|Core|Thread|Virtualization'

lscpu reads the data from /sys and /proc/cpuinfo and summarizes it. Multiply sockets by cores per socket and threads per core to get the logical CPU count. The Virtualization line shows VT-x or AMD-V when the CPU offers it and the firmware has it switched on. Inside a VM the line may be missing, and the core counts show what the hypervisor gives you.

Further reading: lscpu manual page

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link