Date: Wed, 10 Aug 2005 15:34:37 -0600 From: "Chad Leigh -- Shire.Net LLC" <chad@shire.net> To: Dan Nelson <dnelson@allantgroup.com> Cc: FreeBSD - Questions <freebsd-questions@freebsd.org> Subject: Re: using Linux aaccli in a cron job Message-ID: <FEB3F9E5-315C-47AC-83CA-832113AA8AF4@shire.net> In-Reply-To: <20050810192331.GI48947@dan.emsphone.com> References: <1E4F1132-964D-4829-BF81-1017750F362B@shire.net> <20050810192331.GI48947@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 10, 2005, at 1:23 PM, Dan Nelson wrote: > In the last episode (Aug 10), Chad Leigh -- Shire.Net LLC said: > >> I have a 5.4-R system with an Adaptec 2200S. I also have Linux >> emulation running and the aac_linux kernel module installed and I can >> run the aaccli program successfully in a terminal window and use it >> to check status of the RAID controller. However, if I do it from a >> cron job (same script as I run in a terminal) I get no output. >> aaccli uses terminal control commands and I suspect it is detecting >> that it is not connected to a terminal and hence not running. >> However, I so-far have not been able to get the Cron output to check >> for errors due to the fact that the mail server rejects it for not >> having a valid From/Sender and cron does not seem to set a From on >> its mail or something. >> > > Cron should always set From, To, and Subject: > > fprintf(mail, "From: %s (Cron Daemon)\n", usernm); > fprintf(mail, "To: %s\n", mailto); > fprintf(mail, "Subject: Cron <%s@%s> %s\n", > usernm, first_word(hostname, "."), > e->cmd); maybe ssmtp is doing something with it then since mail I send from inside my script (the script calls sendmail to email me -- not the cron output) works but the cron generated mail fails on the mail server with an unable to find a valid sender in any header (checks done on Sender, From:, Reply-To) > > > >> Any ideas on how to get this aaccli program to run in a cron job? >> >> Adaptec really took a step backwards when they went to this aaccli >> from the earlier raidutils used with asr devices. The output is >> cryptic and a pita to work with. >> > > It seems to work for me on a PowerEdge 2550 and a PERC 3/Di card. > Putting something like this in cron: > > /usr/local/bin/aaccli open /readonly aac0 : enclosure show status : > disk show smart : container list /full : diagnostic show text That works better than what I was doing. I have a "script" I feed to aaccli, which work in a terminal but not in cron. Thanks! The script idea (./aaccli < script) was recommended to me from an Adaptec person... Thanks Chad > > gives me a whole lot of info back in the email. > > -- > Dan Nelson > dnelson@allantgroup.com > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions- > unsubscribe@freebsd.org" > --- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider chad@shire.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FEB3F9E5-315C-47AC-83CA-832113AA8AF4>