Sessions Connection Info
Posted in 2013
Dave asked how to tell, from the server side, which DBSERVERNAME/alias a given session connected through (one DBSERVERNAME plus three aliases, with sqlhosts groups in use). IBM's Jacques Renaut said the info exists in server memory but isn't externalized via onstat. Suggestions included onstat -g env <sid> (which Art Kagel and Dave noted only shows INFORMIXSERVER/DBPATH of the client, not the listener used), setting a custom client env var, and John Miller's tip to use sysmaster:sysnetworkio to see the protocol/poll thread per session and infer the alias. No definitive solution; Dave planned to use netstat -a and file an RFE.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Networking & sqlhosts Configuration
Hi, I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3 DBSERVERALIASES defined. How can I tell from the DB side which NAME the sessions are connected to? --Dave --089e01493e161914c004e96f50f5
original post:
Hi,
I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3
DBSERVERALIASES defined. How can I tell from the DB side which NAME the
sessions are connected to?
--Dave
--089e01493e161914c004e96f50f5
Response:
Unfortunately, I think the answer is you can't. The info is there in memory in
the server, but I can't seem to find a way it's been externalized for users to
see (via onstat's ect...).
Jacques Renaut
IBM Informix Advanced Support
onstat -g env <sid> ??
> Hi,
>
> I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3
> DBSERVERALIASES defined. How can I tell from the DB side which NAME the
> sessions are connected to?
>
> --Dave
>
> --089e01493e161914c004e96f50f5
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
--
Paul Watson
Tel: +1 913-674-0360
Mob: +1 913-387-7529
Web: www.oninit.com
www.advancedatatools.com
Failure is not as frightening as regret.
If you want to improve, be content to be thought foolish and stupid.
What this country needs are more unemployed politicians
Thank you acques and Art,
Guess I will have to use netstat -a for the meantime and use the RFE to
request it for the next release.
Thank you,
--Dave
On Thu, Oct 24, 2013 at 1:17 PM, JACQUES RENAUT <jrenaut@us.ibm.com> wrote:
> original post:
>
> Hi,
>
> I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3
> DBSERVERALIASES defined. How can I tell from the DB side which NAME the
> sessions are connected to?
>
> --Dave
>
> --089e01493e161914c004e96f50f5
>
> Response:
>
> Unfortunately, I think the answer is you can't. The info is there in
> memory in
> the server, but I can't seem to find a way it's been externalized for
> users to
> see (via onstat's ect...).
>
> Jacques Renaut
> IBM Informix Advanced Support
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11343408cb6c9504e980343d
No, unfortunately that always reports DBSERVERNAME as the value of
INFORMIXSERVER not the actual value in the user's environment.
Art
Art S. Kagel, Principal Consultant
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Thu, Oct 24, 2013 at 1:45 PM, Paul Watson <paul@oninit.com> wrote:
> onstat -g env <sid> ??>
> > Hi,
> >
> > I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3
> > DBSERVERALIASES defined. How can I tell from the DB side which NAME the
> > sessions are connected to?
> >
> > --Dave
> >
> > --089e01493e161914c004e96f50f5
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
> --
> Paul Watson
> Tel: +1 913-674-0360
> Mob: +1 913-387-7529
> Web: www.oninit.com
>
> www.advancedatatools.com
>
> Failure is not as frightening as regret.
> If you want to improve, be content to be thought foolish and stupid.
> What this country needs are more unemployed politicians
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11c264d09d480404e9807e78
Original post:
Thank you acques and Art,
Guess I will have to use netstat -a for the meantime and use the RFE to
request it for the next release.
Thank you,
--Dave
Response:
As Paul Watson also already mentioned, it occurred to me at lunch 1 place you
might be able to check...and I think you could get the value from the DBPATH
setting in the onstat -g env <session id> command.
It looks like dbpath gets set to //<$INFORMIXSERVER>
At least for unix esql/c clients...might not for java connections didn't test
them out.
Jacques Renaut
IBM Informix Advanced Support
APD Team
You can not get the DBSERVERNAME directly, but each dbservername/allias should be a different network protocol. sysmaster:sysnetworkio will show you which protocol and poll thread each session is using. Since you know the protocol you should know the servername. John F. Miller III STSM, Lead Architect miller3@us.ibm.com 503-747-1366 IBM Informix Dynamic Server (IDS) ids-bounces@iiug.org wrote on 10/24/2013 08:49:50 AM: > From: "Informix DBA" <in4mixdba@gmail.com> > To: ids@iiug.org, > Date: 10/24/2013 09:26 AM > Subject: Sessions Connection Info [31805] > Sent by: ids-bounces@iiug.org > > Hi, > > I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3 > DBSERVERALIASES defined. How can I tell from the DB side which NAME the > sessions are connected to? > > --Dave > > --089e01493e161914c004e96f50f5 > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >
I don't see it listed in onstat -g env. I only see the INFORMIXSERVER
name. However, we are using groups in our sqlhosts file so we want to
monitor which listener the user actually connected to.
Any other ideas?
--Dave
On Thu, Oct 24, 2013 at 1:45 PM, Paul Watson <paul@oninit.com> wrote:
> onstat -g env <sid> ??>
> > Hi,
> >
> > I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3
> > DBSERVERALIASES defined. How can I tell from the DB side which NAME the
> > sessions are connected to?
> >
> > --Dave
> >
> > --089e01493e161914c004e96f50f5
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
> --
> Paul Watson
> Tel: +1 913-674-0360
> Mob: +1 913-387-7529
> Web: www.oninit.com
>
> www.advancedatatools.com
>
> Failure is not as frightening as regret.
> If you want to improve, be content to be thought foolish and stupid.
> What this country needs are more unemployed politicians
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e01176087f96c1704e980f1ca
the INFORMIXSERVER is the engine startup setting as far as I can tell
Why not set MYSERVER=<which I have local>
and the use onstat -g env
not tried it mind you
Cheers
Paul
> I don't see it listed in onstat -g env. I only see the INFORMIXSERVER
> name. However, we are using groups in our sqlhosts file so we want to
> monitor which listener the user actually connected to.
>
> Any other ideas?
>
> --Dave
>
> On Thu, Oct 24, 2013 at 1:45 PM, Paul Watson <paul@oninit.com> wrote:
>
>> onstat -g env <sid> ??>>
>> > Hi,
>> >
>> > I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3
>> > DBSERVERALIASES defined. How can I tell from the DB side which NAME
>> the
>> > sessions are connected to?
>> >
>> > --Dave
>> >
>> > --089e01493e161914c004e96f50f5
>> >
>> >
>> >
>>
>>
>
*******************************************************************************
>> > Forum Note: Use "Reply" to post a response in the discussion forum.
>> >
>>
>> --
>> Paul Watson
>> Tel: +1 913-674-0360
>> Mob: +1 913-387-7529
>> Web: www.oninit.com
>>
>> www.advancedatatools.com
>>
>> Failure is not as frightening as regret.
>> If you want to improve, be content to be thought foolish and stupid.
>> What this country needs are more unemployed politicians
>>
>>
>>
>>
>
*******************************************************************************
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
>
> --089e01176087f96c1704e980f1ca
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
--
Paul Watson
Tel: +1 913-674-0360
Mob: +1 913-387-7529
Web: www.oninit.com
www.advancedatatools.com
Failure is not as frightening as regret.
If you want to improve, be content to be thought foolish and stupid.
What this country needs are more unemployed politicians
I think it's possible, but not practicable... It would involve dumping some
memory structures for the session and comparing it with some other dumps
from the listener threads.
The point is... Why do you need it? What are you looking for.... ?
In any case this would not be supported... it' would not be possible to
obtain through simple SQL... and I'd need to test it.
Why are you using groups and what options (c=?) are you using?
Regards
On Thu, Oct 24, 2013 at 7:39 PM, Informix DBA <in4mixdba@gmail.com> wrote:
> I don't see it listed in onstat -g env. I only see the INFORMIXSERVER
> name. However, we are using groups in our sqlhosts file so we want to
> monitor which listener the user actually connected to.
>
> Any other ideas?
>
> --Dave
>
> On Thu, Oct 24, 2013 at 1:45 PM, Paul Watson <paul@oninit.com> wrote:
>
> > onstat -g env <sid> ??> >
> > > Hi,
> > >
> > > I am running Informix 11.70.FC7W2. We have 1 DBSERVERNAME and 3
> > > DBSERVERALIASES defined. How can I tell from the DB side which NAME the
> > > sessions are connected to?
> > >
> > > --Dave
> > >
> > > --089e01493e161914c004e96f50f5
> > >
> > >
> > >
> >
> >
>
>
*******************************************************************************
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> >
> > --
> > Paul Watson
> > Tel: +1 913-674-0360
> > Mob: +1 913-387-7529
> > Web: www.oninit.com
> >
> > www.advancedatatools.com
> >
> > Failure is not as frightening as regret.
> > If you want to improve, be content to be thought foolish and stupid.
> > What this country needs are more unemployed politicians
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --089e01176087f96c1704e980f1ca
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--001a11339f3c1ce42504e985ca15