R2511-HP MSR Router Series Terminal Access Configuration Guide(V5)
59
• You can use the kill 8312 command to kill the ttyd child processes corresponding to the pseudo
terminal ttyp40.
Use the kill command, rather than the kill -9 command, to kill ttyd processes.
Enabling ttyd autorun at system startup
1. Open the file /etc/init.d/ttyd.
# vi /etc/init.d/ttyd
2. Add the following to the file:
case "$1" in
'start')
echo "Start ttyd ..."
# To launch multiple configuration files, list each of them in a line.
/etc/ttyd /etc/ttyd.conf
;;
'stop')
echo "Stop ttyd ..."
pid=`ps -ef | grep ttyd | awk '{if ($3 == 1) print $0}' | awk '{print $2}'`
if [ ! "$pid" = "" ]
then
kill $pid
fi
;;
esac
3. Save your configuration and exit.
4. Link the file to the startup directory.
# chmod u+x /etc/init.d/ttyd
# ln -s /etc/init.d/ttyd /etc/rc2.d/S99ttyd
# ln -s /etc/init.d/ttyd /etc/rc0.d/K00ttyd
Installing and using ttyd administration program ttyadm
CAUTION:
The programs ttyadm, ttyd, and ttyadmcmd must be placed under the same directory.
A terminal administration program named ttyadm is provided for managing ttyd easily on a Unix server.
It consists of two executable files: ttyadmcmd and ttyadm. ttyadm is a shell program and can be modified
as needed and run without compilation, greatly facilitating maintenance. You can use this tool to
manage ttyd processes, without the need of entering complex commands manually. You can also add
your own shell commands into the ttyadm program as desired.
After logging into the Unix server as root, enter /etc/ttyadm at the prompt to launch ttyd administration
program. The following main interface appears:
***********************************************
HP ttyd Administration Program
***********************************************
Main menu
1 - Process management
2 - View TCP connections.










