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


 
Thread Tools Search this Thread
Operating Systems Solaris 8 character limit for ipcs command , any way to increase # of chars ?
# 1  
Old 08-29-2013
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:

Code:
SunOS 5.10 Generic_148888-03 sun4u sparc SUNW,SPARC-Enterprise

Problem :

Our target search string has increased by 1 character from 8 chars to 9. What I am observing @ this point is the ipcs -a | grep (9 char string) is returning blank results. The increase in characters is due to new naming conventions. So while it may be easy to say , "simply use an 8 char database", in practicality it is over my head.


Desired Solution:

I need to find a way to get ipcs to be able to identify resources associated with a 9 char search string. From what I have read so far I havent dug up an environment var or quick fix for this issue. I have also dug through a few posts here in the forum in the hopes of finding a solution.

Code Example:

a) Working:

Code:
      ipcs -a | grep 1245678

b) Not working

Code:
       ipcs -a | grep 123456789

Anything you can offer is appreciated!

There are logic tweaks I can make to the script however out of curiosity I would like to learn more about ipcs on solaris. Constantly hungry for skills!

Thank you! Smilie

Last edited by Scott; 08-29-2013 at 08:00 PM.. Reason: Code tags
# 2  
Old 08-29-2013
ipcs resources are kernel persistent. They cannot persist over a reboot. So, what you said appears to be wrong, or you need to do some more explanation - specifically 'database name' - what is it: a key generated by ftok()? What are we doing here?

How do you know that the shared memory for a db was not destroyed then recreated by a reboot? Rather than persisting over reboot.

Or do you mean a db shutdown/restart? We need clarity. And a decent example.
# 3  
Old 09-09-2013
Quote:
ipcs resources are kernel persistent. They cannot persist over a reboot. So, what you said appears to be wrong, or you need to do some more explanation - specifically 'database name' - what is it: a key generated by ftok()? What are we doing here?
- I did not imply a reboot was going to be done in any way shape or form, so if I gave that misinimpression I apologize. The issue is this:
1) We are using a script to clean up any hanging ps/ipcs resources that may be erroneosly be left over after we shut down application servers ( database servers are not being stopped/shutdown).

2) The script works as long as your target search string is up to 8 characters long.
3) We have new instances in our environment which have 9 character strings.
When I use the ipcs -a | grep (a 9 char string) there is no data returned. Unless I am mistaken this is because the ipcs command itself will not detect any search string > 8 characters.

I have tested this out and lo and behold this is an issue. So my question is this:

Q) Is there any way to tweak the command via env settings or ANY other feasible method so that we can get ipcs to detect a search pattern that is longer than 8 characters?

Quote:
Or do you mean a db shutdown/restart? We need clarity. And a decent example.
Again, the database is NOT being shutdown or restarted, it is our application servers which are being shutdown. As far as clarity goes I think the example was pretty clear :

1) ipcs -a | grep 1245678 - DOES return a set of results as the 8 char limit isnt breached.

2) ipcs -a | grep 123456789 - DOES NOT return a set of results with this 9 char search string, I am trying to find a way to get the ipcs command to detect something longer than 8 chars in its search string.

Again, I understand the ipcs command stems for a library within Solaris itself. So I am not going to get into re-writing any part of code and recompiling the kernel,etc.

Rather I am curious to see if anyone else has run into this limitation and how they have worked around it?

Thanks! All positive answers and your time are much appreciated.
# 4  
Old 09-10-2013
Hello,

Just wanted to follow up and clarify this post a bit, I apologize for any confusion caused.

The output from the ipcs command that I am concerned with is the "CREATOR" column. I am using the -a flag . The issue is that newer app servers are named with a 9 name character set. And from what I can tell the max char is 8 for the CREATOR group with the ipcs command.
So my question refined would be , "Is there any way to get ipcs to increase the limit for the CREATOR column from the ipcs command when using on Solaris 10?"

I hope this helps .

Sample:

T ID KEY MODE OWNER GROUP CREATOR CGROUP CBYTES QNUM QBYTES LSPID LRPID STIME RTIME CTIME
Message Queues:
q 989856285 0 --rw-rw---- xgudprda psa xgudprda psa 0 0 65536 27230 4625 11:51:33 11:51:33 0:20:47

In this case the CREATOR is listed as "xgudprda" which is an 8 char string. The crux of my question is can we get this output to default to 9 characters or anything greater than 8 chars?


Thanks again, I appreciate your time.
# 5  
Old 09-10-2013
Quote:
Originally Posted by icalderus
When I use the ipcs -a | grep (a 9 char string) there is no data returned. Unless I am mistaken this is because the ipcs command itself will not detect any search string > 8 characters.
ipcs doesn't have the magic ability to know when something on the other side of the pipe is grepping for 9 characters or more. Maybe it's not printing more than 8 characters in the first place, but it's not the searching that's screwing it up. It may also be a problem with the search string itself.

Post the raw output from ipcs, and post the string that somehow fails to match, and maybe we'll see why grep isn't matching it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to increase soft stack limit?

:wall:Dear Solaris 10 Specialists, I am having difficulty trying to increase the soft stack limit to 16384 for user george on this Solaris 10 SunFire Sparc server as follows: $ uname -a SunOS galactica 5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5220 % id -p ... (3 Replies)
Discussion started by: gjackson123
3 Replies

2. Shell Programming and Scripting

Ignore the 255 character limit of command line

Hi I would just like to ask if there is a way for UNIX to ignore/overcome the 255 character limit of the command line? My problem is that I have a really long line of text from a file (300+ bytes) which i have to "echo" and process by adding commands like "sed" to the end of the line, like... (5 Replies)
Discussion started by: agentgrecko
5 Replies

3. UNIX for Advanced & Expert Users

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... (2 Replies)
Discussion started by: newbie_01
2 Replies

4. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

5. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

6. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

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

8. AIX

chfs increase /var limit at 512mb?

Is there a limit of 512Mb when doing a "chfs -a size=XXXXX /myfs" ? I managed to increase /var to 512MB fine, no issues, then i wanted to increase /usr to 2Gb, but when i enter: # chfs -a size=2260992 /usr chfs: 0506-908 Cannot reduce size... (5 Replies)
Discussion started by: craigp84
5 Replies

9. UNIX Desktop Questions & Answers

how do I increase the character size in the Unix Box

do anybody has knowledge how do i increase the character size in the UNIX box (1 Reply)
Discussion started by: subir23
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