Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only

Different ulimits with sudo and su

  • 1.  Different ulimits with sudo and su

    Posted Thu September 01, 2022 11:14 AM
    Hi Community,

    does anyone know why the ulimits differ when using sudo or su?

    # su shows unlimited as string (su - user01)
    user01@aixserver01 /home/user01# ulimit -a
    time(seconds) unlimited
    file(blocks) unlimited
    data(kbytes) unlimited
    stack(kbytes) 2097152
    memory(kbytes) unlimited
    coredump(blocks) unlimited
    nofiles(descriptors) unlimited
    threads(per process) unlimited
    processes(per user) unlimited

    # sudo shows the system-wide limit as integer (sudo -iu user01)
    user01@aixserver01 /home/user01# ulimit -a
    time(seconds) unlimited
    file(blocks) unlimited
    data(kbytes) unlimited
    stack(kbytes) 2097152
    memory(kbytes) unlimited
    coredump(blocks) unlimited
    nofiles(descriptors) unlimited
    threads(per process) unlimited
    processes(per user) 10000

    # System limit
    # lsattr -El sys0 |grep maxuproc
    maxuproc 10000 Maximum number of PROCESSES allowed per user True

    Best regards
    Niklas​


    ------------------------------
    Niklas
    System Engineer UNIX and Linux on Power
    ------------------------------

    #AIXOpenSource