rs_numrads failed on aix 6.1

unix

    Next

  • 1. Network config problem
    Hi, Running v. 5.3, I have en0 configured for dhcp which works ok. However, when I try to ping (or anything else) beyond the router, it can't be reached. For some reason resolv.conf shows "domain example.org" and no matter how I remove or change it (smitty, vi) it keeps showing up. BTW, on v 5.1 (other machine) same thing happens. I once managed to fix that, but very soon after it got back to the old situation and I haven't been able to set it right again. Help is appreciated. Huub
  • 2. Secure deletion of files (AIX 4.3.3)
    Hi, I have a machine running AIX 4.3.3 which needs to be returned to the company we hired it from. Problem is that we have sensitive information on the disks and hence need to clean them. I'm a little more practiced with Solaris and Linux than AIX, so I went straight for GNU Wipe - Which fails to compile and looking at questions other posed AIX 4.3.3 doesn't have have /dev/*random to see the process. I also tried fwipe, but it can't handle files of this size. Any advice/suggestions would be greatly appreciated. Si
  • 3. career in Unix
    Hi I am intersted in starting my career in Unix. Kindly someone guide me to go about it.
  • 4. Getting console login through a serial device.
    I am used to working with Cisco boxes, where you plug your console cable in your laptop, plug in the other end in the Cisco box, do: ~$ cu -l /dev/ttyS0 -s 9600 tab enter a few times - and voila - you get the console output/login prompt. It works. Now, aparently, its not that simple on a pSeries running AIX 5.2 Hardware: ~# lsattr -E -l sys0 | grep modelname modelname IBM,7029-6C3 Machine name Software: ~$ oslevel -r 5200-04 I cannot seem to reach the console and login.. I have serial ports 1, 2 and 3 and from what I can read serial 1 is replicated at the frontpanel with a rj45 connecter. I did a ~# chcons -a login=enable /dev/tty0 and rebooting, nothing... I've tried several settings, understanding that the default should be 19200 8N1, but to no avail. I do not get any output. I use a normal serial cable with rs232 connectors to connect. (either in the front panal or the rear serial port 1 (and 2 and 3 for that matter) What should I check to make sure everything is set right. So that I can get the console output on the serial ports, and do a login from there aswell? -- Sren Dideriksen
  • 5. PLM with IVM
    Hello, Does anybody run Partition Load Manager with p5 server managed with IVM ? I read that PLM is available only with HMC managed partitions. But may be it is possible to use it with IVM ? May by only in monitoring mode ? --

rs_numrads failed on aix 6.1

Postby Guanglei » Tue, 07 Sep 2010 14:41:19 GMT

A very simple application to get the # of cores. It could work before
for many years. But recently I found it failed on some machines of AIX
6.1. On some of the full partition machines, it will work. But on some
lpars, it will fail. I suspect this is an AIX bug.

#include <sys/rset.h>
int main(int argc, char *argv[])
{
        rsethandle_t rset1=NULL;
        rset1 = rs_alloc(RS_SYSTEM);
        perror("rs_alloc");
        unsigned int pcoresdl = atoi(argv[1]);
        int num_cores = rs_numrads(rset1, pcoresdl, 0); /* M312 */
        perror("rs_numrads");
        printf("num_cores:%d\n", num_cores);
}

liguangl:/u/liguangl> ./a.out 5
rs_alloc: Error 0
rs_numrads: Invalid argument
num_cores:-1

Re: rs_numrads failed on aix 6.1

Postby Guanglei » Tue, 07 Sep 2010 16:07:26 GMT


> rset1 = rs_alloc(RS_SY>TEM);
> perror("r>_alloc");
> unsigned int pcoresdl = >toi(argv[1]);
> int num_cores = rs_numrads(rset1, pcores>l, 0); /* M312 */
> gt;perror("rs_numrads");
> printf("nu>_c>res:>d\>", num_cores);
>
> >
>
> ligua>gl:/u/liguangl> ./a.>ut 5
> rs_alloc: Error 0
> rs>numrads: Invalid argument
> num_cores:-1

I found on the full partition machine, the valid sdl level is 0-6, and
5 corresponds to the physical cores.
But on the lpar, I found the sdl level is 0-2.
The question is, how could I know the sdl level of num_cores for a
machine?

Re: rs_numrads failed on aix 6.1

Postby sjm » Tue, 07 Sep 2010 19:05:31 GMT




