Feb 102013

arcconf is a utility that can be used to configure and manage Adaptec RAID arrays. It can also be used to query the status of the array. Below is a script that parses the result of the query looking for problems and if it finds any sends an email containing the relevant lines and the whole query.

It takes the file to parse as argument, if it doesn’t receive an argument it looks for /tmp/arcconfig.

It can be used by including it in crontab or it could be modified for nagios or zabbix monitoring. The arcconf utility needs root permissions to run, however the script doesn’t, since all it does is parse the results.

This works for Adaptec 5405, other models might return slightly different information.

  10 Responses to “Monitoring Adaptec RAID arrays with arcconf”

  1. Thanks but I was using this instruction – http://sysadmin.te.ua/linux/aacraid-monitoring.html . There is much more info about Adaptec AAC-Raid monitoring.

  2. hi,

    fanstatic script however when i run it through cronjob i get the following in my email, even if nothing wrong:
    Controller Status:
    Dead disk drives:
    Battery Status:
    Logical device 0:


    But if i run the very same script manually it works fine ( aka i dont get any mails, only if something gone wrong).

    any idea, why the cornjob end out a mail like above ?

    • Sorry, but I have no idea. If you get output, it encounters something that isn’t expected. It looks like the parsed file doesn’t contain what it should, I’d suggest checking the output of arcconf when run from cron.

  3. ammending the cron job entry to this helped for me – Debian Linux
    51 * * * * /usr/local/sbin/arcconf getconfig 1 > /tmp/arcconf_status ; /usr/local/bin/raid_check.sh /tmp/arcconf_status ;

    Great script!

  4. I cut and paste your code above to a folder /root/check_arcconf.sh and ran it. I get the following errors:

    /bin/sh: root: command not found
    /root/check_arcconf.sh: line 76: mail: command not found

    I have removed the ‘root’ from the crontab command, just after ‘@hourly’

    How can I fix the line 76 problem. Please be aware I am not a code writer so please give me complete instructions.

    Stephen Keating

    • That crontab line should give you an idea of the command to be run. It’s format is proper for FreeBSD and then for the system cron. Mike, for example, in another comment, used a different cron line. Anyway, ‘arcconf’ needs to run as root if I remember correctly. You should adapt it to whatever OS you’re running.

  5. One additional bit of information for my above question: I am running this on a XenServer. The only email ability on it I believe is ssmtp (there is a /etc/ssmtp.conf file that must be modified for sending out messages. How do i need to modify line 76 to make use of ssmtp?


    • ‘mail’ should be present on any Unix like system. If it isn’t, it usually can be installed. It, or something similar. A Google search for ‘xen server mail command’ might help. As far as I can see Xen Server is based on CentOS, so maybe ‘yum install mail’ or ‘yum install mailx’ might do something? Anyway, I’m sorry, but it sounds to me like either you have some reading to do about administering a Linux box, or you need to ask a sysadmin for help, you seem to be lacking the basics. You should be careful, specially if that server means anything to anyone. Sorry I can’t help more.

  6. On Line 14 of the script it says ARCFILE=”/tmp/arcconfig” #’arcconf getconfig 1′ result. I understand the crontab at the top is an example, but should it read /tmp/arcconf instead of /tmp/arcconf_status?

    • No, it shouldn’t. It’s explained before the script and I think it’s all pretty straight forward. Again, if you can’t figure it out it seems to me like you’re missing some basic knowledge that you won’t get asking on some random blog. I’d suggest to at least try getting some interactive help, like talking to someone that has a grasp on this stuff or chatting on some IRC channel or something similar.

      It’s more likely that you need an introduction to Linux. This has made the news recently, $2400 course offered for free. It might help.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">