HP-UX System Administrator's Guide: Configuration Management

7. Kill processes associated with the problem terminal.
CAUTION: Use extreme caution when killing processes. The processes will be
immediately and unconditionally terminated. Some valid processes might take a
long time to complete. Be sure to type carefully when entering the PID numbers
for the kill command to avoid killing the wrong process.
If you have another terminal that is still working, go to that terminal and log in
(you will need to be superuser). Execute the command:
# ps -ft terminal
This displays all processes associated with the terminal with which you are
having problems. Look at the column marked PID (these are the process IDs for
the processes associated with that terminal). Execute the following command,
listing each process ID associated with the problem terminal:
kill -9 process-id
For example:
# kill -9 20133
This should kill all processes associated with that terminal. The init process will
then respawn a getty process for that terminal (if it has been set up to do that,
in the /etc/inittab file) and you should once again be able to log in.
8. Attempt to log in to the previously hung terminal again.
If you are successful, you’ve fixed the problem. If not, continue to the next step.
9. Use cat to send an ASCII file to the hung terminal’s device file.
HP-UX communicates with peripherals through device files. These special files
are typically located in the directory /dev and are used by HP-UX to determine
which driver should be used to talk to the device (by referencing the major number)
and to determine the address and certain characteristics of the device with which
HP-UX is communicating (by referencing the minor number).
Try using the cat command to send an ASCII file (such as /etc/motd or /etc/
issue) to the device file associated with the problem terminal. For example, if
your problem terminal is associated with the device file ttyd1p4:
# cat /etc/motd > /dev/ttyd1p4
You should expect to see the contents of the file /etc/motd displayed on the
terminal associated with the device file /dev/ttyd1p4. If you do not, continue
to the next step.
10. Check the parameters of the device file for the problem terminal.
Device files have access permissions associated with them, just as other files do.
The file’s access permissions must be set so that you have access to the file. If you
set the file's permissions mode to 0622 (crw--w--w-), you should be safe.
148 Configuring Peripherals