1. 程式人生 > >RHEL7中nproc的取值來源於 20-nproc.conf檔案

RHEL7中nproc的取值來源於 20-nproc.conf檔案

[[email protected] ~]# su - postgres
Last login: Mon Aug  7 09:44:30 EDT 2017 on pts/0
[[email protected] ~]$ ulimit -u
4096
[[email protected] ~]$ cat /etc/security/limits.
limits.conf  limits.d/    
[[email protected] ~]$ cat /etc/security/limits.conf 
# /etc/security/limits.conf
#
#This file sets the resource limits for the users logged in via PAM.
#It does not affect resource limits of the system services.
#
#Also note that configuration files in /etc/security/limits.d directory,
#which are read in alphabetical order, override the settings in this
#file in case the domain is the same or more specific.
#That means for example that setting a limit for wildcard domain here
#can be overriden with a wildcard setting in a config file in the
#subdirectory, but a user specific setting here can be overriden only
#with a user specific setting in the subdirectory.
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - a user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open file descriptors
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

# End of file
[
[email protected]
~]$ ulimit -u 4096 [[email protected] ~]$ cat /etc/security/limits.d/20-nproc.conf # Default limit for number of user's processes to prevent # accidental fork bombs. # See rhbz #432903 for reasoning. * soft nproc 4096 root soft nproc unlimited [[email protected]
~]$ cd/etc/security/limits.d/ -bash: cd/etc/security/limits.d/: No such file or directory [[email protected] ~]$ cd/etc/security/limits.d/ -bash: cd/etc/security/limits.d/: No such file or directory [[email protected] ~]$ cd /etc/security/limits.d/ [[email protected] limits.d]$ ls -lrt total 4 -rw-r--r--. 1 root root 191 Jul 19 2016 20-nproc.conf [
[email protected]
limits.d]$ cat 20-nproc.conf # Default limit for number of user's processes to prevent # accidental fork bombs. # See rhbz #432903 for reasoning. * soft nproc 4096 root soft nproc unlimited [[email protected] limits.d]$ ll total 4 -rw-r--r--. 1 root root 191 Jul 19 2016 20-nproc.conf [[email protected] limits.d]$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (Maipo) [[email protected] limits.d]$ uname -a Linux pgserver 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux [[email protected] limits.d]$

參考文章:
How to set or change the default soft or hard limit for the number of user's processes?
https://access.redhat.com/solutions/406663

相關推薦

RHEL7nproc來源於 20-nproc.conf檔案

[[email protected] ~]# su - postgres Last login: Mon Aug 7 09:44:30 EDT 2017 on pts/0 [[email protected] ~]$ ulimit -u 4096 [[

easyuicombobox

pre com 顯示 field pen eas eth eight fun <input id="cmbstrTrainType" class="easyui-combobox" name="cmbstrTrainType" style="width:102px;

Python方法

