BSC / MSC volatile state / restart handling

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Rafael Diniz rafael at rhizomatica.org
Fri Oct 12 13:00:14 UTC 2018


Hi all,

> I've done some research on the web at that time (maybe 2 years ago) but
> unfortunately couldn't find any library/tool/infrastructure for having
> persistent data in SysV SHM, and also no other FOSS programs that did
> so.  Maybe I didn't look closely enough?  To me, it seems like the most
> obvious solution to persist state across crashes/restarts of C programs
> on unix-type systems.
>
> We explicitly don't want to use some kind of database system, as the VLR
> data needs to be accessed all over the code
> directly/synchronously/non-blockingly.  We cannot wait for it to be
> retrieved from somewhere.  That's what is done with HLR data.

May be I'm missing something, but SysV SHM provides system calls you
certainly can create a shared memory segment that is persistent.
You just create / get the reference to a memory segment with shmget,
then having the shmid of the segment, it can be shmat'ed as many times
you want, attaching the memory segment to the address space of a
process. You can do queries, using the ipc* tools - ipcmk, ipcs, ipcrm -
in the shell. I already did this many times to load the state of entire
the data segment of a process.

Regards,
Rafael Diniz


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20181012/b156dfaf/attachment.bin>


More information about the OpenBSC mailing list