/*
 * Copyright (c) 2023 Red Hat.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 */

farm {
	ata
}

farm.ata {
	log_header
	drive_information
	workload_statistics
	error_statistics
	environment_statistics
	reliability_statistics
}

farm.ata.log_header {
	log_version							FARM:0:0
	pages_supported							FARM:0:1
	log_size							FARM:0:2
	page_size							FARM:0:3
	heads_supported							FARM:0:4
	number_of_copies						FARM:0:5
	reason_for_frame_capture					FARM:0:6
}

farm.ata.drive_information {
	serial_number							FARM:1:0
	world_wide_name							FARM:1:1
	device_interface						FARM:1:2
	device_capacity_in_sectors					FARM:1:3
	physical_sector_size						FARM:1:4
	logical_sector_size						FARM:1:5
	device_buffer_size						FARM:1:6
	number_of_heads							FARM:1:7
	device_form_factor						FARM:1:8
	rotation_rate							FARM:1:9
	firmware_rev							FARM:1:10
	ata_security_state						FARM:1:11
	ata_features_supported						FARM:1:12
	ata_features_enabled						FARM:1:13
	power_on_hours							FARM:1:14
	spindle_power_on_hours						FARM:1:15
	head_flight_hours						FARM:1:16
	head_load_events						FARM:1:17
	power_cycle_count						FARM:1:18
	hardware_reset_count						FARM:1:19
	spin_up_time							FARM:1:20
	time_to_ready_last_power_cycle					FARM:1:21
	time_drive_held_in_staggered_spin				FARM:1:22
	model_number							FARM:1:23
	drive_recording_type						FARM:1:24
	max_number_available_sectors_reassignment			FARM:1:25
	assembly_date							FARM:1:26
	depopulation_head_mask						FARM:1:27
}

farm.ata.workload_statistics {
	total_read_commands						FARM:2:0
	total_write_commands						FARM:2:1
	total_random_read_commands					FARM:2:2
	total_random_write_commands					FARM:2:3
	total_other_commands						FARM:2:4
	logical_sectors_written						FARM:2:5
	logical_sectors_read						FARM:2:6
	dither_events_current_power_cycle				FARM:2:7
	dither_held_off_random_workloads				FARM:2:8
	dither_held_off_sequential_workloads	  			FARM:2:9
	read_commands_0_3_lba_space_last_3_smart_summary_frames		FARM:2:10
	read_commands_3_25_lba_space_last_3_smart_summary_frames	FARM:2:11
	read_commands_25_75_lba_space_last_3_smart_summary_frames	FARM:2:12
	read_commands_75_100_lba_space_last_3_smart_summary_frames	FARM:2:13
	write_commands_0_3_lba_space_last_3_smart_summary_frames	FARM:2:14
	write_commands_3_25_lba_space_last_3_smart_summary_frames	FARM:2:15
	write_commands_25_75_lba_space_last_3_smart_summary_frames	FARM:2:16
	write_commands_75_100_lba_space_last_3_smart_summary_frames	FARM:2:17
}

farm.ata.error_statistics {
	unrecoverable_read_errors					FARM:3:0
	unrecoverable_write_errors					FARM:3:1
	reallocated_sectors						FARM:3:2
	read_recovery_attempts						FARM:3:3
	mechanical_start_failures					FARM:3:4
	reallocated_candidate_sectors					FARM:3:5
	asr_events							FARM:3:6
	interface_crc_errors						FARM:3:7
	spin_retry_count						FARM:3:8
	spin_retry_count_normalized					FARM:3:9
	spin_retry_count_worst						FARM:3:10
	ioedc_errors							FARM:3:11
	cto_count_total							FARM:3:12
	cto_count_over_5s						FARM:3:13
	cto_count_over_7s						FARM:3:14
	total_flash_led_assert_events					FARM:3:15
	index_of_last_flash_led						FARM:3:16
	flash_led_event_information					FARM:6:0
	flash_led_event_timestamp					FARM:6:1
	flash_led_event_power_cycle					FARM:6:2
	uncorrectable_errors						FARM:3:17
	cumulative_lifetime_unrecoverable_errors_due_to_erc		FARM:3:18
	cumulative_lifetime_unrecoverable_read_repeating		FARM:7:0
	cumulative_lifetime_unrecoverable_read_unique			FARM:7:1

}

farm.ata.environment_statistics {
	current_temperature						FARM:4:0
	highest_temperature						FARM:4:1
	lowest_temperature						FARM:4:2
	average_short_term_temperature					FARM:4:3
	average_long_term_temperature					FARM:4:4
	highest_average_short_term_temperature				FARM:4:5
	lowest_average_short_term_temperature				FARM:4:6
	highest_average_long_term_temperature				FARM:4:7
	lowest_average_long_term_temperature				FARM:4:8
	time_in_over_temperature					FARM:4:9
	time_in_under_temperature					FARM:4:10
	specified_max_operating_temperature				FARM:4:11
	specified_min_operating_temperature				FARM:4:12
	current_relative_humidity					FARM:4:13
	current_motor_power						FARM:4:14
	current_12_volts						FARM:4:15
	minimum_12_volts						FARM:4:16
	maximum_12_volts						FARM:4:17
	current_5_volts							FARM:4:18
	minimum_5_volts							FARM:4:19
	maximum_5_volts							FARM:4:20
	power_average_12v						FARM:4:21
	power_minimum_12v						FARM:4:22
	power_maximum_12v						FARM:4:23
	power_average_5v						FARM:4:24
	power_minimum_5v						FARM:4:25
	power_maximum_5v						FARM:4:26
}

farm.ata.reliability_statistics {
	error_rate_smart_1_raw						FARM:5:0
	error_rate_smart_1_normalized					FARM:5:1
	error_rate_smart_1_worst					FARM:5:2
	seek_error_rate_smart_7_raw					FARM:5:3
	seek_error_rate_smart_7_normalized				FARM:5:4
	seek_error_rate_smart_7_worst					FARM:5:5
	high_priority_unload_events					FARM:5:6
	helium_pressure_threshold_tripped				FARM:5:7
	lbas_corrected_by_parity_sector					FARM:5:8
	dvga_skip_write_detected					FARM:7:2
	rvga_skip_write_detected					FARM:7:3
	fvga_skip_write_detected					FARM:7:4
	skip_write_detect_threshold_detect				FARM:7:5
	write_power_hrs							FARM:7:6
	mr_head_resistance						FARM:7:7
	second_mr_head_resistance					FARM:7:8
	number_of_reallocated_sectors					FARM:7:9
	number_of_reallocation_candidate_sectors			FARM:7:10
}
