Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Lightbulb How can i show usage of the ulimit "open files" and why important?


    # ulimit -a
    core file size (blocks, -c) 1000000
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 191532
    max locked memory (kbytes, -l) 64
    max memory size (kbytes, -m) unlimited
    open files (-n) 4096
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 14335
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited
    Hello, please

    1) how can i show current usage of the "open files" (4096) limit, shown in above ulimit command output?

    # lsof 2>/dev/null|wc -l
    93830
    When i do cat /proc/sys/fs/file-nr
    1824 0 2451491
    2) What is the difference between ulimit's "open files" (4096) and number 2451491

    3) which one is more important in case of website hosting server?

    4) how can i modify "open files" value permanently for a VPS in case of OpenVZ virtualization?

    Thank you
    "Avoid the Gates of Hell. Use Linux affordable VPS."

  2. #2
    Quote Originally Posted by postcd View Post
    # ulimit -a


    1) how can i show current usage of the "open files" (4096) limit, shown in above ulimit command output?
    you can try reading the man page on lsof for a start, and follow that up with reading "man proc", which tells you what the three numbers are.
    When i do cat /proc/sys/fs/file-nr
    2) What is the difference between ulimit's "open files" (4096) and number 2451491
    the difference is you dont understand the numbers, because you didnt try to look anything up. the file in proc has # of allocated file handles, # of free file handles, and max # of file handles.
    3) which one is more important in case of website hosting server?
    all important for different things. since you obviously dont understand what your doing, id hire someone to do this for you. alot depends on web server your using and what pages are on it.
    4) how can i modify "open files" value permanently for a VPS in case of OpenVZ virtualization?
    change it in limits.conf, which you could have found if you tried to look.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •