is it possible to limit number of processes for a given group or user using the process name? Eg. I'd like to groups remotes have only 5 simultaneous ssh processes that are run on my server.I don't see any options in pam_limit (I can only limit number of process per user or group, regardless of process name) and I don't see ability in cgroups.Do you have any ideas how to accomplish this? (script in cron is not an answer for me :))
Limiting number of processes by name
process;limit
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.)