lua-users home
lua-l archive

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


Hello,

I wonder if their is anyway to do a statfs() from Lua ?

Statfs() is the internal function used by unix' df command to retrieve
file-system usage. I'm working on a monitoring tool (à la Nagios) but I
would like to have it as lightweight as possible : it's why the monitor
is in Lua and I would like to avoid as much as possible to fork()
eternal processes as it's heavy for the host ; So no exec() if possible.

I've been able to retrieve cpuload and memory usage directly in Linuxs
/proc but nothing regarding disk usage :(

Thanks

Laurent