************* BACK AND FORTH PAGING SUBROUTINE ************

PAGEFLOP

If they want to quit, do so
 If They want to quit subsession, Do SO!
  Decrement LOCAL and GLOBAL Page Counters

FORWARD

  Increment LOCAL and GLOBAL Page Counters
   *************** END PAGEFLOP *********************
  ****** CHAPTER INTERNAL SELECTOR ALGORITHM ******

SELECTOR

   Reset Local Page Counter

SELAGAIN

 CHECK IF ONLY A <CR>

WRONGSEL

YOUR SELECTION IS NOT IN THE 0 - #SELIMIT  RANGE  Please try again

AANVANG

Copyright CourseWare Technologies Inc. 1985-1988


 Lesson - 4


 SOLVING PROBLEMS 

P0

Solving Problems|Topics to Learn|4-0|11,48
     #                    Topic
    ---                  -------
     1    -    Fixing a Non-echoing Terminal
     2    -    Stopping a Runaway Process
     3    -    Stopping Unwanted Print Requests
     4    -    Recovering from a System Crash
     5    -    Solving Off-line Printer Problems
     6    -    Solving File System Problems
     7    -    Solving Other System Problems
     8    -    Lesson Review
     0    -    Return to the Main Menu

P1

Solving Problems|Fixing a Non-echoing Terminal|4-1.1|9,48
     A non-echoing terminal is any terminal 
that does not display characters when they are 
entered at the keyboard.


     This abnormal condition occurs when a 
program which has the "echo" disabled, is 
terminated prematurely because of an error
or when the user presses the BREAK key.

P2

Solving Problems|Fixing a Non-echoing Terminal|4-1.2|12,55
     To restore a non-echoing terminal to its normal, 
echoing condition, follow these steps:

    1.  Press the CONTROL and the j keys simultaneously 
        (This is the equivalent of a LINEFEED).  Ignore 
        any messages that are displayed.

    2.  Enter the command stty sane (this will not be 
        echoed), then press <CR>.  If the terminal 
        still does not echo characters, then you 
        probably mistyped stty sane.
    2.  Press the LINEFEED key and enter the command 
        reset (this will not be echoed), then press 
        LINEFEED again.  If the terminal still does 
        not echo characters, then you probably 
        mistyped the reset command.

P3

Solving Problems|Fixing a Non-echoing Terminal|4-1.3|4,48
     If this procedure does not restore the 
terminal to normal operation, then you probably 
have a runaway process, the solution for which 
is explained in the next section.

P4

Solving Problems|Stopping a Runaway Process|4-2.1|9,52
     A runaway process is one that cannot be stopped 
from the terminal from which it was invoked.


     This abnormal condition occurs whenever an
error prevents anything you enter from reaching 
the system.  Errors like this can occur in a 
program where an endless loop occurs so that the 
signals "SIGINT" and "SIGQUIT" are ignored.

P5

Solving Problems|Stopping a Runaway Process|4-2.2|14,52
     A runaway process may be stopped from another 
terminal (or another window) by the owner of the 
process or a superuser.


     The command syntax for stopping such a process 
is:
kill  -9  PID

where PID is the process identification number.


     Use the ps  -ef command to determine the 
PID of the runaway process.
     Use the ps  -aux command to determine the 
PID of the runaway process.

P6

Solving Problems|Unwanted Print Requests|4-3.1|14,59
     Occasionally a user will send a long file to the 
printer that he/she wishes to stop.  If the file is still
being processed, i.e., is listed with the ps command, you
may be able to kill the job before it enters the print queue.


     Once the job has entered the print queue, you need to 
determine the printer identification number of the print 
request with the lpstat command and then (as superuser 
or as the owner of the process) issue the command to remove 
the job from the printer queue (that is, cancel the print 
request).  The command is:

cancel  print-request-id
lprm  print-request-id

P7

Solving Problems|Recovering from a System Crash|4-4.1|12,56
     A system crash is a sudden disruption in system 
operation that prevents any further work on the computer.


     System crashes are very rare; however, when they 
occur, they result either from some hardware failure or 
because of damage to some of the system files.


     When a system crash occurs, the system will usually 
display a message  explaining the cause of the error and 
then stop.

