Get instance names from PIDS?
Posted in 2011
Topics: Server Administration, Platform-Specific Issues
Here's one for you:
HP-UX 11i, IDS9.5
Imagine I'm trying to find out which instances are up and running in
an automated shutdown script,and I have no prior knowledge of the
setup. Although I know where the onconfig files are, I don't know
which ones have been started up.
I can see there are some instances running using ps -fu informix; I
can then find the informix main cpuvp PIDs from ps -ef and looking for
the ones with PPID=1; there could be one or several.
How can I find the instance names that are running (from that PID
info?) so that I can automatically set INFORMIXSERVER to that value
and run onmode -yuck?
I've looked in /INFORMIXTMP, and all there is in there is several
"VP.<instancename>soc.<number>.s" files, some relating to running
instances and some not, and they're length 0 anyway.
I've looked in ${INFORMIXDIR}/etc/ and the .conf.<instancename>
and .infos.<instancename> files don't hold any PID info either.
I could look in the message logs and see which instances don't have
"Informix Dynamic Server Stopped" at the end, but that's similarly not
reliable.
ipcs isn't useful either.
Any clues?
onstat -g dis
j.
On Apr 21, 2011, at 9:11 AM, Malc wrote:
> Here's one for you:
> HP-UX 11i, IDS9.5
> Imagine I'm trying to find out which instances are up and running in
> an automated shutdown script,and I have no prior knowledge of the
> setup. Although I know where the onconfig files are, I don't know
> which ones have been started up.
>
> I can see there are some instances running using ps -fu informix; I
> can then find the informix main cpuvp PIDs from ps -ef and looking for
> the ones with PPID=1; there could be one or several.
>
> How can I find the instance names that are running (from that PID
> info?) so that I can automatically set INFORMIXSERVER to that value
> and run onmode -yuck?
>
> I've looked in /INFORMIXTMP, and all there is in there is several
> "VP.<instancename>soc.<number>.s" files, some relating to running
> instances and some not, and they're length 0 anyway.
> I've looked in ${INFORMIXDIR}/etc/ and the .conf.<instancename>
> and .infos.<instancename> files don't hold any PID info either.
>
> I could look in the message logs and see which instances don't have
> "Informix Dynamic Server Stopped" at the end, but that's similarly not
> reliable.
>
> ipcs isn't useful either.
>
> Any clues?
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
On Apr 21, 2:45 pm, Jack Parker <jack.park...@verizon.net> wrote:
> onstat -g dis>
doh <facepalm>
Although I've noted that the "up" / "down" indicator is not always accurate, and should be taken with a grain of salt.
j.
On Apr 21, 2011, at 9:55 AM, Malc wrote:
> On Apr 21, 2:45 pm, Jack Parker <jack.park...@verizon.net> wrote:
>> onstat -g dis>>
>
> doh <facepalm>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
I usually have a config file with all the instances and a function to get
all the environments.
So if I had to do that I would go through the list, set every environment,
check if it was up and stop it.
This is useful for a lot of other situations, so I usually wouldn't bother
in trying tricks that only solve one issue.
Regards.
On Thu, Apr 21, 2011 at 2:11 PM, Malc <malcrp@googlemail.com> wrote:
> Here's one for you:
> HP-UX 11i, IDS9.5
> Imagine I'm trying to find out which instances are up and running in
> an automated shutdown script,and I have no prior knowledge of the
> setup. Although I know where the onconfig files are, I don't know
> which ones have been started up.
>
> I can see there are some instances running using ps -fu informix; I
> can then find the informix main cpuvp PIDs from ps -ef and looking for
> the ones with PPID=1; there could be one or several.
>
> How can I find the instance names that are running (from that PID
> info?) so that I can automatically set INFORMIXSERVER to that value
> and run onmode -yuck?
>
> I've looked in /INFORMIXTMP, and all there is in there is several
> "VP.<instancename>soc.<number>.s" files, some relating to running
> instances and some not, and they're length 0 anyway.
> I've looked in ${INFORMIXDIR}/etc/ and the .conf.<instancename>
> and .infos.<instancename> files don't hold any PID info either.
>
> I could look in the message logs and see which instances don't have
> "Informix Dynamic Server Stopped" at the end, but that's similarly not
> reliable.
>
> ipcs isn't useful either.
>
> Any clues?
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g