摘要: 脚本实现telnet echo ' ' |telnet ip port 表示执行完telnet后立即退出 sleep 2 |telnet ip port 表示执行完等待2s 再退出 手动退出ctr+],再quit退出 linux 获取本机ipv4 shell 实现: ip -4 address show | grep inet | grep -v 127.0.0 | aw... 阅读全文
posted @ 2019-05-19 23:16 不带R的墨菲特 阅读(338) 评论(0) 推荐(0)
摘要: centos7如何安装sshpass 先安装epel yum install -y epel-release yum repolist 安装完成epel之后,就可以按照sshpass了 yum install -y sshpass 使用方法 当远程主机端口不再是22默认端口时候: 阅读全文
posted @ 2019-05-19 23:10 不带R的墨菲特 阅读(1570) 评论(0) 推荐(0)
摘要: for windows : for linux 阅读全文
posted @ 2019-05-19 19:35 不带R的墨菲特 阅读(3177) 评论(0) 推荐(0)
摘要: 可以看到返回的是一个completeProcess对象 所以调用获取最终returncode可以使用 sub=subproccess.run(xxxxx) returncode,out,err,args=sub.returncode,sub.stdout,sub.stderr,sub.args 正常 阅读全文
posted @ 2019-05-19 14:12 不带R的墨菲特 阅读(7929) 评论(0) 推荐(0)
摘要: [root@hostuser src]# python3 subprocess_popen.py File "subprocess_popen.py", line 23SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xd0 阅读全文
posted @ 2019-05-19 13:38 不带R的墨菲特 阅读(2691) 评论(0) 推荐(0)
摘要: 1.dstat 使用 man dstat 二、交互性监控工具glances glances可以在用户终端上实时显示重要的系统信息,并动态刷新内容。glances每隔3秒钟对其进行刷新,我们也可以使用命令行参数修改刷新的频率。与dstat相同的是,glances可以将捕获到的数据保存到文件中;而不同的 阅读全文
posted @ 2019-05-19 00:40 不带R的墨菲特 阅读(606) 评论(1) 推荐(0)