📄 ipcs.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>ipcs</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_1004"> </a>NAME</h4><blockquote>ipcs - report inter-process communication facilities status</blockquote><h4><a name = "tag_001_014_1005"> </a>SYNOPSIS</h4><blockquote><pre><code>ipcs <b>[</b> -qms <b>] [</b> -a | -bcopt <b>]</b></code></pre></blockquote><h4><a name = "tag_001_014_1006"> </a>DESCRIPTION</h4><blockquote>The<i>ipcs</i>utility writes information about active inter-processcommunication facilities.<p>Without options, information is written in short format formessage queues, shared memory segments and semaphores setsthat are currently active in the system.Otherwise, the information that is displayed is controlled by theoptions specified.</blockquote><h4><a name = "tag_001_014_1007"> </a>OPTIONS</h4><blockquote>The<i>ipcs</i>facility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b> </a> .<p>The<i>ipcs</i>utility accepts the following options:<dl compact><dt><b>-q</b><dd>Write information about active message queues.<dt><b>-m</b><dd>Write information about active shared memory segments.<dt><b>-s</b><dd>Write information about active semaphores sets.</dl><p>If<b>-q</b>,<b>-m</b>or<b>-s</b>are specified, only information about those facilities is written.If none of these three are specified, information about all threeis written subject to the following options:<dl compact><dt><b>-a</b><dd>Use all print options.(This is a shorthand notation for<b>-b</b>,<b>-c</b>,<b>-o</b>,<b>-p</b>and<b>-t</b>.)<dt><b>-b</b><dd>Write information on maximum allowable size.(Maximum number of bytes in messages on queue for messagequeues, size of segments for shared memory, and numberof semaphores in each set for semaphores.)<dt><b>-c</b><dd>Write creator's user name and group name.See below.<dt><b>-o</b><dd>Write information on outstanding usage.(Number of messages on queue and total number of bytes in messageson queue for message queues, and number of processesattached to shared memory segments.)<dt><b>-p</b><dd>Write process number information.(Process ID of last process to send a message and process ID oflast process to receive a message on message queues, process ID ofcreating process, and process ID of last process toattach or detach on shared memory segments.)<dt><b>-t</b><dd>Write time information.(Time of the last control operation that changed the accesspermissions for all facilities, time of last<i><a href="../xsh/msgsnd.html">msgsnd()</a></i>and<i><a href="../xsh/msgrcv.html">msgrcv()</a></i>operations on message queues, time of last<i><a href="../xsh/shmat.html">shmat()</a></i>and<i><a href="../xsh/shmdt.html">shmdt()</a></i>operations on shared memory, and time of last<i><a href="../xsh/semop.html">semop()</a></i>operation on semaphores.)</dl></blockquote><h4><a name = "tag_001_014_1008"> </a>OPERANDS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1009"> </a>STDIN</h4><blockquote>Not used.</blockquote><h4><a name = "tag_001_014_1010"> </a>INPUT FILES</h4><blockquote><ul><p><li>the group database<p><li>the user database.<p></ul></blockquote><h4><a name = "tag_001_014_1011"> </a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>ipcs</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalizationvariables that are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalization variables contain an invalid setting,the utility will behave as if none of the variables had been set.<dt><i>LC_ALL</i><dd>If set to a non-empty string value, override the valuesof all the other internationalization variables.<dt><i>LC_CTYPE</i><dd>Determine the locale for the interpretation ofsequences of bytes of text data as characters (forexample, single- as opposed to multi-byte characters inarguments).<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affect theformat and contents of diagnostic messages written tostandard error.<dt><i>NLSPATH</i><dd>Determine the location of message catalogues for theprocessing of<i>LC_MESSAGES .</i><dt><i>TZ</i><dd>Determine the timezone for the time strings written by<i>ipcs</i>.</dl></blockquote><h4><a name = "tag_001_014_1012"> </a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_1013"> </a>STDOUT</h4><blockquote>An introductory line is written with the format:<pre><code>"IPC status from %s as of %s\n", <<i>source</i>>, <<i>date</i>></code></pre><p>where <<i>source</i>> indicates the source used to gather thestatistics and <<i>date</i>> is the information that would beproduced by the command:<pre><code>date</code></pre><p>when invoked in the POSIX locale.<p>The<i>ipcs</i>utility then creates up to three reports dependingupon the<b>-q</b>,<b>-m</b>and<b>-s</b>options.The first report indicates the status of message queues,the second report indicates the status of shared memory segments,and the third report indicates the status of semaphore sets.<p>If the corresponding facility is not installed or has not beenused since the last reboot, then the report is written out inthe format:<pre><code>"%s facility not in system.\n", <<i>facility</i>></code></pre><p>where <<i>facility</i>> isMessage Queue,Shared MemoryorSemaphoreas appropriate.If the facility has been installed and has been used since thelast reboot, column headings separated by one or more spaces and followedby a new line will be written as indicated below followed by thefacility name written out using the format:<pre><code>"%s:\n", <<i>facility</i>></code></pre><p>where <<i>facility</i>> isMessage Queues,Shared MemoryorSemaphoresas appropriate.On the second and third reports the column headings need notbe written if the last column headings written already provide columnheadings for all information in that report.<p>The column headings provided in the first column below and themeaning of the information in those columns are given in orderbelow; the letters in parentheses indicate the options thatcause the corresponding column to appear; "all" means that thecolumn always appears.Each column is separated by one or more space characters.Note that these options only determine what information is providedfor each report; they do not determine which reports are written.<dl compact><dt>T (all)<dd>Type of facility:<dl compact><dt><b>q</b><dd>Message queue.<dt><b>m</b><dd>Shared memory segment.<dt><b>s</b><dd>Semaphore.</dl><p>This field is a single character written using the format "%c".<p><dt>ID (all)<dd>The identifier for the facility entry.This field is written using the format "%d".<p><dt>KEY (all)<dd>The key used as an argument to<i><a href="../xsh/msgget.html">msgget()</a></i>,<i><a href="../xsh/semget.html">semget()</a></i>or<i><a href="../xsh/shmget.html">shmget()</a></i>to create the facility entry.<dl><dt><b>Note:</b><dd>The key of a shared memory segment is changed to IPC_PRIVATE whenthe segment has been removed until all processesattached to the segment detach it.</dl>This field is written using the format "0x%x".<p><dt>MODE (all)<dd>The facility access modes and flags.The mode consists of 11 characters that are interpreted as follows.<p>The first character is:<dl compact><dt><b>S</b><dd>If a process is waiting on a<i><a href="../xsh/msgsnd.html">msgsnd()</a></i>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -