ttymon(8) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

ttymon(8)

System Administration Commands                                       ttymon(8)



NAME
       ttymon - port monitor for terminal ports

SYNOPSIS
       /usr/sbin/ttymon -g [-d device] [-h] [-t timeout]
            [-l ttylabel] [-p prompt] [-m modules] [-T termtype]

DESCRIPTION
       ttymon  is a STREAMS-based TTY port monitor. Its function is to monitor
       ports, to set terminal modes, baud rates, and line disciplines for  the
       ports, and to connect users or applications to services associated with
       the ports. Each instance of ttymon  monitors  one  port,  specified  at
       startup.  When  an instance of ttymon is started, ttymon first initial‐
       izes the line disciplines, if they are specified,  and  the  speed  and
       terminal  settings. For ports with entries in /etc/logindevperm, device
       owner, group and permissions are set. (See logindevperm(5).) The values
       used for initialization are taken from the appropriate entry in the TTY
       settings file. This file is  maintained  by  the  sttydefs(8)  command.
       Default line disciplines on ports are usually set up by the autopush(8)
       command of the Autopush Facility.


       ttymon then writes the prompt and waits for user  input.  If  the  user
       indicates  that  the  speed is inappropriate by pressing the BREAK key,
       ttymon tries the next speed and writes the  prompt  again.  When  valid
       input  is  received,  ttymon  creates a utmpx entry (see utmpx(5)), and
       execs the login service for the port. Valid input consists of a  string
       of at least one non-newline character, terminated by a carriage return.


       If  autobaud  is  enabled  for a port, ttymon will try to determine the
       baud rate on the port automatically. Users must enter a carriage return
       before  ttymon  can  recognize the baud rate and print the prompt. Cur‐
       rently, the baud rates that can be  determined  by  autobaud  are  110,
       1200, 2400, 4800, and 9600.

   SMF Service Description
       The primary smf(7) service which invokes ttymon is svc:/system/console-
       login,  which  may  have  multiple  service  instances.  Instances  are
       described  in  greater  detail  below. The service provides a number of
       properties within the property group ttymon to control the  invocation,
       as follows:

         NAME                  TYPE               TTYMON OPTION
         ----------------------------------------------------------
         device                astring            [-d device]
         nohangup              boolean            [-h]
         label                 astring            [-l label]
         modules               astring            [-m module1,module2]
         prompt                astring            [-p prompt]
         timeout               count              [-t timeout]
         terminal_type         astring            [-T termtype]



       If  any  value  is the empty string or an integer set to zero, then the
       option is not passed to the ttymon invocation.

       svc:/system/console-login:default

           The default instance always represents the ttymon that offers login
           on the system hardware console.

           See  EXAMPLES for an example of how to modify settings for the sys‐
           tem console.


       svc:/system/console-login:{vt2, vt3, vt4, vt5, vt6}

           Additional service instances are provided for the system's  virtual
           consoles.  If  virtual  consoles  are not available, these services
           will automatically disable themselves. See vtdaemon(8).


       svc:/system/console-login:{terma, termb}

           svc:/system/console-login:terma and svc:/system/console-login:termb
           are provided as a convenience and can assist the user in setting up
           login services for additional ports  /dev/term/a  and  /dev/term/b.
           These services are disabled by default.


   Creating Additional Instances
       The  user  can  configure  additional  service instances for additional
       devices. This can be accomplished in any of these ways:

           o      Manually creating the service instance using svccfg(8).


           o      Creating the service in a service profile (see smf(7)).


           o      Creating  a  service   manifest   for   additional   service
                  instance(s).



       See  EXAMPLES  for an example of manually configuring the service using
       svccfg.

   SMF Service Errors
       In most cases when an instance of the console-login service is  miscon‐
       figured,  it  will transition itself to the maintenance state. Use svcs
       -l (see svcs(1)) to determine the location of the  service's  log  file
       and consult the log for additional information.


       In  some error cases, the service may respawn indefinitely. Disable the
       service using svcadm(8), then consult the service  log  for  additional
       messages or information to help resolve the problem.

SECURITY
       ttymon  uses  pam(3PAM)  for  session management. The PAM configuration
       policy, specified in /etc/pam.conf or per-service files in /etc/pam.d/,
       specifies the modules to be used for ttymon. Here is a partial pam.conf
       file with an entry for ttymon using the UNIX session management module:

         ttymon session required /usr/lib/security/pam_unix_session.so.1



       The equivalent PAM configuration using /etc/pam.d/ would be the follow‐
       ing entry in /etc/pam.d/ttymon:

         session required /usr/lib/security/pam_unix_session.so.1



       If there are no entries for the ttymon service in /etc/pam.conf and the
       /etc/pam.d/ttymon file does not exist, then the entries for the "other"
       service  in /etc/pam.conf will be used. If there are not any entries in
       /etc/pam.conf  for  the  "other"   service,   then   the   entries   in
       /etc/pam.d/other will be used.

