Ulimit and free commands

Source: Internet
Author: User

Ulimit is an internal key function in Linux. It has a set of parameters used to set limits on the usage of shell processes generated by it and their sub-processes.

Ulimit Command Format: ulimit [Options] [limit]
1. ulimit parameter description

Option [Options] Description Example
-H Set hard resource limits. Once set, they cannot be added. Ulimit-HS 64; hard resources are restricted. The thread stack size is 64 KB.
-S Set soft resource limit. After setting, you can add but cannot exceed the hard resource setting. Ulimit-Sn 32; restrict soft resources and 32 file descriptors.
- Displays all current limit information. Ulimit-A; displays all current limit information.
-C The maximum core file size, in blocks. Ulimit-C unlimited; the size of the generated core file is not limited.
-D The maximum data segment size of a process, in Kbytes. Ulimit-D Unlimited; do not limit the Data Segment Size of the process.
-F Maximum number of files that can be created by a process, in blocks. Ulimit-F 2048; restrict the maximum file size that can be created by a process to 2048 blocks.
-L Maximum lockable memory size, in Kbytes. Ulimit-l 32; the maximum lockable memory size is 32 Kbytes.
-M The maximum memory size, in Kbytes. Ulimit-M unlimited; maximum memory is not limited.
-N Maximum number of file descriptors that can be opened. Ulimit-N 128; a maximum of 128 file descriptors can be used.
-P The size of the MPs queue buffer, in Kbytes. Ulimit-P 512; limit the MPs queue buffer size to 512 Kbytes.
-S Thread stack size, in Kbytes. Ulimit-s 512; limits the thread stack size to 512 Kbytes.
-T The maximum CPU usage time, in seconds. Ulimit-T unlimited; the maximum CPU usage time is not limited.
-U Maximum number of processes available to users. Ulimit-u 64; limit that users can use up to 64 processes.
-V Maximum available virtual memory of a process, in Kbytes. Ulimit-V 200000; Limit the maximum available virtual memory to 200000 Kbytes.


The free command displays the idle and used memory of the system.

Command Format: Free [-B |-k |-M |-G]

Parameters:

-B: displays the memory in bytes.

-G: Display memory in GB bytes

-K displays memory in K bytes

-M: Display memory in MB bytes

-T shows the total number of columns in a row.


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.