class People(object): def __init__(self,name): self.__name = name def getName(self): return self.__name def setName(self,n

分類任務label的注意事項(caffe框架下),從0開始,連續整數,

最近在做一個分類任務的實驗的時候,對標籤的取值產生了一些疑惑,所以看了一點對應的原始碼,順利解決了疑惑,在這裡和大家分享,如果有什麼理解錯誤還請大家指出。 之前做分類任務的時候總有聽說,標籤(label)的取值需要從0開始,按照個人的習慣,我在

python 從list隨機

第一種方法(推薦) 適用於隨機取一個值, 返回一個值 import random list1 = ['佛山', '南寧', '北海', '杭州', '南昌', '廈門', '溫州'] a = random.choice(list1) print(a) # 返回一個值

hibernate cascade介紹

當關聯雙方存在父子關係,就可以在 set 處設定 cascade 為 all-delete-orphan 所謂父子關係,即指由父方控制子方的持久化聖明週期,子方物件必須和一個父方物件關聯。如果刪除父方物件,應該級聯刪除所有關聯的子方物件;如果一個子方物件不再和一個父方物件

Spring MVC控制層傳遞物件後在JSP頁面方法

List<Order> orders = new ArrayList<Order>(); for (int i = 0; i < 3; i++) { Order t = new Order(i, user_id, 1, "orderT

javascript解決for迴圈i的問題

最近在做專案時遇到呼叫for迴圈中i取值問題,主要程式碼如下: function delete__listen() { var detNum=document.getElementsByTagName('li'); for(var i =

java為什麽byte的範圍是-128到+127

進制數 符號位 為什麽 絕對值 www .html tar 同學 自己 概念:java中用補碼表示二進制數,補碼的最高位是符號位,最高位為“0”表示正數,最高位為“1”表示負數。正數補碼為其本身;負數補碼為其絕對值各位取反加1

【2017-05-21】WebForm跨頁面傳、C#服務端跳轉頁面、 Button的OnClientClick屬性、JsgetAttribute和超鏈接點擊彈出警示框。

代碼 height delet update size 內存 客戶 bar win 一、跨頁面傳值和取值: 1、QueryString - url傳值,地址傳值 優缺點:不占用服務器內存;保密性差,傳遞長度有限。 通過跳轉頁面路徑進行傳值,方式: href="地址?ke

AngularJS ng-model通過$watch動態

blog html lib brush google java logs con head 這個例子的意思是,當xxxx的長度不超過6時,xxxx和yyyy兩個input的model是無關的,但當xxxx超過6,則yyyy會跟隨其值而變化。 <!doctype

CDM遍歷域及其約束條件、範圍、引用它的項目

最大值 next folder values active valid cit proc not Option ExplicitValidationMode = TrueInteractiveMode = im_BatchDim mdl ‘當前mod

在0~N個數字指定個數的不重復數字,要求這些數字的和為指定,求所有結果

readline tco write span count string rgs logs index 1 using System; 2 using System.Collections.Generic; 3 using System.Linq;

jsp+servlet對於單選按鈕和復選框並且存放到數據庫

cat finall str connect put exce char exc @override index.jsp <form action="index.gj?method=toradio" method="post"> <div align=

C#的各種json

tsl sof 添加 value default pan num 引用 com 1、添加引用Newtonsoft.Json.dll(附件:https://files.cnblogs.com/files/chen-yuan/Newtonsoft.zip); 2、引用: u

利用POI 從world表格

poi從world取值利用POI從world中取值,然後把值保存到數據庫中導入jar包(測試需要用到的jar,根據自己實際情況添加),jar包請百度2.demo,可根據這個進行自己實際需求的改變import java.io.FileInputStream; import java.io.IOException

C#float的範圍和精度分析

windows系統 weight 3.5 ans adding 發生 mage 深入 wid 本文實例分析了C#中float的取值範圍和精度。分享給大家供大家參考。具體分析如下: float類型的表現形式: 默認情況下,賦值運算符右側的實數被視為 double。 因此

Java如何數據各個位上的

Java取值思想/思想:取數據各個位上的值需求:在控制臺輸出所有的"水仙花數"分析:所謂的水仙花數是指一個三位數,其各位數字的立方和等於該數本身比如:153=111 + 555 + 333/class ForDemo4{public static void main (String[] a

java從實體類會忽略的的問題

spa get pos val light 原因 blog 方法 什麽 在我們java Map中通過get來取值時會忽略的問題是:如果取得一個空值null時,那麽.toString()時就會出錯,而且不知道是什麽原因。 現在我給的具體方法是用條件表達式先判斷一下。 例:

javascriptjson對象json數組json字符串互轉及

圖片 今天 too 部門 scrip asc name spa code 今天用到了json數組和json對象和json類型字符串之間互轉及取值,記錄一下: 1.json類型的字符串轉換為json對象及取值 1  var jsonString = ‘{"bar":"pr