Skip to main contentModule df
Source - DfConfig
- Configuration for the df command.
- FsInfo
- Filesystem information after calling statvfs.
- MountEntry
- A parsed mount entry from /proc/mounts.
- VALID_OUTPUT_FIELDS
- Valid field names for –output.
- format_size
- Format a size value according to the config.
- get_filesystems
- Get filesystem info for all relevant mount points.
Returns (filesystems, had_error) where had_error is true if any file was not found.
- human_readable_1000
- Format a byte count in human-readable form using powers of 1000.
- human_readable_1024
- Format a byte count in human-readable form using powers of 1024.
- parse_block_size
- Parse a block size string like “1K”, “1M”, “1G”, etc.
- parse_output_fields
- Parse the –output field list.
- print_fs_line
- Print a single filesystem info line (for backward compat with tests).
- print_header
- Print the df output header (for backward compat with tests).
- print_total_line
- Print the total line (for backward compat with tests).
- read_mounts
- Read mount entries from /proc/mounts (falls back to /etc/mtab).
- run_df
- Run the df command and write output.