摘要:
import datetime import time import requests from pyzabbix import ZabbixAPI class Zabbix(ZabbixAPI): def __init__(self, url=Zabbix_URL, user=Zabbix_USE 阅读全文
摘要:
问题: --> Finished Dependency Resolution --> Finding unneeded leftover dependencies Found and removing 0 unneeded dependencies Error: Package: glibc-hea 阅读全文
摘要:
# cat file ello barbaz?cache_version=4fooooo bye # sed -i -r 's/(.*)(\?cache_version=)([0-9]+)(.*)/echo "\1\2$((\3+1))\4"/ge' file # cat file ello bar 阅读全文
摘要:
In [52]: import io In [53]: row = ('ACME', 50, 91.5) In [54]: ','.join(row) TypeError Traceback (most recent call last) <ipython-input-54-b1add756d97c 阅读全文
摘要:
问题: 由于线上机器是多家厂商的且网卡会有公网IP和内网IP都绑定情形,并且有些服务必须保证监听内网IP,但在host清单文件配置中有可能是内网IP,也有可能是公网IP。 使用:变量 {{ ansible_all_ipv4_addresses }} 会获取机器所有IP,但没有排序 使用: 变量 {{ 阅读全文
摘要:
正常情况下,一般MySQL免密码登录数据库可以通过在~/.my.cnf写入密码实现,然后设置chmod 600,一般来说是比较安全的。 但是如果不想给人知道用户名和实际的密码,但是又想给人用,可以使用MySQL自己带的mysql_config_editor. 执行下面命令,输入MySQL用户root 阅读全文
摘要:
Vim 可以用高亮显示空格和TAB。 文件中有 TAB 键的时候,你是看不见的。要把它显示出来: :set list TAB 键显示为 ^I, $显示在每行的结尾,表示换行;空格仍然显示为空格。 :set list 进入List Mode :set nolist 退出List Mode 1) Use 阅读全文
摘要:
[default] callback_whitelist = profile_tasks # The best way I’ve found to time the execution of Ansible playbooks is by enabling the profile_tasks cal 阅读全文
摘要:
MySQL主从数据同步出错Last_Errno: 1755Last_Error: Cannot execute the current event group in the parallel mode. Encountered event Format_desc, relay-log name ./ 阅读全文