[root@server1 serv]# sim -v
Warning: bad syntax, perhaps a bogus ‘-’? See /usr/share/doc/procps-3.2.3/FAQ
'usr/local/sim/internals/chk/serv/spam.chk: line 1: syntax error near unexpected token { 'usr/local/sim/internals/chk/serv/spam.chk: line 1: chk_spam() {
/usr/local/sbin/sim: line 182: chk_spam: command not found
[12/02/06 13:00:02]: MYSQL service is online.
[12/02/06 13:00:02]: XINET service is online.
[12/02/06 13:00:02]: XINET service is online.
[12/02/06 13:02:23]: LOAD 0.68 (status good)
[12/02/06 13:02:23]: NETWORK is online.
[12/02/06 13:02:23]: FTP service is online.
[12/02/06 13:02:23]: HTTP service is online.
[12/02/06 13:02:23]: SSH service is online.
[12/02/06 13:02:23]: MYSQL service is online.
[12/02/06 13:02:23]: XINET service is online.
Adding all services that are vital for the running of Iworx (inclusive IWORX itself) into SIM would be very nice indeed. This way it is no catastrophe if the iworx-related processes go down. As it is now, iworx needs to be restarted manually if it stalls.
[QUOTE=verantis;13604]Hey, first of all, thanks so much for the tutorial!! It really helped alot! But I have request… [SIZE=3]
I need SIM to restart spamassassin service on high loads (5+) and restart the server on severe loads (10+)
I have no idea what code to add to where…
Think your up for it?
Thanks in advance :D:D
[/SIZE][/QUOTE]
Haven’t actually tried this, but according to the SIM docs, this is possible. I would look in /usr/local/sim/conf.sim, and check out the following config values:
# Here we edit the parameters for our system load module
#
# This module will in due time be completely redone but for now
# it serves the purpose and works reasonable well....
WARN_LD="15" # max load value before status warning (5 minute load avg.)
CRIT_LD="20" # max load value before status critical (5 minute load avg.)
and
WARN_CMD=". $INSPATH/internals/chk/sys/lm/warn.lm" # command to execute at load status warning
CRIT_CMD=". $INSPATH/internals/chk/sys/lm/crit.lm" # command to execute at load status critical
Note that $INSPATH is /usr/local/sim, and that the warn.lm and crit.lm files already have code in it, so you may want to add to those files instead of replacing them.
Regardless, I would still read through the conf file very carefully before making any changes, and make sure you have a backup plan if something goes wrong.