1753954 Members
7707 Online
108811 Solutions
New Discussion юеВ

ipcs question

 
Pieter_5
Advisor

ipcs question

Hi,

I ran ipcs -m on my system.

T ID KEY MODE OWNER GROUP
Shared Memory:
m 0 0x435dce60 --rw-rw-rw- root root
m 1401 0x741cc1a0 --rw-rw-rw- root root
m 2 0x741cc1a1 --rw-rw-rw- root root
m 3 0x741cc1a2 --rw-rw-rw- root root
m 1304 0x63ead61c --rw-r----- oracle other
m 106 0xa7cd63a4 --rw-r----- oracle other

What does this output tell me? Are numbers in the second column the amount of memory allocated in Mb? And what about the column with the hex-numbers?
4 REPLIES 4
G. Vrijhoeven
Honored Contributor

Re: ipcs question

Hi,

If you go for man ipsc it is explained:

go to Column Descriptions section

Gideon


Pieter_5
Advisor

Re: ipcs question

Hi,

I want to know how I can see how much shared memory is used on the system?
Hoefnix
Honored Contributor

Re: ipcs question

If you can not reward the direction to the MAN page, here's the part from the man-page:

Column Descriptions
The column headings and the meaning of the columns in an ipcs listing
are given below. The columns are printed from left to right in the
order shown below.

T Facility type:

m Shared memory segment
q Message queue
s Semaphore

ID The identifier for the facility entry.

KEY The key used as an argument to msgget(), semget(), or
shmget() to create the facility entry. (Note: The key
of a shared memory segment is changed to IPC_PRIVATE
when the segment has been removed until all processes
attached to the segment detach it.)

MODE The facility access modes and flags: The mode consists
of 11 characters that are interpreted as follows:
The first two characters can be:

R A process is waiting on a msgrcv().
S A process is waiting on a msgsnd().
D The associated shared memory segment has been
removed. It will disappear when the last
process attached to the segment detaches it.
C The associated shared memory segment is to be
cleared when the first attach is executed.
- The corresponding special flag is not set.

The next 9 characters are interpreted as three sets of
three characters each. The first set refers to the
owner's permissions, the next to permissions of others
in the group of the facility entry, and the last to all
others.

Hewlett-Packard Company - 2 - HP-UX Release 11.00: October 1997

ipcs(1) ipcs(1)

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.

r Read permission is granted.
w Write permission is granted.
a Alter permission is granted.
- The indicated permission is not granted.

OWNER The login name of the owner of the facility entry.

GROUP The group name of the group of the owner of the
facility entry.

CREATOR The login name of the creator of the facility entry.

CGROUP The group name of the group of the creator of the
facility entry.

CBYTES The number of bytes in messages currently outstanding
on the associated message queue.

QNUM The number of messages currently outstanding on the
associated message queue.

QBYTES The maximum number of bytes allowed in messages
outstanding on the associated message queue.

LSPID The process ID of the last process to send a message to
the associated message queue.

LRPID The process ID of the last process to receive a message
from the associated message queue.

STIME The time the last msgsnd() message was sent to the
associated message queue.

RTIME The time the last msgrcv() message was received from
the associated message queue.

CTIME The time when the associated facility entry was created
or changed.

NATTCH The number of processes attached to the associated
shared memory segment.
SEGSZ The size of the associated shared memory segment.

CPID The process ID of the creating process of the shared
memory segment.

Hewlett-Packard Company - 3 - HP-UX Release 11.00: October 1997

ipcs(1) ipcs(1)

LPID The process ID of the last process to attach or detach
the shared memory segment.

ATIME The time the last shmat() attach was completed to the
associated shared memory segment.

DTIME The time the last shmdt() detach was completed on the
associated shared memory segment.

NSEMS The number of semaphores in the set associated with the
semaphore entry.

OTIME The time the last semop() semaphore operation was
completed on the set associated with the semaphore entry.

Using ipcs -am will you give also info about used amount of memory by shared memory.

Regards,
Peter

Mark Grant
Honored Contributor

Re: ipcs question

Try

"ipcs -ma"

Then add up the numbers under the SEGSZ column.
Never preceed any demonstration with anything more predictive than "watch this"