Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Advanced Administration
Previous Next

Administering ttymon Services

Use the pmadm command to add services, list the services of one or more ports associated with a port monitor, and enable or disable a service.

How to Add a Service

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Add a standard terminal service to the mbmon port monitor.
    # pmadm -a -p mbmon -s a -i root -v `ttyadm -V` -m "`ttyadm -i 'Terminal
     disabled' -l contty -m ldterm,ttcompat -S y -d /dev/term/a 
    -s /usr/bin/login`"

    Note - In this example, the input wraps automatically to the next line. Do not use a Return key or line feed.


    -a

    Specifies the add port monitor status flag.

    -p

    Specifies the pmtag mbmon as the port monitor tag.

    -s

    Specifies the svctag a as the port monitor service tag.

    -i

    Specifies the identity to be assigned to svctag when the service runs.

    -v

    Specifies the version number of the port monitor.

    -m

    Specifies the ttymon-specific configuration data formatted by ttyadm.

    The preceding pmadm command contains an embedded ttyadm command. The options in this embedded command are as follows:

    -b

    Specifies the bidirectional port flag.

    -i

    Specifies the inactive (disabled) response message.

    -l

    Specifies which TTY label in the /etc/ttydefs file to use.

    -m

    Specifies the STREAMS modules to push before invoking this service.

    -d

    Specifies the full path name to the device to use for the TTY port.

    -s

    Specifies the full path name of the service to invoke when a connection request is received. If arguments are required, enclose the command and its arguments in quotation marks (“).

How to View the Status of a TTY Port Service

Use the pmadm command as shown in this procedure to list the status of a TTY port or all the ports that are associated with a port monitor.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. List one service of a port monitor.
    # pmadm -l -p mbmon -s a
    -l

    Lists service information on the system.

    -p

    Specifies the pmtag mbmon as the port monitor tag.

    -s

    Specifies the svctag a as the port monitor service tag.

Example 3-2 Viewing the Status of a TTY Port Monitor Service

This example lists all services of a port monitor.

# pmadm -l -p mbmon
PMTAG  PMTYPE  SVCTAG FLAGS ID    <PMSPECIFIC> 
mbmon  ttymon  a      -     root  /dev/term/a - - /usr/bin/login - contty
ldterm,ttcompat login:  Terminal disabled tvi925 y  #
PMTAG

Identifies the port monitor name, mbmon, that is set by using the pmadm -p command.

PMTYPE

Identifies the port monitor type, ttymon.

SVCTAG

Indicates the service tag value that is set by using the pmadm -s command.

FLAGS

Identifies whether the following flags are set by using the pmadm -f command.

  • x — Do not enable the service.

  • u — Create a utmpx entry for the service.

  • dash (-) — No flags are set.

ID

Indicates the identity assigned to the service when it is started. This value is set by using the pmadm -i command.

<PMSPECIFIC>

Information

/dev/term/a

Indicates the TTY port path name that is set by using the ttyadm -d command.

-

Indicates whether the following flags are set by using the ttyadm -c -b -h -I -r command.

  • c — Sets the connect on carrier flag for the port.

  • b — Sets the port as bidirectional, allowing both incoming and outgoing traffic.

  • h — Suppresses an automatic hangup immediately after an incoming call is received.

  • I — Initializes the port.

  • r— Forces ttymon to wait until it receives a character from the port before it prints the login: message.

  • dash (-) — No flags are set.

-

Indicates a value that is set by using the ttyadm -r count option. This option determines when ttymon displays a prompt after receiving data from a port. If count is 0, ttymon waits until it receives any character. If count is greater than 0, ttymon waits until count new lines have been received. No value is set in this example.

/usr/bin/login

Identifies the full path name of the service to be invoked when a connection is received. This value is set by using the ttyadm -s command.

-

Identifies the ttyadm -t command's time-out value. This option specifies that ttymon should close a port if the open on the port succeeds, and no input data is received in timeout seconds. There is no time-out value in this example.

contty

Identifies the TTY label in the /etc/ttydefs file. This value is set by using the ttyadm -l command.

ldterm,ttcompat

Identifies the STREAMS modules to be pushed. These modules are set by using the ttyadmin -m command.

login: Terminal disabled

Identifies an inactive message to be displayed when the port is disabled. This message is set by using the ttyadm -i command.

tvi925

Identifies the terminal type, if set, by using the ttyadm -T command. The terminal type is tvi925 in this example.

y

Identifies the software carrier value that is set by using the ttyadm -S command. n turns the software carrier off. y turns the software carrier on. The software carrier is turned on in this example.

#

Identifies any comment specified with the pmadm -y command. There is no comment in this example.

How to Enable a Port Monitor Service

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Enable a disabled port monitor service.
    # pmadm -e -p mbmon -s a
    -e

    Specifies the enable flag.

    -p

    Specifies the pmtag mbmon as the port monitor tag.

    -s

    Specifies the svctag a as the port monitor service tag.

How to Disable a Port Monitor Service

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Disable a port monitor service.
    # pmadm -d -p mbmon -s a
    -d

    Specifies the disable flag.

    -p

    Specifies the pmtag mbmon as the port monitor tag.

    -s

    Specifies the svctag a as the port monitor service tag.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire