HP-UX System Administrator's Guide: Routine Management Tasks

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.
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. Usecatto 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/motddisplayed 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 files permissions mode to 622 (crw--w--w-), you should be safe.
Adding Peripherals 159