Random Project

1.63

I had my controller disable cache due to a battery failure, which I didn’t care about cause my server doesn’t store anything important. I just wanted to monitor the disk redundancy status for availability. I had to add two options: [-y] to ignore CACHE_MODULE_STATUS and [-z] to ignore STORAGE STATUS in ‘HEALTH_AT_A_GLANCE’.

@@ -189 +189,2 @@
– [ -i|–ignorelinkdown ] [ -x|–ignorebatterymissing ] [ -s|–sslv3 ]
+ [ -i|–ignorelinkdown ] [ -x|–ignorebatterymissing ] [ -y|–ignorecachestatus ]
+ [ -z|–ignorestoragestatus ] [ -s|–sslv3 ]
@@ -277,0 +279,14 @@
+ spec => ‘ignorecachestatus|y’,
+ help =>
+ qq{-y, –ignorecachestatus
+ Ignore Smart Controller cache status.},
+);
+
+$p->add_arg(
+ spec => ‘ignorestoragestatus|z’,
+ help =>
+ qq{-z, –ignorestoragestatus
+ Ignore Storage “at a glance” status (still checks disks).},
+);
+
+$p->add_arg(
@@ -374,0 +390,2 @@
+my $ignorecachestatus = defined($p->opts->ignorecachestatus) ? 1 : 0;
+my $ignorestoragestatus = defined($p->opts->ignorestoragestatus) ? 1 : 0;
@@ -609,0 +627,3 @@
+ if ($componentstate eq ‘Degraded’ && $ignorestoragestatus ) {
+ next
+ }
@@ -747 +767 @@
– if($cachestatus && $cachestatus ne ‘OK’) {
+ if($cachestatus && $cachestatus ne ‘OK’ && ! $ignorecachestatus ) {