How can I setup shared memory on ULTRIX running Online?
Posted in 1993
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 ##############################################################################