JavaScript is required to for searching.
跳过导航链接
退出打印视图
手册页第 1M 部分:系统管理命令     Oracle Solaris 11 Information Library (简体中文)
search filter icon
search icon

文档信息

前言

简介

系统管理命令-第 1 单元

系统管理命令-第 2 单元

mail.local(1M)

makedbm(1M)

makemap(1M)

makeuuid(1M)

masfcnv(1M)

mdlogd(1M)

mdmonitord(1M)

mdnsd(1M)

medstat(1M)

metaclear(1M)

metadb(1M)

metadetach(1M)

metadevadm(1M)

metahs(1M)

metaimport(1M)

metainit(1M)

metaoffline(1M)

metaonline(1M)

metaparam(1M)

metarecover(1M)

metarename(1M)

metareplace(1M)

metaset(1M)

metassist(1M)

metastat(1M)

metasync(1M)

metattach(1M)

mib2mof(1M)

mibiisa(1M)

mkbootmedia(1M)

mkdevalloc(1M)

mkdevmaps(1M)

mkfifo(1M)

mkfile(1M)

mkfs(1M)

mkfs_pcfs(1M)

mkfs_udfs(1M)

mkfs_ufs(1M)

mknod(1M)

mkntfs(1M)

mkpwdict(1M)

modinfo(1M)

modload(1M)

modunload(1M)

mofcomp(1M)

mofreg(1M)

monacct(1M)

monitor(1M)

mount(1M)

mountall(1M)

mountd(1M)

mount_hsfs(1M)

mount_nfs(1M)

mount_pcfs(1M)

mount_smbfs(1M)

mount_tmpfs(1M)

mount_udfs(1M)

mount_ufs(1M)

mpathadm(1M)

mpstat(1M)

msgid(1M)

mvdir(1M)

named(1M)

named-checkconf(1M)

named-checkzone(1M)

named-compilezone(1M)

ncaconfd(1M)

ncheck(1M)

ncheck_ufs(1M)

ndd(1M)

ndmpadm(1M)

ndmpd(1M)

ndmpstat(1M)

netadm(1M)

netcfg(1M)

netcfgd(1M)

netservices(1M)

netstat(1M)

netstrategy(1M)

newaliases(1M)

newfs(1M)

newkey(1M)

nfs4cbd(1M)

nfsd(1M)

nfslogd(1M)

nfsmapid(1M)

nfsref(1M)

nfsstat(1M)

nscadm(1M)

nscd(1M)

nscfg(1M)

nslookup(1M)

nsupdate(1M)

ntfscat(1M)

ntfsclone(1M)

ntfscluster(1M)

ntfscmp(1M)

ntfscp(1M)

ntfsfix(1M)

ntfsinfo(1M)

ntfslabel(1M)

ntfsls(1M)

ntfsprogs(1M)

ntfsresize(1M)

ntfsundelete(1M)

nulladm(1M)

nwamd(1M)

obpsym(1M)

oplhpd(1M)

parted(1M)

pbind(1M)

pcitool(1M)

pginfo(1M)

pgstat(1M)

picld(1M)

ping(1M)

pkg2du(1M)

pkgadd(1M)

pkgadm(1M)

pkgask(1M)

pkgchk(1M)

pkgcond(1M)

pkgrm(1M)

plockstat(1M)

pntadm(1M)

polkit-is-privileged(1M)

pooladm(1M)

poolbind(1M)

poolcfg(1M)

poold(1M)

poolstat(1M)

ports(1M)

poweradm(1M)

poweroff(1M)

powertop(1M)

pppd(1M)

pppoec(1M)

pppoed(1M)

pppstats(1M)

praudit(1M)

prctmp(1M)

prdaily(1M)

projadd(1M)

projdel(1M)

projmod(1M)

prstat(1M)

prtacct(1M)

prtconf(1M)

prtdiag(1M)

prtdscp(1M)

prtfru(1M)

prtpicl(1M)

prtvtoc(1M)

psradm(1M)

psrinfo(1M)

psrset(1M)

pwck(1M)

pwconv(1M)

quot(1M)

quota(1M)

quotacheck(1M)

quotaoff(1M)

quotaon(1M)

raidctl(1M)

ramdiskadm(1M)

rarpd(1M)

rcapadm(1M)

rcapd(1M)

rctladm(1M)

rdate(1M)

rdisc(1M)

reboot(1M)

rem_drv(1M)

remove_allocatable(1M)

removef(1M)

reparsed(1M)

repquota(1M)

restricted_shell(1M)

rexd(1M)

rexecd(1M)

rlogind(1M)

rmmount(1M)

rmt(1M)

rmvolmgr(1M)

rndc(1M)

rndc-confgen(1M)

roleadd(1M)

roledel(1M)

rolemod(1M)

root_archive(1M)

route(1M)

routeadm(1M)

routed(1M)

rpcbind(1M)

rpc.bootparamd(1M)

rpcinfo(1M)

rpc.mdcommd(1M)

rpc.metad(1M)

rpc.metamedd(1M)

rpc.metamhd(1M)

rpc.rexd(1M)

