On Mon, 2008-12-01 at 17:56 -0500, Daniel Gruner wrote:
> On 12/1/08, Abhishek Kulkarni <[EMAIL PROTECTED]> wrote:
> >
> > On Thu, 2008-11-27 at 11:20 -0500, Daniel Gruner wrote:
> > > The latest version (739) does not work properly. For example, any
> > > time I tried to run something it would just hang, irrespective of
> > > whether I did "xrx -a date", or "xrx -l n0000 /sbin/reboot".
> >
> >
> > I tested r739 before committing and it works fine for me. Can you
> > provide some more details? Possibly a trace. And what hangs?
>
> Well, with the latest version (740), I can do xrx to individual nodes,
> properly,
> but "xrx -a" hangs. By this I mean it just hangs... until I kill it
> with ctrl-C.
>
> Also, I still get the infinite loop with "xuserset add n0000 -u".
the xuserset fix was not committed as of r740. it got stalled in the ack
pipeline.
>
> Here is the debugging output from "xrx -a date":
>
> [EMAIL PROTECTED] xcpu]# xrx -d -a date
> <<<-- (0x61f220) Tversion tag 65535 msize 32792 version '9P2000.u'
> -->>> (0x61f220) Rversion tag 65535 msize 8216 version '9P2000.u'
> <<<-- (0x61f220) Tattach tag 0 fid 0 afid -1 uname root aname nuname 0
> -->>> (0x61f220) Rattach tag 0 qid (0000000000000001 0 'd')
> connection 0x61f220 to 127.0.0.1 opened
> <<<-- (0x61f220) Twalk tag 0 fid 0 newfid 1 nwname 1 'state'
> -->>> (0x61f220) Rwalk tag 0 nwqid 1 (0000000000000002 0 '')
> <<<-- (0x61f220) Topen tag 0 fid 1 mode 0
> -->>> (0x61f220) Ropen tag 0 (0000000000000002 0 '') iounit 0
> <<<-- (0x61f220) Tread tag 0 fid 1 offset 0 count 8191
> -->>> (0x61f220) Rread tag 0 count 90 data 6e303030 30097463 70213130
> 2e31302e 302e3130 21363636 37092f4c 696e7578
> 2f783836 5f363409 75700930 0a6e3030 30310974 63702131 302e3130 2e302e31
>
>
> <<<-- (0x61f220) Tread tag 0 fid 1 offset 90 count 8101
> -->>> (0x61f220) Rread tag 0 count 0 data
>
> <<<-- (0x61f220) Tread tag 0 fid 1 offset 90 count 8191
> -->>> (0x61f220) Rread tag 0 count 0 data
>
> <<<-- (0x61f220) Tclunk tag 0 fid 1
> -->>> (0x61f220) Rclunk tag 0
> <<<-- (0x61f2e0) Tversion tag 65535 msize 32792 version '9P2000.u'
> -->>> (0x61f2e0) Rversion tag 65535 msize 32792 version '9P2000.u'
> <<<-- (0x61f2e0) Tauth tag 0 afid 0 uname root aname nuname 0
> -->>> (0x61f2e0) Rauth tag 0 qid (0000000000000000 0 'A')
> <<<-- (0x61f2e0) Tread tag 0 fid 0 offset 0 count 4096
> -->>> (0x61f2e0) Rread tag 0 count 16 data aa4d6553 ce86b205 7cc011bd 287f1921
>
> <<<-- (0x61f2e0) Tread tag 0 fid 0 offset 16 count 4080
> -->>> (0x61f2e0) Rread tag 0 count 0 data
>
> <<<-- (0x61f2e0) Twrite tag 0 fid 0 offset 0 count 256 data b5eb8c78
> 5fe427e5 77bd9eb5 10d406e2 7d3d1a5e 45b8e2c1 d0d1a5e3 23b345f3
> a9fb0b69 6ae199fa bbbff712 595f584a 7b4f150d ac996f25 a3913a4b f47dc9f1
>
>
> -->>> (0x61f2e0) Rwrite tag 0 count 256
> <<<-- (0x61f2e0) Tattach tag 0 fid 1 afid 0 uname root aname nuname 0
> -->>> (0x61f2e0) Rattach tag 0 qid (0000000000000001 0 'd')
> connection 0x61f2e0 to 10.10.0.10 opened
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 2 nwname 1 'arch'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 1 (0000000000000004 0 '')
> <<<-- (0x61f2e0) Topen tag 0 fid 2 mode 0
> -->>> (0x61f2e0) Ropen tag 0 (0000000000000004 0 '') iounit 0
> <<<-- (0x61f2e0) Tread tag 0 fid 2 offset 0 count 63
> -->>> (0x61f2e0) Rread tag 0 count 13 data 2f4c696e 75782f78 38365f36 34
>
> <<<-- (0x61f2e0) Tread tag 0 fid 2 offset 13 count 50
> -->>> (0x61f2e0) Rread tag 0 count 0 data
>
> <<<-- (0x61f2e0) Tclunk tag 0 fid 2
> -->>> (0x61f2e0) Rclunk tag 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 2 nwname 1 'clone'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 1 (0000000000000002 0 '')
> <<<-- (0x61f2e0) Topen tag 0 fid 2 mode 0
> -->>> (0x61f2e0) Ropen tag 0 (0000000000000002 0 '') iounit 0
> <<<-- (0x61f2e0) Tread tag 0 fid 2 offset 0 count 63
> -->>> (0x61f2e0) Rread tag 0 count 1 data 33
>
> <<<-- (0x61f2e0) Tread tag 0 fid 2 offset 1 count 62
> -->>> (0x61f2e0) Rread tag 0 count 0 data
>
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 3 nwname 2 '3' 'ctl'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000001 0 '')
> <<<-- (0x61f2e0) Topen tag 0 fid 3 mode 1
> -->>> (0x61f2e0) Ropen tag 0 (0000000004000001 0 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 4 nwname 2 '3' 'wait'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000009 0 '')
> <<<-- (0x61f2e0) Topen tag 0 fid 4 mode 0
> -->>> (0x61f2e0) Ropen tag 0 (0000000004000009 0 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 5 nwname 2 '3' 'stdin'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000005 0 '')
> <<<-- (0x61f2e0) Topen tag 0 fid 5 mode 1
> -->>> (0x61f2e0) Ropen tag 0 (0000000004000005 0 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 6 nwname 2 '3' 'stdout'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000006 0 '')
> <<<-- (0x61f2e0) Topen tag 0 fid 6 mode 0
> -->>> (0x61f2e0) Ropen tag 0 (0000000004000006 0 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 7 nwname 2 '3' 'stderr'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000007 0 '')
> <<<-- (0x61f2e0) Topen tag 0 fid 7 mode 0
> -->>> (0x61f2e0) Ropen tag 0 (0000000004000007 0 '') iounit 0
> <<<-- (0x61f2e0) Tclunk tag 0 fid 2
> -->>> (0x61f2e0) Rclunk tag 0
> <<<-- (0x6251a0) Tversion tag 65535 msize 32792 version '9P2000.u'
> -->>> (0x6251a0) Rversion tag 65535 msize 32792 version '9P2000.u'
> <<<-- (0x6251a0) Tauth tag 0 afid 0 uname root aname nuname 0
> -->>> (0x6251a0) Rauth tag 0 qid (0000000000000000 0 'A')
> <<<-- (0x6251a0) Tread tag 0 fid 0 offset 0 count 4096
> -->>> (0x6251a0) Rread tag 0 count 16 data 53c2d5e8 532ebac8 b0a070b2 ce6cee3a
>
> <<<-- (0x6251a0) Tread tag 0 fid 0 offset 16 count 4080
> -->>> (0x6251a0) Rread tag 0 count 0 data
>
> <<<-- (0x6251a0) Twrite tag 0 fid 0 offset 0 count 256 data 8bed7bd1
> 94f1715c fbe85134 082b7308 49b53ccd cd5d5a9f cf501535 92cf6f78
> 1a552358 92cdd21f 82b1dc9d 13e00298 33c61985 a255597f 599e60e6 12023565
>
>
> -->>> (0x6251a0) Rwrite tag 0 count 256
> <<<-- (0x6251a0) Tattach tag 0 fid 1 afid 0 uname root aname nuname 0
> -->>> (0x6251a0) Rattach tag 0 qid (0000000000000001 0 'd')
> connection 0x6251a0 to 10.10.0.11 opened
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 2 nwname 1 'arch'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 1 (0000000000000004 0 '')
> <<<-- (0x6251a0) Topen tag 0 fid 2 mode 0
> -->>> (0x6251a0) Ropen tag 0 (0000000000000004 0 '') iounit 0
> <<<-- (0x6251a0) Tread tag 0 fid 2 offset 0 count 63
> -->>> (0x6251a0) Rread tag 0 count 13 data 2f4c696e 75782f78 38365f36 34
>
> <<<-- (0x6251a0) Tread tag 0 fid 2 offset 13 count 50
> -->>> (0x6251a0) Rread tag 0 count 0 data
>
> <<<-- (0x6251a0) Tclunk tag 0 fid 2
> -->>> (0x6251a0) Rclunk tag 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 2 nwname 1 'clone'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 1 (0000000000000002 0 '')
> <<<-- (0x6251a0) Topen tag 0 fid 2 mode 0
> -->>> (0x6251a0) Ropen tag 0 (0000000000000002 0 '') iounit 0
> <<<-- (0x6251a0) Tread tag 0 fid 2 offset 0 count 63
> -->>> (0x6251a0) Rread tag 0 count 1 data 33
>
> <<<-- (0x6251a0) Tread tag 0 fid 2 offset 1 count 62
> -->>> (0x6251a0) Rread tag 0 count 0 data
>
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 3 nwname 2 '3' 'ctl'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000001 0 '')
> <<<-- (0x6251a0) Topen tag 0 fid 3 mode 1
> -->>> (0x6251a0) Ropen tag 0 (0000000004000001 0 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 4 nwname 2 '3' 'wait'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000009 0 '')
> <<<-- (0x6251a0) Topen tag 0 fid 4 mode 0
> -->>> (0x6251a0) Ropen tag 0 (0000000004000009 0 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 5 nwname 2 '3' 'stdin'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000005 0 '')
> <<<-- (0x6251a0) Topen tag 0 fid 5 mode 1
> -->>> (0x6251a0) Ropen tag 0 (0000000004000005 0 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 6 nwname 2 '3' 'stdout'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000006 0 '')
> <<<-- (0x6251a0) Topen tag 0 fid 6 mode 0
> -->>> (0x6251a0) Ropen tag 0 (0000000004000006 0 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 7 nwname 2 '3' 'stderr'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000007 0 '')
> <<<-- (0x6251a0) Topen tag 0 fid 7 mode 0
> -->>> (0x6251a0) Ropen tag 0 (0000000004000007 0 '') iounit 0
> <<<-- (0x6251a0) Tclunk tag 0 fid 2
> -->>> (0x6251a0) Rclunk tag 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 2 nwname 2 '3' 'argv'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000003 0 '')
> <<<-- (0x61f2e0) Topen tag 0 fid 2 mode 17
> -->>> (0x61f2e0) Ropen tag 0 (0000000004000003 0 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 8 nwname 2 '3' 'fs'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 49347702 'd')
> <<<-- (0x61f2e0) Tcreate tag 0 fid 8 name date perm 755 mode 1 ext
> -->>> (0x61f2e0) Rcreate tag 0 (0000000000000000 49347702 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 9 nwname 2 '3' 'fs'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 49347702 'd')
> <<<-- (0x61f2e0) Tcreate tag 0 fid 9 name librt.so.1 perm 755 mode 1 ext
> -->>> (0x61f2e0) Rcreate tag 0 (0000000000000000 49347702 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 10 nwname 2 '3' 'fs'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 49347702 'd')
> <<<-- (0x61f2e0) Tcreate tag 0 fid 10 name libc.so.6 perm 755 mode 1 ext
> -->>> (0x61f2e0) Rcreate tag 0 (0000000000000000 49347702 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 11 nwname 2 '3' 'fs'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 49347702 'd')
> <<<-- (0x61f2e0) Tcreate tag 0 fid 11 name libpthread.so.0 perm 755 mode 1 ext
> -->>> (0x61f2e0) Rcreate tag 0 (0000000000000000 49347702 '') iounit 0
> <<<-- (0x61f2e0) Twalk tag 0 fid 1 newfid 12 nwname 2 '3' 'fs'
> -->>> (0x61f2e0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 49347702 'd')
> <<<-- (0x61f2e0) Tcreate tag 0 fid 12 name ld-linux-x86-64.so.2 perm
> 755 mode 1 ext
> -->>> (0x61f2e0) Rcreate tag 0 (0000000000000000 49347702 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 2 nwname 2 '3' 'argv'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000004000003 0 '')
> <<<-- (0x6251a0) Topen tag 0 fid 2 mode 17
> -->>> (0x6251a0) Ropen tag 0 (0000000004000003 0 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 8 nwname 2 '3' 'fs'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 493468c7 'd')
> <<<-- (0x6251a0) Tcreate tag 0 fid 8 name date perm 755 mode 1 ext
> -->>> (0x6251a0) Rcreate tag 0 (0000000000000000 493468c7 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 9 nwname 2 '3' 'fs'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 493468c7 'd')
> <<<-- (0x6251a0) Tcreate tag 0 fid 9 name librt.so.1 perm 755 mode 1 ext
> -->>> (0x6251a0) Rcreate tag 0 (0000000000000000 493468c7 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 10 nwname 2 '3' 'fs'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 493468c7 'd')
> <<<-- (0x6251a0) Tcreate tag 0 fid 10 name libc.so.6 perm 755 mode 1 ext
> -->>> (0x6251a0) Rcreate tag 0 (0000000000000000 493468c7 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 11 nwname 2 '3' 'fs'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 493468c7 'd')
> <<<-- (0x6251a0) Tcreate tag 0 fid 11 name libpthread.so.0 perm 755 mode 1 ext
> -->>> (0x6251a0) Rcreate tag 0 (0000000000000000 493468c7 '') iounit 0
> <<<-- (0x6251a0) Twalk tag 0 fid 1 newfid 12 nwname 2 '3' 'fs'
> -->>> (0x6251a0) Rwalk tag 0 nwqid 2 (0000000004000000 0 'd')
> (0000000000000000 493468c7 'd')
> <<<-- (0x6251a0) Tcreate tag 0 fid 12 name ld-linux-x86-64.so.2 perm
> 755 mode 1 ext
> -->>> (0x6251a0) Rcreate tag 0 (0000000000000000 493468c7 '') iounit 0
> ^C
> [EMAIL PROTECTED] xcpu]#
>
i will try to look into this shortly, thanks.
>
> Daniel
>
>
>
>
>
> >
> >
> > > I had to
> > > hard-reboot the nodes and go back to the reasonably stable version
> > > 724. Also the problem with the infinite loop in xuserset, for which
> > > Abhishek sent me a patch, did not make it into the repository.
> > >
> > > May I suggest that versions get checked into the repository only after
> > > some more stringent testing?
> > >
> >
> >
> > One of the motivating reasons for moving the base to sourceforge was
> > that we could have a more traditional development model with incremental
> > tagged repository versions and periodic file releases so that
> > third-party vendors using XCPU know when to pull.
> >
> > I had recently posted a 'caveat emptor' on the mailing list about the
> > recent changes to merge sxcpu spfs/npfs with the sourceforge spfs/npfs.
> > This, and the changes to libxcpu over the last few days, were necessary
> > to ease out the integration of xcpu with other tools.
> >
> > I have not been able to reproduce any obvious errors with the recent SVN
> > revision. I would appreciate any further details you could provide.
> >
> >
> > -- Abhishek
> >
> >
> > > Daniel
> > >
> > > On 11/26/08, Abhishek Kulkarni <[EMAIL PROTECTED]> wrote:
> > > >
> > > > xk and xps use the xp_defaultuser() function of libxcpu to get the
> > admin
> > > > user and key.
> > > >
> > > > for xk, it first tries as xcpu-admin and if that fails as the user
> > > > itself. xps works for all.
> > > >
> > > > Signed-off-by: Abhishek Kulkarni <[EMAIL PROTECTED]>
> > > >
> > > > Index: utils/xk.c
> > > > ===================================================================
> > > > --- utils/xk.c (revision 739)
> > > > +++ utils/xk.c (working copy)
> > > > @@ -50,54 +50,9 @@
> > > >
> > > > extern int spc_chatty;
> > > >
> > > > -static Spuser *user;
> > > > -static Xkey *ukey;
> > > > -static char *afname;
> > > > -
> > > > -static int
> > > > -init_user(void)
> > > > -{
> > > > - char *homepath, keypath[128];
> > > > - int xcpu_uid;
> > > > - struct passwd *xcpu_admin;
> > > > - Spuserpool *upool;
> > > > -
> > > > -
> > > > - if (!afname)
> > > > - ukey = xauth_privkey_create("/etc/xcpu/admin_key");
> > > > - else
> > > > - ukey = xauth_privkey_create(afname);
> > > > -
> > > > - if (ukey) {
> > > > - upool = sp_priv_userpool_create();
> > > > - xcpu_admin = getpwnam("xcpu-admin");
> > > > - if (xcpu_admin)
> > > > - xcpu_uid = xcpu_admin->pw_uid;
> > > > - else
> > > > - xcpu_uid = 65530;
> > > > -
> > > > - user = sp_priv_user_add(upool, "xcpu-admin",
> > xcpu_uid, ukey);
> > > > - if (!user)
> > > > - return -1;
> > > > - }
> > > > -
> > > > - else {
> > > > - user = sp_unix_users->uid2user(sp_unix_users,
> > geteuid());
> > > > - if (!user)
> > > > - return -1;
> > > > - homepath = getenv("HOME");
> > > > - snprintf(keypath, sizeof(keypath), "%s/.ssh/id_rsa",
> > homepath);
> > > > - ukey = xauth_privkey_create(keypath);
> > > > - if (!ukey)
> > > > - return -1;
> > > > - }
> > > > -
> > > > - return 0;
> > > > -}
> > > > -
> > > > void
> > > > usage(char *argv) {
> > > > - fprintf(stderr, "usage: %s [-dhjm] [-a adminkey] sig
> > host:<pid|jid>
> > > > [host:<pid|jid> ...]\n", argv);
> > > > + fprintf(stderr, "usage: %s [-dhjm] [-A adminkey] sig
> > host:<pid|jid>
> > > > [host:<pid|jid> ...]\n", argv);
> > > > exit(1);
> > > > }
> > > >
> > > > @@ -112,9 +67,11 @@
> > > > Xpproc *procs, *xp;
> > > > char *s;
> > > > char statserver[32];
> > > > + static Spuser *auser;
> > > > + static Xkey *akey;
> > > > + static char *adminkey = NULL;
> > > >
> > > > - afname = 0;
> > > > - while ((c = getopt(argc, argv, "+dhja:m")) != -1) {
> > > > + while ((c = getopt(argc, argv, "+dhjA:m")) != -1) {
> > > > switch (c) {
> > > > case 'd':
> > > > spc_chatty = 1;
> > > > @@ -122,8 +79,8 @@
> > > > case 'j':
> > > > killjob++;
> > > > break;
> > > > - case 'a':
> > > > - afname = optarg;
> > > > + case 'A':
> > > > + adminkey = strdup(optarg);
> > > > break;
> > > > case 'm':
> > > > match = 1;
> > > > @@ -142,11 +99,19 @@
> > > > fprintf(stderr, "bad signal argument %s: expected int",
> > > > argv[optind-1]);
> > > > usage(argv[0]);
> > > > }
> > > > -
> > > > -
> > > > - if (init_user() < 0)
> > > > - goto error;
> > > >
> > > > + if (adminkey) {
> > > > + akey = xauth_privkey_create(adminkey);
> > > > + if (!akey)
> > > > + goto error;
> > > > + }
> > > > +
> > > > + if (xp_defaultuser(&auser, &akey) < 0) {
> > > > + if (akey)
> > > > + xauth_destroy(akey);
> > > > + goto error;
> > > > + }
> > > > +
> > > > for(;optind < argc; optind++) {
> > > > int isjid = 0;
> > > > int pid = -1;
> > > > @@ -178,7 +143,7 @@
> > > > }
> > > > }
> > > >
> > > > - n = xp_proc_list(ns, user, ukey, &procs);
> > > > + n = xp_proc_list(ns, auser, akey, &procs);
> > > > if (n < 0) {
> > > > fprintf(stderr, "can not obtain process list
> > for nodeset %s;
> > > > skipping\n", argv[optind]);
> > > > continue;
> > > > @@ -191,20 +156,20 @@
> > > > if(isjid || match) {
> > > > if (xp->xcpujid) {
> > > > if(!match &&
> > !strcmp(xp->xcpujid, id))
> > > > - xp_proc_kill(xp,
> > user, ukey, signal);
> > > > + xp_proc_kill(xp,
> > auser, akey, signal);
> > > > else if(match) {
> > > > tmpjid =
> > malloc(strlen(xp->xcpujid) + 1);
> > > > strcpy(tmpjid,
> > xp->xcpujid);
> > > > slash = strchr(tmpjid,
> > '/');
> > > > *slash = '\0';
> > > > if (!strcmp(tmpjid,
> > id))
> > > > -
> > xp_proc_kill(xp, user, ukey, signal);
> > > > +
> > xp_proc_kill(xp, auser, akey, signal);
> > > > free(tmpjid);
> > > > }
> > > > }
> > > > } else {
> > > > if(xp->pid == pid)
> > > > - xp_proc_kill(xp, user, ukey,
> > signal);
> > > > + xp_proc_kill(xp, auser, akey,
> > signal);
> > > > }
> > > > }
> > > > }
> > > > Index: utils/xps.c
> > > > ===================================================================
> > > > --- utils/xps.c (revision 739)
> > > > +++ utils/xps.c (working copy)
> > > > @@ -48,29 +48,9 @@
> > > > static void printpinfo(Xpproc *xp, char *stat);
> > > >
> > > > extern int spc_chatty;
> > > > -static Spuser *user;
> > > > -static Xkey *ukey;
> > > >
> > > > -static int
> > > > -init_user(void)
> > > > -{
> > > > - char *homepath, keypath[128];
> > > > -
> > > > - user = sp_unix_users->uid2user(sp_unix_users, geteuid());
> > > > - if (!user)
> > > > - return -1;
> > > > -
> > > > - homepath = getenv("HOME");
> > > > - snprintf(keypath, sizeof(keypath), "%s/.ssh/id_rsa",
> > homepath);
> > > > - ukey = xauth_privkey_create(keypath);
> > > > - if (!ukey)
> > > > - return -1;
> > > > -
> > > > - return 0;
> > > > -}
> > > > -
> > > > void usage() {
> > > > - fprintf(stderr, "usage: xps [-dax] [-J JobId] host,...\n");
> > > > + fprintf(stderr, "usage: xps [-dax] [-p port] [-J JobId]
> > host,...\n");
> > > > exit(1);
> > > > }
> > > >
> > > > @@ -80,16 +60,18 @@
> > > > int i, n, c, jlen, ecode;
> > > > int min, sec, allflag = 0;
> > > > long long int t;
> > > > - int xonly = 0;
> > > > - char *ename, buf[256], *jobid;
> > > > + int xonly = 0, port = STAT_PORT;
> > > > + char *ename, buf[256], *jobid, *end;
> > > > Xpnodeset *nds, *nds2;
> > > > Xpproc *procs, *xp;
> > > > char stat[32];
> > > > char tim[64];
> > > > + static Spuser *auser;
> > > > + static Xkey *akey;
> > > >
> > > > jlen = 0;
> > > > jobid = NULL;
> > > > - while ((c = getopt(argc, argv, "+daxJ:")) != -1) {
> > > > + while ((c = getopt(argc, argv, "+daxp:J:h")) != -1) {
> > > > switch (c) {
> > > > case 'd':
> > > > spc_chatty = 1;
> > > > @@ -113,6 +95,12 @@
> > > > xonly = 1;
> > > > break;
> > > >
> > > > + case 'p':
> > > > + port = strtol(optarg, &end, 10);
> > > > + if (*end != '\0')
> > > > + usage(argv[0]);
> > > > + break;
> > > > + case 'h':
> > > > default:
> > > > usage();
> > > > }
> > > > @@ -120,7 +108,7 @@
> > > >
> > > > if (allflag) {
> > > > char statserver[32];
> > > > - sprintf(statserver, "localhost!%d", STAT_PORT);
> > > > + sprintf(statserver, "localhost!%d", port);
> > > > nds = xp_nodeset_list(NULL);
> > > > if(nds == NULL)
> > > > nds = xp_nodeset_list(statserver);
> > > > @@ -145,13 +133,12 @@
> > > > if (!nds)
> > > > goto error;
> > > >
> > > > - if (init_user() < 0)
> > > > + if (xp_defaultuser(&auser, &akey) < 0)
> > > > goto error;
> > > >
> > > > - n = xp_proc_list(nds, user, ukey, &procs);
> > > > + n = xp_proc_list(nds, auser, akey, &procs);
> > > > if (n < 0)
> > > > goto error;
> > > > -
> > > >
> > > > printf("NODE\tPID\tTTY\tSTAT\tTIME\tJOBID\tCOMMAND\n");
> > > > for(i = 0; i < n; i++) {
> > > >
> > > >
> > > >
> >
> >