Linux limits user behavior and linux limits Behavior
The number of people on the server is large recently, and resources are insufficient. It is highlighted that the hard disk space is often insufficient because the user does not clean up the disk in time. The user goes crazy with the process regardless of the consequences, resulting in insufficient memory and CPU. Specifically, the user's hard disk space, memory usage, CPU, and other restrictions are checked.
Linux ic-m3.localdomain 2.6.32-220. el6.x86 _ 64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
1. Memory process restrictions
Reference http://my.oschina.net/emptytimespace/blog/177773
But it does not work. /Lib/security/pam_limits.so is not found.
For more information, see http://blog.csdn.net/lwei_998/article/details/21459965. The reason is the number of digits in the system. You can modify the number according to what the blog says.
Problem 1: Modify rss and find that the user memory limit is invalid. Similar Problem: http://bbs.csdn.net/topics/330026185
Countermeasure: Modify the as. Correspondingly, the user's VIRT field cannot exceed the threshold during top time.
Question 2: Limit the CPU usage. A user can enable multi-process or multi-thread to grab the CPU
Countermeasure: None
2. Hard Disk Space restrictions
Reference http://blog.csdn.net/arnoldlu/article/details/38706287
Http://blog.chinaunix.net/uid-20639775-id-154424.html
However, the quotacheck command is stuck and an error is returned.
Cannot guess format from filename on /dev/example/disk. Please specify format on commandline.
Reference http://www.debian-administration.org/article/47/Limiting_your_users_use_of_disk_space_with_quotas
Run the following command:
quotacheck -F vfsv0 -afcvugm