Technical article 109412

How can I capture the screen output from a kernel relink to a file?

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

When I try to relink the kernel, multiple errors display on the
screen too quickly to read them all.  How can I capture the screen
output from a kernel relink?

Solution

It is necessary to redirect stderr to stdout and output stdout to a file, in order to capture the kernel relink screen output. To do this, take these steps:

1. Type:
# script /tmp/outfile
# cd /etc/conf/cf.d
# ./link_unix

2. To terminate scripting, type <Ctrl> - d (after relink finishes or fails).

3. To view the results, type:
# vi /tmp/outfile
The above method will capture the initiation of the relink, all
errors and warnings, and the end results, either of success or
failure.  It is important to remember to terminate the script
with <Ctrl> - d, so that it ceases to capture all screen activity.
If more detail of the process of relinking is desired, then you
may want to put "set -x" at the first uncommented line in
/etc/conf/bin/idbuild.  This will output the whole process of
the relink to the script, which may give a better indication
of which stage of the relink is failing.

NOTE: The script (TC) command captures everything on the screen, including the invisible "^M" character. To remove this character use the dtox(C) command and direct the output to another log file:

	# dtox /tmp/outfile > /tmp/outfile2

If you want a non-interactive method that captures only the initiation of relink and the end results (without errors or warnings), do the following:

1. Type:
# cd /etc/conf/cf.d
# ./link_unix -y 2>&1 > /tmp/outfile

2. When the relink (or attempted relink) is finished, the file /tmp/outfile can be edited, to view the relink information.

From the Xinuos technical article database, record 109412. Reproduced with permission. The original is at www.sco.com/ta/109412, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.