Home > Blockchain >  What are the valid values for ulimit -t?
What are the valid values for ulimit -t?

Time:11-04

I want to limit cpu time for user by using ulimit -t. I looked ulimit man page it says

Values are in 1024-byte increments, except for '-t', which is in seconds, '-p', which is in units of 512-byte blocks, and '-n' and '-u', which are unscaled values.

What is the maximum limit and how can I learn it so that I can set a reasonable value(i.e. percentage of maximum for instance 80% of cpu time)?

CodePudding user response:

With utlimit you can limit the resources of a shell.

The parameter -t is the maximum amount of cpu time in seconds That means you can specify the amount of CPU time for your shell like this:

$ ulimit -t 5

if you wanted to limit the CPU time of your shell to 5 seconds.

The maximum limit is unlimited. It is hard to calculate 80% of an infinite amout of time.

  • Related