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.
EMCVNX,NetAppFiler -
A software solution running on commodity hardware, targetd, Nexenta
-
A Linux system running NFS service
Fields§
§id: StringIdentifier.
name: StringHuman friendly name.
status: u32System status stored in bitmap. Valid status value are:
System::STATUS_UNKNOWNSystem::STATUS_OKSystem::STATUS_ERRORSystem::STATUS_DEGRADEDSystem::STATUS_PREDICTIVE_FAILURESystem::STATUS_OTHER
if (s.status & System::STATUS_OK) == 0 {
println!("System {}/{} is not healthy", s.name, s.id);
}status_info: StringAdditional message for status.
fw_version: StringFirmware version.
read_cache_pct: i8Read cache percentage of the system. Valid values are:
>0 and < 100means only a part of whole cache are used for read.0means no read cache.100means all cache are used for read.System::READ_CACHE_PCT_NO_SUPPORTmeans no support.System::READ_CACHE_PCT_UNKNOWNmeans plugin failed to detect this value.
mode: SystemModeSystem 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)