Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Configuring a System
Adding Peripherals
Chapter 3 261
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 -ef
The output will look similar to this:
UID PID PPID C STIME TTY TIME COMMAND
root 95 1 0 Jul 20 ? 0:00 /usr/sbin/getty -h ttyd1p0 9600
root 94 0 0 Jul 20 tty0p5 0:00 /usr/sbin/getty -h tty0p5 9600
root 22095 1 0 13:29:17 ? 0:00 /usr/sbin/getty -h ttyd2p1 9600
root 22977 1 0 14:42:28 ? 0:00 /usr/sbin/getty -h ttyd2p0 9600
root 14517 1 0 Jul 21 ttyd1p4 0:01 -csh [csh]
root 107 1 0 Jul 20 ? 0:00 /usr/sbin/getty -h ttyd3p0 9600
stevem 20133 1 0 11:20:24 ttyd2p5 0:00 -csh [csh]
Look in the column marked TTY for those processes that are associated
with the terminal with which you are having problems. Look at the
column marked PID for those entries (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
[
process-id
]...
If, in the example above, we wanted to kill the process associated with
terminal ttyd2p5, we would execute the command:
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.
Step 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.
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).