python - How to limit number of Linux processes spawned per minute? -


My application needs to interrupt any fork bombs created by Python / Bash. I use the ulimit program that determines the number of processes per user.

Can someone suggest me how can I limit the number of processes, instead of per minute , per user?

There is no default way to determine the number of processes per minute. As you said, the limit will be for each user instead, instead you can work around,

  ps -aux | Wc -l   

With this you can give the number of processes currently running. Write a script that will continuously check for every minute and update the result.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -