使用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 长格式(--)命令行中输入:...
Python tule转dict
[root@virtdb55 py]# vi tuledict.pyimport MySQLdb as mdbimport os,time,sysimport commands as coimport datetimeuser = 'root'password = '123456'servername='192.168.2.55'con_1 = mdb.connect(servername,'root','123456','mysql');cur_1 = con_1.cursor()cur_1.execute("select id,user,host,db,...
pt-online-schema-change在线DDL
操作的表必须有主键否则会出错误加字段:pt-online-schema-change -u root -h 127.0.0.1 -p 123456 --alter='add column address varchar(20) ' --execute D=test,t=t4 加索引: pt-online-schema-change -u root -h 127.0.0.1 -p 123456 --alter='add key idx_address(address)' --execu...
性能监控小工具
atop:http://www.atoptool.nl/downloadatop.phpwget http://www.atoptool.nl/download/atop-2.2-3.sysv.x86_64.rpmrpm -ivh atop-2.2-3.sysv.x86_64.rpm
oracle 11.2.0.4安装 vncserver ?
oracle 11.2.0.4安装 vncserveryum whatprovides "*/xhost"xorg-x11-server-utils-7.7-14.el6.x86_64 : X.Org X11 X server utilitiesRepo : baseMatched from:Filename : /usr/bin/xhostyum install xorg-x11-server-utils-7.7-14.el6.x86_64 -yyum install xorg-x11-...
linux根据命令查找包
yum whatprovides "*/xhost"xorg-x11-server-utils-7.7-14.el6.x86_64 : X.Org X11 X server utilitiesRepo : baseMatched from:Filename : /usr/bin/xhostyum install xorg-x11-server-utils-7.7-14.el6.x86_64 -y
Oracle11.2.0.4 Linux 64bit FTP下载地址
Oracle11GU4介质FTP下载地址Oracle11.2.0.4 Linux 64bit FTP下载地址server:ftp://104.236.52.210/p13390677_112040_Linux-x86-64_1of7.zip ftp://104.236.52.210/p13390677_112040_Linux-x86-64_2of7.zipclient:ftp://104.236.52.210/p13390677_112040_Linux-x86-64_3of7.zip...
yum 下载rpm包
yum -y install --downloadonly --downloaddir=/tmp python-psutil.x86_64