La commande 'ipcs' permet de gérer les segments de mémoires partagés d'un système AIX.

Les 3 options les plus employées sont '-a', '-s' et '-m'.

Une fois les informations affichées, il est possible d'utiliser la commande 'ipcrm' pour effacer certains segments non voulus.

 

La documentation officielle est ci-dessous.

                                                           Commands Reference, Volume 3, i - m

ipcs Command

Purpose

       Reports interprocess communication facility status.

Syntax

       ipcs [ -m] [ -q] [ -s] [ -S] [ -P] [ -l] [ -a | -b -c -o -p -r -t] [ -T] [ -C CoreFile] [ -N Kernel ] [ -X ]

Description

       The ipcs command writes to the standard output information about active interprocess communication facilities. If you do not specify any flags, the
       ipcs command writes information in a short form about currently active message queues, shared memory segments, semaphores, remote queues, and local
       queue headers.

       The column headings and the meaning of the columns in an ipcs command listing follow. The letters in parentheses indicate the flags that cause the
       corresponding heading to appear. The designator all means the heading is always displayed. These flags only determine what information is provided
       for each facility. They do not determine which facilities are listed.
       T
            (all) the type of facility. There are three facility types:
              q
                   message queue
              m
                   shared memory segment
              s
                   semaphore
       ID
            (all) the identifier for the facility entry.
       KEY
            (all) the key used as a parameter to the msgget subroutine, the semget subroutine, or the shmget subroutine to make the facility entry.

            Note: The key of a shared memory segment is changed to IPC_PRIVATE when the segment is removed until all processes attached to the segment
            detach from it.

       MODE
            (all) the facility access modes and flags. The mode consists of 11 characters that are interpreted as follows:

            The first two characters can be the following:
              R
                   If a process is waiting on a msgrcv system call.
              S
                   If a process is waiting on a msgsnd system call.
              D
                   If the associated shared memory segment has been removed. It disappears when the last process attached to the segment detaches it.
              C
                   If the associated shared memory segment is to be cleared when the first attach is run.
              -
                   If the corresponding special flag is not set.
            The next nine characters are interpreted as three sets of 3 bits each. The first set refers to the owner's permissions; the next to permissions
            of others in the user group of the facility entry; and the last to all others. Within each set, the first character indicates permission to
            read, the second character indicates permission to write or alter the facility entry, and the last character is currently unused.

            The permissions are indicated as follows:
              r
                   If read permission is granted.

              w
                   If write permission is granted.
              a
                   If alter permission is granted.
              -
                   If the indicated permission is not granted.
       OWNER
            (all) The login name of the owner of the facility entry.
       GROUP
            (all) The name of the group that owns the facility entry.
       CREATOR
            (a,c) The login name of the creator of the facility entry.
       CGROUP
            (a,c) The group name of the creator of the facility entry.

            Note: For the OWNER, GROUP, CREATOR, and CGROUP, the user and group IDs display instead of the login names.

       CBYTES
            (a,o) The number of bytes in messages currently outstanding on the associated message queue.
       QNUM
            (a,o) The number of messages currently outstanding on the associated message queue.
       QBYTES
            (a,b) The maximum number of bytes allowed in messages outstanding on the associated message queue.
       LSPID
            (a,p) The ID of the last process that sent a message to the associated queue. If the last message sent was from a process in a node other than
            the node that holds the queue, LSPID is the PID of the kernel process that actually placed the message on the queue, not the PID of the sending
            process.
       LRPID
            (a,p) The ID of the last process that received a message from the associated queue. If the last message received was from a process in a node
            other than the node that holds the queue, LRPID is the PID of the kernel process that actually received the message on the queue, not the PID
            of the receiving process.
       STIME
            (a,t) The time when the last message was sent to the associated queue. For remote queues, this is the server time. No attempt is made to
            compensate for time-zone differences between the local clock and the server clock.
       RTIME
            (a,t) The time when the last message was received from the associated queue. For remote queues, this is the server time. No attempt is made to
            compensate for any time-zone differences between the local clock and the server clock.
       CTIME
            (a,t) The time when the associated entry was created or changed. For remote queues, this is the server time. No attempt is made to compensate
            for any time-zone differences between the local clock and the server clock.
       NATTCH
            (a,o) The number of processes attached to the associated shared memory segment.
       SEGSZ
            (a,b) The size of the associated shared memory segment.
       CPID
            (a,p) The process ID of the creator of the shared memory entry.
       LPID
            (a,p) The process ID of the last process to attach or detach the shared memory segment.
       ATIME
            (a,t) The time when the last attach was completed to the associated shared memory segment.
       DTIME
            (a,t) The time the last detach was completed on the associated shared memory segment.
       NSEMS
            (a,b) The number of semaphores in the set associated with the semaphore entry.
       OTIME
            (a,t) The time the last semaphore operation was completed on the set associated with the semaphore entry.
       SID
            (S) The shared memory segment id. SIDs can be used as input to the svmon -S command.

       RTFLAGS
            (r) Filled with UNLINK when the real-time interprocess communication object has been unlinked. Otherwise, a hyphen (-) is displayed.
       NAME
            (r) The name of the real-time interprocess communication object. A hyphen (-) is displayed for the unnamed semaphores.

       This command supports multibyte character sets.

