• linux.sh


    一.系统版本

         centos7.3

    二.系统体检

    #!/bin/bash
    echo "系统内存大小:"
    free -g |grep 'Mem' |awk '{print $2}'
    echo "系统cpu核数:"
    lscpu |grep '^CPU(s):' |awk '{print $2}'
    cat /proc/cpuinfo | grep "physical id" |wc -l

    三.系统初始化

    #!/bin/bash
    cp /etc/security/limits.conf    /etc/security/limits.conf.bak.install.glc
    echo "# init by igoodful, 32cpu,128G memory" > /etc/security/limits.conf
    echo "*       hard    nofile  300000" >> /etc/security/limits.conf
    echo "*       soft    nofile  150000" >> /etc/security/limits.conf
    echo "*       hard    nproc  3000000" >> /etc/security/limits.conf
    echo "*       soft    nproc  1500000" >> /etc/security/limits.conf
    echo "*       soft    core   unlimited" >> /etc/security/limits.conf

    cp  /etc/sysctl.conf  /etc/sysctl.conf.bak.install.glc
    echo "# init by igoodful 32cpu 128G memory" >  /etc/sysctl.conf
    echo "" >>  /etc/sysctl.conf
    echo "" >>  /etc/sysctl.conf
    echo "" >>  /etc/sysctl.conf
    echo "" >>  /etc/sysctl.conf
    echo "" >>  /etc/sysctl.conf
    echo "" >>  /etc/sysctl.conf

    echo "" >>  /etc/sysctl.conf


  • 相关阅读:
    不用if/else swich for while实现累加
    1.java数据结构
    青蛙跳台阶问题
    next与nextLine
    9.遗传算法
    Docker镜像管理
    Docker镜像管理
    CentOS 6.7安装Docker
    CentOS 6.7安装Docker
    数字三角形_递归_递推(动态规划)
  • 原文地址:https://www.cnblogs.com/igoodful/p/12815470.html
Copyright © 2020-2023  润新知