wiki:plugin_statfs

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:

typetype of filesystem
bsizeoptimal transfer block size
blockstotal data blocks in file system
bfreefree blocks in fs
bavailfree blocks avail to non-superuser
filestotal file nodes in file system
ffreefree file nodes in fs
namelenmaximum 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
}

Last modified 14 years ago Last modified on 04/03/05 09:34:56