Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!ugle.unit.no!nuug!ulrik!spider!blarsen From: blarsen@spider.uio.no (Bjorn Larsen) Newsgroups: comp.unix.wizards Subject: Writing portable code that reads /dev/kmem Message-ID: Date: 23 May 91 04:00:50 GMT Sender: news@ulrik.uio.no (Mr News) Reply-To: Bjorn.Larsen@usit.uio.no Distribution: comp Organization: University of Oslo, Norway Lines: 34 Nntp-Posting-Host: spider.uio.no We are writing a daemon that should execute on a number of different UNIX platforms. It should fetch performance information about the running system. We want to make this program as portable as possible, possibly by dividing it into one generic part and one system-specific part. The UNIX variants that we want to run this daemon on includes SunOS, Ultrix, OSF/1, SVR4, SVR3.2, Convex UNIX, SCO UNIX, and possibly others. I'm looking for advice on the best way to handle this. Does there exist a standard interface for retreiving such information? I've heard rumors that there exists a kmem-access library for BSD4.3. Would it be feasible to start with this library and port it or reimplement it on the abovementioned platforms in such a way that the call interface remains identical on all platforms? If this is the case, I assume that we would want to use the kmem library routines as the call interface between the generic and system specific parts of the deamon, and attempt to make everything above the kmem library portable. I'm generally ignorant about this topic; for all I know there might be inherent differences in the way the different UNIX variants store data in kmem that makes this approach a dead end. If so, what should we do? Seeking enlightenment, Bjorn.Larsen@usit.uio.no "Specialization is for insects" University Centre for Information Technology - Lazarus Long University of Oslo, Norway