配置文件

vim /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
* - nofile 65535                                ----最大文件打开数
# End of file

linux 最大文件打开数的更多相关文章

  1. linux最大文件打开数和swap限制

    linux最大文件打开数和swap限制   逑熙 关注 2017.07.24 15:39* 字数 388 阅读 314评论 0喜欢 0 linux 2.6+的核心会使用硬盘的一部分做为SWAP分区,用 ...

  2. ulimit 命令详解 socket查看linux最大文件打开数

    ulimit 命令详解     Linux对于每个用户,系统限制其最大进程数.为提高性能,可以根据设备资源情况,设置各linux 用户的最大进程数 可以用ulimit -a 来显示当前的各种用户进程限 ...

  3. Linux最大文件打开数

    介绍 在Linux下有时会遇到Socket/File : Can't open so many files的问题.其实Linux是有文件句柄限制的,而且Linux默认一般都是1024(阿里云主机默认是 ...

  4. Linux下设置最大文件打开数nofile及nr_open、file-max

    在开发运维的时候我们常常会遇到类似“Socket/File: Can’t open so many files”,“无法打开更多进程”,或是coredump过大等问题,这些都可以设置资源限制来解决.今 ...

  5. 调整Linux的最大文件打开数

    要调整一下Linux的最大文件打开数,否则squid在高负载时执行性能将会很低.另外,在Linux下面部署应用时,有时候会遇上 Socket/File:Can’t open so many files ...

  6. 【Linux命令】ulimit设置最大文件打开数

    一.简介 在Linux下有时会遇到Socket/File : Can't open so many files的问题.其实Linux是有文件句柄限制的,而且Linux默认一般都是1024(阿里云主机默 ...

  7. Centos7修改默认最大文件打开数

    方法一: [root@bogon ~]# vi /etc/systemd/system.conf [root@bogon ~]# cat /etc/systemd/system.conf # This ...

  8. linux修改文件打开最大数(ulimit命令)

    解除 Linux 系统的最大进程数和最大文件打开数限制:vi /etc/security/limits.conf# 添加如下的行* soft noproc 65536 * hard noproc 65 ...

  9. LSOF查看linux中文件打开情况

    如何查看linux中文件打开情况 前言 我们都知道,在linux下,“一切皆文件”,因此有时候查看文件的打开情况,就显得格外重要,而这里有一个命令能够在这件事上很好的帮助我们-它就是lsof. lin ...

随机推荐

  1. WPF复杂形状按钮

    方法很简单,将图片转换为<path>就可以了(需要用到Photoshop) 不过一般情况下制作按钮都不会用到这种方法,通常只要用image填充一张图片或者把路径转成按钮控件就可以了. 之所 ...

  2. 阶段3 2.Spring_05.基于XML的IOC的案例1_3 测试基于XML的IOC案例

    编写测试方法. TestMehtod 生成测试方法 只需要改个名字叫做testFindAll 然后就复制这个方法,多复制几次改改名字 findAll方法 编写查询所有的代码 选中和这个方法,run 根 ...

  3. selenium之css selector定位

    什么是CSS Selector? Css Selector定位实际就是HTML的Css选择器的标签定位 工具 Css Selector的练习建议大家安装火狐浏览器(49及以下版本)后,下载插件Fire ...

  4. 40组合总和II

    题目:给定一个数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合.candidates 中的每个数字在每个组合中只能使用一 ...

  5. LoadRunner 技巧之 检查点

    LoadRunner 技巧之 检查点 判断脚本是否执行成功是根据服务器返回的状态来确定的,如果服务器返回的HTTP状态为 200 OK ,那么VuGen 就认为脚本正确地运行了,并且是运行通过的.在绝 ...

  6. 转载 STM32 使用Cubemx 建一个USB(HID)设备下位机,实现数据收发

    STM32 使用Cubemx 建一个USB(HID)设备下位机,实现数据收发  本文转载自 https://www.cnblogs.com/xingboy/p/9913963.html 这里我主要说一 ...

  7. P2429 【制杖题】

    这题目名字也是够了... emmmmmm为什么要用线筛??????不感觉很麻烦吗??????既然是智障制杖题,那么肯定要用很简单的算法啦~下面,我就提供一种非常便于理解的膜你算法~~~很明显,做了这题 ...

  8. Leetcode基础篇30天30题系列之数组:模拟计算法

    作者:丁宋涛 数组:加一 题干: 给定一个由整数组成的非空数组所表示的非负整数,在该数的基础上加一. 最高位数字存放在数组的首位, 数组中每个元素只存储一个数字. 你可以假设除了整数 0 之外,这个整 ...

  9. tez

    参考: 原理: https://www.cnblogs.com/rongfengliang/p/6991020.html https://www.cnblogs.com/hankedang/p/421 ...

  10. Websocket --(1)简介

    最近项目需求提出前台界面实时获取后端数据,也就是数据发生变化后服务端主动通知前端页面,以往都是前端请求服务端.当然了,前人已经为我们想好了解决办法,那就是websocket.至于websocket的介 ...