执行效果,日志
![b882a0a1b157009d39910e8b33d8f190.png](https://img-blog.csdnimg.cn/img_convert/b882a0a1b157009d39910e8b33d8f190.png)
![dcec85419ead55458cd1a5875b3ebcbb.png](https://img-blog.csdnimg.cn/img_convert/dcec85419ead55458cd1a5875b3ebcbb.png)
脚本内容
每日凌晨五点重启
[root@gitlab-123-110 ~]# crontab -l0 5 * * * /usr/bin/sh /opt/restart.sh && /usr/sbin/reboot[root@gitlab-123-110 ~]#
脚本内容
[root@gitlab-123-110 ~]# cat /opt/restart.sh #!/bin/bash> /opt/log.txtecho "$(date)开始执行每日重启" > /opt/log.txtfree -hm >> /opt/log.txt/usr/bin/gitlab-ctl stopsleep 3
[root@gitlab-123-110 ~]#
[root@gitlab-123-110 ~]# cat /etc/rc.local cd /optnohup ./re.sh &[root@gitlab-123-110 ~]#
脚本内容2
[root@gitlab-123-110 ~]# cat /opt/re.sh echo ===============重启后内存占用================= >> /opt/log.txtwhile [ true ] do sleep 2 /usr/bin/gitlab-ctl status && { echo "$(free -hm)" >> /opt/log.txt echo "$(date)结束" >> /opt/log.txt break 1} done[root@gitlab-123-110 ~]#
执行效果,日志
[root@gitlab-123-110 ~]# cat /opt/log.txt Thu Oct 3 05:00:01 CST 2019开始执行每日重启 total used free shared buff/cache availableMem: 11G 2.8G 194M 100M 8.6G 8.3GSwap: 17G 256K 17G===============重启后内存占用================= total used free shared buff/cache availableMem: 11G 737M 9.9G 73M 947M 10GSwap: 17G 0B 17GThu Oct 3 05:00:38 CST 2019结束[root@gitlab-123-110 ~]#
k8s集群二进制包一键化,kubernetes v1.14.4集群一键离线安装,一键批量增删node节点,一键集成k8s持久化方案Heketi+GlusterFS+nfs+helm+动态存储+dns+ipvs+prometheus +grafan
[centos7]kubernetesv1.13.2集群一键安装"真的"是一键k8s集群
https://gitee.com/q7104475/K8s