[CentOS] cpu type
Gregory P. Ennis
PoMec at PoMec.Net
Sun Feb 3 23:21:51 UTC 2008
On Sun, 2008-02-03 at 06:06 -0600, Jimmy Bradley wrote:
> I have a quick question.
> The board and CPU that I'm using in one of my machines was given
> to me. I didn't take the time to look up the info on the board or
> anything. I was busy, so I just put the board in a pc case, hooked
> everything up, and loaded the os on the machine.
> I didn't know it at the time, but there's a chance it may be a
> 64bit board and cpu. I don't want to pull the machine out of the desk,
> and open it up to find out. Is there a command entered by way of the
> terminal window that will tell me what kind of cpu I have? I want to say
> that it's an AMD sempron 3000+, but I'm not sure.
>
> Thanks
>
> Jim
>
Jim,
Here is a short script that identifies the OS as well as a 64 bit
machine. The script is not mine, but was posted on this site 6 months
or so ago.
Greg
#!/bin/bash
echo -n "Running "
RES=`uname -a | grep 64`
if [ $? -eq 0 ]; then
echo -n "64-bit "
else
echo -n "32-bit "
fi
echo -n "operating system on a "
RES=`cat /proc/cpuinfo | grep " lm "`
if [ $? -eq 0 ]; then
echo -n "64-bit "
else
echo -n "32-bit "
fi
echo "machine"
More information about the CentOS
mailing list