Learn about Linux regulatory commands

Source: Internet
Author: User

Some commands are often used during Linux learning. Are you familiar with these commands? For beginners, this article describes Linux regulatory commands in detail and plays a role in learning Linux regulatory commands.

Lsof: displays the list of currently opened files, including WEkO. xBQ, and I. This command can be used by programmers to check the number of files opened by the program.

Sysctl: displays or sets system kernel parameters.

Sysctl-a displays all Kernel Parameters

Sysctl-w parameter name = parameter value

For example, sysctl-w fs. file-max = 10240 sets the maximum number of files allowed to be opened simultaneously by the system to be 10240.

The Kernel Parameter fs. file-nr contains three parameter values: 'vk} N * u} + country F tqU} 9 \
Me't ['net X Education sSj net' tbS
The first parameter indicates the peak number of files opened at the same time in the system,
Uq K4O teach F, C tube L4 @

The second parameter indicates the number of files that have been released after idle allocation,

The third parameter indicates the maximum number of files that can be opened. The value is equal to fs. file-max.

Number of files currently opened = first parameter value-second parameter value

For example:

Fs. file-nr = 977 223 10240

Number of files currently opened = 977-233 = 744

Be careful when setting kernel parameters. Improper settings may cause system exceptions or even crash.

Ulimit: display or set) resource limits that users can use

Ulimit-a displays the resource limits that users can use

Ulimit unlimited does not limit the resources that users can use, but this setting sets the maximum number of files that can be opened max open files)

And the maximum number of processes that can run simultaneously. max user processes) is invalid.

Ulimit-n <number of files that can be opened at the same time> set the maximum number of files that can be opened at the same time max open files)

Example: ulimit-n 8192

If this parameter is set too small, the too program open files error may occur for websites with a large number of concurrent visits.

Ulimit-u <maximum number of concurrent processes that can be run> set the maximum number of processes that can be run simultaneously by the user max user processes)

For example, ulimit-u 1024

The above is an introduction to some Linux regulatory commands.

  1. Linux virtualization technology Xen virtualization beginner's Guide
  2. Handling Linux kernel security details
  3. Basic Shell programming syntax in Linux
  4. How to program and run a Shell program in Linux
  5. Linux Shell programming bash Internal commands

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.