使用Hcache查看是谁占用了系统Buffer&Cache?
一、hcacheLinux用户可能经常遇到的一个问题是内存大部分都被Buffer和Cache占用了,但是有时候我们想知道到底Cache了些什么内容却没有一个直观好用的工具。今天给你介绍一个可以查看Linux当前缓存了哪些文件的小工具hcache。Hcache作者:伊布前几...
UnicodeDecodeError: 'utf8'解决方法
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd4 in position x: invalid continuation byte更多0pythonencode字符串在执行下面语句时会报错o = "a test of \xe9 char" #I want this to remain a string as this is what I am receiving...
Mysql日期计算
MySQL 为日期增加一个时间间隔用date_add()函数MySQL 为日期减去一个时间间隔用date_sub()函数实验如下:mysql> select now();+---------------------+| now() |+---------------------+| 2017-03-15 16:57:30 |+--...
Mysql join图
各表之间SQL Joins之间的关系图:
Mysql debug模式
以debug模式编译-DWITH_DEBUG=1如果想开调试模式,启动的时候要加参数:/usr/local/mysql/support-files/mysql.server start --debug --console &,调试一个MySQL客户端mysql --debug=d:t:O,/tmp/client.trace# cat /etc/my.cnf.d/debug.cnf[mysql...
Python pip源修改
pip-修改国内镜像源Oct 10, 2016 | 16 Hitsmkdir ~/.pip vim ~/.pip/pip.conf[global]index-url = http://mirrors.aliyun.com/pypi/simple/[install]trusted-host = mirrors.aliyun.com注意事项:http://...
Python flask相关知识收集
http://www.bjhee.com/flask-ext8.html
Python得到代码执行时间脚本
得到代码执行时间脚本:import timet0 = time.time() # start time# the code to time goes heret1 = time.time() # end timeprint(t1 - t0)if __name__ == '__main__': import t...
yum安装包找不到
yum install -y epel-release在用yum安装软件包的时候 [root@ MHA]# yum install perl-Parallel-ForkManager 出现如下信息安装包找不到,是不是yum仓库没有更新,更新一下yum -y update
centos:下载
centos:下载http://mirrors.aliyun.com/centos/7.3.1611/isos/x86_64/
Oracle加表空间
--查询表空间使用率select a.tablespace_name,total,free,total-free used from( select tablespace_name,sum(bytes)/1024/1024 total from dba_data_files group by tablespace_name) a,( select tablespace_name,sum(bytes)/1024/1024 free from dba_free_space group by tablespace_...
redis 慢日志 slowlog
redis 慢日志 slowlog 1 slowlog是什么redis的slowlog是redis用于记录记录慢查询执行时间的日志系统。由于slowlog只保存在内存中,因此slowlog的效率很高,完全不用担心会影响到redis的性能。Slowlog是Redis从2.2.12版本引入的一条命令。 2 slowlog设置参考&n...
Python+getopt实现命令行带参数
Python+getopt实现命令行带参数python中 getopt 模块,该模块是专门用来处理命令行参数的函数getopt(args, shortopts, longopts = [])参数args一般是sys.argv[1:],shortopts 短格式 (-), longopts 长格式(--)命令行中输入:...