pub struct System {
pub id: String,
pub name: String,
pub status: u32,
pub status_info: String,
pub fw_version: String,
pub read_cache_pct: i8,
pub mode: SystemMode,
/* private fields */
}
Expand description
Represent a storage system. Examples:
-
A hardware RAID card, LSI
MegaRAID
-
A storage area network (SAN), e.g.
EMC
VNX,NetApp
Filer -
A software solution running on commodity hardware, targetd, Nexenta
-
A Linux system running NFS service
Fields§
§id: String
Identifier.
name: String
Human friendly name.
status: u32
System status stored in bitmap. Valid status value are:
System::STATUS_UNKNOWN
System::STATUS_OK
System::STATUS_ERROR
System::STATUS_DEGRADED
System::STATUS_PREDICTIVE_FAILURE
System::STATUS_OTHER
if (s.status & System::STATUS_OK) == 0 {
println!("System {}/{} is not healthy", s.name, s.id);
}
status_info: String
Additional message for status.
fw_version: String
Firmware version.
read_cache_pct: i8
Read cache percentage of the system. Valid values are:
>0 and < 100
means only a part of whole cache are used for read.0
means no read cache.100
means all cache are used for read.System::READ_CACHE_PCT_NO_SUPPORT
means no support.System::READ_CACHE_PCT_UNKNOWN
means plugin failed to detect this value.
mode: SystemMode
System mode, currently only supports hardware RAID cards.
Implementations§
source§impl System
impl System
sourcepub const READ_CACHE_PCT_NO_SUPPORT: i8 = -2i8
pub const READ_CACHE_PCT_NO_SUPPORT: i8 = -2i8
Plugin does not support querying read cache percentage.
sourcepub const READ_CACHE_PCT_UNKNOWN: i8 = -1i8
pub const READ_CACHE_PCT_UNKNOWN: i8 = -1i8
Plugin failed to query read cache percentage.
sourcepub const STATUS_UNKNOWN: u32 = 1u32
pub const STATUS_UNKNOWN: u32 = 1u32
Plugin failed to query system status.
sourcepub const STATUS_ERROR: u32 = 4u32
pub const STATUS_ERROR: u32 = 4u32
System is in error state.
sourcepub const STATUS_DEGRADED: u32 = 8u32
pub const STATUS_DEGRADED: u32 = 8u32
System is degraded.
sourcepub const STATUS_PREDICTIVE_FAILURE: u32 = 16u32
pub const STATUS_PREDICTIVE_FAILURE: u32 = 16u32
System has potential failure.
sourcepub const STATUS_OTHER: u32 = 32u32
pub const STATUS_OTHER: u32 = 32u32
Vendor specific status.
Trait Implementations§
source§impl<'de> Deserialize<'de> for System
impl<'de> Deserialize<'de> for System
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for System
impl RefUnwindSafe for System
impl Send for System
impl Sync for System
impl Unpin for System
impl UnwindSafe for System
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)