0

I am working on a project that needs to manage the ulimit through custom services file (lets say demo.service) on Linux.

I need to add a mechanism where my custom services file should attempt to set the current file descriptor to:

max( current_limit, min(hard_limit, 10240) )

Is this achievable?

Abhay
  • 31
  • 1

1 Answers1

0

Please check the docs for LimitNOFILE= in man systemd.exec. It allows setting the number of file descriptors for a service.

Mark Stosberg
  • 12,961
  • 6
  • 44
  • 49
  • That's true but that would need to be a hard coded value. As the original query says, i need to perform a comparative analysis and then do the same. Is it possible? – Abhay Jul 30 '18 at 04:34