Closed tiagomreis closed 2 years ago
Regarding this issue and because is discuss in some other issues, there is no problem in time:
Controller time:
Ctrl_Prop Value Time 2022/01/20 16:18:40
System time:
The current time is: 16:18:45.60
Do you pass "-C 0" as controller number?
Yes
C:\LSI>"C:\Program Files (x86)\perl\bin\perl.exe" check_lsi_raid -p "C:\LSI\storcli64.exe" -C 0 Error: invalid controller number, controller not found!
I've also done the direct usage of files on the same folder to avoid any problem in paths.
C:\LSI>perl check_lsi_raid -p storcli64.exe -C 0 Error: invalid controller number, controller not found!
Can you post the command output of:
C:\LSI\storcli64.exe show time
The code used to check if the controller number is:
sub getControllerTime{
my $storcli = shift;
my @output = `$storcli show time`;
return (checkCommandStatus(\@output));
}
@gschoenberger that command returns the list of commands without the /c0
syntax error, unexpected $end
Storage Command Line Tool Ver 007.1017.0000.0000 May 10, 2019
(c)Copyright 2019, AVAGO Technologies, All Rights Reserved.
help - lists all the commands with their usage. E.g. storcli help
<command> help - gives details about a particular command. E.g. storcli add help
List of commands:
With /c0 before show time
CLI Version = 007.1017.0000.0000 May 10, 2019
Operating system = Windows Server 2019
Controller = 0
Status = Success
Description = None
Controller Properties :
Ctrl_Prop Value
Time 2022/01/24 09:19:53
OK, I forgot that storcli is always prepended with the controller number by default:
$storcli .= " /c$CONTROLLER";
The command executed is, as you said:
C:\LSI\storcli64.exe /c0 show time
Then theres a function to parse the output of this command:
sub checkCommandStatus{
my @output = @{(shift)};
foreach my $line (@output){
if($line =~ /^Status/){
if($line eq "Status = Success\n"){
return 1;
}
Mh, your output includes "Status = Success":
C:\LSI>C:\LSI\storcli64.exe /c0 show time
CLI Version = 007.1017.0000.0000 May 10, 2019
Operating system = Windows Server 2019
Controller = 0
Status = Success
Description = None
Controller Properties : Ctrl_Prop Value Time 2022/01/24 09:19:53
Maybe there is a problem with "\n" under windows. Can you check which line endings you have at the output?
@gschoenberger I've attached the output
Plus, to make "this work" i've removed the following code:
if(!getControllerTime($storcli, $noCleanlogs)){
print "Error: invalid controller number, controller not found!\n";
exit(STATE_UNKNOWN);
}
And after that, the error pass to:
C:\LSI>"C:\Program Files (x86)\Plesk\perl\bin\perl.exe" check_lsi_raid_orig -p storcli64.exe -C 0
Invalid StorCLI command! (storcli64.exe /c0/vall show all nolog)
Can you post the output of storcli64.exe /c0/vall show all nolog
+ Return Code?
@gschoenberger sure
Does storcli64.exe /c0 /vall show all
work?
Maybe the spaces are a problem under windows.
I did a quick test under Linux:
# /opt/MegaRAID/storcli/storcli64 /c0/vall show all nolog
CLI Version = 007.1508.0000.0000 Oct 14, 2020
Operating system = Linux 5.4.0-72-generic
Controller = 0
Status = Success
Description = No VD's have been configured.
I am also using a newer storcli version:
/opt/MegaRAID/storcli/storcli64 -h
StorCli SAS Customization Utility Ver 007.1508.0000.0000 Oct 14, 2020
@gschoenberger on a Lenovo StorCli util i've found this on their changelog:
-MR 7.13: Storcli(Regression): Syntax error seen while using "nolog" and "page" together as parameters.(DCSG00071417)
....
-StorCLI - '/c0 show nolog' reported as Un-supported Command.(DCSG00071410)
I think this is a bug on the version that I've. I downloaded other version and the command works.
New version: 007.1705.0000.0000 Mar 31, 2021
Old version: 007.1508.0000.0000 Oct 14, 2020
How about the plugin with the new version?
@gschoenberger it's working now with no changes on the code.
C:\LSI>perl check_lsi_raid -p storcli64.exe -C 0
Critical (CTR Crit) [ROC_Temperature = Critical]|CV_Temperature=26;70;85 ROC_Temperature=101;85;95 c0/e252/s0_Drive_Temperature=33;40;45 c0/e252/s1_Drive_Temperature=31;40;45 c0/e252/s2_Drive_Temperature=30;40;45 c0/e252/s3_Drive_Temperature=30;40;45
I now have this "Critical", I will investigate..it was ok until I change the storcli64.exe
Your ROC temp is above the limits:
ROC_Temperature=101;85;95
@gschoenberger yes, it's another issue that I will investigate
Thank you for your feedback, the tool is working fine if we use the latest version of StorCLI.
Running the storcli64 with /c0 returns the controller and all disks, however, using the check_lsi_raid returns error
C:\LSI>"C:\Program Files (x86)\perl\bin\perl.exe" check_lsi_raid -p "C:\LSI\storcli64.exe" Error: invalid controller number, controller not found!
When using the storcli64.exe `C:\LSI>storcli64.exe /c0 show Generating detailed summary of the adapter, it may take a while to complete.
CLI Version = 007.1017.0000.0000 May 10, 2019 Operating system = Windows Server 2019 Controller = 0 Status = Success Description = None
Product Name = LSI MegaRAID 9361-8i`
Doing C:\LSI>"C:\Program Files (x86)\perl\bin\perl.exe" check_lsi_raid --help returns the correct output of check_lsi_raid plugin
Any idea / suggestion?