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.


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.


Widget DF {
    class  'Text'
    expression statfs('/', 'bavail')*statfs('/', 'bsize')/1024/1024
    prefix '/ '
    postfix 'MB available'
    width  20
    align  'L'
    update 1000
}

  • plugin_statfs.txt
  • Last modified: 2020/07/17 18:33
  • (external edit)