running afacli in a cron job
pwendling at sopragroup.com
Thu Nov 28 13:03:01 CST 2002
Test config is a PE2500, PERC 3/Di, running RedHat 7.3 with
I have a perl script that calls afacli, send commands on it's stdin and
parse the output. Everything works fine when called from a shell script
launched from an interactive shell (i.e. with a tty), but as soon as I
try to call it from the same shell script submitted as a cron/at job, it
fails with the following message in the log:
Error opening terminal: unknown
I guess that's because afacli tries to use fancy tty features for it's CLI.
However, I need to monitor the status of the RAID volumes and individual
disks for multiple remote systems, and feed that into our monitoring
framework. So I tried every possible way of calling afacli I could think
of (shell script, perl, pipes, redirections, etc.) and couldn't find a
way to run my script from cron.
I tried to do something as close as I could to the example on Matt
Domsch page, and I can not see how it could possibly work !
Has anybody tried to do that ?
Would it be possible to get something more in the Unix spirit than
afacli ? Like something that doesnt do stupid things with the tty but
just reads and executes commands so that you can use it in scripts ???
Sopra Group, Annecy, France
More information about the Linux-PowerEdge