OPTIONS
       The following options are supported:

       -g            The -g option is required for historical reasons.


       -ddevice      device  is the full path name of the port to which ttymon
                     is to attach. If  this  option  is  not  specified,  file
                     descriptor  0 must be set up by the invoking process to a
                     TTY port.


       -h            If the -h flag is not set, ttymon will force a hangup  on
                     the  line by setting the speed to zero before setting the
                     speed to the default or specified speed.


       -lttylabel    ttylabel is a link to a speed and TTY definition  in  the
                     ttydefs  file. This definition tells ttymon at what speed
                     to run initially, what the initial TTY settings are,  and
                     what  speed  to  try  next if the user indicates that the
                     speed is inappropriate by pressing  the  BREAK  key.  The
                     default speed is 9600 baud.


       -mmodules     When  initializing  the port, ttymon will pop all modules
                     on the port, and then push modules in  the  order  speci‐
                     fied.  modules is a comma-separated list of pushable mod‐
                     ules. Default modules on the ports are usually set up  by
                     the Autopush Facility.


       -pprompt      Allows  the  user to specify a prompt string. The default
                     prompt is Login:.


       -ttimeout     Specifies that ttymon should exit if no  one  types  any‐
                     thing in timeout seconds after the prompt is sent.


       -Ttermtype    Sets the TERM environment variable to termtype.


       -v            Enables verbose messaging.


EXAMPLES
       Example 1 Setting the Terminal Type for the System Console



       The  following  example sets the value of the terminal type (-T) option
       for the system console ttymon invocation:


         # svccfg -s svc:/system/console-login:default \
                  "setprop ttymon/terminal_type = xterm"
         # svcadm refresh svc:/system/console-login:default


       Example 2 Creating a Service Instance for an Additional Serial Device



       In this example, the user wishes to configure an additional instance of
       the  svc:/system/console-login service in order to offer login services
       over a terminal connected by means of a USB serial adapter. Assume that
       the  USB  serial  port is present as /dev/term/1, and the user plans to
       connect a vt100 terminal to it. In this case, the service instance  can
       be named term1 (or any other name) and defined as follows:


         # svccfg -s svc:/system/console-login "add term1"
         # SVC=svc:/system/console-login:term1
         # svccfg -s $SVC "addpg ttymon application"
         # svccfg -s $SVC "setprop ttymon/device = /dev/term/1"
         # svccfg -s $SVC "setprop ttymon/terminal_type = vt100"
         # svcadm refresh $SVC
         # svcadm enable $SVC


ENVIRONMENT VARIABLES
       If  any  of the LC_* variables (LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COL‐
       LATE, LC_NUMERIC, or LC_MONETARY) (see environ(7)) are not set  in  the
       environment,  the operational behavior of ttymon for each corresponding
       locale category is determined by the  value  of  the  LANG  environment
       variable. If LC_ALL is set, its contents are used to override both LANG
       and the other LC_* variables. If none of the above variables is set  in
       the environment, the "C" locale determines how ttymon behaves.

       LC_CTYPE    Determines  how ttymon handles characters. When LC_CTYPE is
                   set to a valid value, ttymon can display  and  handle  text
                   and  filenames containing valid characters for that locale.
                   ttymon can display and  handle  Extended  UNIX  Code  (EUC)
                   characters where any individual character can be 1, 2, or 3
                   bytes wide. ttymon can also handle EUC characters of 1,  2,
                   or  more  column widths. In the "C" locale, only characters
                   from ISO 8859-1 are valid.


FILES
       /etc/logindevperm

           Contains information that is used by login(1) and ttymon to  change
           the  owner,  group, and permissions of devices upon logging into or
           out of a console device.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommit‐
       ted


SEE ALSO
       svcs(1),    pam(3PAM),    logindevperm(5),    pam.conf(5),    utmpx(5),
       attributes(7),  environ(7),  pam_authtok_check(7),  pam_authtok_get(7),
       pam_authtok_store(7),        pam_dhkeys(7),         pam_passwd_auth(7),
       pam_unix_account(7),   pam_unix_auth(7),  pam_unix_session(7),  smf(7),
       autopush(8), sttydefs(8), svcadm(8), svccfg(8), vtdaemon(8)

NOTES
   Service Access Facility (SAF and SAC)
       ttymon was formerly a component of the Service Access Facility and  was
       invoked  by  sac, the Service Access Controller. This facility has been
       removed in this release of Solaris, and a conversion to SMF of relevant
       portions was performed.

   Competition for Ports
       If  a port is monitored by more than one ttymon, it is possible for the
       ttymons to send out prompt messages in such a way that they compete for
       input.


       It  is  possible  that  two svc:/system/console-login service instances
       could refer to the same underlying device. For example, if the system's
       hardware  console  is  connected  (due  to settings or autodetection in
       firmware)  to  serial  port  A,  then  both  the   svc:/system/console-
       login:default  and  svc:/system/console-login:terma services will refer
       to same underlying hardware device. Care should be taken when  defining
       or  enabling  additional  service instances to avoid this situation, or
       the two ttymons will compete for input.



Oracle Solaris 11.4               11 May 2021                        ttymon(8)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3