![ubuntu cpuinfo ubuntu cpuinfo](https://cdn2.peterdavehello.org/wp-content/uploads/2016/04/screenshot-from-Linux-Command-Line-on-Windows-video-demo-fs-dev-proc.png)
#Ubuntu cpuinfo how to
How to determine number of CPU sockets on a systemĭifference between physical cpus, cpu cores, and logical cpus So we have some formal articles you can refer back to as well: So BAM! Right there exactly what we wanted in a nicely-wrapped output. On a machine here in the lab I ran xsos so you can see typical output: # xsosĭistro: Red Hat Enterprise Linux Workstation release 6.4 (Santiago)īoot time: Tue Sep 10 07:29: (1378812568) Yum repo available for xsos - a tool for sysadmins I use xsos to help look at infomration provided in sosreports, but it has a lot of great uses (like our proc/socket question here). #cat /proc/cpuinfo | grep "physical id" | sort -u | wc -līut dmidecode still shows sockets: # dmidecode -t4 | egrep 'Designation|Status'Īnd far and away the best hidden nugget from the older article was a tool that I use very often here during my day helping support customers: xsos Hyperthreading can be found with lscpu too: # lscpu | grep -i thread Grep -i "processor" /proc/cpuinfo | sort -u | wc -l Socket Designation: CPU1 Socket Designation: CPU2Ĭheck if HyperThreading is enabled # of siblings = # of cores Get number of CPU grep -i "physical id" /proc/cpuinfo | sort -u | wc -l These commands worked from RHEL6 back to RHEL4 so most everyone should be able to use them, So if you're interested in giving these a whirl, there are also a few official knowledge solutions produced by our esteemed Ryan Sawhill you may want to review too:ĭmidecode | grep -i product Product Name: VMware Virtual Platform So Tom went back to work, happy and ready to give his bosses EXACTLY what they needed (he was so happy he had a new scripting project to tinker with). $ egrep -e "core id" -e ^physical /proc/cpuinfo|xargs -l2 echo|sort -u And then for fun (Tom is nothing if not fun) we wondered how you could account for if something was hyperthreaded or not so he whipped out this: This told us exactly how many sockets we had. $ cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l Next we tried something that while much less pretty, zeroed in on the exact requirement: Not only can we see how many sockets he was using (which is what he was reporting for) but we also found out how many cores there were in each socket. First we tried this:Īt this command's "core" we got exactly what my pal Tom wanted, and then some. So we worked on a few simple commands that can be used to produce this data. I thought back to my years of running a large Enterprise *NIX team and shuddered easily once every month or so someone came by asking me the exact same questions. Sadly they did not have any type of CMDB in place to help (Configuration Management Database - something very handy to have when it comes to looking at your server inventory). He had a few 3rd-party products they needed to do some accounting on and each product was licensed using a different model. His organization was about ready to go through some licensing true-ups and he was in a bit of a pickle. I had a recent email from one of my customers. So please read on and let us know if you other options we can share.
#Ubuntu cpuinfo skin
As with anything in this exciing world of open source, there are literally dozens of ways to skin this cat. I'm reposting here and have attempted to weave in some of the great comments we received from the Community.
![ubuntu cpuinfo ubuntu cpuinfo](https://i.imgur.com/jynPyI9.jpg)
It was fairly popular and generated quite a bit of good conversation. So a while back I posted this article in our older portal group system.