Solaris 10 kstat output of multicore machine

Solaris 10 kstat output of multicore machine

Post by Thomas Maier-Komo » Wed, 26 Apr 2006 00:33:38



Hi,

can anybody post a kstat output of a multicore machine running Solaris
10? I need to know if the enumeration of cpu_stat/instance is consistent
with cpu/sys/instance. intrstat, cpustat, and cpuinfo look consistent,
but I really would like to know for sure.

Unfortunately the instances of cpu_stat are not enumerated sequentally
on multicore cpus which makes collecting the information a bit tricky,
when one consideres that a cpu could be turned off during this process.

Does anybody know, if there is an upper limit of instances. kstat_lookup
takes an int, which is a pretty long way to go, if a cpu got turned off.

TIA,
Tom

 
 
 

Solaris 10 kstat output of multicore machine

Post by Daniel Roc » Wed, 26 Apr 2006 01:52:59



> Hi,

> can anybody post a kstat output of a multicore machine running Solaris
> 10? I need to know if the enumeration of cpu_stat/instance is consistent
> with cpu/sys/instance. intrstat, cpustat, and cpuinfo look consistent,
> but I really would like to know for sure.

A complete output would be rather large, but basically:

module = cpu
instance = processor_id
name = intrstat/sys/vm

% kstat -m cpu | grep -v '^     '
module: cpu                             instance: 0
name:   intrstat                        class:    misc

module: cpu                             instance: 0
name:   sys                             class:    misc

module: cpu                             instance: 0
name:   vm                              class:    misc

module: cpu                             instance: 1
name:   intrstat                        class:    misc

module: cpu                             instance: 1
name:   sys                             class:    misc

module: cpu                             instance: 1
name:   vm                              class:    misc

For "kstat -m cpu -n sys" exist a second structure with almost the same
content. It is just named differently:

module = cpu_stat
instance = processor_id
name = cpu_stat%d               (%d = processor_id)

% kstat -m cpu_stat|grep -v '^   '
module: cpu_stat                        instance: 0
name:   cpu_stat0                       class:    misc

module: cpu_stat                        instance: 1
name:   cpu_stat1                       class:    misc

Quote:> Unfortunately the instances of cpu_stat are not enumerated sequentally
> on multicore cpus which makes collecting the information a bit tricky,
> when one consideres that a cpu could be turned off during this process.

> Does anybody know, if there is an upper limit of instances. kstat_lookup
> takes an int, which is a pretty long way to go, if a cpu got turned off.

Just iterate through all cpu_stat%d entries. Or call
        sysconf(_SC_CPUID_MAX)
to know up to which instance number you have to iterate. Remember there
may be holes in the processor numbering, esp. on SPARC.

--
Daniel

 
 
 

Solaris 10 kstat output of multicore machine

Post by Thomas Maier-Komo » Wed, 26 Apr 2006 04:45:04




>> Hi,

>> can anybody post a kstat output of a multicore machine running Solaris
>> 10? I need to know if the enumeration of cpu_stat/instance is consistent
>> with cpu/sys/instance. intrstat, cpustat, and cpuinfo look consistent,
>> but I really would like to know for sure.

> A complete output would be rather large, but basically:

> module = cpu
> instance = processor_id
> name = intrstat/sys/vm

> % kstat -m cpu | grep -v '^        '
> module: cpu                             instance: 0
> name:   intrstat                        class:    misc

> module: cpu                             instance: 0
> name:   sys                             class:    misc

> module: cpu                             instance: 0
> name:   vm                              class:    misc

> module: cpu                             instance: 1
> name:   intrstat                        class:    misc

> module: cpu                             instance: 1
> name:   sys                             class:    misc

> module: cpu                             instance: 1
> name:   vm                              class:    misc

> For "kstat -m cpu -n sys" exist a second structure with almost the same
> content. It is just named differently:

I know - and even more important: cpu/sys is Solaris 10 and later only,
while cpu_stat is at least Solaris 8 and later. But I need both to be
compatible with Solaris 8 and also have the features of 10 if available.

- Show quoted text -

Quote:> module = cpu_stat
> instance = processor_id
> name = cpu_stat%d          (%d = processor_id)

> % kstat -m cpu_stat|grep -v '^   '
> module: cpu_stat                        instance: 0
> name:   cpu_stat0                       class:    misc

> module: cpu_stat                        instance: 1
> name:   cpu_stat1                       class:    misc

>> Unfortunately the instances of cpu_stat are not enumerated sequentally
>> on multicore cpus which makes collecting the information a bit tricky,
>> when one consideres that a cpu could be turned off during this process.

>> Does anybody know, if there is an upper limit of instances. kstat_lookup
>> takes an int, which is a pretty long way to go, if a cpu got turned off.

> Just iterate through all cpu_stat%d entries. Or call
>    sysconf(_SC_CPUID_MAX)
> to know up to which instance number you have to iterate. Remember there
> may be holes in the processor numbering, esp. on SPARC.

Thanks! That was the one I was looking for - how could I miss it...

Cheers,
Tom

 
 
 

Solaris 10 kstat output of multicore machine

Post by Thomas Maier-Komo » Thu, 27 Apr 2006 20:11:19



> Just iterate through all cpu_stat%d entries. Or call
>    sysconf(_SC_CPUID_MAX)
> to know up to which instance number you have to iterate. Remember there
> may be holes in the processor numbering, esp. on SPARC.

And what do I do on Solaris 8? It doesn't define _SC_CPUID_MAX...

Tom

 
 
 

1. Is it possible to downgrade a Solaris 10 machine to Solaris 9?

       Hi,

as per subject line: is it possible to downgrade a machine that has been
upgraded from Solaris 9 to Solaris 10 again to Solaris 9?

We can't make Veritas NetBackup 4.5 communicate with our tape loaded
StorEdge L7 (veritas sg driver does nothing on Solaris 10) and the whole
issue with upgrading NetBackup to 5.0 that apparently supports Solaris 10
is messy and seem to require additional funds :-(

I know that on the long run we should get rid of Veritas and roll our own
backup system, but the licence came with the drive (probably paid dearly
for that 2 years ago!) and was silly not to use :-\

This is rather urgent for us since in the meantime we can't do backups of
that system...

Alternatively, does anyone has a sg driver (from
/usr/openv/volmgr/bin/driver and /usr/openv/volmgr/bin/driver/64) for
NetBackup 5.0 that _works_ with Solaris 10 which I can try? Would it work
with NBU 4.5?

Thanks and bye, Dragan

--
Dragan Cvetkovic,

To be or not to be is true. G. Boole      No it isn't.  L. E. J. Brouwer

!!! Sender/From address is bogus. Use reply-to one !!!

2. problema pppd

3. Jumpstart solaris 10 b69 and solaris 10 b72 on an Ultra 30

4. Secure Shell on OSR5

5. Live upgrade failure: Solaris 10 -> Solaris 10 update 1.

6. AH2940 kernel sources HELP ! ;-)

7. lsof 4.70D for Solaris 10 [was Re: Lsof on Solaris 10 x86?]

8. shell / awk question

9. How to redirect output from a SMF service (converted from run control script) in Solaris 10?

10. Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

11. need help setting up my solaris 10 machine as a dns server

12. How to find processor architecture in EMT64 machine with Solaris 10 ?

13. Solaris 10, Sarge und Fedora Core 3 on 1 machine