rpc.rstatd(1M)

rpc.rusersd(1M)

rpc.rwalld(1M)

rpc.smserverd(1M)

rpc.sprayd(1M)

rpc.yppasswdd(1M)

rpc.ypupdated(1M)

rquotad(1M)

rsh(1M)

rshd(1M)

rstatd(1M)

rtc(1M)

rtquery(1M)

runacct(1M)

rusersd(1M)

rwall(1M)

rwalld(1M)

rwhod(1M)

sa1(1M)

sa2(1M)

sadc(1M)

sar(1M)

sasinfo(1M)

savecore(1M)

sbdadm(1M)

scadm(1M)

sckmd(1M)

scmadm(1M)

sconadm(1M)

sdpadm(1M)

sendmail(1M)

sf880drd(1M)

sftp-server(1M)

shadowd(1M)

shadowstat(1M)

share(1M)

shareall(1M)

sharectl(1M)

share_nfs(1M)

share_smb(1M)

showmount(1M)

shutacct(1M)

shutdown(1M)

slpd(1M)

smattrpop(1M)

smbadm(1M)

smbd(1M)

smbiod(1M)

smbiod-svc(1M)

smbios(1M)

smbstat(1M)

smrsh(1M)

smtnrhdb(1M)

smtnrhtp(1M)

smtnzonecfg(1M)

sasinfo(1M)

sndradm(1M)

sndrd(1M)

sndrsyncd(1M)

snmpdx(1M)

snmp-notify(1M)

snmpXwbemd(1M)

snoop(1M)

soconfig(1M)

soladdapp(1M)

soldelapp(1M)

solstice(1M)

sppptun(1M)

spray(1M)

sprayd(1M)

srptadm(1M)

sshd(1M)

ssh-keysign(1M)

startup(1M)

statd(1M)

stclient(1M)

stmfadm(1M)

stmsboot(1M)

strace(1M)

strclean(1M)

strerr(1M)

sttydefs(1M)

su(1M)

sulogin(1M)

svadm(1M)

svcadm(1M)

svccfg(1M)

svc.configd(1M)

svc.ipfd(1M)

svc.startd(1M)

swap(1M)

sync(1M)

syncinit(1M)

syncloop(1M)

syncstat(1M)

sysconfig(1M)

sysdef(1M)

syseventadm(1M)

syseventconfd(1M)

syseventd(1M)

syslogd(1M)

talkd(1M)

tapes(1M)

tcxconfig(1M)

telnetd(1M)

tftpd(1M)

th_define(1M)

th_manage(1M)

tic(1M)

tncfg(1M)

tnchkdb(1M)

tnctl(1M)

tnd(1M)

tninfo(1M)

tpmadm(1M)

traceroute(1M)

trapstat(1M)

ttymon(1M)

tunefs(1M)

turnacct(1M)

txzonemgr(1M)

tzreload(1M)

tzselect(1M)

uadmin(1M)

ucodeadm(1M)

ufsdump(1M)

ufsrestore(1M)

umount(1M)

umountall(1M)

umount_smbfs(1M)

unlink(1M)

unshare(1M)

unshareall(1M)

unshare_nfs(1M)

系统管理命令-第 3 单元

ttymon

- port monitor for terminal ports

用法概要

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

描述

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 initializes 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(4).) The values used for initialization are taken from the appropriate entry in the TTY settings file. This file is maintained by the sttydefs(1M) command. Default line disciplines on ports are usually set up by the autopush(1M) 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(4)), 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. Currently, the baud rates that can be determined by autobaud are 110, 1200, 2400, 4800, and 9600.

SMF Service Description

The primary smf(5) 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 system 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(1M).

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:

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 misconfigured, 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(1M), then consult the service log for additional messages or information to help resolve the problem.

安全

ttymon uses pam(3PAM) for session management. The PAM configuration policy, listed through /etc/pam.conf, specifies the modules to be used for ttymon. Here is a partial pam.conf file with entries for ttymon using the UNIX session management module.

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

If there are no entries for the ttymon service, then the entries for the “other” service will be used.

选项

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 specified. modules is a comma-separated list of pushable modules. 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 anything in timeout seconds after the prompt is sent.

-Ttermtype

Sets the TERM environment variable to termtype.

-v

Enables verbose messaging.

示例

示例 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

示例 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

环境变量

If any of the LC_* variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) 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 the LANG and the other LC_* variables. If none of the above variables is set in the environment, the “C” (U.S. style) 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.

文件

/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.

属性

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os
Interface Stability
Committed

另请参见

svcs(1), ct(1C), cu(1C), autopush(1M), sttydefs(1M), svcadm(1M), svccfg(1M), uucico(1M), vtdaemon(1M), pam(3PAM), logindevperm(4), pam.conf(4), utmpx(4), attributes(5), environ(5), pam_authtok_check(5), pam_authtok_get(5), pam_authtok_store(5), pam_dhkeys(5), pam_passwd_auth(5), pam_unix_account(5), pam_unix_auth(5), pam_unix_session(5), smf(5)

《Oracle Solaris 管理:常见任务》

附注

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.