1. Trang chủ
  2. » Ngoại Ngữ

solaris 9 user command phần 5 pot

156 299 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 156
Dung lượng 805,05 KB

Nội dung

“9f”,or“9s”. That is, each subsection must be searched separately by man -s. Each section contains descriptions apropos to a particular reference category, with subsections refining these distinctions. See the intro manual pages for an explanation of the classification used in this release. Before searching for a given name, man constructs a list of candidate directories and sections. man searches for name in the directories specified by the MANPATH environment variable. If this variable is not set, /usr/share/man is searched by default. Within the manual page directories, man confines its search to the sections specified in the following order: ■ sections specified on the command line with the -s option ■ sections embedded in the MANPATH environment variable ■ sections specified in the man.cf file for each directory specified in the MANPATH environment variable If none of the above exist, man searches each directory in the manual page path, and displays the first matching manual page found. The man.cf file has the following format: MANSECTS=section[,section] Lines beginning with ‘#’ and blank lines are considered comments, and are ignored. Each directory specified in MANPATH can contain a manual page configuration file, specifying the default search order for that directory. Manual pages are marked up in nroff(1) or sgml(5). Nroff manual pages are processed by nroff(1) or troff(1) with the -man macro package. Please refer to man(5) for information on macro usage. SGML—tagged manual pages are processed by an SGML parser and passed to the formatter. When formatting an nroff manual page, man examines the first line to determine whether it requires special processing. If the first line is a string of the form: ’\" X where X is separated from the ‘"’ by a single SPACE and consists of any combination of characters in the following list, man pipes its input to troff(1) or nroff(1) through the corresponding preprocessors. e eqn(1), or neqn for nroff r refer(1) t tbl(1) v vgrind(1) man(1) Search Path Formatting Manual Pages Preprocessing Nroff Manual Pages User Commands 855 If eqn or neqn is invoked, it will automatically read the file /usr/pub/eqnchar (see eqnchar(5)). If nroff(1) is invoked, col(1) is automatically used. If the first line of the nroff manual page is a reference to another manual page entry fitting the pattern: .so man*/sourcefile man processes the indicated file in place of the current one. The reference must be expressed as a path name relative to the root of the manual page directory subtree. When the second or any subsequent line starts with .so, man ignores it; troff(1) or nroff(1) processes the request in the usual manner. Manual pages are identified as being marked up in SGML by the presence of the string <!DOCTYPE.Ifthefile also contains the string SHADOW_PAGE, the file refers to another manual page for the content. The reference is made with a file entity reference to the manual page that contains the text. This is similar to the .so mechanism used in the nroff formatted man pages. See environ(5) for descriptions of the following environment variables that affect the execution of man: LC_CTYPE, LC_MESSAGES, and NLSPATH. MANPATH A colon-separated list of directories; each directory can be followed by a comma-separated list of sections. If set, its value overrides /usr/share/man as the default directory search path, and the man.cf file as the default section search path. The -M and -s flags, in turn, override these values.) PAGER A program to use for interactively delivering man’s output to the screen. If not set, ‘more -s’ is used. See more(1). TCAT The name of the program to use to display troffed manual pages. TROFF The name of the formatter to use when the -t flag is given. If not set, troff(1) is used. The following exit values are returned: 0 Successful completion. >0 An error occurred. /usr/share/man root of the standard manual page directory subtree /usr/share/man/man?/* unformatted nroff manual entries /usr/share/man/sman?/* unformatted SGML manual entries man(1) Referring to Other Nroff Manual Pages Processing SGML Manual Pages ENVIRONMENT VARIABLES EXIT STATUS FILES 856 man pages section 1: User Commands • Last Revised 10 Dec 2001 /usr/share/man/cat?/* nroffed manual entries /usr/share/man/fmt?/* troffed manual entries /usr/share/man/windex table of contents and keyword database /usr/share/lib/tmac/an standard –man macro package /usr/share/lib/sgml/locale/C/dtd/* SGML document type definition files /usr/share/lib/sgml/locale/C/solbook/* SGML style sheet and entity definitions directories /usr/share/lib/pub/eqnchar standard definitions for eqn and neqn man.cf default search order by section See attributes(5) for descriptions of the following attributes: ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWdoc CSI Enabled (see NOTES) apropos(1), cat(1), col(1), eqn(1), more(1), nroff(1), refer(1), tbl(1), troff(1), vgrind(1), whatis(1), catman(1M), attributes(5), environ(5), eqnchar(5), man(5), sgml(5) The -f and -k options use the windex database, which is created by catman(1M). The man command is CSI-capable. However, some utilities invoked by the man command, namely, troff, eqn, neqn, refer, tbl, and vgrind, are not verified to be CSI-capable. Because of this, the man command with the -t option may not handle non-EUC data. Also, using the man command to display man pages that require special processing through eqn, neqn, refer, tbl,orvgrind may not be CSI-capable. The manual is supposed to be reproducible either on a phototypesetter or on an ASCII terminal. However, on a terminal some information (indicated by font changes, for instance) is lost. man(1) ATTRIBUTES SEE ALSO NOTES BUGS User Commands 857 Some dumb terminals cannot process the vertical motions produced by the e (see eqn(1)) preprocessing flag. To prevent garbled output on these terminals, when you use e, also use t, to invoke col(1) implicitly. This workaround has the disadvantage of eliminating superscripts and subscripts, even on those terminals that can display them. Control-q will clear a terminal that gets confused by eqn(1) output. man(1) 858 man pages section 1: User Commands • Last Revised 10 Dec 2001 mconnect – connect to SMTP mail server socket mconnect [-p port] [-r] [hostname] The mconnect utility opens a connection to the mail server on a given host, so that it can be tested independently of all other mail software. If no host is given, the connection is made to the local host. Servers expect to speak the Simple Mail Transfer Protocol (SMTP) on this connection. Exit by typing the quit command. Typing EOF sends an end of file to the server. An interrupt closes the connection immediately and exits. The following options are supported: -p port Specify the port number instead of the default SMTP port (number 25) as the next argument. -r "Raw" mode: disable the default line buffering and input handling. This produces an effect similar to telnet(1) to port number 25. The following operand is supported: hostname The name of a given host. The mconnect command is IPv6–enabled. See ip6(7P). /etc/mail/sendmail.hf help file for SMTP commands See attributes(5) for descriptions of the following attributes: ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWcsu telnet(1), sendmail(1M), attributes(5), ip6(7P) Postel, Jonathan B., RFC 821, Simple Mail Transfer Protocol, Information Sciences Institute, University of Southern California, August 1982. mconnect(1) NAME SYNOPSIS DESCRIPTION OPTIONS OPERANDS USAGE FILES ATTRIBUTES SEE ALSO User Commands 859 mcs – manipulate the comment section of an object file /usr/ccs/bin/mcs {-c|-d|-p|-V|-astring |-nname…}file… The mcs command is used to manipulate a section, by default the .comment section, in an ELF object file. It is used to add to, delete, print, and compress the contents of a section in an ELF object file, and print only the contents of a section in a COFF object file. mcs cannot add, delete, or compress the contents of a section that is contained within a segment. If the input file is an archive (see ar(3HEAD)), the archive is treated as a set of individual files. For example, if the -a option is specified, the string is appended to the comment section of each ELF object file in the archive; if the archive member is not an ELF object file, then it is left unchanged. mcs must be given one or more of the options described below. It applies, in order, each of the specified options to each file. The following options are supported: -a string Appends string to the comment section of the ELF object files. If string contains embedded blanks, it must be enclosed in quotation marks. -c Compresses the contents of the comment section of the ELF object files. All duplicate entries are removed. The ordering of the remaining entries is not disturbed. -d Deletes the contents of the comment section from the ELF object files. The section header for the comment section is also removed. -n name Specifies the name of the comment section to access if other than .comment. By default, mcs deals with the section named .comment. This option can be used to specify another section. mcs can take multiple -n options to allow for specification of multiple section comments. -p Prints the contents of the comment section on the standard output. Each section printed is tagged by the name of the file from which it was extracted, using the format file[member_name]: for archive files and file: for other files. -V Prints on standard error the version number of mcs. EXAMPLE 1 Printing a file’s comment section The following entry example% /usr/ccs/bin/mcs -p elf.fileprints the comment section of the file elf.file. mcs(1) NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES 860 man pages section 1: User Commands • Last Revised 15 May 2000 EXAMPLE 2 Appending a string to a comment section The following entry example% /usr/ccs/bin/mcs -a xyz elf.fileappends string xyz to elf.file’s comment section. /tmp/mcs* temporary files See attributes(5) for descriptions of the following attributes: ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWbtool ar(1), as(1), ld(1), elf(3ELF), tmpnam(3C), a.out(4), ar(3HEAD), attributes(5) When mcs deletes a section using the -d option, it tries to bind together sections of type SHT_REL and target sections pointed to by the sh_info section header field. If one is to be deleted, mcs attempts to delete the other of the pair. mcs(1) FILES ATTRIBUTES SEE ALSO NOTES User Commands 861 mdb – modular debugger mdb [-fkmuwyAFMS] [±o option] [-p pid] [-s distance] [-I path] [-L path] [-P prompt] [-R root] [-V dis-version] [object [core] | core | suffix] The mdb utility is an extensible utility for low-level debugging and editing of the live operating system, operating system crash dumps, user processes, user process core dumps, and object files. For a more detailed description of mdb features, refer to the manual, Solaris Modular Debugger Guide. Debugging is the process of analyzing the execution and state of a software program in order to remove defects. Traditional debugging tools provide facilities for execution control so that programmers can re-execute programs in a controlled environment and display the current state of program data or evaluate expressions in the source language used to develop the program. Unfortunately, these techniques are often inappropriate for debugging complex software systems such as an operating system, where bugs may not be reproducible and program state is massive and distributed, for programs that are highly optimized, have had their debug information removed, or are themselves low-level debugging tools, or for customer situations where the developer can only access post-mortem information. mdb provides a completely customizable environment for debugging these programs and scenarios, including a dynamic module facility that programmers can use to implement their own debugging commands to perform program-specific analysis. Each mdb module can be used to examine the program in several different contexts, including live and post-mortem. The target is the program being inspected by the debugger. mdb currently provides support for the following types of targets: user processes, user process core files, the live operating system (via /dev/kmem and /dev/ksyms), operating system crash dumps, user process images recorded inside an operating system crash dump, ELF object files, and raw binary files. Each target exports a standard set of properties, including one or more address spaces, one or more symbol tables, a set of load objects, and a set of threads that can be examined using the debugger commands described below. A debugger command, or dcmd (pronounced dee-command) in mdb terminology, is a routine in the debugger that can access any of the properties of the current target. mdb parses commands from standard input, and then executes the corresponding dcmds. Each dcmd can also accept a list of string or numerical arguments, as shown in the syntax description below. mdb contains a set of built-in dcmds, described below, that are always available. You can also extend the capabilities of mdb itself by writing your own dcmds, as described in the Solaris Modular Debugger Guide. mdb(1) NAME SYNOPSIS Introduction Definitions 862 man pages section 1: User Commands • Last Revised 12 Dec 2001 A walker is a set of routines that describe how to walk, or iterate, through the elements of a particular program data structure. A walker encapsulates the data structure’s implementation from dcmds and from mdb itself. You can use walkers interactively, or use them as a primitive to build other dcmds or walkers. As with dcmds, you can extend mdb by implementing your own walkers as part of a debugger module. A debugger module, or dmod (pronounced dee-mod), is a dynamically loaded library containing a set of dcmds and walkers. During initialization, mdb will attempt to load dmods corresponding to the load objects present in the target. You can subsequently load or unload dmods at any time while running mdb. mdb ships with a set of standard dmods for debugging the Solaris kernel. The Solaris Modular Debugger Guide contains more information on developing your own debugger modules. A macro file is a text file containing a set of commands to execute. Macro files are typically used to automate the process of displaying a simple data structure. mdb provides complete backward compatibility for the execution of macro files written for adb(1), and the Solaris installation includes a set of macro files for debugging the Solaris kernel that may be used with either tool. The debugger processes commands from standard input. If standard input is a terminal, mdb provides terminal editing capabilities. mdb can also process commands from macro files and from dcmd pipelines, described below. The language syntax is designed around the concept of computing the value of an expression (typically a memory address in the target), and then applying a dcmd to that address. The current address location is referred to as dot, and its value is referenced using ‘‘.’’. A metacharacter is one of the following characters: []|!/\?=>$:; NEWLINE SPACE TAB A blank is a TAB or a SPACE.Aword is a sequence of characters separated by one or more non-quoted metacharacters. Some of the metacharacters only function as delimiters in certain contexts, as described below. An identifier is a sequence of letters, digits, underscores, periods, or backquotes beginning with a letter, underscore, or period. Identifiers are used as the names of symbols, variables, dcmds, and walkers. Commands are delimited by a NEWLINE or semicolon ( ; ). A dcmd is denoted by one of the following words or metacharacters: /\?=>$character :character ::identifier dcmds named by metacharacters or prefixed by a single $ or : are provided as built-in operators, and implement complete compatibility with the command set of the legacy adb(1) utility. Once a dcmd has been parsed, the /, \, ?, =, >, $, and : characters are no longer recognized as metacharacters until the termination of the argument list. mdb(1) Syntax User Commands 863 A simple-command is a dcmd followed by a sequence of zero or more blank-separated words. The words are passed as arguments to the invoked dcmd, except as specified under Quoting and Arithmetic Expansion below. Each dcmd returns an exit status that indicates it was either successful, failed, or was invoked with invalid arguments. A pipeline is a sequence of one or more simple commands separated by |. Unlike the shell, dcmds in mdb pipelines are not executed as separate processes. After the pipeline has been parsed, each dcmd is invoked in order from left to right. Each dcmd’s output is processed and stored as described under dcmd Pipelines below. Once the left-hand dcmd is complete, its processed output is used as input for the next dcmd in the pipeline. If any dcmd does not return a successful exit status, the pipeline is aborted. An expression is a sequence of words that is evaluated to compute a 64-bit unsigned integer value. The words are evaluated using the rules described under Arithmetic Expansion below. A command is one of the following: pipeline [! word ][; ] A simple-command or pipeline can be optionally suffixed with the ! character, indicating that the debugger should open a pipe(2) and send the standard output of the last dcmd in the mdb pipeline to an external process created by executing $SHELL -c followed by the string formed by concatenating the words after the ! character. For more details, refer to Shell Escapes below. expression pipeline [! word ][; ] A simple-command or pipeline can be prefixed with an expression. Before execution of the pipeline, the value of dot (the variable denoted by ‘‘.’’) is set to the value of the expression. expression , expression pipeline [! word ][; ] A simple-command or pipeline can be prefixed with two expressions. The first is evaluated to determine the new value of dot, and the second is evaluated to determine a repeat count for the first dcmd in the pipeline. This dcmd will be executed count times before the next dcmd in the pipeline is executed. The repeat count only applies to the first dcmd in the pipeline. , expression pipeline [! word ][; ] If the initial expression is omitted, dot is not modified but the first dcmd in the pipeline will be repeated according to the value of the expression. expression [! word ][; ] A command can consist only of an arithmetic expression. The expression is evaluated and the dot variable is set to its value, and then the previous dcmd and arguments are executed using the new value of dot. mdb(1) Commands 864 man pages section 1: User Commands • Last Revised 12 Dec 2001 [...]... following user- defined sequences as editing commands User defined sequences can be read or modified using the stty(1) command erase User defined erase character (usually ^H or ^?) Delete previous character intr User defined interrupt character (usually ^C) Abort the current command and print a new prompt User Commands 871 mdb(1) kill User defined kill character (usually ^U) Kill the entire current command. .. characters for use with the /, \, ?, and = formatting dcmds The formats and their use is described under Formatting dcmds, above User Commands 8 85 mdb(1) ::grep command Evaluate the specified command string, and then print the old value of dot if the new value of dot is non-zero If the command contains whitespace or metacharacters, it must be quoted The ::grep dcmd can be used in pipelines to filter a list... current command line quit User defined quit character (usually ^\) Quit the debugger suspend User defined suspend character (usually ^Z) Suspend the debugger werase User defined word erase character (usually ^W) Erase the preceding word On keyboards that support an extended keypad with arrow keys, mdb will interpret these keystrokes as editing commands: up-arrow down-arrow Fetch the next command from the history... associate an event callback (using the -c option) with each event specifier The event callbacks are strings that represent mdb commands to execute when the corresponding event occurs in the target These commands are executed as if they had been typed at the command man pages section 1: User Commands • Last Revised 12 Dec 2001 mdb(1) prompt Before executing each callback, the dot variable is set to the value... Transpose current character with next character ^N Fetch the next command from the history Each time ^N is entered, the next command forward in time is retrieved ^P Fetch the previous command from the history Each time ^P is entered, the next command backward in time is retrieved ^R[string] Search backward in the history for a previous command line containing string The string should be terminated by... are specified, the current set of debugger properties is displayed The ::set dcmd recognizes the following options: -F 890 Forcibly takes over the next user process that ::attach is applied to, as if mdb had been executed with the -F option on the command line man pages section 1: User Commands • Last Revised 12 Dec 2001 ... information about the risks associated with the resume option Command Re-entry The text of the last HISTSIZE (default 128) commands entered from a terminal device are saved in memory The in-line editing facility, described next, provides key mappings for searching and fetching elements from the history list 870 man pages section 1: User Commands • Last Revised 12 Dec 2001 mdb(1) In-line Editing If... of the specified user process (as opposed to just kernel pages) The kernel crash dump facility can be configured to dump all pages or the pages of the current user process using dumpadm(1M) The ::status dcmd can be used to display the contents of the current crash dump When the user requests a context switch from the kernel target, mdb constructs a new target representing the specified user process Once... global level: thus the / dcmd will now format and display data from the virtual address space of the user process, the ::mappings dcmd will display the mappings in the address space of the user process, and so on The kernel target can be restored by executing 0::context 880 man pages section 1: User Commands • Last Revised 12 Dec 2001 mdb(1) ::dcmds List the available dcmds and print a brief description... integer A variable may have one or more of the following attributes: read-only (cannot be modified by the user) , persistent (cannot be unset by the user) , and tagged (user- defined indicator) The following variables are defined as persistent: 0 The most recent value printed using the /, \, ?, or = dcmd 9 The most recent count used with the $< dcmd b The virtual address of the base of the data section d The . whatis(1), catman(1M), attributes (5) , environ (5) , eqnchar (5) , man (5) , sgml (5) The -f and -k options use the windex database, which is created by catman(1M). The man command is CSI-capable. However,. Path Formatting Manual Pages Preprocessing Nroff Manual Pages User Commands 855 If eqn or neqn is invoked, it will automatically read the file /usr/pub/eqnchar (see eqnchar (5) ). If nroff(1) is invoked, col(1) is automatically. 198 2. mconnect(1) NAME SYNOPSIS DESCRIPTION OPTIONS OPERANDS USAGE FILES ATTRIBUTES SEE ALSO User Commands 8 59 mcs – manipulate the comment section of an object file /usr/ccs/bin/mcs {-c|-d|-p|-V|-astring |-nname…}file… The mcs command is used to manipulate

Ngày đăng: 24/07/2014, 02:20

TỪ KHÓA LIÊN QUAN