How to view the number of files opened in linux

Source: Internet
Author: User
How to view the number of files opened in linux-general Linux technology-Linux technology and application information. For details, refer to the following section. Check the number of files opened in linux on the Internet in two ways, but the results are different. in linux, check that the number of files opened is based on the file or command?

I searched some usage of the ulimit command, including
Ulimit-n 4096
That is, limit the maximum number of files opened by a user to 4096.

There are roughly two statements about how to view the number of opened files on the Internet:

/Proc/sys/fs/file-nr
This file is related to file-max. It has three values:

Number of allocated file handles
Number of file handles used
Maximum number of file handles
This file is read-only and only used to display information.

View the number of files opened by all processes
Lsof | wc-l

View the number of files opened by a process
Lsof-p pid | wc-l
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.