[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Server

>> Is it possible to make a program like Plan9's 'Iostat' for Inferno?
>Possible, yes, but it would be nicer if the system offered more explicit
>support for handling all of Styx.  If you know exactly which files you're
>interested in, sys->file2chan and some bindings make it easy to snoop
>I/O on those particular files.
>A different but more general approach would be to interpose an
>implementation of the sys module, picking off and logging all system
>calls.  This is thwarted by two effects: the inability to override the $Sys
>name in the module and the impossibility of writing a Limbo varargs-like
>interface (needed to catch print, sprint, and fprint).  Both problems are
>being addressed.
the system does offer explicit support to do this. If you create
two files with sys->file2chan. Open one side and then make a clean
namespace, mount the fd. Open the other side and call sys->export.
Now all you need is limbo program thats alt's the four io channels
copying mount.read -> exportfs.write and mount.write->exportfs.read.
What you see in the bodies of the messages are STYX which can
be interpreted however you like.