Quick question - How do I display number of processors on linux?
Simply use top command:
Get info from /proc/cpuinfo with the help of grep commandCode:top
Code:grep -c processor /proc/cpuinfo
Quick question - How do I display number of processors on linux?
Simply use top command:
Get info from /proc/cpuinfo with the help of grep commandCode:top
Code:grep -c processor /proc/cpuinfo
tom,
the cmd top does not display the # of processors !!!
LivE Free 0r DiE
L!nux rul3z aLL
hey u can type top and hit 1 to see processorsOriginally Posted by B!n@ry
cheers
Raj
Linux rulz.
I have never turned back in my life ; I shall not do so today.. haha
Oh, really nice ...Originally Posted by raj
Thanx for that point raj![]()
LivE Free 0r DiE
L!nux rul3z aLL
#top
this command will only show top running porcesses
#ps aux|wc -l
78
#ps -el|wc -l
78
#ps -ael|wc -l
78
show the number of running processes
correction
[/quote]Code:grep -c processor /proc/cpuinfo
right info for cpu
grep CPU /proc/cpuinfo
grep cpu /proc/cpuinfo
and to see the process in the linux machine? start searching in /proc/thats the one which does the heavy dirty work! and also make sure you know difference between process and threads. like process is when you run xmms it opens up 3 windows, xmms is a process and those 3 windows are threads, threads are not identical with processess.
best way?
man lsof
How can I Get only the correct number of CPU's, the following output shows that my server has 8 CPU's but physically how many does it have? now I know it's not 8 of them???
grep CPU /proc/cpuinfo
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
grep cpu /proc/cpuinfo
cpu family : 6
cpu MHz : 2333.400
cpu cores : 4
cpuid level : 10
cpu family : 6
cpu MHz : 2333.400
cpu cores : 4
cpuid level : 10
cpu family : 6
cpu MHz : 2333.400
cpu cores : 4
cpuid level : 10
cpu family : 6
cpu MHz : 2333.400
cpu cores : 4
cpuid level : 10
cpu family : 6
cpu MHz : 2333.400
cpu cores : 4
cpuid level : 10
cpu family : 6
cpu MHz : 2333.400
cpu cores : 4
cpuid level : 10
cpu family : 6
cpu MHz : 2333.400
cpu cores : 4
cpuid level : 10
cpu family : 6
cpu MHz : 2333.400
cpu cores : 4
cpuid level : 10
Try
Get Information About Your BIOS / Server Hardware From a Shell Without Opening Chassis ( BIOS Decoder )Code:dmidecode --type 4 dmidecode --type 4 | grep -c Socket
All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]
top and grep -c processor /proc/cpuinfotop
commands are not same sir..
ple describe me...
i m getting from it that
the top comm and is showing the total process info. (tasks ). which are currently on
but grep -c ......XXXXXXXX...........command showing how many no of process going on.. how they are same.. plz ans me
Last edited by pritam.linux; 20th December 2008 at 01:48 PM.
You need to only type:
Code:grep -c processor /proc/cpuinfo
All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]
There are currently 1 users browsing this thread. (0 members and 1 guests)