diff options
author | Peter Schiffer <pschiffe@redhat.com> | 2014-02-14 16:32:18 +0100 |
---|---|---|
committer | Peter Schiffer <pschiffe@redhat.com> | 2014-02-14 16:32:18 +0100 |
commit | 59a6934768e3160864674a434db7c29739f9ae60 (patch) | |
tree | 4c6ce42b4ed71c0abac1170bd4e5d38d5bfb4c2d /commands/hardware | |
parent | 3782773b65ee8bf9a556a442b7c01b7fd70ed682 (diff) | |
download | openlmi-scripts-59a6934768e3160864674a434db7c29739f9ae60.tar.gz openlmi-scripts-59a6934768e3160864674a434db7c29739f9ae60.tar.xz openlmi-scripts-59a6934768e3160864674a434db7c29739f9ae60.zip |
Hardware: added disk temperature
Diffstat (limited to 'commands/hardware')
-rw-r--r-- | commands/hardware/lmi/scripts/hardware/__init__.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/commands/hardware/lmi/scripts/hardware/__init__.py b/commands/hardware/lmi/scripts/hardware/__init__.py index faa6cd0..dae84f4 100644 --- a/commands/hardware/lmi/scripts/hardware/__init__.py +++ b/commands/hardware/lmi/scripts/hardware/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Red Hat, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -368,6 +369,13 @@ def get_disks_info(ns): else: smart = get_colored_string('Unknown', YELLOW_COLOR) + temp = '' + if hdd.Temperature: + temp = '%d' % hdd.Temperature + if not temp: + temp = 'N/A' + temp = temp + u' °C' + if not first_disk: result.append(EMPTY_LINE) else: @@ -386,5 +394,6 @@ def get_disks_info(ns): (' Port Type:', port_type), (' Port Speed:', '%s current, %s max' % \ (port_speed_current, port_speed_max)), - (' SMART Status:', smart)] + (' SMART Status:', smart), + (' Temperature:', temp)] return result |