How to know that which user started the instance?
Posted in 2013
User asked how to determine which OS user started an Informix instance. The suggested solution was using 'ps -eaf | grep oninit' to check process ownership—if root started it, most oninit processes would be root-owned; if informix started it, all would be informix-owned. However, the user reported this didn't work on AIX IDS 11.70 FC4.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: General Discussion
Hello All, I wanted to know that which OS user started the informix instance? whenever it is started, I am not concerned who has initialized it for the first time. I just wanted to know that who has started it whenever it was started last time? Is this information is stored anywhere in the system tables anytime the database is started? Any help is much appreciated. Thanks. Regards, Khan
We generally review the process list. How would you know who actually logi=
n as informix without LDAP sudo to informix.
$ps -eaf | grep oninit
root 14272 16672 0 Aug 04 - 0:23 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 15170 16672 0 Aug 04 - 4:02 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 16672 16962 0 Aug 04 - 1:55 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 16962 1 0 Aug 04 - 56:32 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 18588 16672 0 Aug 04 - 50:32 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 18922 16672 0 Aug 04 - 82:18 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 19124 16672 0 Aug 04 - 0:23 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 19398 16672 0 Aug 04 - 0:22 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 19638 16672 0 Aug 04 - 0:23 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 19878 16672 0 Aug 04 - 0:23 /ifmx_4/dba_jester_0921_1/bi=
n/oninit=20
root 20382 16672 0 Aug 04 - 9:45 /ifmx_4/dba_jester_0921_1/bi=
n/Oninit
$ps -eaf | grep oninit
informix 4436 27906 0 Aug 09 - 0:08 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 18578 27906 0 Aug 09 - 398:29 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 19380 27906 0 Aug 09 - 426:38 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 22748 27906 0 Aug 09 - 0:08 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 25026 1 0 Aug 09 - 271:54 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 25484 27906 0 Aug 09 - 0:03 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 26066 27906 0 Aug 09 - 0:09 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 26738 27906 0 Aug 09 - 0:08 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 26956 27906 0 Aug 09 - 0:08 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 27906 25026 0 Aug 09 - 0:44 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 28248 27906 0 Aug 09 - 16:42 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 28704 27906 0 Aug 09 - 357:56 /ifmx/dba_ltosnd/bin/oninit=
=20
informix 29158 27906 0 Aug 09 - 0:08 /ifmx/dba_ltosnd/bin/oninit
Thanks,
***************************************************************************=
***************
Ernie Knox
Sr. Technical Specialist, I&TG - IT Operations & Governance
Sears Holdings Management Corp
3333 Beverly Rd.
Hoffman Estates, IL. 60179
Office: (847) 286-5735
Email: Ernest.Knox@searshc.com
Blackberry:=A02244650553@messaging.sprintpcs.com
Informix Email: ifmxdba@searshc.com and Team: InformixDBA@searshc.com
Informix Primary: INFORMIXDBAPrimaryPager@searshc.com
Informix Secondary: INFORMIXDBASecondaryPager@searshc.com
MySQL Email: MYSQLDBAe@searshc.com and Team: MySQLDBA2@searshc.com
MySQL Primary: MYSQLDBAPrimaryPager@searshc.com
MySQL Secondary: MYSQLDBASecondaryPager@searshc.com
For more information, view our DBA Wiki page link below:
http://wiki.intra.sears.com/confluence/display/TechStrag/Database+Managemen=
t#DatabaseManagement
" Yes we can make a Change! "
" IF you can think it, you can do it! "
" IT'S always a great day to watch=A0Sports: FOOTBALL "
GSU
MISSION:
" The focus of my life begins at home with family, loved ones, and friends.=
I want to use my resources to create a
secure environment that fosters love, learning, laughter, and mutual succes=
s. I will protect and value integrity. I
will admit and quickly correct my mistakes. I will be a self-starter. I w=
ill be a caring person. I will be a good listener
with an open mind. I will continue to grow and learn. I will facilitate a=
nd celebrate the success of others. "
***************************************************************************=
***************
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of O KHAN
Sent: Friday, August 16, 2013 10:51 AM
To: ids@iiug.org
Subject: How to know that which user started the instance? [31204]
Hello All,=20
I wanted to know that which OS user started the informix instance? whenever=
it is started, I am not concerned who has initialized it for the first tim=
e. I just wanted to know that who has started it whenever it was started la=
st time?=20
Is this information is stored anywhere in the system tables anytime the dat=
abase is started?=20
Any help is much appreciated. Thanks.=20
Regards,
Khan=20
***************************************************************************=
****=20
Forum Note: Use "Reply" to post a response in the discussion forum.=20
This message, including any attachments, is the property of Sears Holdings =
Corporation and/or one of its subsidiaries. It is confidential and may cont=
ain proprietary or legally privileged information. If you are not the inten=
ded recipient, please delete it without reading the contents. Thank you.
I don't think that you can determine that from inside the database.
However the normal permissions only allow the owner (usually root unless
the software was installed as a private server) and members of group
informix (which should include ONLY user informix and DBSA users) to exec
the oninit process, so usually it would have to be either root or informix
that started the server. If root did, then most of the oninit processes
would be owned by root and a few by informix. If informix started the
server than all oninit processes would be owned by informix.
Art
Art S. Kagel
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 Fri, Aug 16, 2013 at 10:50 AM, O KHAN <theultimateboy@hotmail.com> wrote:
> Hello All,
>
> I wanted to know that which OS user started the informix instance?
> whenever it
> is started, I am not concerned who has initialized it for the first time. I
> just wanted to know that who has started it whenever it was started last
> time?
>
> Is this information is stored anywhere in the system tables anytime the
> database is started?
>
> Any help is much appreciated. Thanks.
>
> Regards,
> Khan
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11336460332f4004e412062a
Yes, I wanted to know between "root" & "informix", that who has started the
instance?
Art, I have checked using the "ps -ef|grep oninit" command, for the same
instance which first starting as "root" and then starting at "informix", but
the output/ownership remains the same. I am using IDS 11.70 FC4 at AIX.
Actually, I am facing a strange situation that when the instance is started as
"root", then users are able to connect to it, but if the instance is started
as "informix", users are not able to connect to it and instance returns an
error or incorrect password authentication.
Although, we have already opened a PMR with IBM on this issue and they are
working on it.
But, untill we reach to a solution, i just wanted to make sure that all my
instances gets started with "root", that's why I wanted to know this
information that who stated the instance, so that I could monitor it.
Thanks.
Regards,
Khan
And yet, on Linux (and IMS on Solaris when I used to use that) if root
started the server I would see this:
$ ps -fe|fgrep oninitart 11028 6303 0 11:41 pts/0 00:00:00 fgrep oninit
root 20550 25736 0 Aug09 ? 00:00:12 oninit -vw
informix 25735 1 0 Aug08 ? 00:04:50 oninit -vw
root 25736 25735 0 Aug08 ? 00:01:43 oninit -vw
root 25782 25736 0 Aug08 ? 00:00:15 oninit -vw
root 25785 25736 0 Aug08 ? 00:00:14 oninit -vw
root 25786 25736 0 Aug08 ? 00:00:15 oninit -vw
root 25799 25736 0 Aug08 ? 00:00:00 oninit -vw
root 25800 25736 0 Aug08 ? 00:00:14 oninit -vw
informix 25801 25736 0 Aug08 ? 00:05:58 oninit -vw
root 25822 25736 0 Aug08 ? 00:02:41 oninit -vw
root 25855 25736 0 Aug08 ? 00:02:41 oninit -vw
root 25862 25736 0 Aug08 ? 00:02:42 oninit -vw
root 25863 25736 0 Aug08 ? 00:02:40 oninit -vw
root 25873 25736 0 Aug08 ? 00:00:14 oninit -vw
But AIX is based on the older BSD code while Solaris is SystemV based and
Linux emulates SystemV conventions.
Art
Art S. Kagel
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 Fri, Aug 16, 2013 at 11:35 AM, O KHAN <theultimateboy@hotmail.com> wrote:
> Yes, I wanted to know between "root" & "informix", that who has started the
> instance?
>
> Art, I have checked using the "ps -ef|grep oninit" command, for the same
> instance which first starting as "root" and then starting at "informix",
> but
> the output/ownership remains the same. I am using IDS 11.70 FC4 at AIX.
>
> Actually, I am facing a strange situation that when the instance is
> started as
> "root", then users are able to connect to it, but if the instance is
> started
> as "informix", users are not able to connect to it and instance returns an
> error or incorrect password authentication.
>
> Although, we have already opened a PMR with IBM on this issue and they are
> working on it.
>
> But, untill we reach to a solution, i just wanted to make sure that all my
> instances gets started with "root", that's why I wanted to know this
> information that who stated the instance, so that I could monitor it.
>
> Thanks.
>
> Regards,
> Khan
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11c233ea2dcfef04e4127682
Your filesystem permissions are wrong.
Did you copy the installation from another place/machine?
oninit command must be "owned" by root and setuid. But if it's not, chances
are that other files are also wrong.
Regards
On Fri, Aug 16, 2013 at 4:35 PM, O KHAN <theultimateboy@hotmail.com> wrote:
> Yes, I wanted to know between "root" & "informix", that who has started the
> instance?
>
> Art, I have checked using the "ps -ef|grep oninit" command, for the same
> instance which first starting as "root" and then starting at "informix",
> but
> the output/ownership remains the same. I am using IDS 11.70 FC4 at AIX.
>
> Actually, I am facing a strange situation that when the instance is
> started as
> "root", then users are able to connect to it, but if the instance is
> started
> as "informix", users are not able to connect to it and instance returns an
> error or incorrect password authentication.
>
> Although, we have already opened a PMR with IBM on this issue and they are
> working on it.
>
> But, untill we reach to a solution, i just wanted to make sure that all my
> instances gets started with "root", that's why I wanted to know this
> information that who stated the instance, so that I could monitor it.
>
> Thanks.
>
> Regards,
> Khan
>
>
>
>
*******************************************************************************
> 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...
--089e013a2746a6e29d04e413ba67