• Linux unlimit


    [root@jhoa ~]# ulimit  -a
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 38656
    max locked memory       (kbytes, -l) 32
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) 10240
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 2047
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    
    -u 限制每个用户的进程
    [root@jhoa ~]# ulimit -u 150
    
    这个只是暂时生效,ulimit 是SESSION级别参数
    
    1.会话级别生效
    
    2.一个用户能使用的进程数
    
    适用于命令登陆shell会话期间
    
    [root@jhoa ~]# ulimit -u 
    150
    
    
    [root@jhoa ~]# ps -ef | grep root | wc -l
    110
    
    [root@jhoa ~]# ps -ef | wc -l
    141
    
    
    [oracle@jhoa ~]$ ps -ef | grep oracle | wc -l
    -bash: fork: Resource temporarily unavailable
    -bash: fork: Resource temporarily unavailable
    
    
    [root@jhoa ~]# ps -ef | grep oracle | wc -l
    30
    ------------------------------------------------
    oracle               soft    nproc   100
    oracle               hard    nproc   100
    oracle               soft    nofile  1024
    oracle               hard    nofile  65536
    
    [oracle@jhoa ~]$ ulimit  -u
    30
    [oracle@jhoa ~]$ ps -ef | grep oracle | wc -l
    -bash: fork: Resource temporarily unavailable
    -bash: fork: Resource temporarily unavailable
    
    [oracle@jhoa ~]$ ps -ef | grep oracle | wc -l
    34
    
    [oracle@jhoa ~]$ ps -ef | grep oracle
    root      2790  2520  0 20:11 ?        00:00:00 sshd: oracle [priv]
    oracle    2792  2790  5 20:11 ?        00:00:41 sshd: oracle@pts/1
    oracle    2793  2792  0 20:11 pts/1    00:00:00 -bash
    oracle    2901     1  0 20:12 ?        00:00:00 ora_pmon_orcl
    oracle    2903     1  0 20:12 ?        00:00:00 ora_psp0_orcl
    oracle    2905     1  0 20:12 ?        00:00:00 ora_mman_orcl
    oracle    2907     1  0 20:12 ?        00:00:00 ora_dbw0_orcl
    oracle    2909     1  0 20:12 ?        00:00:00 ora_lgwr_orcl
    oracle    2911     1  0 20:12 ?        00:00:00 ora_ckpt_orcl
    oracle    2913     1  0 20:12 ?        00:00:00 ora_smon_orcl
    oracle    2915     1  0 20:12 ?        00:00:00 ora_reco_orcl
    oracle    2917     1  0 20:12 ?        00:00:00 ora_cjq0_orcl
    oracle    2919     1  0 20:12 ?        00:00:00 ora_mmon_orcl
    oracle    2921     1  0 20:12 ?        00:00:00 ora_mmnl_orcl
    oracle    2923     1  0 20:12 ?        00:00:00 ora_d000_orcl
    oracle    2925     1  0 20:12 ?        00:00:00 ora_s000_orcl
    oracle    2938     1  0 20:12 ?        00:00:00 ora_qmnc_orcl
    oracle    2947     1  0 20:13 ?        00:00:00 ora_q001_orcl
    oracle    2949     1  0 20:13 ?        00:00:00 ora_q002_orcl
    oracle    2951     1  0 20:13 ?        00:00:00 ora_q003_orcl
    root      3012  2830  0 20:15 pts/1    00:00:00 su - oracle
    oracle    3013  3012  0 20:15 pts/1    00:00:00 -bash
    root      3072  2520  0 20:16 ?        00:00:00 sshd: oracle [priv]
    oracle    3074  3072  0 20:16 ?        00:00:00 sshd: oracle@pts/0
    oracle    3075  3074  0 20:16 pts/0    00:00:00 -bash
    root      3151  2520  0 20:16 ?        00:00:00 sshd: oracle [priv]
    oracle    3153  3151 23 20:16 ?        00:01:38 sshd: oracle@pts/2
    oracle    3154  3153  0 20:17 pts/2    00:00:00 -bash
    root      3192  3112  0 20:17 pts/0    00:00:00 su - oracle
    oracle    3193  3192  0 20:17 pts/0    00:00:00 -bash
    oracle    3268  3154 46 20:21 pts/2    00:01:15 sh ./2.sh
    oracle    3304  3193  0 20:23 pts/0    00:00:00 ps -ef
    oracle    3305  3193  0 20:23 pts/0    00:00:00 grep oracle
    [oracle@jhoa ~]$ ps -ef | grep oracle | wc -l
    -bash: fork: Resource temporarily unavailable
    -bash: fork: Resource temporarily unavailable
    

  • 相关阅读:
    git 学习网站
    Vue 部署在 IIS 上
    Element UI 的坑
    Vue 中 Prop 传至的 一个Bug
    Asp.net Core 部署在 IIS上
    今天用UniApp开发, 用到 Vuex 中的 mutations, 设置值的时候好像只能传2个参数, 第一个是固定的state, 第二个是一个值, 不能传第三个了
    anxios 和 uni.request 访问Asp.net 服务器传参出错的坑
    内网计算机设置问题说明
    关于综合布线
    Android学习 -- Activity 以及Activity之间值传递
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351870.html
Copyright © 2020-2023  润新知