The pbind(1M) manpage spells out the circumstances when you need to be root. From the description given below, this shouldn't be necessary to be root. When I'm exploring cache behaviour for example, I routinely use processor_bind(2) to ensure my thread(s) and data are where I want them. All of this is done as an ordinary user. I do give myself cpc_cpu privilege for when I want to run cpustat, but more commonly I embed calls to libcpc functions and use only the virtual counters (e.g. cpc_bind_curlwp instead of cpc_bind_cpu).
kevin wrote: > Thanks John. > > Just now I find out "pbind" also need to be a root, and I don't have the > privilege. > > I want to check the examples on textbook about the difference between shared > L2 cache multicore cpu and private L2 cache multicore cpu. The examples are > all written for the Linux environment, but machines with > Xeon/Opteron/UltraSparc cpus available to me are all run Solaris, and I am > just a user without any privilege. -- ============================================================================ ,-_|\ Richard Smith Staff Engineer PAE / \ Sun Microsystems Phone : +61 3 9869 6200 richard.smith at Sun.COM Direct : +61 3 9869 6224 \_,-._/ 476 St Kilda Road Fax : +61 3 9869 6290 v Melbourne Vic 3004 Australia ===========================================================================