Re: xctl problem on script
Posted in 2001
Topics: Server Administration
I have inserted the on line
#!/usr/bin/ksh also
I have exported the onconfig also. Will u correct me:
INFORMIXDIR=/usr/informix; export INFORMIXDIR
ONCONFIG=/usr/informix/etc/onconfig; export ONCONFIG
xctl onstat -u
This is giving the error:
shared memory not initialized for INFORMIXSERVER '#.1'
Thanks
In article <93d2qe$1vg$1@nnrp1.deja.com>,
William Rice <ricew@operamail.com> wrote:
> OK, in my experience if something works from the command line, but not
> in cron, the problem is always either environment variables, or not
> having #!/usr/bin/ksh(or whatever shell you are expecting the script
> to run in)
>
> I have seen xctl onstat commands in multiple shell scripts running out
> of cron with no issues.
>
> would you place the following commands at the bottom of your shell
> script, run it out of cron and post or email the output.
>
> xctl onstat -u
> echo "informixdir $INFORMIXDIR"
> echo "informixserver $INFORMIXSERVER"
>
> it is difficult to troubleshoot the issue without knowing what xctl
> onstat -u does output when run out of cron.>
> Will
>
> In article <93d10b$5r$1@nnrp1.deja.com>,
> mazafar4@my-deja.com wrote:
> > I tried everything; but it is not giving the correct output only
from
> > crontab.
> >
> > In article <93cppt$p22$1@nnrp1.deja.com>,
> > William Rice <ricew@operamail.com> wrote:
> > > in the script do
> > > $toolsdir/xctl $toolsdir/onstat -u
> > >
> > > and post that output.
> > >
> > > In article <93coru$o3m$1@nnrp1.deja.com>,
> > > mazafar4@my-deja.com wrote:
> > > > The output:
> > > > Sorry
> > > >
> > > > INFORMIXDIR is not the problem.
> > > > Thanks
> > > > In article <93co8j$ngd$1@nnrp1.deja.com>,
> > > > William Rice <ricew@operamail.com> wrote:
> > > > > INFORMIXDIR is not set, my guess would be it should be set to
> > > > > /usr/informix.
> > > > >
> <SNIP>
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/
In article <93d4pn$3rd$1@nnrp1.deja.com>,
mazafar4@my-deja.com wrote:
> I have inserted the on line
> #!/usr/bin/ksh also
>
> I have exported the onconfig also. Will u correct me:
> INFORMIXDIR=/usr/informix; export INFORMIXDIR
> ONCONFIG=/usr/informix/etc/onconfig; export ONCONFIG>
> xctl onstat -u
>
> This is giving the error:
> shared memory not initialized for INFORMIXSERVER '#.1'
This says it thinks the INFORMIXSERVER is #.1
add
export INFORMIXSERVER=tcms.1
>
> Thanks
>
> In article <93d2qe$1vg$1@nnrp1.deja.com>,
> William Rice <ricew@operamail.com> wrote:
> > OK, in my experience if something works from the command line, but
not
> > in cron, the problem is always either environment variables, or not
> > having #!/usr/bin/ksh(or whatever shell you are expecting the
script
> > to run in)
> >
> > I have seen xctl onstat commands in multiple shell scripts running
out
> > of cron with no issues.
> >
> > would you place the following commands at the bottom of your shell
> > script, run it out of cron and post or email the output.
> >
> > xctl onstat -u
> > echo "informixdir $INFORMIXDIR"
> > echo "informixserver $INFORMIXSERVER"
> >
> > it is difficult to troubleshoot the issue without knowing what xctl
> > onstat -u does output when run out of cron.> >
> > Will
> >
> > In article <93d10b$5r$1@nnrp1.deja.com>,
> > mazafar4@my-deja.com wrote:
> > > I tried everything; but it is not giving the correct output only
> from
> > > crontab.
> > >
> > > In article <93cppt$p22$1@nnrp1.deja.com>,
> > > William Rice <ricew@operamail.com> wrote:
> > > > in the script do
> > > > $toolsdir/xctl $toolsdir/onstat -u
> > > >
> > > > and post that output.
> > > >
> > > > In article <93coru$o3m$1@nnrp1.deja.com>,
> > > > mazafar4@my-deja.com wrote:
> > > > > The output:
> > > > > Sorry
> > > > >
> > > > > INFORMIXDIR is not the problem.
> > > > > Thanks
> > > > > In article <93co8j$ngd$1@nnrp1.deja.com>,
> > > > > William Rice <ricew@operamail.com> wrote:
> > > > > > INFORMIXDIR is not set, my guess would be it should be set
to
> > > > > > /usr/informix.
> > > > > >
> > <SNIP>
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/
Thanks William,
After exporting the onconfig from the script finally I got the correct
result.
Thanks Once again.
Zafar
In article <93d6k4$5i4$1@nnrp1.deja.com>,
William Rice <ricew@operamail.com> wrote:
> In article <93d4pn$3rd$1@nnrp1.deja.com>,
> mazafar4@my-deja.com wrote:
> > I have inserted the on line
> > #!/usr/bin/ksh also
> >
> > I have exported the onconfig also. Will u correct me:
> > INFORMIXDIR=/usr/informix; export INFORMIXDIR
> > ONCONFIG=/usr/informix/etc/onconfig; export ONCONFIG> >
> > xctl onstat -u
> >
> > This is giving the error:
> > shared memory not initialized for INFORMIXSERVER '#.1'
> This says it thinks the INFORMIXSERVER is #.1
>
> add
> export INFORMIXSERVER=tcms.1>
> >
> > Thanks
> >
> > In article <93d2qe$1vg$1@nnrp1.deja.com>,
> > William Rice <ricew@operamail.com> wrote:
> > > OK, in my experience if something works from the command line, but
> not
> > > in cron, the problem is always either environment variables, or
not
> > > having #!/usr/bin/ksh(or whatever shell you are expecting the
> script
> > > to run in)
> > >
> > > I have seen xctl onstat commands in multiple shell scripts running
> out
> > > of cron with no issues.
> > >
> > > would you place the following commands at the bottom of your shell
> > > script, run it out of cron and post or email the output.
> > >
> > > xctl onstat -u
> > > echo "informixdir $INFORMIXDIR"
> > > echo "informixserver $INFORMIXSERVER"
> > >
> > > it is difficult to troubleshoot the issue without knowing what
xctl
> > > onstat -u does output when run out of cron.> > >
> > > Will
> > >
> > > In article <93d10b$5r$1@nnrp1.deja.com>,
> > > mazafar4@my-deja.com wrote:
> > > > I tried everything; but it is not giving the correct output only
> > from
> > > > crontab.
> > > >
> > > > In article <93cppt$p22$1@nnrp1.deja.com>,
> > > > William Rice <ricew@operamail.com> wrote:
> > > > > in the script do
> > > > > $toolsdir/xctl $toolsdir/onstat -u
> > > > >
> > > > > and post that output.
> > > > >
> > > > > In article <93coru$o3m$1@nnrp1.deja.com>,
> > > > > mazafar4@my-deja.com wrote:
> > > > > > The output:
> > > > > > Sorry
> > > > > >
> > > > > > INFORMIXDIR is not the problem.
> > > > > > Thanks
> > > > > > In article <93co8j$ngd$1@nnrp1.deja.com>,
> > > > > > William Rice <ricew@operamail.com> wrote:
> > > > > > > INFORMIXDIR is not set, my guess would be it should be set
> to
> > > > > > > /usr/informix.
> > > > > > >
> > > <SNIP>
> > >
> > > Sent via Deja.com
> > > http://www.deja.com/
> > >
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/