Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.