<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Get the Processor Type on Solaris</title>
	<atom:link href="http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/</link>
	<description>Computer Help from your Friendly How-To Geek</description>
	<lastBuildDate>Tue, 24 Nov 2009 08:50:03 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: hogmaster</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-75883</link>
		<dc:creator>hogmaster</dc:creator>
		<pubDate>Thu, 27 Aug 2009 18:18:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-75883</guid>
		<description>Really usefull scripts for Linux and Solaris.

I have been trying to determine the number of cores in a system with Sparc T2 cpus.
These cpus hav 4,6 or 8 cores per cpu

psrinfo -pv &#124; wc -l will return 32, this is the number of threads, if I divide 32 by 2 I get 16 !
Does this mean I have 4 4 core cpus or do I have 2 8 core cpus?
Am I missing something?

/Hogmaster</description>
		<content:encoded><![CDATA[<p>Really usefull scripts for Linux and Solaris.</p>
<p>I have been trying to determine the number of cores in a system with Sparc T2 cpus.<br />
These cpus hav 4,6 or 8 cores per cpu</p>
<p>psrinfo -pv | wc -l will return 32, this is the number of threads, if I divide 32 by 2 I get 16 !<br />
Does this mean I have 4 4 core cpus or do I have 2 8 core cpus?<br />
Am I missing something?</p>
<p>/Hogmaster</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-75872</link>
		<dc:creator>Praveen</dc:creator>
		<pubDate>Thu, 27 Aug 2009 12:52:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-75872</guid>
		<description>@ Alex, I&#039;m referring to your first post!</description>
		<content:encoded><![CDATA[<p>@ Alex, I&#8217;m referring to your first post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-75871</link>
		<dc:creator>Praveen</dc:creator>
		<pubDate>Thu, 27 Aug 2009 12:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-75871</guid>
		<description>@Alex,

Great script. But if you have CPUs with different frequencies, then it will NOT work. For getting the Frequency, you&#039;ve used the below command:

/usr/sbin/psrinfo -v&#124; grep operate &#124; sed -e &quot;s/.*at //;s/,//&quot; &#124; head -1

This will result in:

$ /usr/sbin/psrinfo -v&#124; grep operate &#124; sed -e &quot;s/.*at //;s/,//&quot; &#124; head -1
1200 MHz

However, when I check, I&#039;ve got 8 CPUs - 4 with 1200 MHz and 4 others with 900 MHz

$ /usr/sbin/psrinfo -v&#124; grep operate &#124; sed -e &quot;s/.*at //;s/,//&quot;
1200 MHz
1200 MHz
1200 MHz
1200 MHz
900 MHz
900 MHz
900 MHz
900 MHz

You can perhaps use something like:

/usr/sbin/psrinfo -v&#124; grep operate &#124; sed -e &quot;s/.*at //;s/,//&quot; &#124; uniq

or

/usr/sbin/psrinfo -v&#124; grep operate &#124; sed -e &quot;s/.*at //;s/,//&quot; &#124; sort -u

using the above commands for frequency, I get the below output:

$ ./sunos_cpu_info
8 &quot;UltraSPARC-III+ 1200 MHz 900 MHz&quot;

Anyway, thanks a lot for your wonderful script (for both Linux &amp; Solaris!)</description>
		<content:encoded><![CDATA[<p>@Alex,</p>
<p>Great script. But if you have CPUs with different frequencies, then it will NOT work. For getting the Frequency, you&#8217;ve used the below command:</p>
<p>/usr/sbin/psrinfo -v| grep operate | sed -e &#8220;s/.*at //;s/,//&#8221; | head -1</p>
<p>This will result in:</p>
<p>$ /usr/sbin/psrinfo -v| grep operate | sed -e &#8220;s/.*at //;s/,//&#8221; | head -1<br />
1200 MHz</p>
<p>However, when I check, I&#8217;ve got 8 CPUs &#8211; 4 with 1200 MHz and 4 others with 900 MHz</p>
<p>$ /usr/sbin/psrinfo -v| grep operate | sed -e &#8220;s/.*at //;s/,//&#8221;<br />
1200 MHz<br />
1200 MHz<br />
1200 MHz<br />
1200 MHz<br />
900 MHz<br />
900 MHz<br />
900 MHz<br />
900 MHz</p>
<p>You can perhaps use something like:</p>
<p>/usr/sbin/psrinfo -v| grep operate | sed -e &#8220;s/.*at //;s/,//&#8221; | uniq</p>
<p>or</p>
<p>/usr/sbin/psrinfo -v| grep operate | sed -e &#8220;s/.*at //;s/,//&#8221; | sort -u</p>
<p>using the above commands for frequency, I get the below output:</p>
<p>$ ./sunos_cpu_info<br />
8 &#8220;UltraSPARC-III+ 1200 MHz 900 MHz&#8221;</p>
<p>Anyway, thanks a lot for your wonderful script (for both Linux &amp; Solaris!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ahmad</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-74892</link>
		<dc:creator>Ahmad</dc:creator>
		<pubDate>Mon, 03 Aug 2009 11:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-74892</guid>
		<description>Hi, 

Physical disks on sun solaris : psrinfo -p</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Physical disks on sun solaris : psrinfo -p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrice</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-66127</link>
		<dc:creator>Patrice</dc:creator>
		<pubDate>Tue, 03 Feb 2009 18:11:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-66127</guid>
		<description>Hello guys,

Thanks alot for your great work!  Anyone managed to differentiate the number of socket/core/threads on Sun CMT processors?</description>
		<content:encoded><![CDATA[<p>Hello guys,</p>
<p>Thanks alot for your great work!  Anyone managed to differentiate the number of socket/core/threads on Sun CMT processors?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-64380</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 08 Jan 2009 10:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-64380</guid>
		<description>@Keith: I believe that if you use a non-SMP kernel, your OS won&#039;t be able to see more than 1 CPU, so you won&#039;t be able to get more information about CPU, unless maybe you use vendor specific drivers.

If you use a SMP kernel, you may be able to get information about the number of chips and the number of cores of each cpu chip using /proc/cpuinfo. Look at how I actually decode it in my script:

function enclose {
        tr -s &quot; &quot; &#124; sed -e &quot;s/^/\&quot;/; s/$/\&quot;/; s/\&quot;\ /\&quot;/; s/\ \&quot;/\&quot;/&quot;
}

function linux_hw_CPU {

   typeset num=0
   typeset name=&quot;&quot;
   typeset cores=&quot;&quot;

   name=&quot;$(
      cat /proc/cpuinfo &#124;    awk -F: &#039;
         /vendor_id/ { vendor=$2 }
         /model name/ { model=$2 }
         /cpu MHz/ {
                                if( model ~ &quot;Hz&quot; ) {speed=&quot;&quot;} else { speed=$2&quot; MHz&quot; };
            print vendor, model, speed; }
         &#039; &#124; tail -1
   )&quot;

   num=$(
      if [ -r /proc/vmware/cpuinfo ]
      then
         awk &#039;/pcpu/ { print NF-1 }&#039; /proc/vmware/cpuinfo
      else
         cat /proc/cpuinfo &#124; grep processor&#124; wc -l
      fi

   )

   if grep -q &quot;physical id&quot; /proc/cpuinfo &#124;&#124; grep &quot;siblings&quot; /proc/cpuinfo
   then
      chip_count=$( grep &quot;physical id&quot; /proc/cpuinfo &#124; sort -u &#124; wc -l )
      chip_core=$( grep &quot;siblings&quot; /proc/cpuinfo &#124; tail -1 &#124; cut -d: -f2 )
      cores=&quot;($chip_count chips x $chip_core cores)&quot;
   fi

   # Blades HP con
   if [ -x /sbin/hpasmcli ]
   then
      chip_name=$(  /sbin/hpasmcli -s &quot;SHOW SERVER&quot; &#124; grep &quot;Name&quot; &#124; head -1 &#124; cut -d: -f2 )
      chip_speed=$( /sbin/hpasmcli -s &quot;SHOW SERVER&quot; &#124; grep &quot;Speed&quot; &#124; head -1 &#124; cut -d: -f2 )
      chip_core=$(  /sbin/hpasmcli -s &quot;SHOW SERVER&quot; &#124; grep &quot;Core&quot; &#124; head -1 &#124; cut -d: -f2 )
   fi

   # ESX: mas info sobre logical/cores/packages
   if [ -r /proc/vmware/sched/ncpus ]
   then
      cores=&quot;($( echo $( cat /proc/vmware/sched/ncpus ) ))&quot;
   fi

   # Linux Itanium IA64
   if grep -q -i itanium /proc/cpuinfo
   then
      name=&quot;$(
         grep &quot;vendor&quot;  /proc/cpuinfo &#124; cut -d: -f2- &#124; tail -1 ) $(
         grep &quot;arch &quot;   /proc/cpuinfo &#124; cut -d: -f2- &#124; tail -1 ) $(
         grep &quot;family&quot;  /proc/cpuinfo &#124; cut -d: -f2- &#124; tail -1 ) $(
         grep &quot;cpu MHz&quot; /proc/cpuinfo &#124; cut -d: -f2- &#124; cut -d. -f1 &#124; tail -1 ) Mhz&quot;

      chip_count=$( grep &quot;physical id&quot; /proc/cpuinfo &#124; sort -u &#124; wc -l )
      chip_core=$( grep &quot;siblings&quot; /proc/cpuinfo &#124; tail -1 &#124; cut -d: -f2 )
      cores=&quot;($chip_count chips x $chip_core cores)&quot;
   fi

   echo $num $( echo &quot;$name $cores&quot; &#124; enclose )
}

linux_hw_CPU


For example:
# linux_hw_CPU
8 &quot;GenuineIntel Intel(R) Xeon(R) CPU E5345 @ 2.33GHz (2 chips x 4 cores)&quot;</description>
		<content:encoded><![CDATA[<p>@Keith: I believe that if you use a non-SMP kernel, your OS won&#8217;t be able to see more than 1 CPU, so you won&#8217;t be able to get more information about CPU, unless maybe you use vendor specific drivers.</p>
<p>If you use a SMP kernel, you may be able to get information about the number of chips and the number of cores of each cpu chip using /proc/cpuinfo. Look at how I actually decode it in my script:</p>
<p>function enclose {<br />
        tr -s &#8221; &#8221; | sed -e &#8220;s/^/\&#8221;/; s/$/\&#8221;/; s/\&#8221;\ /\&#8221;/; s/\ \&#8221;/\&#8221;/&#8221;<br />
}</p>
<p>function linux_hw_CPU {</p>
<p>   typeset num=0<br />
   typeset name=&#8221;"<br />
   typeset cores=&#8221;"</p>
<p>   name=&#8221;$(<br />
      cat /proc/cpuinfo |    awk -F: &#8216;<br />
         /vendor_id/ { vendor=$2 }<br />
         /model name/ { model=$2 }<br />
         /cpu MHz/ {<br />
                                if( model ~ &#8220;Hz&#8221; ) {speed=&#8221;"} else { speed=$2&#8243; MHz&#8221; };<br />
            print vendor, model, speed; }<br />
         &#8216; | tail -1<br />
   )&#8221;</p>
<p>   num=$(<br />
      if [ -r /proc/vmware/cpuinfo ]<br />
      then<br />
         awk &#8216;/pcpu/ { print NF-1 }&#8217; /proc/vmware/cpuinfo<br />
      else<br />
         cat /proc/cpuinfo | grep processor| wc -l<br />
      fi</p>
<p>   )</p>
<p>   if grep -q &#8220;physical id&#8221; /proc/cpuinfo || grep &#8220;siblings&#8221; /proc/cpuinfo<br />
   then<br />
      chip_count=$( grep &#8220;physical id&#8221; /proc/cpuinfo | sort -u | wc -l )<br />
      chip_core=$( grep &#8220;siblings&#8221; /proc/cpuinfo | tail -1 | cut -d: -f2 )<br />
      cores=&#8221;($chip_count chips x $chip_core cores)&#8221;<br />
   fi</p>
<p>   # Blades HP con<br />
   if [ -x /sbin/hpasmcli ]<br />
   then<br />
      chip_name=$(  /sbin/hpasmcli -s &#8220;SHOW SERVER&#8221; | grep &#8220;Name&#8221; | head -1 | cut -d: -f2 )<br />
      chip_speed=$( /sbin/hpasmcli -s &#8220;SHOW SERVER&#8221; | grep &#8220;Speed&#8221; | head -1 | cut -d: -f2 )<br />
      chip_core=$(  /sbin/hpasmcli -s &#8220;SHOW SERVER&#8221; | grep &#8220;Core&#8221; | head -1 | cut -d: -f2 )<br />
   fi</p>
<p>   # ESX: mas info sobre logical/cores/packages<br />
   if [ -r /proc/vmware/sched/ncpus ]<br />
   then<br />
      cores=&#8221;($( echo $( cat /proc/vmware/sched/ncpus ) ))&#8221;<br />
   fi</p>
<p>   # Linux Itanium IA64<br />
   if grep -q -i itanium /proc/cpuinfo<br />
   then<br />
      name=&#8221;$(<br />
         grep &#8220;vendor&#8221;  /proc/cpuinfo | cut -d: -f2- | tail -1 ) $(<br />
         grep &#8220;arch &#8221;   /proc/cpuinfo | cut -d: -f2- | tail -1 ) $(<br />
         grep &#8220;family&#8221;  /proc/cpuinfo | cut -d: -f2- | tail -1 ) $(<br />
         grep &#8220;cpu MHz&#8221; /proc/cpuinfo | cut -d: -f2- | cut -d. -f1 | tail -1 ) Mhz&#8221;</p>
<p>      chip_count=$( grep &#8220;physical id&#8221; /proc/cpuinfo | sort -u | wc -l )<br />
      chip_core=$( grep &#8220;siblings&#8221; /proc/cpuinfo | tail -1 | cut -d: -f2 )<br />
      cores=&#8221;($chip_count chips x $chip_core cores)&#8221;<br />
   fi</p>
<p>   echo $num $( echo &#8220;$name $cores&#8221; | enclose )<br />
}</p>
<p>linux_hw_CPU</p>
<p>For example:<br />
# linux_hw_CPU<br />
8 &#8220;GenuineIntel Intel(R) Xeon(R) CPU E5345 @ 2.33GHz (2 chips x 4 cores)&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keith</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-63584</link>
		<dc:creator>keith</dc:creator>
		<pubDate>Wed, 24 Dec 2008 13:11:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-63584</guid>
		<description>What if you have a 64 bit dual core CPU and you are running a non SMP kernel , the script will show   only 1  CPU. 
Is there a way to get the details from hardware ?
On linux , dmidecode -s processor-version will give you the CPU count , however how to find out if its a single or multicore processor</description>
		<content:encoded><![CDATA[<p>What if you have a 64 bit dual core CPU and you are running a non SMP kernel , the script will show   only 1  CPU.<br />
Is there a way to get the details from hardware ?<br />
On linux , dmidecode -s processor-version will give you the CPU count , however how to find out if its a single or multicore processor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claudio</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-41925</link>
		<dc:creator>Claudio</dc:creator>
		<pubDate>Thu, 27 Mar 2008 17:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-41925</guid>
		<description>Alex : ¿ Its posible to get the complete set of scripts to identify the hw?..thanks in advance</description>
		<content:encoded><![CDATA[<p>Alex : ¿ Its posible to get the complete set of scripts to identify the hw?..thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-20108</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 26 Jul 2007 07:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-20108</guid>
		<description>As part of the same script, I&#039;ve done this function for Linux (including VMware ESX servers):

function linux_hw_CPU {
   typeset num=0
   typeset name=&quot;&quot;
   typeset cores=&quot;&quot;

   name=&quot;$(
      cat /proc/cpuinfo &#124;    awk -F: &#039;
         /vendor_id/ { vendor=$2 }
         /model name/ { model=$2 }
         /cpu MHz/ { 
                                if( model ~ &quot;Hz&quot; ) {speed=&quot;&quot;} else { speed=$2&quot; MHz&quot; };
            print vendor, model, speed; }
         &#039; &#124; tail -1
   )&quot;

   num=$( 
      if [ -r /proc/vmware/cpuinfo ]
      then
         awk &#039;/pcpu/ { print NF-1 }&#039; /proc/vmware/cpuinfo
      else
         cat /proc/cpuinfo &#124; grep processor&#124; wc -l
      fi
   )
   
   # ESX: mas info sobre logical/cores/packages
   if [ -r /proc/vmware/sched/ncpus ]
   then
      cores=$( echo $( cat /proc/vmware/sched/ncpus ) )
   fi

   echo $num $( echo &quot;$name ($cores)&quot; &#124; enclose )
}

For example, in one of our ESX box, I get:

32 &quot;GenuineIntel Intel(R) Xeon(TM) CPU 3.00GHz (32 logical 16 cores 8 packages)&quot;

(ESX is nice, it gives me information about chip, cores and also logical (that is because hyperthreading is activates on that box).

A normal linux server (not ESX) would give something more simple like:

2 &quot;GenuineIntel Pentium III (Coppermine) 696.417 MHz ()&quot;

Hope it helps</description>
		<content:encoded><![CDATA[<p>As part of the same script, I&#8217;ve done this function for Linux (including VMware ESX servers):</p>
<p>function linux_hw_CPU {<br />
   typeset num=0<br />
   typeset name=&#8221;"<br />
   typeset cores=&#8221;"</p>
<p>   name=&#8221;$(<br />
      cat /proc/cpuinfo |    awk -F: &#8216;<br />
         /vendor_id/ { vendor=$2 }<br />
         /model name/ { model=$2 }<br />
         /cpu MHz/ {<br />
                                if( model ~ &#8220;Hz&#8221; ) {speed=&#8221;"} else { speed=$2&#8243; MHz&#8221; };<br />
            print vendor, model, speed; }<br />
         &#8216; | tail -1<br />
   )&#8221;</p>
<p>   num=$(<br />
      if [ -r /proc/vmware/cpuinfo ]<br />
      then<br />
         awk &#8216;/pcpu/ { print NF-1 }&#8217; /proc/vmware/cpuinfo<br />
      else<br />
         cat /proc/cpuinfo | grep processor| wc -l<br />
      fi<br />
   )</p>
<p>   # ESX: mas info sobre logical/cores/packages<br />
   if [ -r /proc/vmware/sched/ncpus ]<br />
   then<br />
      cores=$( echo $( cat /proc/vmware/sched/ncpus ) )<br />
   fi</p>
<p>   echo $num $( echo &#8220;$name ($cores)&#8221; | enclose )<br />
}</p>
<p>For example, in one of our ESX box, I get:</p>
<p>32 &#8220;GenuineIntel Intel(R) Xeon(TM) CPU 3.00GHz (32 logical 16 cores 8 packages)&#8221;</p>
<p>(ESX is nice, it gives me information about chip, cores and also logical (that is because hyperthreading is activates on that box).</p>
<p>A normal linux server (not ESX) would give something more simple like:</p>
<p>2 &#8220;GenuineIntel Pentium III (Coppermine) 696.417 MHz ()&#8221;</p>
<p>Hope it helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Geek</title>
		<link>http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/comment-page-1/#comment-20100</link>
		<dc:creator>The Geek</dc:creator>
		<pubDate>Wed, 25 Jul 2007 19:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/solaris/get-the-processor-type-on-solaris/#comment-20100</guid>
		<description>Alex, thanks!

That&#039;s a great script... I might convert it into linux...</description>
		<content:encoded><![CDATA[<p>Alex, thanks!</p>
<p>That&#8217;s a great script&#8230; I might convert it into linux&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
