Skip to contentSkip to conversation

Probing for physical number of cpus.

DISCUSSION Roy Dragseth 3 participants 5 messages Oct 28, 2005 – Nov 7, 2005

lore
Share & tools
lore
#0 lore raw

Hi.

Do anyone know how to figure out the physical number of cpus in an ia64 system? No, /proc/cpuinfo wont do because the kernel is booted with maxcpus=1.

When installing RH EL the install kernel is booted with maxcpus=1 and I need to figure out the physical number of cpus in the system for later use in the software setup. I need to be able to get this from userspace.

Any hints is greatly appreciated.

Regards,
r.

Signature · 4 lines
  The Computer Center, University of Tromsø, N-9037 TROMSØ Norway.
	      phone:+47 77 64 41 07, fax:+47 77 64 41 00
     Roy Dragseth, High Performance Computing System Administrator
	 Direct call: +47 77 64 62 56. email: [email protected]
#1 lore raw
Quoted 3 lines · Roy Dragseth

Do anyone know how to figure out the physical number of cpus in an ia64 system? No, /proc/cpuinfo wont do because the kernel is booted with maxcpus=1.

Read and parse the ACPI tables off of /dev/mem, starting with the address from /sys/firmware/efi/systab.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#2 lore raw
In reply to Roy Dragseth
Quoted 7 lines · Andreas Schwab
Quoted 3 lines · Roy Dragseth

Do anyone know how to figure out the physical number of cpus in an ia64 system? No, /proc/cpuinfo wont do because the kernel is booted with maxcpus=1.

Read and parse the ACPI tables off of /dev/mem, starting with the address from /sys/firmware/efi/systab.

Yikes! Thanks for the answer. I've been toying around with pmtools/acpidump which gives me a text dump, but I'm still a bit confused (to say the least).

r.

Signature · 4 lines
  The Computer Center, University of Tromsø, N-9037 TROMSØ Norway.
	      phone:+47 77 64 41 07, fax:+47 77 64 41 00
     Roy Dragseth, High Performance Computing System Administrator
	 Direct call: +47 77 64 62 56. email: [email protected]
#3 lore raw
In reply to Roy Dragseth
Quoted 9 lines · Roy Dragseth
Quoted 2 lines · Andreas Schwab
Quoted 1 line · Roy Dragseth

Do anyone know how to figure out the physical number of cpus in an

ia64

Quoted 1 line
Quoted 1 line

system? No, /proc/cpuinfo wont do because the kernel is booted

with

Quoted 2 lines
Quoted 1 line

maxcpus=1.

Quoted 9 lines
Quoted 1 line

Read and parse the ACPI tables off of /dev/mem, starting with the

address

Quoted 1 line

from /sys/firmware/efi/systab.

Yikes! Thanks for the answer. I've been toying around with
pmtools/acpidump
which gives me a text dump, but I'm still a bit confused (to say the least).

Actually even of you boot with maxcpus=1, we still create sysfs entries for each cpus physically present in the system.

you should be able to look at /sys/devices/system/cpu/cpuX entries

if you compiled with CONFIG_HOTPLUG_CPU enabled, then you could echo 1 > online file in the appropriate cpu directory to add more cpus.

Let me know if you dont see this behaviour.

Cheers,
ashok

#4 lore raw
In reply to Roy Dragseth
Quoted 10 lines · Ashok Raj

Actually even of you boot with maxcpus=1, we still create sysfs entries for each cpus physically present in the system.

you should be able to look at /sys/devices/system/cpu/cpuX entries

if you compiled with CONFIG_HOTPLUG_CPU enabled, then you could echo 1 > online file in the appropriate cpu directory to add more cpus.

Let me know if you dont see this behaviour.

Hi, this is more in line of what I was hoping for ;-)

However I don't see this behaviour on my system. I'm running RH EL 4 with this setup:

[root@testing ~]# ls /sys/devices/system/cpu/
cpu0
[root@testing ~]# uname -a
Linux testing.cluster.none 2.6.9-22.EL #1 SMP Wed Oct 5 15:20:11 EEST 2005 ia64 ia64 ia64 GNU/Linux
[root@testing ~]# cat /proc/cmdline BOOT_IMAGE=scsi0:\EFI\redhat\vmlinuz-2.6.9-22.EL console=ttyS0 maxcpus=1 rhgb quiet root=LABEL=/1 ro

Upgrading the kernel will not help because I need to be able to probe this under the install kernel.

Some background:

This is for the Rocks Cluster Distribution (www.rocksclusters.org), where the compute node installation is done using RH kickstart files that is automatically generated on, and fetched from, the frontend based on the information that is sent from the compute node when it asks for the kickstart file. For instance, the number of cpus on the node is used to configure the queueing system.

Any further hints is greatly appreciated.

Regards,
r.

Signature · 4 lines
  The Computer Center, University of Tromsø, N-9037 TROMSØ Norway.
	      phone:+47 77 64 41 07, fax:+47 77 64 41 00
     Roy Dragseth, High Performance Computing System Administrator
	 Direct call: +47 77 64 62 56. email: [email protected]