CentOS 7安装配置Shadowsocks客户端

https://i4t.com/3151.html CentOS 7安装配置Shadowsocks客户端 最近由于在阿里云从 GitHub 拖代码非常困难,因此萌生了在服务器上使用 shadowsocks 的念头。本文记录了我在 CentOS 7 上成功安装 [阅读全文]

Linux常用性能调测命令简介

https://mp.weixin.qq.com/s?__biz=MjM5NTcxMTE2Nw==&mid=2653116870&idx=1&sn=db0f254e0c549eabc62a7510e4f46505&chksm=bd23a8168a5421007a5cd6a5884dce9fd4809656ab7922417d0181ad342fc74136dbeb9e4663&scene=0#rd 一、 Linux常用命令 1 top 简介:top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows [阅读全文]

Linux性能监控工具 gtop

https://i4t.com/1376.html 1.下载安装包 $ wget https://nodejs.org/dist/v8.9.2/node-v8.9.2-linux-x64.tar.xz $ xz -d node-v8.9.2-linux-x64.tar.xz $ tar xf node-v8.9.2-linux-x64.tar -C /usr/local/ $ ln -s /usr/local/node-v8.9.2-linux-x64 /usr/local/node 2.配置环境变量 $ echo "export PATH=$PATH:/usr/local/node/bin" >>/etc/profile $ . /etc/profile && source /etc/profile 3.检查是否安装成功 $ node -v v8.9.2 4.安装cnpm npm install -g [阅读全文]

Web站点性能拨测脚本

#!/usr/bin/env bash #=============================================================================== # # FILE: get_site_status.sh # # USAGE: ./get_site_status.sh <url> # # DESCRIPTION: 使用curl检测url,输出相关指标 # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # ORGANIZATION: BlueKing # CREATED: 02/15/2017 16:25 # REVISION: --- #=============================================================================== if [[ -z "$1" ]]; then echo "$0<url>" exit 1 fi echo & [阅读全文]

centos初始化脚本

[root@k8snode03 ~]# cat init_centos.sh #!/bin/bash #检测是否为root用户 if [ $UID -ne 0 ];then echo "Must be root can do this." exit 9 fi #检测网络 echo "检测网络中......" /bin/ping www.baidu.com -c 2 &>/dev/null if [ $? -ne 0 ];then echo "现在网络无 [阅读全文]

fs服务的手工部署脚本\日志切割

#!/bin/bash current_date=`date -d "0 day" "+%Y%m%d"` #列出时间 echo $current_date docker build -t harbor.xikang.com/ycyltest/tm-fs:$current_date -- rm=true .sleep 10 docker push harbor.xikang.com/ycyltest/tm-fs:$current_date sed -i "s/image.*tm-fs.*/image: harbor.xikang.com\/ycyltest\/tm- fs:$current_date/g" /root/xkmicroservice/tm-fs/tm-fs.yamlkubectl apply -f /root/xkmicroservice/tm-fs/tm-fs.yaml 日志切割脚本 #!/bin/bash # this_path=$(cd `dirname $0`;pwd) #根据脚本所在路径 cd $this_path echo $this_path current_date=`date -d "-1 day" "+%Y%m%d"` #列出时间 echo $current_date split [阅读全文]

linux 登录后显示系统信息

cat /etc/profile 最后一行 sh /etc/motd.sh #!/bin/bash date=$(date "+%F %T") head="System Time: $date" kernel=$(uname -r) hostname=$(echo $HOSTNAME) #Cpu load load1=$(cat /proc/loadavg | awk '{print $1}') load5=$(cat /proc/loadavg | awk '{print $2}') load15=$(cat /proc/loadavg | awk '{print $3}') #System uptime uptime=$(cat /proc/uptime | cut -f1 -d.) upDays=$((uptime/60/60/24)) upHours=$((uptime/60/60%24)) upMins=$((uptime/60%60)) upSecs=$((uptime%60)) up_lastime=$(date -d "$(awk -F. '{print $1}' /proc/uptime)second ago" +"%Y-%m-%d %H:%M:%S") #Memory Usage mem_usage=$(free -m | grep Mem | awk [阅读全文]

linux文件同步方法

https://segmentfault.com/a/1190000010310496 https://blog.csdn.net/zpf336/article/details/51659666 http://codingstandards.iteye.com/blog/1539363 <a href="http://yw8.tech/tag/rsync/" title="查看与 rsync 相关的文章" target="_blank">rsync</a> -avz --delete -e ssh 17.22.144.191:/root/pro-microservice/ /data/pro-microservice/ rsync文件同步配置 server端:主机名s170 client端 [阅读全文]

logstash无法写入ES问题解决

curl -XPUT -H 'Content-Type: application/json' http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}' 启动多个节点的ES后,ES开始推举master节点并同步分片shard数据到新ES节点上,此时观察Logstash日志抛出 [阅读全文]