Question on output of ipcs command

Hi,

I read the ipcs man page and am still very confused.

Basically, I just want to know whether the output from the ipcs command below means these are the current "TOTAL" memory usage in bytes on the server? Is this correct?

Thanks in advance.

ipcs command output below:

# ipcs
IPC status from <running system> as of Wed Aug 11 18:37:40 EST 2010
T         ID      KEY        MODE        OWNER    GROUP
Message Queues:
Shared Memory:
m 1090519155   0x455cd2dc --rw-r-----   oracle oinstall
m   67108928   0x7a00a10c --rw-rw-rw-    sybase    other
Semaphores:
s  335544444   0x38597ec2 --ra-r--r--     root     root
s  671088731   0x27af6c54 --ra-r-----   oracle oinstall
s  218103855   0x7a00a10c --ra-ra-ra-    sybase    other
#

No it isnt. Ipcs only lists Memory Queues, Shared Memory and Semaphores used on the system. There are lots of other IPC's on UNIX, included Memory Mapped files, pipes and sockets. To be honest the IPC's command doesnt really give you much useful information these days. Can I ask what it is you are actually after and what O/S you are on ? Other commands like "top", "vmstat" and "sar" can give more useful info.

Cheers

Hi citaylor,

Thanks for your response, now that you explained it, I think ipcs is not what am after.

I want to know how much memory I have, how much is used and how much is free. Running top, I get the output as below:

Memory: 8192M phys mem, 72G free mem, 179G swap, 179G free swap

This is a Solaris zone/container and the server has been assigned 8192M and the available memory for the whole zone/container is presumably 72G.

I thought if I run vmstat, it will show me how much of the 8192M is free but sadly that does not seem to be the case.

The output of vmstat command is as below.

The free seems to be for the whole Solaris container or am I wrong and should be calculating free as the value from vmstat minus the 72GB from the top command and that should give me how much of the 8129M is free?

In short, should I be calculating the free memory of the server as the (value of free from vmstat) - (value of free from top)

Any advise will be very much appreciated. Thanks in advance.

vmstat 5 10
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr lf s0 s1 s2   in   sy   cs us sy id
 0 4 0 253043824 92076232 14 42 15 0 0 0 0  0  0 10  0  384  634  212  2  3 94
 0 0 0 241363080 75768528 97 437 0 0 0 0 0  0  0  0  0   27 4770   63  3  7 89
 0 0 0 241337320 75743496 1 1 0 0  0  0  0  0  0  0  0   21 3925  103  1  4 95
 0 0 0 241329560 75735840 1 1 0 0  0  0  0  0  0  0  0   21 3531   26  2  4 95
 0 0 0 241357368 75764896 1 13 0 0 0  0  0  0  0 22  0   22 3560   56  1  4 95
 0 0 0 241341368 75772552 1 1 0 0  0  0  0  0  0  0  0   21 3501   20  2  3 95
 0 0 0 241357296 75774792 1 1 0 0  0  0  0  0  0 16  0   20 3652   27  1  4 95
 0 0 0 241364880 75779976 97 432 0 0 0 0 0  0  0  0  0   29 4584   66  3  8 89
 2 0 0 241364352 75779920 11 48 0 0 0 0  0  0  0  0  0   24 4018  128  2  4 94
 0 0 0 241358424 75774752 1 1 0 0  0  0  0  0  0  0  0   44 3482   21  1 29 70