|
|
DTC Device File Access Utilities and Telnet Port Identification: HP 9000 Computers > Chapter 4 Defining and Executing DDFA Parameters Managing Outgoing Dedicated Ports With dpp and ocd |
|
Each outgoing dedicated port is managed by an outgoing connection daemon, ocd. Once all outgoing dedicated ports have been defined in the dedicated port file, /etc/ddfa/dp, the DDFA Utilities can be started with the dpp command (see next paragraph). The result of this step will be that one outgoing connection daemon (ocd) process will be running for each valid outgoing entry defined in the dedicated port file. The dedicated port parser, dpp, scans the dedicated port file and spawns an ocd process for each outgoing entry in the file. The dpp program can be run manually, or to start it up automatically at system bootup, set the system variable DDFA (to 1) in the /etc/rc.config.d/netdaemons file.
Full path names must be specified for the dp file and log files. The dpp command performs the following actions for each outgoing dedicated port defined in the dp file:
After running dpp, you can check to see that the ocd processes are running by using the HP-UX ps -ef command from the Shell prompt as follows:
After the ocd processes have been started, accessing the pseudonym (opening the slave side of the pty) results in access to the associated device. Dpp cannot execute an ocd process for an entry in the dp file if the pty device file specified in that entry already exists. The existence of such a file could indicate that an ocd process is already running for that entry, or that another application is already using the device file. Therefore, it is important to kill all running ocd daemons properly and remove the device files they use before using dpp to start or restart the ocd daemons. Stopping the DDFA Utilities involves two steps.
Sending a signal 15 to an ocd process causes both of these things to happen automatically. For example,
The pid is the process identification number of the ocd daemon. It can be found by executing ps -ef. The kill -9 command also kills the ocd process, but does not remove the device file. If the kill -9 command is used, you will have to remove the device file manually from the /dev/telnet directory using the HP-UX rm command. Therefore, the kill -15 command is more complete. Running the dpp program with the -k option causes dpp to kill all ocd processes for ports defined in the dp file and remove their associated pty device files. In addition, it restarts ocd processes. Using dpp -k at system startup time is an excellent way to start up the ocd processes. Then all ocd processes defined in the dp file are started properly and old files removed even if the ocd processes were previously aborted. The syntax is:
After adding entries for outgoing dedicated ports to the dp file, run dpp without the -k option. The -k option causes ocd processes for existing entries to be killed. Aborting the existing ocd processes disrupts service to any current active sessions. To start ocd processes for the newly added entries to the dp file, execute dpp without the -k option. The syntax is:
Ocd processes will be started only for the newly added entries. Dpp will ignore entries that already exist. If you remove outgoing entries from the dp file by running dpp, be sure to kill their associated ocd processes using the kill -15 command. This command will ensure that the ocd processes and their associated device files are removed properly. The syntax is:
The <ocd pid> is the process identification number of the ocd daemon whose entry was removed from the dp file. |
|