You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while read -r line; do
info_type="$(echo "${line}" | cut -f1 -d: | tr ' ' '_')"
case "${info_type}" in
…
Logical_Unit_id) lun_id="${info_value}" ;;
However, on all systems I have access to, the actual info contains LU WWN Device ID, and I suppose smartctl made an output change since this code was written.
The fix is rather trivial, but since I don't know if there are still old - or many just different - smartctl versions are there, needs to handle both.
The text was updated successfully, but these errors were encountered:
This is a pretty strong argument for ditching both the smartmon.sh bash script and the smartmon.py Python script, both of which invoke smartctl in the usual way, and parse the human-readable output.
smartmontools has supported JSON output since 2017, and it would IMHO make a lot more sense to parse that. The smartmontools developers are aware that the JSON output is assumed to be machine-readable, and they avoid making backwards-incompatible changes to the format.
Looking at the code in smartmon.sh, here:
However, on all systems I have access to, the actual info contains
LU WWN Device ID
, and I suppose smartctl made an output change since this code was written.The fix is rather trivial, but since I don't know if there are still old - or many just different - smartctl versions are there, needs to handle both.
The text was updated successfully, but these errors were encountered: