So, to create the shared memory segment, do this:
(as user pilot) oven readonly=noOnce you do this, the shm segment will stay around forever as near as I can tell. It certainly stays around when I completely logout. Rebooting gets rid of it. The only other way to get rid of it is to explicitly delete it using the ipcrm command (see below).
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 360448 tom 600 524288 2 dest 0x00000000 4587531 tom 600 49152 2 dest 0x00000100 13664268 pilot 644 263748 1 0x00000000 2949133 tom 600 16777216 2 destIf you want to get rid of this for some reason, use:
ipcrm shm 13664268
Note that on Solaris, the "ipcs" command is less informative. The following is from our system with the oven software active:
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001 Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001 You have new mail. crater$ ipcs IPC status fromThe Solaris version of "ipcs" does not display the size of the segment, which is too bad.as of Thu May 23 10:28:45 MST 2019 Shared Memory: T ID KEY MODE OWNER GROUP m 0 0x500006d9 --rw-r--r-- root root m 101 0x100 --rw-r--r-- pilot other m 102 0x101 --rw-r--r-- pilot other m 103 0x102 --rw-r--r-- pilot other
I wrote a little program that I can run on my linux system, and by including oven.h and letting the compiler show me the "sizeof" various things, I get the following.
B database: 172 bytes P database: 133376 bytes I database: 50628 bytes D database: 34952 bytes E database: 44620 bytes total database: 263748 bytesThe 263748 number is what we like to see, and it turns out that the sizes of B+P added together give us 133548 -- just the size of the binary database files. So it turns out that only the B and P portions are worth writing to disk. The D and E values come from the V computers as needed or wanted.
As near as I can tell, the I values never escape from the V computers at all. It does no harm to allocate space for them (and it is convenient to just allocate the "database" structure verbatim as per oven.h). So we really only have 4 things to concern ourselves with in the control room software.
The reader may find several other things heartening. If he adds up the individual sizes above, they total to 263748 bytes. This means the compiler is not doing any monkey business padding structures. Also the sum of the B plus P sizes on x86 linux totals to 133548 bytes, which matches the sizes of the database files on the sparc system.
Tom's home page / [email protected]