Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: she@sunc7.informatik.tu-chemnitz.de (Steffen Herold)
Subject: Help - How can I setup shared memory on DEC5500 ULTRIX4.2
Date: 17 Mar 1993 21:03:12 +0100	[thread overview]
Message-ID: <she.732398558@hrz.tu-chemnitz.de> (raw)



Hello World!

Probably a naive question? - How can I setup shared memory on ULYTRIX????

I have trouble with shared memory on a DECsystem 5500 RISC-ULTRIX V4.2 (R96).

I want to install DBMS INFORMIX-Online wich uses shared memory. But when I will
startup the DBMS I got the the Error-msg:

                Initializing, please wait ...

                tbinit: fatal error in shared memory initialization

Oh fine I thought - it must be something wrong. I found in INFORMIX-distributiona README-File with following parameters:
		 SHMMAX: 1024 (4096 byte pages)
		 SHMMIN: 0
		 SHMALL: Not applicable
		 SHMMNI: 100
		 SHMSEG: 6
		 SHMBRK: 10 (4096 byte pages)
And in documentation you must sysgen your kernel ...

I do so in /usr/sys/conf/mips the File DONAR (hostname) and inserted according
to ULTRIX-Documentation:
		 (These lines missing before)
                 smmin 0
		 smmax 1024
		 smseg 6
		 smsmat 0
		 smbrk 10

Then I rebuild (and reboot) the kernel via /etc/doconfig 
but it wont work with INFORMIX (above Error occurs).

Does anybody know my mistake or wich command "switch on" shared memory or
what else must be configure or how can I check shared memory (<ipcs> works)????

Same problem; in my desperation I compiled a sample programm from book:
Maurice J. Bach : The Design of the UNIX Operating System (chapter shared memory)
--------

#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <errno.h>
#define SHMKEY 75
#define K 1024

int shmid;

main()
{
  int i, *pint;
  char *addr1,*addr2;
  extern char *shmat();
  extern cleanup();

  for (i=0;i<20;i++)
    signal(i,cleanup);
  shmid=shmget(SHMKEY,128*K,0777|IPC_CREAT);

  if((int)(addr1=shmat(shmid,0,0)) == -1) {
     perror("1st attach");
     fprintf(stderr,"Error Code %d\n",errno);
     exit(errno);
  }
  if((int)(addr2=shmat(shmid,0,0)) == -1) {
     perror("2nd attach");
     fprintf(stderr,"Error Code %d\n",errno);
     exit(errno);
  }
  printf("addr1 0x%x addr2 0x%x\n",addr1,addr2);
  pint = (int *) addr1;

  for(i=0;i<256; i++)
   *pint++=i;
   pint=(int *)addr1;
   *pint=256;

  pint=(int *)addr2;

  for(i=0; i<256; i++)
     printf("index %d\tvalue %d\n",i,*pint++);

  pause();
}

cleanup()
{
  shmctl(shmid,IPC_RMID,0);
  exit();
}

But it fails while running with message:
         2nd attach: Too many open files
         Error Code 24

and Error Code 24 is shmat-manual:
        [EMFILE]       The number of shared memory segments attached
                       to the calling process exceed the system-
                       imposed limit.


using ipcs I see it creates shared memory and I can remove it with ipcrm.
But why I got the error and why INFORMIX wont startup.
I run the same program on HP and SUN without any errors!

I hope anybody will help me and give a solution for my hard problem.

Thanks, in advance Steffen.
--

Please reply to me via email:
##############################################################################
steffen.herold@informatik.tu-chemnitz.de
##############################################################################


                 reply	other threads:[~1993-03-17 20:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox