Thanks for your help but I still can not get this to work…
With the quotes, I get the following error: on: No such file or directory
(progX | tee progX.out)
Maybe I should describe what I need to do and perhaps you can direct me down
a different path…
We have a machine on which a number of applications are created during boot
time in the sysinit.1 file…
There are times when we need to Telnet to the machine, shutdown the
applications and restart them.
If we just restart them and then disconnect the Telnet session the
applications terminate as well… so we need them detached from the shell
that creates them - we thought the ON utility would do this for us but we
had that problem of re-directing their output to a specific file. One option
would have been to simply issue a ‘shutdown’ command - which was our first
choice… however, on these particular machines, they will not reboot when
shutdown (do not know why!) … for some reason the boot process always hangs
just prior to the login prompt. Powering the machine off is the only way to
reboot… the machines are disk-on-chip based remote units… powering off is
not an option…
So the real problem is this…
How to Telnet to a remote machine, start a process running with its output
directed to a file, and logout while leaving the created process active?
Mario Charest <firstname.lastname@example.org> wrote in message
“Brian Delsey” <> email@example.com> > wrote in message
news:9ftr4a$jv4$> firstname.lastname@example.org> …
Does anyone know how to use the ON utility to start a detatched process
running on a console device while also redirecting its stdout to a file?
For example, I want to essentially do the equivalent of the following:
progX >progX.out &
If I issue the following:
on -d -t /dev/con1 progX >progX.out &
The result is that progX runs, and progX.out is created, but the output
progX still goes to /dev/con1 and progX.out is a 0 length file.
I have tried other permutations as well without success. Is there
way to accomplish what I need?
on -t /dev/conX “progX | tee prog.out”
If you don’t need to redirect to a specific console:
progX | tee prog.out
Any help would be greatly appreciated…