会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
litton888
博客园
首页
新随笔
联系
订阅
管理
2020年7月16日
shell中expect用法
摘要: #!/bin/bashworkdir="/data/opr/clean_account"hostslist="/data/opr/clean_account/hosts"ip=`cat /data/opr/clean_account/hosts`password=123456eval `ssh-ag
阅读全文
posted @ 2020-07-16 10:05 litton888
阅读(845)
评论(0)
推荐(0)
2020年6月3日
ansible获取文件内容及机器ip
摘要: name: get argus-agent hostname and ipaddress hosts: all gather_facts: false tasks: - name: get hostname&ip shell: | echo -ne "`cat /xxxx/hostname` \x2
阅读全文
posted @ 2020-06-03 14:36 litton888
阅读(1838)
评论(0)
推荐(0)
2020年5月14日
在物理机(linux)里面,找它链接的交换机,及端口
摘要: 在物理机(linux)里面,找它链接的交换机,及端口[root@EQUHST00005311 ~]# lldptool -n -t -i enp26s0f0Chassis ID TLV MAC: 70:6d:15:d4:4a:9ePort ID TLV Ifname: Ethernet1/27Tim
阅读全文
posted @ 2020-05-14 16:00 litton888
阅读(667)
评论(0)
推荐(0)
centos7救援模式
摘要: CentOS7 Linux Root忘记,进入救援模式更改密码(两种方法!) 请按照在下提供的代码进行修改 (在下亲自测试的结果!) Linux系统开机进入引导画面,选择:CentOS Linux(3.10.0-693.e17.x86_64)7 (Core) ,按字母 "E"键,进入Linux内核模
阅读全文
posted @ 2020-05-14 15:57 litton888
阅读(1058)
评论(0)
推荐(0)
linux添加静态路由
摘要: 1、route add -net 192.168.10.0/24 -gw 172.16.1.12、vim /etc/rc.d/rc.localroute add -net 192.168.10.0/24 -gw 172.16.1.13、vim /etc/sysconfig/static-routes
阅读全文
posted @ 2020-05-14 15:55 litton888
阅读(737)
评论(0)
推荐(0)
ansible常用模块
摘要: lineinfile匹配开头ansible ansible-demo3 -m lineinfile -a 'path=/testdir/test regexp="^line" line="test lineinfile" backrefs=yes'匹配结尾ansible -i /root/hosts
阅读全文
posted @ 2020-05-14 15:52 litton888
阅读(90)
评论(0)
推荐(0)
cloudstack vr启动时间长的处理
摘要: 1. 登陆 starting状态的 VR2. 修改代码文件 vi /opt/cloud/bin/configure.py修改前,搜索关键字 vm_metadata.json if process_file in ["cmd_line.json", "vm_metadata.json"]: loggi
阅读全文
posted @ 2020-05-14 15:47 litton888
阅读(117)
评论(0)
推荐(0)
批量ping主机脚本
摘要: #!/bin/bashIP_LIST=$(cat /root/iplist)for i in ${IP_LIST}doping=`ping -c 3 -i 0.2 -w 1 $i > /dev/null`if [ $? -eq 0 ];then echo "host $i up"else echo
阅读全文
posted @ 2020-05-14 14:04 litton888
阅读(285)
评论(0)
推荐(0)
升级内核及qemu的ansible playbook
摘要: name: update kernel and qemu hosts: all gather_facts: false tasks: - name: copy repo file copy: src: cloud_repos.repo dest: /etc/yum.repos.d/cloud_rep
阅读全文
posted @ 2020-05-14 13:59 litton888
阅读(385)
评论(0)
推荐(0)
cloudstack修改超分比
摘要: 修改cpu超分比1、查询cmk list clusters filter=name,id,cpuovercommitratio keyword=pod01-SC+ + + +| CPUOVERCOMMITRATIO | ID | NAME |+ + + +| 3.0 | 4e9bc92e-bacf-
阅读全文
posted @ 2020-05-14 13:55 litton888
阅读(471)
评论(0)
推荐(0)
公告