Flags

       -a
            Uses the -b, -c, -o, -p and -t flags.
       -b
            Writes the maximum number of bytes in messages on queue for message queues, the size of segments for shared memory, and the number of
            semaphores in each semaphores set.
       -c
            Writes the login name and group name of the user that made the facility.
       -CCoreFile
            Uses the file specified by the CoreFile parameter in place of the /dev/mem file. The CoreFile parameter is a memory image file produced by the
            Ctrl-(left)Alt-Pad1 key sequence.
       -l
            When used with the -S flag, this flag writes the list of SIDs unwrapped.
       -m
            Writes information about active shared memory segments.
       -NKernel
            Uses the specified Kernel (the /usr/lib/boot/unix file is the default).
       -o
            Writes the following usage information:
              *    Number of messages on queue
              *    Total number of bytes in messages in queue for message queues
              *    Number of processes attached to shared memory segments
       -p
            Writes process number information:
              *    Process number of the last process to receive a message on message queues
              *    Process number of last process to send a message on message queues
              *    Process number of the creating process
              *    Process number of last process to attach or detach on shared memory segments
       -P
            Writes the list of SIDs (segment IDs) associated with the shared memory ID, along with the number of bytes pinned to that segment and an
            indication of whether the segment is large-page enabled or not. If the segment is large-page enabled, a 'Y' is displayed, otherwise a '-' is
            displayed.
       -q
            Writes information about active message queues.
       -r
            Writes information about real-time interprocess communication objects.
       -s
            Writes information about active semaphore set.
       -S
            Writes the list of SID attached to shared memory id.
       -t
            Writes time information:
              *    Time of the last control operation that changed the access permissions for all facilities
              *    Time of the last msgsnd and msgrcv on message queues
              *    Time of the last shmat and shmdt on shared memory
              *    Time of the last semop on semaphore sets
       -T
            Writes the output of the -t flag with the date.
       -X
            Prints all available characters of each user name, group name of owner, creator, owner group, creator group instead of truncating to the first
            8 characters.  Notes:

       1    If the user specifies either the -C or -N flag, the real and effective UID/GID is set to the real UID/GID of the user invoking ipcs.
       2    Values can change while ipcs is running; the information it gives is guaranteed to be accurate only when it was retrieved.

Example

       Example output from entering ipcs without flags:

       IPC status from /dev/mem as of Mon Aug 14 15:03:46 1989
       T    ID         KEY        MODE       OWNER     GROUP
       Message Queues:
       q       0    0x00010381 -Rrw-rw-rw-   root      system
       q   65537    0x00010307 -Rrw-rw-rw-   root      system
       q   65538    0x00010311 -Rrw-rw-rw-   root      system
       q   65539    0x0001032f -Rrw-rw-rw-   root      system
       q   65540    0x0001031b -Rrw-rw-rw-   root      system
       q   65541    0x00010339--rw-rw-rw-    root      system
       q       6    0x0002fe03 -Rrw-rw-rw-   root      system
       Shared Memory:
       m   65537    0x00000000 DCrw-------   root      system
       m  720898    0x00010300 -Crw-rw-rw-   root      system
       m   65539    0x00000000 DCrw-------   root      system
       Semaphores:
       s  131072    0x4d02086a --ra-ra----   root      system
       s   65537    0x00000000 --ra-------   root      system
       s 1310722    0x000133d0 --ra-------   7003      30720

