You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had to move from the dependable megaraid-status to megaclisas-status in my bullseye installations, as it seems the former is deprecated.
In my PERC5 machines, the megaclisas-status, which parses the output of megacli, doesn't work, since the PERC5s have bad binary data in the "Mfg. Data" section that it's all too willing to output:
# megaclisas-status --notemp
-- Controller information --
Traceback (most recent call last):
File "/usr/sbin/megaclisas-status", line 660, in <module>
output = getOutput(cmd)
File "/usr/sbin/megaclisas-status", line 148, in getOutput
for line in output:
File "/usr/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 420: invalid start byte
Mfg. Data
================
Mfg. Date : 00/00/00
Rework Date : 00/00/00
Revision No : @��A
Battery FRU : N/A
I think parsing the output of megacli is a fool's game compared to using the far more robust megactl, but I'm sure there are good reasons for it.
For now, I've created a /usr/local/sbin/MegaCli wrapper (that this script finds first), to preprocess the data:
#!/bin/sh
/usr/sbin/megacli $@ | iconv -c
But apparently the proper solution in the silliness that is Python is apparently to remove os.popen and replace with subprocess.Popen, which has string encoding options. I am useless with Python, so I can't provide a decent patch, though I can test.
The text was updated successfully, but these errors were encountered:
I've had to move from the dependable
megaraid-status
tomegaclisas-status
in my bullseye installations, as it seems the former is deprecated.In my PERC5 machines, the
megaclisas-status
, which parses the output ofmegacli
, doesn't work, since the PERC5s have bad binary data in the "Mfg. Data" section that it's all too willing to output:I think parsing the output of megacli is a fool's game compared to using the far more robust megactl, but I'm sure there are good reasons for it.
For now, I've created a
/usr/local/sbin/MegaCli
wrapper (that this script finds first), to preprocess the data:But apparently the proper solution in the silliness that is Python is apparently to remove
os.popen
and replace withsubprocess.Popen
, which has string encoding options. I am useless with Python, so I can't provide a decent patch, though I can test.The text was updated successfully, but these errors were encountered: