Hi all, I've created an ebuild for Lsi Logic's megarc Megaraid Controller utility, which allows you to monitor the hardware array status for one. I've also created a nagios plugin, which will be installed if you have the nagios-plugin useflag set. It's been a _real_ mission finding this software and actually figuring it out, so this ebuild should make alot of people's lives much easier as it would have mine had it existed. Regards, Pieter Steyn.
Created attachment 93892 [details] Ebuild for lsi-logic megarc
Created attachment 93893 [details] Lsi Logic LICENSE
Created attachment 93894 [details] README for the nagios plugin
Created attachment 93895 [details] README for the nagios plugin
Created attachment 93896 [details] README for the nagios plugin
Created attachment 93897 [details] nagios plugin
Created attachment 93898 [details, diff] Patch to fix insecure temp file creation by the binary
Is anyone willing to commit this? I'd love to have it in the portage tree for all the Dell servers I manage. Pieter was very careful to mark it x86-only only and honour the silly license agreement.
Could this please be added to portage.
Created attachment 104028 [details, diff] Update to insecure patch to not display cwd at end of execution I would like to add my voice to those that would like to see this included. The following patch stops the script from outputting the current working directory at the end of execution (the cd - does this) by using cd /tmp. The user's cwd is unaffected in any case since the cd within the script does not affect the program calling it.
Created attachment 104029 [details, diff] Find only the correct device and handle no device at all The script was failing on some of my systems because two devices were being found (megadev_legacy being the second). I took the opportunity to handle no device being found more gracefully too.
Created attachment 104030 [details] ebuild including device-find.patch
Guys, can you please have a look at the following: sys-block/megacli (by LSI) sys-block/megactl (OSS) sys-block/lsiutil (by LSI, only for Fusion MPT based devices) sys-block/mpt-status (OSS, only for Fusion MPT based devices) Afterwards, please tell me whether you still want MegaRC in Portage. If so, I'll add it. Thanks!
Of the four listed, only sys-block/megactl recognises my adapter. It doesn't support much of the control functionality of megarc, so I would still like to see that added if possible.
(In reply to comment #14) > Of the four listed, only sys-block/megactl recognises my adapter. It doesn't > support much of the control functionality of megarc, so I would still like to > see that added if possible. Ok. Will let you know once it's committed.
(In reply to comment #11) > Created an attachment (id=104029) [edit] > Find only the correct device and handle no device at all > > The script was failing on some of my systems because two devices were being > found (megadev_legacy being the second). I took the opportunity to handle no > device being found more gracefully too. +MAJOR=`grep 'megadev\>' /proc/devices|awk '{print $1}'` What does the \> do there?! man 7 regex didn't help... I'd suspect it to act just like $, but well, please enlighten me :)
> What does the \> do there?! It forces a match to the end of a word, so: megadev megadev, both match, but megadeva does not. > man 7 regex didn't help... I think the grep manpage may have a more complete explanation.
(In reply to comment #17) > > What does the \> do there?! > > It forces a match to the end of a word, so: > megadev > megadev, > both match, but > megadeva > does not. I see... why not match against 'megadev$'? Does /proc/devices sometimes contains stuff like this: "123 megadev, foo, bar, baz"?! Cannot imagine that... > > man 7 regex didn't help... > > I think the grep manpage may have a more complete explanation. Stupid me X-) Thanks!
> I see... why not match against 'megadev$'? > Does /proc/devices sometimes contains stuff like this: > "123 megadev, foo, bar, baz"?! Cannot imagine that... Fair point; looking at the output of /proc/devices you should be able to switch to $ without affecting the behaviour I think.
Committed sys-block/megarc-1.11 with a new wrapper shell script (please test it!). I left out the Nagios plugin thingy for now. Feel free to open a new bug for that one.
Thanks for adding this. Install seems fine, so not sure this should be re-opened for the following problem or I should have created a new bug. Sorry if you would prefer the latter. Running the installed program: # megarc /usr/sbin/megarc: line 36: megarc/megarc.bin: No such file or directory Removing temporary megarc working directory Finished. Have a nice day. Looks like the location of megarc.bin is being mis-calculated. As it's being looked at, would it be better somewhere other than sbin anyway, since it won't be called directly? Also, if I had my way the last two echo statements would be removed since all they do is clutter up the output.
(In reply to comment #21) > Running the installed program: > # megarc > /usr/sbin/megarc: line 36: megarc/megarc.bin: No such file or directory > Removing temporary megarc working directory > Finished. Have a nice day. > > Looks like the location of megarc.bin is being mis-calculated. As it's being > looked at, would it be better somewhere other than sbin anyway, since it won't > be called directly? Thanks, I f**ked up ;) Fixed in CVS without revbump. > Also, if I had my way the last two echo statements would be removed since all > they do is clutter up the output. Fixed.
Works here, many thanks. Sorry for my slow response.