Does ulimit change resource limits at runtime?

0

Does ulimit change the limits of running programs? Are their specific resources which can not be changed at run time? If ulimit doesn't change limits at run time, does this mean that you have to restart all daemons to work with the new specified limits?

AlexLordThorsen

Posted 2013-06-06T17:55:23.850

Reputation: 123

Answers

1

Correct, the ulimit command doesn't change the limits of running programs as far as I know. You can however call set_rlimit and friends from a running program. You may also want to look at resource control stuff, man rctl, but it requires rebuilding your kernel.

Steve Wills

Posted 2013-06-06T17:55:23.850

Reputation: 395

0

You can limit the resources for a daemon by using ulimit (or limit, depending on the shell), or you can set them using /etc/login.conf (hence the user account per daemon type).

After updating /etc/login.conf make sure you follow the steps at the top of the file to regenerate the db version of the file. Then restart the daemon, assuming that the daemon changes user account.

Coroos

Posted 2013-06-06T17:55:23.850

Reputation: 135