statfs plugin
This plugin provides an interface to the statfs() system call. Use this plugin to get similar information than the 'df' (disk free) command.
Functions
statfs(path, f) | call statfs(path) and return field <f> |
'path' can be any file or directory, usually it's a mountpoint. 'field' can have the following values:
type | type of filesystem |
bsize | optimal transfer block size |
blocks | total data blocks in file system |
bfree | free blocks in fs |
bavail | free blocks avail to non-superuser |
files | total file nodes in file system |
ffree | free file nodes in fs |
namelen | maximum length of filenames |
see statfs(2) for details.
Example
Widget DF { class 'Text' expression statfs('/', 'bavail')*statfs('/', 'bsize')/1024/1024 prefix '/ ' postfix 'MB available' width 20 align 'L' update 1000 }