Peter


2015/06/06 22:28
版主的《Python 自动化运维》正在看。关于yorserver部分,楼主能否提供完成的代码下载。谢谢!
刘天斯 回复于 2015/06/07 16:11
https://github.com/yorkoliu/pyauto全书涉及所有源代码。
在《自动化运维》一书中的第一张,dns的使用中,simple1例子中有点问题请教。
在代码中使用:
A = dns.resolver.query(domain, 'A')
查询A记录,但实际上查询条件:'A' 无效,得到的结果集中包含CNAME记录,导致出现:
异常。
执行环境:Python 2.7.3 , linux Ubuntu 12.04
期待得带你的回复
在代码中使用:
A = dns.resolver.query(domain, 'A')
查询A记录,但实际上查询条件:'A' 无效,得到的结果集中包含CNAME记录,导致出现:
异常。
执行环境:Python 2.7.3 , linux Ubuntu 12.04
期待得带你的回复
刘天斯 回复于 2015/06/07 16:12
这个问题有同学反馈过,是python版本的兼容性问题。http://qa.liuts.com
关于windows下装rrdtool
2015/03/24 16:52
关于windows下装rrdtool,遇到很多问题(本机上没有装vs)。
例如:
1。 fatal error C1083: Cannot open include file: '../../rrd_config.h': No such file or directory
2. cl.exe' failed with exit status 2
这种问题应该怎样解决,能否给出个 windos 下能成功安装rrdtool的步骤。安装插件的时候应该注意什么问题
书刚买到,看了最后几页,其实挺希望看到,您写软件时的思路,而不是光贴代码
例如:
1。 fatal error C1083: Cannot open include file: '../../rrd_config.h': No such file or directory
2. cl.exe' failed with exit status 2
这种问题应该怎样解决,能否给出个 windos 下能成功安装rrdtool的步骤。安装插件的时候应该注意什么问题
书刚买到,看了最后几页,其实挺希望看到,您写软件时的思路,而不是光贴代码
我按照您书上的DNS 解析模块写的一个python 脚本,但是使用的时候报错,希望您能帮助一下,我现在使用的Python 2.7.2的版本[root@localhost tmp]# python 4.py please input an domain: www.baidu.comTraceback (most recent call last): File "4.py", line 9, in <module> print j.addressAttributeError: 'CNAME' object has no attribute 'address'代码是以下内容:#!/usr/bin/env pythonimport dns.resolverdomain = raw_input('please input an domain: ')A = dns.resolver.query(domain,'A')for i in A.response.answer: for j in i.items: j.address
刘天斯 回复于 2015/03/13 21:36
一般是python版本不兼容引起,可以在QA找到答案。http://qa.liuts.com/questions
我按照您书上的DNS 解析模块写的一个python 脚本,但是使用的时候报错,希望您能帮助一下,我现在使用的Python 2.7.2的版本[root@localhost tmp]# python 4.py please input an domain: www.baidu.comTraceback (most recent call last): File "4.py", line 9, in <module> print j.addressAttributeError: 'CNAME' object has no attribute 'address'代码是以下内容:#!/usr/bin/env pythonimport dns.resolverdomain = raw_input('please input an domain: ')A = dns.resolver.query(domain,'A')for i in A.response.answer: for j in i.items: j.address
天斯大神,我买了这本自动化运维但是第一个脚本执行时就报这个错误,能帮我解决下么,谢啦![root@localhost pythontest]# python psutil.py Traceback (most recent call last): File "psutil.py", line 1, in <module> import psutil File "/root/pythontest/psutil.py", line 3, in <module> p=psutil.cpu_times()AttributeError: 'module' object has no attribute 'cpu_times'[root@localhost pythontest]#
刘天斯 回复于 2015/03/08 20:53
确认psutil对应的python版本是否匹配。
wanghd
2015/02/02 19:25
前辈的OMserver是不是需要手动添加被操作主机的信息到mysql(server_list表)?
刘天斯 回复于 2015/02/03 14:45
是的,可以与企业现有的资产平台打通。
天斯大神,您好: 最近购买了您的这本书,看了看 发现一个小弟做不通的地方。P161import salt.client 会直接报importerror。这块还希望加个说明吧,是否需要安装salt api? 还希望给予说明。谢谢(我是从头开始按照书上照抄做的,做到这部发现了这个问题)
刘天斯 回复于 2015/01/26 07:38
安装saltstack时,salt api会默认安装进去的,确认安装过程是否正确,或加QQ群讨论下。QQ交流群:222171081
买了本前辈的书,好像里面没有zabbix之类的,希望可以在第二版中加一下zabbix的板块
刘天斯 回复于 2015/01/17 18:26
建议已收下。