Web Hosting Talk







View Full Version : How to change sendmail priority


Katt
07-01-2002, 07:12 AM
How can I set sendmail priority higher so that it wouldn't stop when the server gets overloaded?

Joey
07-01-2002, 09:21 AM
===============================
NAME
nice - execute a utility with an altered scheduling priority

SYNOPSIS
nice [-n increment] utility [argument ...]

DESCRIPTION
nice runs utility at an altered scheduling priority. If an increment is
given, it is used; otherwise an increment of 10 is assumed. The superus-
er can run utilities with priorities higher than normal by using a nega-
tive increment. The priority can be adjusted over a range of -20 (the
highest) to 20 (the lowest).

The options are as follows:

-n increment
A positive or negative decimal integer used to modify the system
scheduling priority of utility.

The nice utility shall exit with one of the following values:

1-125 An error occurred.
126 The utility was found but could not be invoked.
127 The utility could not be found.

Otherwise, the exit status of nice shall be that of utility.
===============================
This is from "man nice" on a BSD box. You can mess with the nice and give it a higher priority.

Katt
07-01-2002, 12:52 PM
nice: sendmail: No such file or directory

What am I doing wrong?

jahsh
07-01-2002, 07:24 PM
Set a processes priority (nice, renice)

This will start sendmail with a priority of 15.

-20 is the highest priority

20 is the lowest priority

/bin/nice -n +15 /usr/sbin/sendmail /etc/sendmail.cf

those paths might not be exact but the command will work, you need to set the priority

infinite
07-02-2002, 06:06 AM
I used sendmail before and in the config file you can set sendmail to slow down/stop when the load average gets over 2 or 4, or whatever you set it to. It may be this that stops sendmail from working.

HTH,
Infinite :)