Porting from Linux to FreeBSD (procfs question)

gregoryd.freebsd at free.fr gregoryd.freebsd at free.fr
Fri Jan 4 05:38:04 PST 2008


Quoting Fernando Apesteguía <fernando.apesteguia at gmail.com>:


> Maybe a mix of both could be good: use the linxprocfs when it is
> almost straightforward (in fact I could run the app, just changing few
> lines) and sysctl when the linprocfs doesn't provide the information
> that I need.

Wouldn't the opposite be more legitimate: using sysctl and falling back on
linuxprocfs when lacking functionality ?
(Depending on whether it's a FreeBSD *port*, or if you want to keep it as
general as you can)


Also, have you considered procstat ?
(as i read here:
http://ivoras.sharanet.org/freebsd/freebsd8.html
it is destined to replace procfs in a way, am I wrong ?)

Depending on how short term your application must be available (and how long it
will take to MFC procstat), it might do the thing.



More information about the freebsd-hackers mailing list