Re: is a user space process capable of generating a /proc filesystem entry?

Evan Jeffrey (ejeffrey@utrek.ml.org)
Mon, 03 Nov 1997 17:59:31 -0600


>I have a OptiSAFE UPS and it has communication abilities which
>allow it to monitor line voltage, battery temperature, line
>frequency and such via a serial port.
>
>I would lilke to have something like /proc/optisafe which
>could be used to view modify these parameters from the
>command line.

You can't do that. What you can do, however, is create a named pipe in the
/dev directory with the mknod program. Then write an optisafed which will
open the pipe for write, select(2) on it, then when woken, get the info from
the UPS, process it, and send output to the pipe.

In theory, you could also use the userfs and a userspace program that
created a filesystem based on data from the UPS. This would be overkill.

Evan