Files

       /usr/lib/boot/unix
            Specifies the system kernel image.
       /dev/mem
            Specifies memory.
       /etc/passwd
            Specifies user names.
       /etc/group
            Specifies group names.
       /usr/include/sys/ipc.h
            Contains the header file.

Related Information

       The ipcrm command.

       The svmon command.

       The msgrcv subroutine, msgsnd subroutine, semop subroutine, shmat subroutine, shmdt subroutine.

       Commands in Operating system and device management.

Manual entry for -a not found or not installed.
vcadinet1:/# ipcs -a
IPC status from /dev/mem as of Tue Jun  7 17:37:23 CEST 2011
T        ID     KEY        MODE       OWNER    GROUP  CREATOR   CGROUP CBYTES  QNUM QBYTES LSPID LRPID   STIME    RTIME    CTIME
Message Queues:
q         0 0x4301a01b --rw-rw-rw-     root   system     root   system         0         0   4194304      0      0 no-entry no-entry  1:10:30
q         1 0x4101a01b --rw-rw-rw-     root   system     root   system         0         0   4194304      0      0 no-entry no-entry  1:10:30
T        ID     KEY        MODE       OWNER    GROUP  CREATOR   CGROUP NATTCH     SEGSZ  CPID  LPID   ATIME    DTIME    CTIME
Shared Memory:
m         0 0x78000cc3 --rw-rw-rw-     root   system     root   system      2  16777216 262274 1028330  1:10:19  0:08:04  1:05:15
m         1 0x78000cc5 --rw-rw-rw-     root   system     root   system      2 268435456 262274 1028330  1:10:19  0:08:04  1:05:15
m         2 0x67001001 --rw-r--r--     root   system     root   system      3        12 393402 217106  1:10:27  1:10:12  1:10:11
m         3 0x68001001 --rw-r--r--     root   system     root   system      3    377016 393402 217106  1:10:27  1:10:12  1:10:11
m         4 0x70001001 --rw-------     root   system     root   system      3      3168 393402 217106  1:10:27  1:10:12  1:10:11
m         5 0xffffffff --rw-rw----     root   haemrm     root   haemrm      1      4096 217106 217106 17:36:30 17:36:30  1:10:27
m   3145734 0x7cff50d0 --rw-r----- oracle10      dba oracle10      dba     17 373301248 331942 1237220 17:37:14 17:37:14  0:08:18
m   1048583 0xb9e4efd8 --rw-r----- oracle10      dba oracle10      dba     30 704651264 888850 1245268 17:35:41 17:35:41  3:09:32
m         8 0x3ee9b64c --rw-r-----   oracle oinstall   oracle oinstall     18 218906624 405520 1093778 15:37:24 15:37:25  0:08:47
m   1048585 0x762d2764 --rw-r----- oracle10      dba oracle10      dba     17 2499813376 905252 1097872 17:36:54 17:36:54  3:08:40
m   1048586 0x8b27bfc8 --rw-r----- oracle10      dba oracle10      dba     29 2499813376 831722 843812 17:37:14 17:37:14  3:07:48
T        ID     KEY        MODE       OWNER    GROUP  CREATOR   CGROUP NSEMS   OTIME    CTIME
Semaphores:
s   3145728 0x69001001 --ra-ra-ra-     root   system     root   system     2 17:34:59  1:10:11
s         1 0x6200003a --ra-r--r--     root   system     root   system     1  1:04:59  1:04:58
s         2 0x58001058 --ra-ra-r--     root   system     root   system     1  1:10:17  1:10:17
s        31 0x01000021 --ra-------     root   system     root   system     1 13:13:28 13:13:28

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone