Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to force running on a selected cpu on smp machine

0 views
Skip to first unread message

Carsten Hammer

unread,
Nov 15, 2002, 10:49:53 AM11/15/02
to
Hi,
I want to get the cpu serial numbers of all cpus in a machine. How to
force to run on a selected cpu?
At the moment I get arbitrary cpu serial numbers because sco runs my
programm on a arbitrary cpu what is fine most of the time but not at the
moment I want to get the serial numbers.
Best regards,
Carsten Hammer

Bela Lubkin

unread,
Nov 15, 2002, 1:37:59 PM11/15/02
to sco...@xenitec.on.ca
Carsten Hammer wrote:

You didn't mention an operating system, but I'm pretty sure
`/etc/p6update -nv` works on both OpenServer and UnixWare. Processor
serial numbers are only reported if they're present, which is true only
on Pentium III CPUs. Earlier CPUs didn't have PSNs, and Intel dropped
them in the P4 after so many people complained about supposed privacy
concerns.

`/etc/hw -v -r cpu` will report on the presence of the processor serial
number feature.

>Bela<

Carsten Hammer

unread,
Nov 16, 2002, 2:02:08 PM11/16/02
to

Bela Lubkin schrieb:


> Carsten Hammer wrote:
>
>
>>I want to get the cpu serial numbers of all cpus in a machine. How to
>>force to run on a selected cpu?
>>At the moment I get arbitrary cpu serial numbers because sco runs my
>>programm on a arbitrary cpu what is fine most of the time but not at the
>>moment I want to get the serial numbers.
>
>
> You didn't mention an operating system, but I'm pretty sure
> `/etc/p6update -nv` works on both OpenServer and UnixWare. Processor

Oh, I need it for SCO Openserver 5.0.5.
If possible I prefer to have the ability to select the cpu from within
an application written in C or C++.


> serial numbers are only reported if they're present, which is true only
> on Pentium III CPUs. Earlier CPUs didn't have PSNs, and Intel dropped
> them in the P4 after so many people complained about supposed privacy
> concerns.

I prefer to detect the CPU and its ability to deliver a CPU serial
number using my own assembler code. It should work on Linux as well with
changes as small as possible.
Unfortunatly I could not find any way to influence the kernels selection
of the next cpu on a fork. The only thing that I learned is that it
seems to be able to switch cpus off using "cpuonof".


>
> `/etc/hw -v -r cpu` will report on the presence of the processor serial
> number feature.
>

hw -v -r cpu does neither report serial numbers nor the cpu the process
currently runs on. It does not help me unfortunatly.


>
>>Bela<
>

Thanks anyway,
Carsten

Bela Lubkin

unread,
Nov 16, 2002, 2:13:09 PM11/16/02
to
Carsten Hammer wrote:

> Bela Lubkin schrieb:
> > Carsten Hammer wrote:
> >
> >>I want to get the cpu serial numbers of all cpus in a machine. How to
> >>force to run on a selected cpu?
> >>At the moment I get arbitrary cpu serial numbers because sco runs my
> >>programm on a arbitrary cpu what is fine most of the time but not at the
> >>moment I want to get the serial numbers.
> >
> > You didn't mention an operating system, but I'm pretty sure
> > `/etc/p6update -nv` works on both OpenServer and UnixWare. Processor
>
> Oh, I need it for SCO Openserver 5.0.5.
> If possible I prefer to have the ability to select the cpu from within
> an application written in C or C++.

It can be done, with some root-only ioctls.

> > `/etc/hw -v -r cpu` will report on the presence of the processor serial
> > number feature.
>
> hw -v -r cpu does neither report serial numbers nor the cpu the process
> currently runs on. It does not help me unfortunatly.

Ah, I see that reporting of the Processor Serial Number feature was
added in 5.0.6.

I'll look up the CPU selection ioctls. (Crudely, you can use
lockpid(ADM)...)

>Bela<

Bela Lubkin

unread,
Nov 16, 2002, 2:31:34 PM11/16/02
to
I wrote:

> Carsten Hammer wrote:

> > >>I want to get the cpu serial numbers of all cpus in a machine. How to
> > >>force to run on a selected cpu?
> > >>At the moment I get arbitrary cpu serial numbers because sco runs my
> > >>programm on a arbitrary cpu what is fine most of the time but not at the
> > >>moment I want to get the serial numbers.

> It can be done, with some root-only ioctls.

> I'll look up the CPU selection ioctls. (Crudely, you can use
> lockpid(ADM)...)

See http://osr5doc.ca.caldera.com:457/cgi-bin/man/man?cpu+HW. The man
page was new in 5.0.6; most of the ioctls documented work on releases
back to SCO Unix 3.2.0. The device nodes exist and the ioctls are
supported only on systems which have SMP (nee MPX) installed.

>Bela<

Carsten Hammer

unread,
Nov 19, 2002, 4:16:56 AM11/19/02
to
Bela Lubkin wrote:

Thank you very much,
I think that is the hint that I needed.
For a shell script solution:

Has anybody ever used lockpid to *start* a prozess on a certain cpu? It should be
possible using a tricky wrapper script around it by delaying execution of a
forked process and using lockpid in the meantime, isnt it?

Best regards
Carsten Hammer

Konstantin Morev

unread,
Jan 30, 2003, 5:39:44 AM1/30/03
to
Hi all!
After unexpected reboot my server wrote:
PANIC: Kernel-mode adress fault on user address 0x0000002c

Booting from BCP with INITSTATE=S parameter was not successful.

Can you help me?

0 new messages