Limit the number of Linux normal user processes __linux

Source: Internet
Author: User

Command:

Ulimit-a is used to display current user process restrictions;

1 Remove the maximum number of processes and maximum file opening limits for Linux systems:

Vi/etc/security/limits.conf

# Add the following line

* Soft Noproc 11000

* Hard Noproc 11000

* Soft Nofile 4100

* Hard Nofile 4100

Description: * For all users, at the beginning of @

Noproc represents the maximum number of processes

Nofile is the maximum number of file open

2 Allow SSH to accept login program login, easy to view ulimit-a resource restrictions on SSH client:

A, Vi/etc/ssh/sshd_config

Change the value of Userlogin to Yes and remove the # annotation

b, restart the SSHD service:

/etc/init.d/sshd restart

3 Modify all Linux users ' environment variable files:

Vi/etc/profile

Ulimit-u 10000

Ulimit-n 4096

Ulimit-d Unlimited

Ulimit-m Unlimited

Ulimit-s Unlimited

Ulimit-t Unlimited

Ulimit-v Unlimited

Reboot the server

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.