Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-12 Thread Joerg Schilling
Justin Zygmont <[EMAIL PROTECTED]> wrote: > to make use of it i'm not so clear on. I think more examples and > explanation of different threading senarios would help. for example, if I > had a shell script that had to gzip 20 files, what would be the right way, > fork > out 20 instances to g

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-12 Thread Justin Zygmont
On Wed, 10 Jan 2007, Dave Marquardt wrote: "Justin" == Justin Zygmont <[EMAIL PROTECTED]> writes: Justin> On Tue, 9 Jan 2007, Darren J Moffat wrote: Nikolay Piskun wrote: I am trying to implement in C++ something like what I get from: kstat -m cpu_info | grep core_id That isn't what I was a

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-11 Thread Darren J Moffat
Nikolay Piskun wrote: Node locking is bad for service availability. I am totally agree with you and FYI: Totalview is not license to node, it has a floating licenses and only one type of licenses is restricted by the size of the machine. Which is reasonable, I think. If you are in a disaster r

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-10 Thread Nikolay Piskun
Darren J Moffat wrote: Rich Teer wrote: On Tue, 9 Jan 2007, Darren J Moffat wrote: You do know it is trivial to have the answer faked with a simple bit of DTrace or an LD_PRELOAD library ? Users of commercial software would never resort to such tactics to reduce their licensing fees! ;-)

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-10 Thread Dave Marquardt
"Justin" == Justin Zygmont <[EMAIL PROTECTED]> writes: Justin> On Tue, 9 Jan 2007, Darren J Moffat wrote: >> Nikolay Piskun wrote: >>> I am trying to implement in C++ something like what I get from: kstat -m >>> cpu_info | grep core_id >> >> That isn't what I was asking. >> >> Once you know the

[osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-10 Thread Nikolay Piskun
To end this thread, here is a final program, that prints the value of core_id, that is unique for each core: /* Compile with cc -lkstat */ #include #include main(){ kstat_ctl_t *kc; kstat_t*kp; kstat_named_t* kn; kc = kstat_open(); for (kp = kc->kc_chain; kp != 0; kp = kp->ks_next) {

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-09 Thread Justin Zygmont
On Tue, 9 Jan 2007, Darren J Moffat wrote: Nikolay Piskun wrote: I am trying to implement in C++ something like what I get from: kstat -m cpu_info | grep core_id That isn't what I was asking. Once you know the number of cores vs threads vs sockets etc what are you planning on doing with the

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-09 Thread Rich Teer
On Tue, 9 Jan 2007, Darren J Moffat wrote: > regardless of that they will get very very annoyed at vendors that do this > type of thing when they are in a disaster recovery situation and aren't using > identical hardware with the same hostid/cores/whatever hardware tie. Joking aside, I agree. >

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-09 Thread Darren J Moffat
Rich Teer wrote: On Tue, 9 Jan 2007, Darren J Moffat wrote: You do know it is trivial to have the answer faked with a simple bit of DTrace or an LD_PRELOAD library ? Users of commercial software would never resort to such tactics to reduce their licensing fees! ;-) regardless of that they

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-09 Thread Rich Teer
On Tue, 9 Jan 2007, Darren J Moffat wrote: > You do know it is trivial to have the answer faked with a simple bit of DTrace > or an LD_PRELOAD library ? Users of commercial software would never resort to such tactics to reduce their licensing fees! ;-) -- Rich Teer, SCSA, SCNA, SCSECA, OpenSol

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-09 Thread Darren J Moffat
Nikolay Piskun wrote: I am supporting Totalview debugger on Solaris platforms and for the Enterprise License I need to find the number of cores instead of numbers of processors. I would like to thank everyone for suggestions, because of them, I have a working prototype now, that I hope will go

[osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-09 Thread Nikolay Piskun
I am supporting Totalview debugger on Solaris platforms and for the Enterprise License I need to find the number of cores instead of numbers of processors. I would like to thank everyone for suggestions, because of them, I have a working prototype now, that I hope will go to the next Totalview r

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-09 Thread Darren J Moffat
Nikolay Piskun wrote: I am trying to implement in C++ something like what I get from: kstat -m cpu_info | grep core_id That isn't what I was asking. Once you know the number of cores vs threads vs sockets etc what are you planning on doing with the information in your application ? I very v

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-08 Thread Sean McGrath - Sun Microsystems Ireland
Nikolay Piskun stated: < I am trying to implement in C++ something like what I get from: < kstat -m cpu_info | grep core_id This article gives a decent intro into using libkstat http://developers.sun.com/solaris/articles/kstatc.html < < < This message posted from opensolaris.org <

Re: [osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-08 Thread Peter Tribble
On 1/8/07, Nikolay Piskun <[EMAIL PROTECTED]> wrote: I think I am close to find the answer, but I get stuck in kstat. I am using calls to kstat but after getting cpu_info kstat I don't know how to cast it to the right structure, that gives me core_id field. Here is my code: . kstat_t *kp; if

[osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-08 Thread Nikolay Piskun
I think I am close to find the answer, but I get stuck in kstat. I am using calls to kstat but after getting cpu_info kstat I don't know how to cast it to the right structure, that gives me core_id field. Here is my code: . kstat_t *kp; if (strncmp(kp->ks_name, "cpu_info", 8) == 0) {

[osol-discuss] Re: How to find the number of cores on T1 processor

2007-01-08 Thread Nikolay Piskun
I am trying to implement in C++ something like what I get from: kstat -m cpu_info | grep core_id This message posted from opensolaris.org ___ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org