smah.settings.system.stats.disk_stats

Classes

DiskStats()

Represents disk statistics.

class smah.settings.system.stats.disk_stats.DiskStats[source]

Bases: BaseStats

Represents disk statistics.

time_stamp

The timestamp of the last update.

Type:

datetime

total

The last recorded total disk space.

Type:

float

available

The last recorded available disk space.

Type:

float

used

The last recorded used disk space.

Type:

float

percent

The last recorded disk usage percentage.

Type:

float

static disk_info(reading)[source]

Retrieves disk information based on the specified reading type.

Parameters:

reading (str) – The type of disk information to retrieve.

Returns:

The requested disk information.

Return type:

float

readings(threshold=100)[source]

Retrieves the current disk readings, updating if necessary.

Parameters:

threshold (int) – The threshold in microseconds.

Returns:

The current disk readings.

Return type:

dict

show(options=None)[source]
update()[source]

Updates the disk statistics.