This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mail command in Astaro?

Hello all!
I have what I think is a stupid question but I cannot seem to find the answer.  My boss' Astaro box at home has been going into states of high CPU usage and I have been tasked with tracking it down.  I have SSH and webadmin access to it.  Anyway I found a nice little script here that can be scheduled as a cron job to email me on the processes that go above a set CPU usage (say 70%).  I have modified it slightly to stop throwing some errors about a defunct process but I am now receiving this error:

./monitorCpuUsage.sh: line 124: mail: command not found

and that leads me to the actual question, what is the command to mail something on Astaro?  I simply want it to send out a report of the high CPU processes whenever the script runs, probably every 5 minutes or so.

If there is an easier way to do this please let me know.  Thanks for your time!!!


This thread was automatically locked due to age.
  • Astaro is a heavily customized distro where most things happen through a series of customized scripts.  As such, working from the shell is unsupported unless directed to by support.  Also be aware that if you do make changes, like a custom script or cron job, there is a good chance that updates will break or remove them.
  • Um thanks?  :/  I'm well aware of those points, but somehow that doesn't answer my questions.  I need to, FOR A SHORT TIME, keep track of CPU usage on this box and I don't know of a better way to do it.  Another suggestion rather than a custom script would be welcomed.
  • If you look at other cron jobs setup on astaro, they are using sendmail instead of mail command. However when you do that, root is not allowed to send email and you get an error like this 

    2011:09:06-21:23:17 gatekeeper exim-in[19051]: 2011-09-06 21:23:17 unqualified sender rejected:  H=localhost [127.0.0.1]:60422
    2011:09:06-21:23:17 gatekeeper exim-in[19051]: 2011-09-06 21:23:17 SMTP connection from localhost [127.0.0.1]:60422 closed by QUIT

    You will have have to customize your script accordingly.

    --Bill
  • Your question has been asked several times over the years here, and has never received an answer.  The folks who would definitely know, the developers, can't say since it would be a company unsupported action.

    Those of us on the boards who are not Astaro employees, but have a great deal of experience with Astaro, can't muck around with something like this to figure it out because it would negate our paid business license support contracts.

    The best that I can offer you is a research path you can potentially follow.  I know of one shell command that can email something.  It's a script to kick off an executive report.  If you can figure out what the script is doing, you can probably figure out how to add it to your script.  /usr/local/bin/report_render.plx --type monthly --sendmail
  • Why don't you just install ACC and do everything without scripting?

    Edit: oops sorry, that wouldn't work. You want to get emails when the cpu spikes. Thats what I get for not reading the entire post[;)]
  • We have this same need in order to have our RAID controller information sent out to us. We are using HP hardware and Astaro does not have 1st party support for things like HP's SNMP hooks, etc.

    I did notice that perl is available on the server so that might be a viable option.