LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2008, 12:47 PM   #31
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918

my suggestion would be a stanza like:
Code:
...
elif [ $CPU_VENDOR == 'ibm-powerpc' ]; then
   CPU_VENDOR="ibm"
...
i think these are still popular enough ?
 
Old 12-10-2009, 05:36 AM   #32
lavixu
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
vendor info

http://java.sun.com/j2se/1.4.2/docs/...getProperties()
This may be useful.
 
Old 12-10-2009, 08:33 AM   #33
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
@uxinn: i think this should be corrected
Code:
OS_BIT=`uname -m`
so that it figures the os-bit from /proc/cpuinfo (if cpu_flags contain lm -- long mode).
 
Old 12-11-2009, 08:21 AM   #34
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by lavixu View Post
Normally, it is not a good idea to revive threads that are this old.
 
Old 12-11-2009, 06:48 PM   #35
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
yeah Pixel you should checkout the original posting date. someone rezzed this one when I said it was an old post a two years ago :P its officially a zombie

Last edited by exvor; 12-11-2009 at 06:50 PM.
 
Old 03-16-2010, 04:35 AM   #36
linuxmandrake
Member
 
Registered: Sep 2004
Distribution: debian sarge 64bit (AMD)
Posts: 709

Rep: Reputation: 30
Hi
Does that tell you the actual speed the chip is running at when it's under clocked ?
The reason I want to know is because my link station live (NAS) runs slower than the pro version but the hardware is the same.
I just want to know if it's under clocked. If not then I think it can only be firmware or perhaps some other hardware bottleneck.
 
Old 03-16-2010, 04:39 AM   #37
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,145

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Some zombies just won't die - see my previous post.
 
Old 07-27-2011, 04:20 PM   #38
MsCtrl
LQ Newbie
 
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
Thumbs up Thanks!

Sorry for the resurrection. I don't expect any replies. But I wanted to thank everyone for a very interesting thread as well as the useful info. I'm still some what new to Linux. Not to computers, or command line. Just to Linux. Which I LOVE. And this thread was amusing. Someone was thoughtful enough to remind everyone to backup before taking advice. Brilliant! No one wants to admit it but yes, even the most intelligent has forgotten once or twice and kicked him/herself!

I found the uname command useful because I really wasn't sure how many bits my processor was. I can't believe I forgot. You think you'll remember these things but I don't know how many computer parts I have laying around here and which ones I'm actually using any more. lol

But I did find [/proc/cpuinfo] useful too. Now I am sure which processor it is as well. Or at least more sure. Narrows it down anyway.

So thank you all so very much for re-resurrecting this zombie and letting me find this thread!!! I cannot contribute but I sure do appreciate it!! I hope it's here later in case I forget or lose my notes.
 
Old 03-03-2012, 07:21 AM   #39
heavytull
LQ Newbie
 
Registered: Apr 2006
Posts: 15

Rep: Reputation: 0
Initially some users in this post wanted a way in linux to get get the CPU ID.
After many years I notice that no one replied.
So is there any mean in linux to get the CPU ID?
I mean, for example there are several Intel pentium 4 models, all identified by a unique number e.g. 620, 630, 631, 640, 641, 650, 651, 660.
If one tries cpuz in windows he will get this info straight forward whereas /proc/cpuinfo in linux does not contain it.
 
Old 06-27-2012, 10:01 AM   #40
lionheart22
LQ Newbie
 
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
Hi,

This is my first post on LQ.

Thanks to Uxinn. Ading my 2 cents. Below is modified script to get valid values for cores, cpus and number of cores per cpu.


#!/bin/bash

#CPU_COUNT=`grep physical\ id /proc/cpuinfo |sort -u|wc -l`
CORE_COUNT=`grep core\ id /proc/cpuinfo |wc -l`
CORE_PER_CPU=`grep cpu\ cores /proc/cpuinfo |sort -u|awk '{print $4}'`
CPU_COUNT=`expr $CORE_COUNT / $CORE_PER_CPU`
CPU_MODEL=
CPU_VENDOR=`grep vendor_id /proc/cpuinfo|awk '{print $3}'|sort -u`
CPU_FREQ=`cat /proc/cpuinfo | grep "cpu MHz" | sort -u|sed 's/[^0-9\.]//g'`
OS_BIT=`uname -m`
KERNEL_VERSION=`uname -rsv`


MEMORY_KB=`grep MemTotal: /proc/meminfo|awk '{ print $2 }'`
MEMORY_MB=`echo $MEMORY_KB / 1024`"M"

if [ $OS_BIT == 'x86_64' ]; then
OS_BIT="64bit"
else
OS_BIT="32bit"
fi

if [ $CPU_COUNT == 0 ]; then
CPU_COUNT=1
CORE_COUNT=1
fi

if [ $CPU_VENDOR == 'GenuineIntel' ]; then
CPU_VENDOR="Intel"
CPU_TYPE=`grep model\ name /proc/cpuinfo|sort -u|awk '{print $5" "$7 $8 $9}'`
elif [ $CPU_VENDOR == 'AuthenticAMD' ]; then
CPU_VENDOR="AMD"
CPU_TYPE=`grep model\ name /proc/cpuinfo|sort -u|awk '{print $4 " " $5 " " $7}'`
fi


echo "CORE_COUNT: " $CORE_COUNT
echo "CPU COUNT: " $CPU_COUNT
echo "CORE PER CPU: " $CORE_PER_CPU
echo "CPU VENDOR: " $CPU_VENDOR
echo "CPU Type: " $CPU_TYPE
echo "Platform: " $OS_BIT
echo "Kernel Version: " $KERNEL_VERSION
 
Old 06-27-2012, 10:36 AM   #41
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
"For those of us who believe in physics, this separation between past, present and future is only an illusion." Albert Einstein

Here is what the OP was/is/will be looking for:
https://kevinclosson.wordpress.com/2...r-information/
http://www.etallen.com/cpuid.html
CPUID is probably available for your distribution.

Regards
 
Old 03-05-2013, 02:55 AM   #42
yeugeniuss
LQ Newbie
 
Registered: Nov 2010
Posts: 4

Rep: Reputation: 0
sh script collecting system info

I suppose this bash script could be helpful for this task.
http://sourceforge.net/projects/sysinforeport

detects number of cpu's/cores, cpu model, memory info, kernel info,releae info, bios info.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find how many CPU's are active in 8 CPU Linux machine sumit_sinha Linux - General 11 03-29-2011 10:53 AM
CPU information structure alltime Programming 2 10-31-2005 05:58 AM
Multithreaded System On 4 Cpu Linux Machine, process stuck on certain thread eyalzm Programming 1 05-10-2004 11:46 AM
Switching off a CPU of a multiple CPU machine kravisudhakar Linux - General 1 12-26-2003 10:13 AM
CPU#0:Machine Check Exception karamboul Linux - Software 1 03-29-2002 10:33 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration