Question on output of ipcs command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Question on output of ipcs command
# 1  
Old 08-11-2010
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:

Code:
# 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
#

# 2  
Old 08-11-2010
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
# 3  
Old 08-12-2010
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:

Code:
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.

Code:
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

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

2. Solaris

8 character limit for ipcs command , any way to increase # of chars ?

Hello All, We have a working script which identifies and kills ipcs resources which havent been correctly killed during normal shutdowns. It is working fine and dandy however there are some issues now. Environment: SunOS 5.10 Generic_148888-03 sun4u sparc SUNW,SPARC-Enterprise ... (4 Replies)
Discussion started by: icalderus
4 Replies

3. Solaris

IPCS COUNT clear

How to clear IPCS queue count in server? (2 Replies)
Discussion started by: Arasu123
2 Replies

4. Shell Programming and Scripting

Use script to monitor command output question? (like Linux watch)

Hi I want to write a script, help me to monitor command output. This script like Linux "watch" command. Below is my script: # cat watch.sh #!/bin/bash while true do clear echo "command: $*" ( $* ) sleep 2 done Then I run this script below (2 Replies)
Discussion started by: nnnnnnine
2 Replies

5. Shell Programming and Scripting

Command Output Question

Hi everyone-- I'm new to these forums and shell scripting, and I'm trying to write a script that checks if a particular ip is pingable My idea was to check if the output of the command ping <some ip> -c 1 -w 1 had the string: "1 packet transmitted, 1 received"How would I go about doing this?... (2 Replies)
Discussion started by: Prodiga1
2 Replies

6. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

7. Solaris

ipcs Help

hi, I need help with ipcs command on Solaris. What does it do and what are options b,m,o,q does. Here is the sample output of ipcs -oq and ipcs -bm IPC status from <running system> as of Sun Sep 7 23:07:59 GMT 2008 T ID KEY MODE OWNER GROUP CBYTES QNUM... (4 Replies)
Discussion started by: krabu
4 Replies

8. AIX

ipcs command with out output

hello i'm running on aix 5300-08-02-0822 hacmp 4 when i run ipcs command there is nio output. some one got this problem? best regards ariec (1 Reply)
Discussion started by: ariec
1 Replies

9. Programming

System V and POSIX IPCs

I am using SUN 0S 5.7. My application has a dozen programs running in this machine, each instance of a program having 2 POSIX message queues for itself. Totally around 90 POSIX message queues. Another small application uses a SYSTEM V shared memory and a message queue. We face a problem... (1 Reply)
Discussion started by: Deepa
1 Replies

10. UNIX for Dummies Questions & Answers

ipcs command

Does anyone know how to set the variables with the ipcs command? I need to set the following variables: Shared memory segments message queues semaphore arrays all of these (1 Reply)
Discussion started by: Deuce
1 Replies
Login or Register to Ask a Question