disk_usage - bruno-beloff/scs_dev GitHub Wiki

docs > software repositories > scs_dev > commands > device status


DESCRIPTION

The disk_usage utility is used to determine whether a volume is mounted and, if so, the free and used space on the volume. Space is given in blocks. The volume is identified by any filesystem path within the volume. If the --csv flag is used, the path is as specified by scs_mfr/csv_logger_conf.

If the "is-available" field in the report is false, this indicates that an OS error occurred when an attempt was made to access the volume. This error can occur if a removable medium failed, or was disconnected without being unmounted.

The disk_usage utility is normally included in the commands accepted by the control_receiver utility.

SYNOPSIS

disk_usage.py [-v] { -c | PATH }

Options
--version show program's version number and exit
-h, --help show this help message and exit
-c, --csv use PATH specified by csv_logger_conf
-v, --verbose report narrative to stderr

EXAMPLES

./disk_usage.py /srv/removable_data_storage

DOCUMENT EXAMPLE

{"path": "/srv/removable_data_storage", "free": 15423610880, "used": 329793536, "total": 15753404416, "is-available": true}

SEE ALSO

scs_dev/csv_logger
scs_dev/csv_log_usage
scs_dev/disk_volume

scs_mfr/csv_logger_conf