Mario Charest
04/06/2009 4:19 PM
post26136
|
I'm trying to find the pid/nid of a process from its name registered with name_attach(). It's the nid I'm having
trouble with.
|
|
|
Colin Burgess(deleted)
04/06/2009 4:22 PM
post26138
|
Can you call ConnectServerInfo on the coid?
Mario Charest wrote:
> I'm trying to find the pid/nid of a process from its name registered with name_attach(). It's the nid I'm having
trouble with.
>
>
>
>
>
>
>
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26136
>
--
cburgess@qnx.com
|
|
|
Mario Charest
04/06/2009 4:34 PM
post26142
|
Hum not sure, the idea is it's possible the process is stuck in a loop, it's my understanding that a name_open() will
not work, since it wouldn't be able to handle the IO_CONNECT message. My goal is to kill (SIGKILL) processes that
haven't respond to our normal termination method, I cannot assume they are in a sane state.
> -----Original Message-----
> From: Colin Burgess [mailto:community-noreply@qnx.com]
> Sent: April-06-09 4:23 PM
> To: technology-networking
> Subject: Re: pid/nid from name
>
> Can you call ConnectServerInfo on the coid?
>
> Mario Charest wrote:
> > I'm trying to find the pid/nid of a process from its name registered
> with name_attach(). It's the nid I'm having trouble with.
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Technology
> > http://community.qnx.com/sf/go/post26136
> >
>
> --
> cburgess@qnx.com
>
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26138
>
|
|
|
Xiaodan Tang(deleted)
04/06/2009 4:38 PM
post26144
|
Try the back door then :)
/proc/mount/dev/name/[global|local]/<your_registered_name>/<node>,<pid>,
<chid>,<ftype>,<handle>
-xtang
> -----Original Message-----
> From: Mario Charest [mailto:community-noreply@qnx.com]
> Sent: April 6, 2009 4:35 PM
> To: technology-networking
> Subject: RE: pid/nid from name
>
> Hum not sure, the idea is it's possible the process is stuck in a
loop,
> it's my understanding that a name_open() will not work, since it
wouldn't
> be able to handle the IO_CONNECT message. My goal is to kill
(SIGKILL)
> processes that haven't respond to our normal termination method, I
cannot
> assume they are in a sane state.
>
> > -----Original Message-----
> > From: Colin Burgess [mailto:community-noreply@qnx.com]
> > Sent: April-06-09 4:23 PM
> > To: technology-networking
> > Subject: Re: pid/nid from name
> >
> > Can you call ConnectServerInfo on the coid?
> >
> > Mario Charest wrote:
> > > I'm trying to find the pid/nid of a process from its name
registered
> > with name_attach(). It's the nid I'm having trouble with.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Technology
> > > http://community.qnx.com/sf/go/post26136
> > >
> >
> > --
> > cburgess@qnx.com
> >
> > _______________________________________________
> > Technology
> > http://community.qnx.com/sf/go/post26138
> >
>
>
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26142
|
|
|
Mario Charest
04/06/2009 4:47 PM
post26145
|
> -----Original Message-----
> From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> Sent: April-06-09 4:39 PM
> To: technology-networking
> Subject: RE: pid/nid from name
>
> Try the back door then :)
>
> /proc/mount/dev/name/[global|local]/<your_registered_name>/<node>,<pid>
> ,
> <chid>,<ftype>,<handle>
There doesn't seem to be anything under /proc/mount/dev/name/global but the info on gns
I tried it under /dev/name/global, but the <node> field can be 0 in some cases depending on the relationship between
the location of the program and the location of the gns server, at least that is what I observed.
>
> -xtang
>
>
> > -----Original Message-----
> > From: Mario Charest [mailto:community-noreply@qnx.com]
> > Sent: April 6, 2009 4:35 PM
> > To: technology-networking
> > Subject: RE: pid/nid from name
> >
> > Hum not sure, the idea is it's possible the process is stuck in a
> loop,
> > it's my understanding that a name_open() will not work, since it
> wouldn't
> > be able to handle the IO_CONNECT message. My goal is to kill
> (SIGKILL)
> > processes that haven't respond to our normal termination method, I
> cannot
> > assume they are in a sane state.
> >
> > > -----Original Message-----
> > > From: Colin Burgess [mailto:community-noreply@qnx.com]
> > > Sent: April-06-09 4:23 PM
> > > To: technology-networking
> > > Subject: Re: pid/nid from name
> > >
> > > Can you call ConnectServerInfo on the coid?
> > >
> > > Mario Charest wrote:
> > > > I'm trying to find the pid/nid of a process from its name
> registered
> > > with name_attach(). It's the nid I'm having trouble with.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Technology
> > > > http://community.qnx.com/sf/go/post26136
> > > >
> > >
> > > --
> > > cburgess@qnx.com
> > >
> > > _______________________________________________
> > > Technology
> > > http://community.qnx.com/sf/go/post26138
> > >
> >
> >
> > _______________________________________________
> > Technology
> > http://community.qnx.com/sf/go/post26142
>
>
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26144
>
|
|
|
Xiaodan Tang(deleted)
04/06/2009 4:52 PM
post26148
|
There is GNS! :)
The nid always valid to whoever is looking at it.
If on node A, you have a name. AND, from same node, you do "ls", you
should see nid = 0; but if you goes to node B, and do "ls
/net/nodeA/dev/name/...", you see a nid which won't be 0 (nodeA'd nid on
B).
Not sure this is clear enough. :)
Anyway, which ever machine you are on, you should always be able to
ConnectAttach(nid, pid, chid, ..) that returns back to you.
-xtang
> -----Original Message-----
> From: Mario Charest [mailto:community-noreply@qnx.com]
> Sent: April 6, 2009 4:47 PM
> To: technology-networking
> Subject: RE: pid/nid from name
>
> > -----Original Message-----
> > From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> > Sent: April-06-09 4:39 PM
> > To: technology-networking
> > Subject: RE: pid/nid from name
> >
> > Try the back door then :)
> >
> >
/proc/mount/dev/name/[global|local]/<your_registered_name>/<node>,<pid>
> > ,
> > <chid>,<ftype>,<handle>
>
> There doesn't seem to be anything under /proc/mount/dev/name/global
but
> the info on gns
>
> I tried it under /dev/name/global, but the <node> field can be 0 in
some
> cases depending on the relationship between the location of the
program
> and the location of the gns server, at least that is what I observed.
>
> >
> > -xtang
> >
> >
> > > -----Original Message-----
> > > From: Mario Charest [mailto:community-noreply@qnx.com]
> > > Sent: April 6, 2009 4:35 PM
> > > To: technology-networking
> > > Subject: RE: pid/nid from name
> > >
> > > Hum not sure, the idea is it's possible the process is stuck in a
> > loop,
> > > it's my understanding that a name_open() will not work, since it
> > wouldn't
> > > be able to handle the IO_CONNECT message. My goal is to kill
> > (SIGKILL)
> > > processes that haven't respond to our normal termination method, I
> > cannot
> > > assume they are in a sane state.
> > >
> > > > -----Original Message-----
> > > > From: Colin Burgess [mailto:community-noreply@qnx.com]
> > > > Sent: April-06-09 4:23 PM
> > > > To: technology-networking
> > > > Subject: Re: pid/nid from name
> > > >
> > > > Can you call ConnectServerInfo on the coid?
> > > >
> > > > Mario Charest wrote:
> > > > > I'm trying to find the pid/nid of a process from its name
> > registered
> > > > with name_attach(). It's the nid I'm having trouble with.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Technology
> > > > > http://community.qnx.com/sf/go/post26136
> > > > >
> > > >
> > > > --
> > > > cburgess@qnx.com
> > > >
> > > > _______________________________________________
> > > > Technology
> > > > http://community.qnx.com/sf/go/post26138
> > > >
> > >
> > >
> > > _______________________________________________
> > > Technology
> > > http://community.qnx.com/sf/go/post26142
> >
> >
> > _______________________________________________
> > Technology
> > http://community.qnx.com/sf/go/post26144
> >
>
>
> _______________________________________________
> Technology
>...
|
|
|
Mario Charest
04/07/2009 9:16 AM
post26194
|
> -----Original Message-----
> From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> Sent: April-06-09 4:53 PM
> To: technology-networking
> Subject: RE: pid/nid from name
>
> There is GNS! :)
>
> The nid always valid to whoever is looking at it.
>
> If on node A, you have a name. AND, from same node, you do "ls", you
> should see nid = 0; but if you goes to node B, and do "ls
> /net/nodeA/dev/name/...", you see a nid which won't be 0 (nodeA'd nid
> on
> B).
>
> Not sure this is clear enough. :)
Yes but this not what I'm seing.
Node A (called neutrino) runs gns -s, node B runs gns -c. I start the application on node A and it creates "/dev/name/
global/mcharest/logc/Trace_0"
ls -l gives me "lr-xr-xr-x 0 root root 0 Apr 07 09:01 0,172687673,2,0,12 -> ../../../net/neutrino.
comact.com/ /mcharest/logc/Trace_0/0,172687673,2,0,12"
Node is 0 hence everything look ok . Then I go on Node B.
ls -l /dev/name/global/mcharest/logc/Trace_0 returns:
lr-xr-xr-x 0 root root 0 Apr 07 13:01 0,172687673,2,0,12 -> ./../../net/neutrino.comact.com/mcharest/
logc/Trace_0/0,172687673,2,0,12
See, the node number is still 0. If I do like in your example, from node B I do ls -l /net/neutrino/dev/name/global/
mcharest/logc/Trace_0 I still get a 0. Even if that method would work it's the chicken & egg problem.
>
> Anyway, which ever machine you are on, you should always be able to
> ConnectAttach(nid, pid, chid, ..) that returns back to you.
>
> -xtang
>
> > -----Original Message-----
> > From: Mario Charest [mailto:community-noreply@qnx.com]
> > Sent: April 6, 2009 4:47 PM
> > To: technology-networking
> > Subject: RE: pid/nid from name
> >
> > > -----Original Message-----
> > > From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> > > Sent: April-06-09 4:39 PM
> > > To: technology-networking
> > > Subject: RE: pid/nid from name
> > >
> > > Try the back door then :)
> > >
> > >
> /proc/mount/dev/name/[global|local]/<your_registered_name>/<node>,<pid>
> > > ,
> > > <chid>,<ftype>,<handle>
> >
> > There doesn't seem to be anything under /proc/mount/dev/name/global
> but
> > the info on gns
> >
> > I tried it under /dev/name/global, but the <node> field can be 0 in
> some
> > cases depending on the relationship between the location of the
> program
> > and the location of the gns server, at least that is what I observed.
> >
> > >
> > > -xtang
> > >
> > >
> > > > -----Original Message-----
> > > > From: Mario Charest [mailto:community-noreply@qnx.com]
> > > > Sent: April 6, 2009 4:35 PM
> > > > To: technology-networking
> > > > Subject: RE: pid/nid from name
> > > >
> > > > Hum not sure, the idea is it's possible the process is stuck in a
> > > loop,
> > > > it's my understanding that a name_open() will not work, since it
> > > wouldn't
> > > > be able to handle the IO_CONNECT message. My goal is to kill
> > > (SIGKILL)
> > > > processes that haven't respond to our normal termination method,
> I
> > > cannot
> > > > assume they are in a sane state.
> > > >
> > > > > -----Original Message-----
> > > > > From: Colin Burgess [mailto:community-noreply@qnx.com]
> > > > > Sent: April-06-09 4:23 PM
> > > > > To: technology-networking
> > > > > Subject: Re: pid/nid from name
> > > > >
> > >...
View Full Message
|
|
|
Mario Charest
|
Re: RE: pid/nid from name
|
Mario Charest
04/08/2009 1:21 PM
post26429
|
Re: RE: pid/nid from name
Does no answer means it's can't be done?
>
>
> > -----Original Message-----
> > From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> > Sent: April-06-09 4:53 PM
> > To: technology-networking
> > Subject: RE: pid/nid from name
> >
> > There is GNS! :)
> >
> > The nid always valid to whoever is looking at it.
> >
> > If on node A, you have a name. AND, from same node, you do "ls", you
> > should see nid = 0; but if you goes to node B, and do "ls
> > /net/nodeA/dev/name/...", you see a nid which won't be 0 (nodeA'd nid
> > on
> > B).
> >
> > Not sure this is clear enough. :)
>
> Yes but this not what I'm seing.
>
> Node A (called neutrino) runs gns -s, node B runs gns -c. I start the
> application on node A and it creates "/dev/name/global/mcharest/logc/Trace_0"
>
> ls -l gives me "lr-xr-xr-x 0 root root 0 Apr 07 09:01 0,
> 172687673,2,0,12 -> ../../../net/neutrino.comact.com/ /mcharest/logc/Trace_0/0
> ,172687673,2,0,12"
>
> Node is 0 hence everything look ok . Then I go on Node B.
>
> ls -l /dev/name/global/mcharest/logc/Trace_0 returns:
>
> lr-xr-xr-x 0 root root 0 Apr 07 13:01 0,172687673,2,0,12 ->
> ./../../net/neutrino.comact.com/mcharest/logc/Trace_0/0,172687673,2,0,12
>
> See, the node number is still 0. If I do like in your example, from node B I
> do ls -l /net/neutrino/dev/name/global/mcharest/logc/Trace_0 I still get a 0.
> Even if that method would work it's the chicken & egg problem.
>
> >
> > Anyway, which ever machine you are on, you should always be able to
> > ConnectAttach(nid, pid, chid, ..) that returns back to you.
> >
> > -xtang
> >
> > > -----Original Message-----
> > > From: Mario Charest [mailto:community-noreply@qnx.com]
> > > Sent: April 6, 2009 4:47 PM
> > > To: technology-networking
> > > Subject: RE: pid/nid from name
> > >
> > > > -----Original Message-----
> > > > From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> > > > Sent: April-06-09 4:39 PM
> > > > To: technology-networking
> > > > Subject: RE: pid/nid from name
> > > >
> > > > Try the back door then :)
> > > >
> > > >
> > /proc/mount/dev/name/[global|local]/<your_registered_name>/<node>,<pid>
> > > > ,
> > > > <chid>,<ftype>,<handle>
> > >
> > > There doesn't seem to be anything under /proc/mount/dev/name/global
> > but
> > > the info on gns
> > >
> > > I tried it under /dev/name/global, but the <node> field can be 0 in
> > some
> > > cases depending on the relationship between the location of the
> > program
> > > and the location of the gns server, at least that is what I observed.
> > >
> > > >
> > > > -xtang
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Mario Charest [mailto:community-noreply@qnx.com]
> > > > > Sent: April 6, 2009 4:35 PM
> > > > > To: technology-networking
> > > > > Subject: RE: pid/nid from name
> > > > >
> > > > > Hum not sure, the idea is it's possible the process is stuck in a
> > > > loop,
> > > > > it's my understanding that a name_open() will not work, since it
> > > > wouldn't
> > > > > be able to handle the IO_CONNECT message. My goal is to kill
> > > > (SIGKILL)
> > >...
View Full Message
|
|
|
Xiaodan Tang(deleted)
|
RE: RE: pid/nid from name
|
Xiaodan Tang(deleted)
04/08/2009 1:54 PM
post26439
|
RE: RE: pid/nid from name
Sorry, no answer means "it's not suppose to be that way"...
> -----Original Message-----
> From: Mario Charest [mailto:community-noreply@qnx.com]
> Sent: April 8, 2009 1:21 PM
> To: technology-networking
> Subject: Re: RE: pid/nid from name
>
> Does no answer means it's can't be done?
>
> >
> >
> > > -----Original Message-----
> > > From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> > > Sent: April-06-09 4:53 PM
> > > To: technology-networking
> > > Subject: RE: pid/nid from name
> > >
> > > There is GNS! :)
> > >
> > > The nid always valid to whoever is looking at it.
> > >
> > > If on node A, you have a name. AND, from same node, you do "ls",
you
> > > should see nid = 0; but if you goes to node B, and do "ls
> > > /net/nodeA/dev/name/...", you see a nid which won't be 0 (nodeA'd
nid
> > > on
> > > B).
> > >
> > > Not sure this is clear enough. :)
> >
> > Yes but this not what I'm seing.
> >
> > Node A (called neutrino) runs gns -s, node B runs gns -c. I start
the
> > application on node A and it creates
> "/dev/name/global/mcharest/logc/Trace_0"
> >
> > ls -l gives me "lr-xr-xr-x 0 root root 0 Apr 07
09:01
> 0,
> > 172687673,2,0,12 -> ../../../net/neutrino.comact.com/
> /mcharest/logc/Trace_0/0
> > ,172687673,2,0,12"
> >
> > Node is 0 hence everything look ok . Then I go on Node B.
> >
> > ls -l /dev/name/global/mcharest/logc/Trace_0 returns:
> >
> > lr-xr-xr-x 0 root root 0 Apr 07 13:01
> 0,172687673,2,0,12 ->
> >
./../../net/neutrino.comact.com/mcharest/logc/Trace_0/0,172687673,2,0,1
> 2
> >
> > See, the node number is still 0. If I do like in your example, from
> node B I
> > do ls -l /net/neutrino/dev/name/global/mcharest/logc/Trace_0 I still
get
> a 0.
> > Even if that method would work it's the chicken & egg problem.
> >
> > >
> > > Anyway, which ever machine you are on, you should always be able
to
> > > ConnectAttach(nid, pid, chid, ..) that returns back to you.
> > >
> > > -xtang
> > >
> > > > -----Original Message-----
> > > > From: Mario Charest [mailto:community-noreply@qnx.com]
> > > > Sent: April 6, 2009 4:47 PM
> > > > To: technology-networking
> > > > Subject: RE: pid/nid from name
> > > >
> > > > > -----Original Message-----
> > > > > From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> > > > > Sent: April-06-09 4:39 PM
> > > > > To: technology-networking
> > > > > Subject: RE: pid/nid from name
> > > > >
> > > > > Try the back door then :)
> > > > >
> > > > >
> > >
>
/proc/mount/dev/name/[global|local]/<your_registered_name>/<node>,<pid>
> > > > > ,
> > > > > <chid>,<ftype>,<handle>
> > > >
> > > > There doesn't seem to be anything under
/proc/mount/dev/name/global
> > > but
> > > > the info on gns
> > > >
> > > > I tried it under /dev/name/global, but the <node> field can be
0 in
> > > some
> > > > cases depending on the relationship between the location of the
> > > program
> > > > and the location of the gns server, at least that is what I
observed.
> > > >
> > > > >
> > > > > -xtang
> > > > >
> >...
View Full Message
|
|
|
Xiaodan Tang(deleted)
|
Re: RE: RE: pid/nid from name
|
Xiaodan Tang(deleted)
04/08/2009 5:16 PM
post26461
|
Re: RE: RE: pid/nid from name
> Sorry, no answer means "it's not suppose to be that way"...
Sorry, should look at the source first. :( Maybe "it is suppose to be this way". If a filename changed because it is
viewed from different machine, things getting crazy when gns server try to sync (or it seems like...)
Anyway, the nd is "the nd of the registrer machine in gns server's view". In your case, if you register from node B
(your gns client), you should see a non-zero nd.
So if you run your program on the same node of gns server (node A), things are simple. Otherwise, you have to parse the
linked name and netmgr_strtond() it.
It doesn't sound very straight forward I guess. Connect to the server and ConnectServerInfo() is still the "official way
" to go.
|
|
|
Mario Charest
|
RE: RE: RE: pid/nid from name
|
Mario Charest
04/08/2009 5:18 PM
post26462
|
RE: RE: RE: pid/nid from name
> -----Original Message-----
> From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> Sent: April-08-09 5:17 PM
> To: technology-networking
> Subject: Re: RE: RE: pid/nid from name
>
> > Sorry, no answer means "it's not suppose to be that way"...
>
> Sorry, should look at the source first. :( Maybe "it is suppose to be
> this way". If a filename changed because it is viewed from different
> machine, things getting crazy when gns server try to sync (or it seems
> like...)
>
> Anyway, the nd is "the nd of the registrer machine in gns server's
> view". In your case, if you register from node B (your gns client), you
> should see a non-zero nd.
>
> So if you run your program on the same node of gns server (node A),
> things are simple. Otherwise, you have to parse the linked name and
> netmgr_strtond() it.
>
Ok thanks.
> It doesn't sound very straight forward I guess. Connect to the server
> and ConnectServerInfo() is still the "official way" to go.
Maybe it's official but it sucks since you can't connect to an unresponsive server.
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26461
>
|
|
|
Colin Burgess(deleted)
|
RE: RE: RE: pid/nid from name
|
Colin Burgess(deleted)
04/08/2009 6:30 PM
post26467
|
RE: RE: RE: pid/nid from name
The server may not be responding to an _IO_OPEN message, but you should still be able to ConnectAttach to it... maybe
some hacky use of _connect* might get you what you want...
Colin
________________________________
From: Mario Charest [mailto:community-noreply@qnx.com]
Sent: Wed 4/8/2009 5:18 PM
To: technology-networking
Subject: RE: RE: RE: pid/nid from name
> -----Original Message-----
> From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> Sent: April-08-09 5:17 PM
> To: technology-networking
> Subject: Re: RE: RE: pid/nid from name
>
> > Sorry, no answer means "it's not suppose to be that way"...
>
> Sorry, should look at the source first. :( Maybe "it is suppose to be
> this way". If a filename changed because it is viewed from different
> machine, things getting crazy when gns server try to sync (or it seems
> like...)
>
> Anyway, the nd is "the nd of the registrer machine in gns server's
> view". In your case, if you register from node B (your gns client), you
> should see a non-zero nd.
>
> So if you run your program on the same node of gns server (node A),
> things are simple. Otherwise, you have to parse the linked name and
> netmgr_strtond() it.
>
Ok thanks.
> It doesn't sound very straight forward I guess. Connect to the server
> and ConnectServerInfo() is still the "official way" to go.
Maybe it's official but it sucks since you can't connect to an unresponsive server.
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26461
>
_______________________________________________
Technology
http://community.qnx.com/sf/go/post26462
|
|
|
Mario Charest
|
RE: RE: RE: pid/nid from name
|
Mario Charest
04/08/2009 7:47 PM
post26470
|
RE: RE: RE: pid/nid from name
> -----Original Message-----
> From: Colin Burgess [mailto:community-noreply@qnx.com]
> Sent: April-08-09 6:31 PM
> To: technology-networking
> Subject: RE: RE: RE: pid/nid from name
>
> The server may not be responding to an _IO_OPEN message, but you should
> still be able to ConnectAttach to it... maybe some hacky use of
> _connect* might get you what you want...
Either I'm brain dead or I haven't made myself clear. I'm trying to find the nid and pid of a process via the name it
register with name_attach() so i can SigKill it. Can't use ConnectAttach since it needs the nd, pid and chid.
Not sure what the _IO_OPEN you mentioned has to do with anything. It's the _IO_CONNECT I'm worried about. I'm assuming
_IO_CONNECT is sent by _connect_ctrl()?
>
> Colin
>
> ________________________________
>
> From: Mario Charest [mailto:community-noreply@qnx.com]
> Sent: Wed 4/8/2009 5:18 PM
> To: technology-networking
> Subject: RE: RE: RE: pid/nid from name
>
>
>
>
>
> > -----Original Message-----
> > From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> > Sent: April-08-09 5:17 PM
> > To: technology-networking
> > Subject: Re: RE: RE: pid/nid from name
> >
> > > Sorry, no answer means "it's not suppose to be that way"...
> >
> > Sorry, should look at the source first. :( Maybe "it is suppose to be
> > this way". If a filename changed because it is viewed from different
> > machine, things getting crazy when gns server try to sync (or it
> seems
> > like...)
> >
> > Anyway, the nd is "the nd of the registrer machine in gns server's
> > view". In your case, if you register from node B (your gns client),
> > you should see a non-zero nd.
> >
> > So if you run your program on the same node of gns server (node A),
> > things are simple. Otherwise, you have to parse the linked name and
> > netmgr_strtond() it.
> >
>
> Ok thanks.
>
> > It doesn't sound very straight forward I guess. Connect to the server
> > and ConnectServerInfo() is still the "official way" to go.
>
> Maybe it's official but it sucks since you can't connect to an
> unresponsive server.
>
>
> > _______________________________________________
> > Technology
> > http://community.qnx.com/sf/go/post26461
> >
>
>
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26462
>
>
>
>
>
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26467
|
|
|
Colin Burgess(deleted)
04/08/2009 9:00 PM
post26471
|
(an open is actually just an IO_CONNECT with subtype IO_CONNECT_OPEN)
but you don't need a message - the connect machinery retries the nd and chid from procnto, then does a connect
attach, THEN sends an IO_CONNECT.
So if you can get as far as the ConnectAttach you're golden.
That said, the code probably doesn't directly ALLOW for this right now... but it should be possible! :-)
Mario Charest wrote:
>
>> -----Original Message-----
>> From: Colin Burgess [mailto:community-noreply@qnx.com]
>> Sent: April-08-09 6:31 PM
>> To: technology-networking
>> Subject: RE: RE: RE: pid/nid from name
>>
>> The server may not be responding to an _IO_OPEN message, but you should
>> still be able to ConnectAttach to it... maybe some hacky use of
>> _connect* might get you what you want...
>
> Either I'm brain dead or I haven't made myself clear. I'm trying to find the nid and pid of a process via the name it
register with name_attach() so i can SigKill it. Can't use ConnectAttach since it needs the nd, pid and chid.
>
> Not sure what the _IO_OPEN you mentioned has to do with anything. It's the _IO_CONNECT I'm worried about. I'm assuming
_IO_CONNECT is sent by _connect_ctrl()?
>
>
>> Colin
>>
>> ________________________________
>>
>> From: Mario Charest [mailto:community-noreply@qnx.com]
>> Sent: Wed 4/8/2009 5:18 PM
>> To: technology-networking
>> Subject: RE: RE: RE: pid/nid from name
>>
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: Xiaodan Tang [mailto:community-noreply@qnx.com]
>>> Sent: April-08-09 5:17 PM
>>> To: technology-networking
>>> Subject: Re: RE: RE: pid/nid from name
>>>
>>>> Sorry, no answer means "it's not suppose to be that way"...
>>> Sorry, should look at the source first. :( Maybe "it is suppose to be
>>> this way". If a filename changed because it is viewed from different
>>> machine, things getting crazy when gns server try to sync (or it
>> seems
>>> like...)
>>>
>>> Anyway, the nd is "the nd of the registrer machine in gns server's
>>> view". In your case, if you register from node B (your gns client),
>>> you should see a non-zero nd.
>>>
>>> So if you run your program on the same node of gns server (node A),
>>> things are simple. Otherwise, you have to parse the linked name and
>>> netmgr_strtond() it.
>>>
>> Ok thanks.
>>
>>> It doesn't sound very straight forward I guess. Connect to the server
>>> and ConnectServerInfo() is still the "official way" to go.
>> Maybe it's official but it sucks since you can't connect to an
>> unresponsive server.
>>
>>
>>> _______________________________________________
>>> Technology
>>> http://community.qnx.com/sf/go/post26461
>>>
>>
>> _______________________________________________
>> Technology
>> http://community.qnx.com/sf/go/post26462
>>
>>
>>
>>
>>
>> _______________________________________________
>> Technology
>> http://community.qnx.com/sf/go/post26467
>
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post26470
>
--
cburgess@qnx.com
|
|
|
Xiaodan Tang(deleted)
04/08/2009 9:03 PM
post26472
|
But we need to see the return value of _IO_CONNECT message to determine
if we are talking to the right manager...
-xtang
> -----Original Message-----
> From: Colin Burgess [mailto:community-noreply@qnx.com]
> Sent: April 8, 2009 9:00 PM
> To: technology-networking
> Subject: Re: pid/nid from name
>
> (an open is actually just an IO_CONNECT with subtype IO_CONNECT_OPEN)
>
> but you don't need a message - the connect machinery retries the nd
and
> chid from procnto, then does a connect
> attach, THEN sends an IO_CONNECT.
>
> So if you can get as far as the ConnectAttach you're golden.
>
> That said, the code probably doesn't directly ALLOW for this right
now...
> but it should be possible! :-)
>
> Mario Charest wrote:
> >
> >> -----Original Message-----
> >> From: Colin Burgess [mailto:community-noreply@qnx.com]
> >> Sent: April-08-09 6:31 PM
> >> To: technology-networking
> >> Subject: RE: RE: RE: pid/nid from name
> >>
> >> The server may not be responding to an _IO_OPEN message, but you
should
> >> still be able to ConnectAttach to it... maybe some hacky use of
> >> _connect* might get you what you want...
> >
> > Either I'm brain dead or I haven't made myself clear. I'm trying to
> find the nid and pid of a process via the name it register with
> name_attach() so i can SigKill it. Can't use ConnectAttach since it
needs
> the nd, pid and chid.
> >
> > Not sure what the _IO_OPEN you mentioned has to do with anything.
It's
> the _IO_CONNECT I'm worried about. I'm assuming _IO_CONNECT is sent by
> _connect_ctrl()?
> >
> >
> >> Colin
> >>
> >> ________________________________
> >>
> >> From: Mario Charest [mailto:community-noreply@qnx.com]
> >> Sent: Wed 4/8/2009 5:18 PM
> >> To: technology-networking
> >> Subject: RE: RE: RE: pid/nid from name
> >>
> >>
> >>
> >>
> >>
> >>> -----Original Message-----
> >>> From: Xiaodan Tang [mailto:community-noreply@qnx.com]
> >>> Sent: April-08-09 5:17 PM
> >>> To: technology-networking
> >>> Subject: Re: RE: RE: pid/nid from name
> >>>
> >>>> Sorry, no answer means "it's not suppose to be that way"...
> >>> Sorry, should look at the source first. :( Maybe "it is suppose to
be
> >>> this way". If a filename changed because it is viewed from
different
> >>> machine, things getting crazy when gns server try to sync (or it
> >> seems
> >>> like...)
> >>>
> >>> Anyway, the nd is "the nd of the registrer machine in gns server's
> >>> view". In your case, if you register from node B (your gns
client),
> >>> you should see a non-zero nd.
> >>>
> >>> So if you run your program on the same node of gns server (node
A),
> >>> things are simple. Otherwise, you have to parse the linked name
and
> >>> netmgr_strtond() it.
> >>>
> >> Ok thanks.
> >>
> >>> It doesn't sound very straight forward I guess. Connect to the
server
> >>> and ConnectServerInfo() is still the "official way" to go.
> >> Maybe it's official but it sucks since you can't connect to an
> >> unresponsive server.
> >>
> >>
> >>> _______________________________________________
> >>> Technology
> >>> http://community.qnx.com/sf/go/post26461
> >>>
> >>
> >> _______________________________________________
> >> Technology
> >>...
|
|
|
Colin Burgess(deleted)
04/08/2009 9:14 PM
post26473
|
Yes, I guess so.
I guess the moral of the story is that your system is only as robust as your resource managers!
Xiaodan Tang wrote:
> But we need to see the return value of _IO_CONNECT message to determine
> if we are talking to the right manager...
>
> -xtang
>
>> -----Original Message-----
>> From: Colin Burgess [mailto:community-noreply@qnx.com]
>> Sent: April 8, 2009 9:00 PM
>> To: technology-networking
>> Subject: Re: pid/nid from name
>>
>> (an open is actually just an IO_CONNECT with subtype IO_CONNECT_OPEN)
>>
>> but you don't need a message - the connect machinery retries the nd
> and
>> chid from procnto, then does a connect
>> attach, THEN sends an IO_CONNECT.
>>
>> So if you can get as far as the ConnectAttach you're golden.
>>
>> That said, the code probably doesn't directly ALLOW for this right
> now...
>> but it should be possible! :-)
>>
>> Mario Charest wrote:
>>>> -----Original Message-----
>>>> From: Colin Burgess [mailto:community-noreply@qnx.com]
>>>> Sent: April-08-09 6:31 PM
>>>> To: technology-networking
>>>> Subject: RE: RE: RE: pid/nid from name
>>>>
>>>> The server may not be responding to an _IO_OPEN message, but you
> should
>>>> still be able to ConnectAttach to it... maybe some hacky use of
>>>> _connect* might get you what you want...
>>> Either I'm brain dead or I haven't made myself clear. I'm trying to
>> find the nid and pid of a process via the name it register with
>> name_attach() so i can SigKill it. Can't use ConnectAttach since it
> needs
>> the nd, pid and chid.
>>> Not sure what the _IO_OPEN you mentioned has to do with anything.
> It's
>> the _IO_CONNECT I'm worried about. I'm assuming _IO_CONNECT is sent by
>> _connect_ctrl()?
>>>
>>>> Colin
>>>>
>>>> ________________________________
>>>>
>>>> From: Mario Charest [mailto:community-noreply@qnx.com]
>>>> Sent: Wed 4/8/2009 5:18 PM
>>>> To: technology-networking
>>>> Subject: RE: RE: RE: pid/nid from name
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Xiaodan Tang [mailto:community-noreply@qnx.com]
>>>>> Sent: April-08-09 5:17 PM
>>>>> To: technology-networking
>>>>> Subject: Re: RE: RE: pid/nid from name
>>>>>
>>>>>> Sorry, no answer means "it's not suppose to be that way"...
>>>>> Sorry, should look at the source first. :( Maybe "it is suppose to
> be
>>>>> this way". If a filename changed because it is viewed from
> different
>>>>> machine, things getting crazy when gns server try to sync (or it
>>>> seems
>>>>> like...)
>>>>>
>>>>> Anyway, the nd is "the nd of the registrer machine in gns server's
>>>>> view". In your case, if you register from node B (your gns
> client),
>>>>> you should see a non-zero nd.
>>>>>
>>>>> So if you run your program on the same node of gns server (node
> A),
>>>>> things are simple. Otherwise, you have to parse the linked name
> and
>>>>> netmgr_strtond() it.
>>>>>
>>>> Ok thanks.
>>>>
>>>>> It doesn't sound very straight forward I guess. Connect to the
> server
>>>>> and ConnectServerInfo() is still the "official way" to go.
>>>> Maybe...
View Full Message
|
|
|
|