I'm writing a FreeBSD Zenbleed workaround script in csh/tcsh (I know why not?!) and I'm using various ways to get the CPU model. I'm aware of Freaky's script and cpucontrol. However, for this script and other uses of this code I want to capture the model using sysctl
but I don't have access to every AMD processor to set my script against.
I'm trying to parse the sysctl -n hw.model
output but I don't have enough samples, so here is where I could use the help! Some output has only two awk columns, some 3 and I don't know if the AMD "Threadripper" models actually say Threadripper
and is it hyphenated like Rome
model output is?
Does the following command print nothing out but your AMD CPU model:
sysctl -n hw.model | awk '{ print $1= $(NF-1) }'
I would especially like to hear from anyone using Threadripper Pros. Please post if that command did not work. It would be helpful to post what was the output come out so I can verify. You can obfuscate (***) blot out your specific CPU numbers if you wish as long as I can understand how to parse it.
I'm expecting this as output:
Ryzen 5 4600G
or
Ryzen 5 4600G with Radeon Graphics
Ryzen Threadripper Pro 3995WX
Thanks!