P8

Solving Problems|Recovering from a System Crash|4-4.2|15,54
     The error that caused a system crash may be 
easily correctable, or may be fatal if the computer 
has a serious software or hardware malfunction.


     Often system errors can be corrected, and the 
processing can be brought back to normal simply by 
turning the system off and then restarting the 
system as described in the System Administrator 
tutorial.


     Another method for correcting fatal system 
problems is to read error dumps when /etc/errdump 
is enabled.
Solving Problems|Recovering from a System Crash|4-4.2|10,54
     The error that caused a system crash may be 
easily correctable, or may be fatal if the computer 
has a serious software or hardware malfunction.


     Often system errors can be corrected, and the 
processing can be brought back to normal simply by 
turning the system off and then restarting the 
system as described in the System Administrator 
tutorial.

P9

Solving Problems|Off-line Printer Problems|4-5.1|3,54
     A problem with an off-line printer is usually 
suspected when the printer does not produce the 
output you expected.

P10

Solving Problems|Off-line Printer Problems|4-5.2|13,54
     The first thing that you should check is whether 
the line printer is on-line.  Other printer hardware 
problems include:

     1.  Paper is jammed in the printer. 
     2.  The printer is set to the serial instead of 
         the parallel mode or vice-versa.
     3.  The printer is set to an incorrect character 
         set.  Consult the printer owner's manual for 
         other possible problems.

     If the printer is properly configured, then the
problem is with the spooling software configuration.

P11

Solving Problems|Off-line Printer Problems|4-5.3|9,54
The lpc command is used to control the operation of the 
line printer system.  It is an interactive program which 
lets you do things like:

     *  enable or disable a printer
     *  enable or disable a printer's spooling queue
     *  rearrange the order of jobs in a queue
     *  check the status of printers, their queues and 
        their daemons

P12

Solving Problems|Off-line Printer Problems|4-5.4|7,60
If you have a problem with a particular printer: 

  1.  use the lpc program to abort the printer daemon,
  2.  go to the /usr/spool/lpg directory and remove relevant 
      spooled files,
  3.  use the lpc program to start the printer spooling 
      mechanism again.

P13

Solving Problems|File System Problems|4-6.1|8,48
     Most file system errors are detected and 
solved automatically by the fsck program.


     On the other hand, errors such as write 
permission violations, unavailable file system, 
and other configuration problems are due to 
improper system configuration.

P14

Solving Problems|File System Problems|4-6.2|8,52
     Unavailable file systems result from errors 
in the script in the /etc/rc file where it fails 
to mount the necessary file systems.


     An unwritable file system (one which cannot 
be written to by anyone) results when a file 
system is mounted as a read only file system.

P15

Solving Problems|File System Problems|4-6.3|5,56
     Unfortunately, situations do occur when some 
critical UNIX system files are lost.  Because of the 
large size of the UNIX operating system, you may not 
know exactly which missing files are causing various 
system problems.

P16

Solving Problems|File System Problems|4-6.4|9,56
     When you do not know which files to restore or 
to modify to bring your UNIX system back to a normal 
state, you have two options:  

     1.  call the software support person if you have 
         one, or

     2.  reload the system during the lowest system 
         usage period.

P17

Solving Problems|Solving Other System Problems|4-7.1|12,55
     Several other system problems may occur.  Your 
readiness and understanding are your best insurance.


     Restoring free space is necessary when the 
system runs out of disk space and prints a message 
like:

out of space on /dev/rdisk

You will have look through the specified file system 
and remove any unnecessary files to free up more space.

P18

Solving Problems|Solving Other System Problems|4-7.2|12,54
     Hidden files, those whose names begin with a 
dot (.), or those whose names have control characters 
in them, may be removed with:

rm  .[a-z]*

or by matching some characters in the name with control 
characters, for example:

rm  *as*  

Be sure you don't remove files like .login!

P19

Solving Problems|Solving Other System Problems|4-7.3|5,58
     Lost files or file systems may be restored from 
your backups by using the restore, cpio, or tar commands.  
If you do not have backups of some critical files, then 
you will have to reload the entire UNIX system, hopefully 
being able to backup all users' work beforehand.