摘要: 参考:https://blog.csdn.net/weixin_42980713/article/details/86559017 阅读全文
posted @ 2019-02-27 23:38 风追海浪 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 参考: https://www.cnblogs.com/emanlee/p/3327576.html 阅读全文
posted @ 2019-02-27 23:32 风追海浪 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1.vi /etc/profile 2.未行添加 阅读全文
posted @ 2019-02-27 23:15 风追海浪 阅读(607) 评论(0) 推荐(0) 编辑
摘要: 状态统计 netstat -ant | awk '/tcp/ {print $6}'|sort |uniq -c |sort -nr 前十位ESTABLISHED状态ip统计 netstat -ant | grep "ESTABLISHED"|awk '/tcp/ {print $5}'|cut -d ":" -f1|sort |uniq -c |sort -nr |head -10 前... 阅读全文
posted @ 2019-02-27 23:07 风追海浪 阅读(1118) 评论(0) 推荐(0) 编辑
摘要: #查看sn号 dmidecode -t 1 |grep "Serial Number" #看服务器型号 dmidecode |grep "Product Name" #看cpu型号 grep "model name" /proc/cpuinfo #逻辑CPU个数: # cat /proc/cpuinfo | grep "processor" | wc -l 物理CPU个数: # cat /pr... 阅读全文
posted @ 2019-02-27 22:42 风追海浪 阅读(188) 评论(0) 推荐(0) 编辑
摘要: #用户登陆显示cpu、负载、内存信息 #!/bin/bash # hostip=`ifconfig eth0 |awk -F" +|:" '/Bcast/{print $4}'` date=`date "+%F %T %A"` load=`uptime |awk -F: '{print $NF}'` usage=`df -h / | awk 'NR==2{print $(NF-1)}'` fss... 阅读全文
posted @ 2019-02-27 22:40 风追海浪 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 1.导入模块方法 import module from module.xx.xx import xx from module.xx.xx import xx as rename from module.xx.xx import * test.py下面代码 if __name__ == '__main 阅读全文
posted @ 2019-02-27 00:09 风追海浪 阅读(160) 评论(0) 推荐(0) 编辑