[torqueusers] pbs_statnode problem
Bas van der Vlies
basv at sara.nl
Wed Oct 6 03:58:02 MDT 2010
Just for the record i have tested this on torque version 2.4.9 and 2.4.10.
So is this the intended behaviour or must i fill in a bug report?
Regards
On 19-08-10 14:58, Bas van der Vlies wrote:
> Hello,
>
> I just encounter this in pbs_python package. Sometimes i am only
> interested in one attribute for a node. but this seems broken in torque
> version 2.4.9 (currently installed). Here is very simple C-program that
> only wants the 'status' of a node, but i get all attributes back. Is this
> the intended behaviour?:
>
> {{{
> #include<pbs_error.h>
> #include<pbs_ifl.h>
> #include<stdio.h>
>
> main()
> {
> int c;
> struct attrl *attrl_p;
> struct batch_status *batch_status_p;
> int GO;
>
> c = pbs_connect(pbs_default());
> printf("c = %d\n", c);
>
> attrl_p = malloc(sizeof(struct attrl));
> attrl_p->name = "status";
> attrl_p->next = NULL;
>
> batch_status_p = pbs_statnode(c, "", attrl_p, NULL);
> for (batch_status_p; batch_status_p->next != NULL; batch_status_p
> = batch_status_p->next)
> {
> printf("name = %s\n", batch_status_p->name);
>
> GO = 10;
> while (GO> 0)
> {
> printf("\t %s = %s\n", batch_status_p->attribs->name,
> batch_status_p->attribs->value);
> if (batch_status_p->attribs->next == NULL)
> GO = 0;
> else
> batch_status_p->attribs =
> batch_status_p->attribs->next;
>
> }
> }
> }
>
> }}}
>
> output:
> {{{
> name = gb-r35n30
> state = free
> np = 8
> properties = cores8,f_gigabit,mem24gb,q_express,q_serial,r35b,mem4gb
> ntype = cluster
> jobs = 0/4268975.batch-ng.irc.sara.nl
> status = arch=x86_64,opsys=linux,uname=Linux gb-r35n30.irc.sara.nl
> 2.6.32.17-sara1 #1 SMP Thu Aug 5 16:49:46 CEST 2010
> x86_64,sessions=10214,nsessions=1,nusers=1,idletime=931715,totmem=28738312kb,availmem=5906324kb,physmem=24738320kb,ncpus=8,loadave=5.04,gres=max_jobs:1+ideal_jobs:1,netload=60181858736,size=71641856kb:71652324kb,state=free,jobs=4268975.batch-ng.irc.sara.nl,varattr=,rectime=1282222175
> name = gb-r35n31
> state = free
> np = 8
> properties = cores8,f_gigabit,mem24gb,q_express,q_serial,r35b,mem4gb
> ntype = cluster
> jobs = 0/4268961.batch-ng.irc.sara.nl
> status = arch=x86_64,opsys=linux,uname=Linux gb-r35n31.irc.sara.nl
> 2.6.32.17-sara1 #1 SMP Thu Aug 5 16:49:46 CEST 2010
> x86_64,sessions=4973,nsessions=1,nusers=1,idletime=941860,totmem=28738312kb,availmem=5898660kb,physmem=24738320kb,ncpus=8,loadave=5.00,gres=max_jobs:1+ideal_jobs:1,netload=88954910527,size=71641856kb:71652324kb,state=free,jobs=4268961.batch-ng.irc.sara.nl,varattr=,rectime=1282222181
> ......
> }}}
>
--
********************************************************************
* Bas van der Vlies e-mail: basv at sara.nl *
* SARA - Academic Computing Services Amsterdam, The Netherlands *
********************************************************************
More information about the torqueusers
mailing list