Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Malc asked how to find which IDS 9.5 instances were running on HP-UX 11i from PIDs, for an automated shutdown script. Jack Parker suggested onstat -g dis, noting its up/down indicator is not always accurate. Fernando Nunes preferred keeping a config file of all instances and a function to set each environment, check whether it was up and stop it. Malc accepted the onstat tip.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
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?
↪ replying to Malc
Jack Parker — — source: Usenet: comp.databases.informix
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>
↪ replying to Malc
Jack Parker — — source: Usenet: comp.databases.informix
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
↪ replying to Malc
Fernando Nunes — — source: Usenet: comp.databases.informix
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...
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.