SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Originally posted by keefaz Win32sux, did you try:
ulimit -u 256
before execute your forkbomb.sh script ?
okay, when setting the ulimit like that before executing the script it helps a lot... the system still gets slow, but it doesn't get SO slow and doesn't hang... also, the swap doesn't get touched... i am able to open a terminal, become root, and issue a "killall forkbomb.sh" and make everything come back to normal...
Code:
bash-3.00$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 2048
virtual memory (kbytes, -v) unlimited
Code:
bash-3.00$ ulimit -u 256
bash-3.00$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 256
virtual memory (kbytes, -v) unlimited
by doing a "ulimit -u 128" the performance hit of the forkbomb was even lighter...
the problem is that this is all done by the non-root user... and obviously someone with bad intentions wouldn't ulimit themselves... so my question now is:
how can *root* set the max ulimit for all the non-root users on slackware??
i'm thinking that maybe adding a ulimit command to the /etc/X11/xinit/xinitrc file might limit the amount of processs spawned in the X session?? what do you think??
what about remote ssh logins and local runlevel 3 logins??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.