we are running 7.4.2.RS D3 on 5.3 TL 3 AIX.
i am executing a script from cron. the script contains 2 commands,
one that stops D3, one that starts D3.
The command that shuts down D3 is:
d3 -0 -n pick0 -d '\rdm\rN3XT2DMV\rN3XT2DMV\rshutdown (y\r' >>
$outputfile 2>&1
This command works as expected.
The command to start D3:
d3 -a x >> $outputfile 2>&1
I can't get to work at all, producing the following error/s:
7.4.2.M12 05 Jul 2006
^MVirtual machine.... pick0:AIX Line 0.............
^MKey................ 10 Memory (K)......... 1794048
^MPibs............... 512 Phantom Processes.. 165
^MShared BASIC size 8192K
^MABS locked
^MBoot in single user mode
^MDisk 0: /dev/rpicklv 314572800 Blocks
^MTape Record
# Type size Device Name
0: 7 500 /usr/lib/pick/ab
1: 7 500 /usr/lib/pick/dt
2: 7 2000000 /ptape/tape
3: 6 16384 /dev/rmt0.1
4: 0 500 /tmp/newabs
Automatic boot. Sleeping 15 s.
Hit a key to stop auto boot ...^G Auto boot aborted by user.
^MOptions: F)ile only, A)BS only, X) eXecute. Q)uit = ÿ
^MIllegal option
^MOptions: F)ile only, A)BS only, X) eXecute. Q)uit = ÿ
^MIllegal option
^MOptions: F)ile only, A)BS only, X) eXecute. Q)uit = ÿ
^MIllegal option
^MOptions: F)ile only, A)BS only, X) eXecute. Q)uit = ÿ
^MIllegal option
^MOptions: F)ile only, A)BS only, X) eXecute. Q)uit = ÿ
^MIllegal option
Any insights would be deeply appreciated!
Thanks,
danny
my apologies, i should have mentioned that the script containing the 2
commands above works fine from the command line. the error/s are only
encountered when attempting to execute from cron...
thanks,
danny
>> d3 -a x >> $outputfile 2>&1
...
>> Automatic boot. Sleeping 15 s.
>> Hit a key to stop auto boot ...^G Auto boot aborted by user.
>>
>> ^MOptions: F)ile only, A)BS only, X) eXecute. Q)uit = �
It looks to me like after the "-a x", the cron process says "we're
done with this command" so the process is terminated - or at least it
tries. Note that ^G in the output stream - looks like a bell. The
command isn't given the opportunity to feed the Options prompt because
it's being terminated too soon.
Without great analysis, my approach would be to give it what it wants:
d3 -a xx >> $outputfile 2>&1 &
The first x says auto boot. The second x interrupts the bootwait
process and allows the first one to process. There's a line in pick0
called "bootsleep". If necessary, try setting that to 0 to avoid the
sleep entirely.
Note also the trailing ampersand. I'm not positive but I think this
should allow cron to spawn off the process as a separate thread so
that D3 boots all the way through. Otherwise, I don't know what will
happen to that thread - will cron hang on it when the process goes to
the login prompt after boot? You might need to script it to login
then exit. That reminds me that I used to have a user in *nix called
'exit' which immediately exited right after a boot like this (wow,
completely forgot about tricks like that.)
Another point (didn't I say I wasn't going to analyze this?) is that
you're using "-a x" and telling it to pause. Well, try "d3 -0" and
avoid the prompt. Or use "d3 -0 -s" which puts it into silent mode.
That is, it should exit immediately back to cron without a lot of
messages.
Final point - this might be a permissions issue. You might need to
get cron to "su" before booting D3, even if D3 is not running with
root permissions ( and it shouldn't be ).
Sorry for being so verbose. Without having a box in front of me I
need to spell out all of these silly guesses and experiments. With
something in front of me for experimenting the issue might be solved
in a few seconds. Can't ya ask about Windows? ;)
HTH
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
remove.pleaseNebula-RnD.com/blog
Visit PickWiki.com! Contribute!
http://Twitter.com/TonyGravagno