Tag Info

New answers tagged


There is something kind of what you describe: there is a feature to limit the amount of RAM used by a process (RAM, as opposed to virtual memory). The RLIMIT_RSS limit sets an upper bound a program's resident set size, i.e. the part of the memory of that process which is resident in memory (as opposed to swapped out). However, it is not implemented on Linux. ...


There is no such tool because it does not make any sense from a single-program point of view. One can consider CPU/HDD/RAM/swap as resources. These resources can be shared in different ways by the operating system among processes, users, contexts, etc. In some specific situations, it makes sense to tell the operating system to enforce hard limits: Don't ...


All values is correct and have different meanings./proc/sys/kernel/pid_max is maximum value for PID, ulimit -u is maximum value for number of processes. From man 5 proc: /proc/sys/kernel/pid_max (since Linux 2.5.34) This file specifies the value at which PIDs wrap around (i.e., the value in this file is one greater than the ...


There is almost certainly a better way of doing this, probably through limits.conf but I don't know it so here's a dirty hack. This command will kill all processes owned by the user terdon that are using more than 3G of RAM: ps -u terdon -o vsize= -o pid= | while read mem pid; do [ $mem -gt 3145728 ] && kill $pid; done The ps -u terdon -o ...


While I don't know of a way to limit the number of processes by name, you may be able to accomplish your overall goal via pam_limits by limiting the number of user logins. An entry in /etc/security/limits such as @remotes hard maxlogins 5 will ensure that the users of the remotes group cannot have more than 5 login sessions on the ...


No, it is not possible to limit by process name, because the process name can be changed easily. So that limit could easily be evaded. (It can even be changed at runtime I think.)


I think SDN is the way and you can check openstack networking. I haven't looked in detail about setting up per user limits. May be you can create Virtual NICs per user and then set up limit on Virtual NICs.

Top 50 recent answers are included