> > rsethandle_t rset1=NUL>;>
> > rset1 = rs_alloc(RS_SY>T>M);
> > perror("r>_>lloc");
> > unsigned int pcoresdl = >t>i(argv[1]);
> > int num_cores = rs_numrads(rset1, pcores>l> 0); /* M312 */
> > gt;p>rror("rs_numrads");
> > printf("nu>_c>r>s:%d>n"> >um_cores);
>
> > }
>>
> > ligua>g>:/u/liguangl> ./a.ou> >
> > rs_alloc: Error 0
> > rs>n>mrads: Invalid >rg>ment
> > num_cores:-1
>
> I found on the full partition machine, the v>lid sdl level is 0-6, and
> 5 correspo>ds to the physical cores.
> But on the lpar, I f>und the sdl level is 0-2.
> The question is, how could I know the sd> level of num_cores for a
> machine?

Looking in the documentation for these routines online at suggests
that you query the maximum system detail level in some manner, for
example:

printf("rs_getinfo(0, R_MAXSDL, 0)=%d\n",rs_getinfo(0, R_MAXSDL, 0));

The doco is here:

 http://www.**--****.com/ 

Re: rs_numrads failed on aix 6.1

Postby Guanglei » Thu, 09 Sep 2010 12:40:03 GMT





> > > rsethandle_t rset1=NUL>;>
> > > rset1 = rs_alloc(RS_SY>T>M>;
> > > perror("r>_>l>oc");
> > > unsigned int pcoresdl = >t>i>argv[1]);
> > > int num_cores = rs_numrads(rset1, pcores>l> >); /* M312 */
> > > gt;p>r>or("rs_numrads");
> > > printf("nu>_c>r>s>%d\n>, >u>_>ores);
>
> > > }
>>
> > > ligua>g>:>u/liguangl> ./a.out >
>>>> > rs_alloc: Error 0
> > > rs>n>m>ads: Invalid ar>um>n>
> > > num_cores:-1
>
> > I found on the full partition machine, the v>l>d sdl level is 0-6, and
> > 5 correspo>d> to the physical cores.
> > But on the lpar, I f>u>d the sdl level is 0-2.
> > The question is, how could I know the sd> >evel of num>co>es for a
> > machine?
>
> Looking in the documentation for these r>utines online at suggests
> that you query the maximum system detail>level in so>e >anner, for
> example:
>
> printf("rs_getinfo(0, R_MAXSDL, 0)=%d\n",rs>ge>info(0, R_MAXSDL, 0)>;
>>
> The doco is here:
>
>  http://www.**--****.com/ 

R_MAXSDL is 2 on my machine.
My machine is a lpar, with 4 virtial CPUs.  The following calls:
rs_numrads(rset1, 0, 0);
rs_numrads(rset1, 1, 0);
rs_numrads(rset1, 2, 0);
will return 1, 1, 9 respectively.  But it's obvious that none of them
corresponds to number of cpu cores.

Is it possible a rs_numrads bug?

Re: rs_numrads failed on aix 6.1

Postby sjm » Fri, 10 Sep 2010 01:34:15 GMT






> > > > rsethandle_t rset1=NUL>;>
> > > > rset1 = rs_alloc(RS_SY>T>M>;>
> > > > perror("r>_>l>o>");
> > > > unsigned int pcoresdl = >t>i>a>gv[1]);
> > > > int num_cores = rs_numrads(rset1, pcores>l> >)> /* M312 */
> > > > gt;p>r>o>("rs_numrads");
> > > > printf("nu>_c>r>s>%>\n",>nu>_>o>e>);
>
> > > > }
>
> > > > rs>n>m>a>s: Invalid argu>en>
>>>> > > num_cores:-1
>
> > > I found on the full partition machine, the v>l>d>sdl level is 0-6, and
> > > 5 correspo>d> >o the physical cores.
> > > But on the lpar, I f>u>d>the sdl level is 0-2.
> > > The question is, how could I know the sd> >e>el of num_c>re> >or a
> > > machine?
>
> > Looking in the documentation for these r>u>ines online at suggests
> > that you query the maximum system detail>l>vel in some>ma>n>r, for
> > example:
>
> > printf("rs_getinfo(0, R_MAXSDL, 0)=%d\n",rs>ge>i>fo(0, R_MAXSDL, 0));>
>>
> > The doco is here:
>
> > http://www.**--****.com/ ;r1>topic/com.ibm.aix.b...
>
> R_>AXSDL is 2 on my machine.
> My machine is a lpar, with 4 virtial C>Us. he following calls:
> will return 1, 1, 9 respectively. ut it's>obvious that none of them
> correspon>s >o number of cpu cores.
>
> Is it possible a rs_numrads bug?

The documentation is not clear on what would be expected on your
machine. But in any case, the resource scheduling routines may not be
what you're after. The supported way to get information like the
number of CPUs is via perfstat_cpu_total(). Take a look here:

 http://www.**--****.com/ 


Return to unix

 

Who is online

Users browsing this forum: No registered users and 73 guest