LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-24-2010, 10:31 AM   #1
markseger
Member
 
Registered: Jul 2003
Posts: 244

Rep: Reputation: 26
many processors on your system? and don't say /proc/cpuinfo


/proc/cpuinfo will tell you how many processors are enabled, but I want to know the total. I can see them all enumerated in:

[root@node02 mjs]# ls /sys/devices/system/cpu/
cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 sched_mc_power_savings

but not so in /proc/stat

[root@node02 mjs]# cat /proc/stat
cpu 65142 1364 44298 148671393 162022 9689 1899 0
cpu0 1133 43 853 18664269 2848 21 146 0
cpu1 671 14 422 18666930 2149 7 6 0
cpu2 7917 84 8898 18652007 1003 1 3 0
cpu3 22206 45 6253 18481313 149921 9465 815 0
cpu5 8796 995 9985 18649240 919 1 16 0
cpu6 1021 1 504 18665804 2613 2 10 0
cpu7 10847 17 11415 18645977 1528 2 7 0

or /proc/cpuinfo

[root@node02 mjs]# grep process /proc/cpuinfo
processor : 0
processor : 1
processor : 2
processor : 3
processor : 5
processor : 6
processor : 7

so the question then becomes if I disable a cpu at boot, what then? Will it still show up in /sys later? If not, I suppose I can't put it back online later, can I.

-mark
 
Old 06-24-2010, 10:56 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
To answer the original question:
Code:
ls /sys/devices/system/cpu | grep cpu[0-9] | wc -l
Quote:
if I disable a cpu at boot
How do you do that?

Quote:
Will it still show up in /sys later?
Try it?
 
  


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
proc/cpuinfo question pilot117 Linux - Hardware 1 03-07-2010 07:49 PM
/proc/cpuinfo question rob.rice Programming 2 11-08-2009 07:52 AM
Proc/CpuInfo sipsipi Linux - Software 4 03-03-2006 11:42 AM
/proc/cpuinfo oops! feta Linux - Hardware 2 11-08-2004 10:16 PM
/proc/cpuinfo embsupafly Linux - General 3 12-29-2003 06:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:43 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