Centos7.5 关闭声音

Centos7.5 关闭声音 操作 关闭命令行补全的声音 ```shell # 去掉注释 vim /etc/inputrc set bell-style none # 执行文件并从文件中加载变量及函数到执行环境 source /etc/inputrc ``` 关闭vim的声音 shell vim /etc/vimrc set vb t_vb= 备注 一大堆资料重启啥的,是不懂source命令吧 vim又一大堆修改/etc/bashrc的 setterm -blength 0

连接数据库异常 MySQL: ERROR 1040: Too many connections

[TOC] MySQL: ERROR 1040: Too many connections 背景 连接数据库异常 MySQL: ERROR 1040: Too many connections 原因 并发过大 数据库连接数超过最大连接数 查看mysql的最大连接数: mysql mysql> show variables like '%max_connections%'; 查看mysql曾经响应的最大连接数: mysql mysql> show global status like...

mysql创建索引异常

mysql创建索引异常 背景 mysql创建表的时候失败: Specified key was too long;max key length is 767 bytes 原因 索引长度限制 From the manual at http://dev.mysql.com/doc/refman/5.6/en/create-table.html >>从5.6的官方文档中我们能找到如下双引号中解释 "For CHAR, VARCHAR, BINARY, and VARBINARY...

Liunx应用故障排查常用命令

[toc] Liunx应用故障排查常用命令 应用层 进程: top 线程: top -H ps -ef f | grep uwsgi 系统层 内存 free -m 内核参数 sysctl -a 网络层 抓包 tcpdump

类方法和实例方法

[toc] 类属性与类方法 code def out_fun(a): print("out_fun", a) def deco(): pass class Test(object): out_fun_var, dec_fun = out_fun, deco @dec_fun # 能成功引用 def in_fun1(self): self.out_fun_var(1) # TypeError: out_fun() takes 1 positional argument but 2 were...

nginx静态文件/页面配置

示例 location /web1/ { root /etc/nginx/html/; index biaobai.html; } location /web2/ { root /etc/nginx/html/; index index.html; } 说明 root /etc/nginx/html/; 表示访问location xxxx 的根路径 /web2/ 表示在根路径下即/etc/nginx/html/的web2文件夹寻找静态文件即/etc/nginx/html/web2/目录下

linux内核端口设置

ip_local_port_range /proc/sys/net/ipv4/ip_local_port_range的原文解释: The /proc/sys/net/ipv4/ip_local_port_range defines the local port range that is used by TCP and UDP traffic to choose the local port. You will see in the parameters of this file two...

curl的GET请求特殊字符问题

示例 curl http://x.x.x.x:9202/operating_reports/get_status?data={"operation": "get_usersuccessrate_alluser","in_args": {"condition": {}}} curl: (3) [globbing] unmatched brace at pos 73 curl: (6) Could not resolve host:...

mysql中的max与group by结合使用

max函数 max函数是针对group by的每一个子集(相同值则为一个子集),筛选出最大值后与原数据合并 比如下面sql的含义是:以os_ip分组后,在每一个分组中筛选出updated_at最大的值,并与分组数据合并 SELECT job_id,ins_id,os_ip, max(updated_at) from job_result_info where ins_id like "auto%" and os_ip='10.203.178.176' group by os_ip 结果:...

ping带时间戳

示例 ping 127.0.0.1 -c 10 | awk '{ print $0"\t" strftime("%H:%M:%S",systime()) } '