Re: ontape -c
Posted in 1997
In article <5h8sdk$edf@cssun.mathcs.emory.edu>,
sromankiw@execrisk.com (Steve Romankiw) wrote:
>We use ontape to do continuous log backups. On Sundays, we bring down
>the instance (onmode -yuk).
>This effectively knocks off all users so that we can perform system
>maintenance. Before the recycle occurs,
>I would like to gracefully stop ontape -c and trap the output generated
>by ontape.
>
>Any thoughts how I can mimick a "Ctrl/C" and capture the output?
>
>Regards,
>Steve Romankiw
>Executive Risk Inc.
echo "" | ontape -c 1>>/dirname/filename &
will capture, what ontape normally throws on screen, in '/dirname/filename'
while doing the log backup in background.
onmode -ky (flag u seems redundant), which I assume you are doingafter ensuring that no user is active, will cause ontape to stop.
Logs should be intact inspite of this 'uncontrolled' stop.
To be safe, you can precede the onmode -ky (a cron job, I guess) with
another cron command which kills the ontape process (simulates
Ctrl-C).
If you are running a single instance (or a single ontape command), try
kill -1 `ps aux | grep ontape | awk '{print $2}'`
which works under DEC-UNIX (3.2C)
HTH
-----------------
Rudy Fernandes
GIC, Kuwait
-----------------