AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Ulimit alerts

    Posted Thu April 22, 2010 05:48 PM

    Originally posted by: drakede57


    Is there a log that will show me when a process violates the ulimits set for the user that the processs is running under?


  • 2.  Re: Ulimit alerts

    Posted Fri April 23, 2010 02:02 AM

    Originally posted by: j.gann


    short answer: no.

    your program can detect by return values from system calls and by inspecting the errno variable whether a call has failed due to effective ulimits.

    if you want to find out if a program you have not written yourself hits these limits use truss or (on aix6) probevue. (both require some insight into programming and unix system calls to interpret the results).

    in general: think about how much sense ulimits actually make in your environment. In many cases it makes sense to only set limits (other than unlimited) when there is a reason to do so (untrusted users, unstable software and the like...)


  • 3.  Re: Ulimit alerts

    Posted Fri April 23, 2010 12:22 PM

    Originally posted by: drakede57


    Thanks.

    Since this was a kernal level exent I was hopeing that there was some way to log it.

    This is a cots program, and I may take your advice and remove the limits for the user it runs under.


  • 4.  Re: Ulimit alerts

    Posted Fri April 23, 2010 12:24 PM

    Originally posted by: drakede57


    Event, not extent, sorry.


  • 5.  Re: Ulimit alerts

    Posted Fri April 23, 2010 02:13 PM

    Originally posted by: drakede57


    It would seem this would be good enhancement. What good is setting limits if you cannot tell from a system level that they are being violated?


  • 6.  Re: Ulimit alerts

    Posted Fri April 23, 2010 04:52 PM

    Originally posted by: shargus


    What good is setting limits if you cannot tell from a system level that they are being violated?

    Well... the limits are enforced by the kernel. If a process requests a resource that exceeds those limits, the request is denied and an error code is returned. In theory, the process can try again with a smaller request.

    So, the real answer would be - a process cannot violate the limits set by the kernel.

    Is there a log for when a process attempts to violate the limits? That would probably be up to the application that makes the attempt.

    Beyond that - maybe something with the auditing system... ?