crond 是linux用来定期执行程序的命令。当安装完成操作系统之后,默认便会启动此任务调度命令。crond命令每分锺会定期检查是否有要执行的工作,如果有要执行的工作便会自动执行该工作。可以用以下的方法启动、关闭这个服务: /sbin/service crond start //启动服务 /sbi Read More
posted @ 2017-03-16 10:28 zoro_robin Views(8336) Comments(0) Diggs(0) Edit
#coding=utf-8 import os import time import datetime def deleteOutdateFiles(path): """ 删除目录下七天前创建的文件 """ current_time = time.strftime("%Y-%m-%d", time.localtime(time.time())) cu... Read More
posted @ 2017-02-25 22:01 zoro_robin Views(1051) Comments(0) Diggs(0) Edit
之前想在centos系统上安装clang 3.6版本,由于yum上版本太低,想通过源码编译安装。按照网上说的源码安装步骤,下好llvm、clang、clang-tools-extra和compiler-rt后,总在make install的最后一步安装失败。为了找到解决办法,去查llvm.org官网 Read More
posted @ 2017-02-25 21:26 zoro_robin Views(1907) Comments(0) Diggs(0) Edit
1.安装 下载地址:https://www.getpostman.com/。直接安装,成功后在chorme的应用程序中会多出一个Postman。如果无法在google store上直接安装,可以下载.crx文件手动安装:http://chromecj.com/utilities/2015-04/423.html 2.发送请求 a.搭建服务器。 先用tonado在本机搭一个简易服务器,端口为... Read More
posted @ 2016-12-12 19:14 zoro_robin Views(3104) Comments(1) Diggs(0) Edit
如果想同时执行两个while True循环,可以使用多线程threading来实现。 完整代码 #coding=gbk from time import sleep, ctime import threading def muisc(func): while True: print 'Start playing: %s! %s' %(func,ctime... Read More
posted @ 2016-11-30 11:46 zoro_robin Views(13094) Comments(0) Diggs(0) Edit
1.背景 如果你想用Python开发Windows程序,并让其开机启动等,就必须写成windows的服务程序Windows Service,用Python来做这个事情必须要借助第三方模块pywin32,自己去下载然后安装(注意下载符合自己OS的版本) 2.实例 先上代码 #encoding=utf-8 import win32serviceutil import win32... Read More
posted @ 2016-11-28 16:41 zoro_robin Views(8695) Comments(0) Diggs(1) Edit
有时候编写的Python程序依赖很多,如果要在不同服务器上安装python环境等东西有点得不偿失了。这时候可以使用pyinstaller和py2exe,能够将python程序打包成可执行的exe文件,复制到其他机器上可以直接执行。下面说一下使用pyinstaller将python程序打包成exe文件。 1.pyinstaller安装 使用pip安装:pip install PyInstalle... Read More
posted @ 2016-11-28 16:25 zoro_robin Views(590) Comments(0) Diggs(0) Edit
jmeter中可以监控服务器的CPU和内存使用情况,但是需要安装一些插件还需要在被监测服务器上开启服务。 1.下载JMeterPlugins-Standard-1.4.0.zip插件。下载后将JMeterPlugins-Standard.jar插件复制到lib/ext文件中。 打开Jmeter,创建监视器时选择jp@gc - PerfMon Metrics Collector,就是用来监控cp... Read More
posted @ 2016-10-28 17:59 zoro_robin Views(9186) Comments(1) Diggs(2) Edit
使用jmeter时有时需要访问不同的uri,或POST不同的数据。这时候可以对数据参数化,将数据写入文件,再从文件读取。下面举个例子说明如何使用CSV Data Set Config参数化。 这里有两个请求: http://www.cnblogs.com/zoro-robin/p/5908644.html http://www.cnblogs.com/zoro-robin/p/5960682... Read More
posted @ 2016-10-27 17:05 zoro_robin Views(367) Comments(0) Diggs(0) Edit
最近有一个小程序需要用php来跑,记录一下php的环境配置过程。 1.首先在下载集成工具wamp,WAMP是指在Windows服务器上使用Apache、MySQL和PHP的集成安装环境,可以快速安装配置Web服务器: https://sourceforge.net/projects/wampserver/files/WampServer%203/WampServer%203.0.0/wamps... Read More
posted @ 2016-10-14 15:32 zoro_robin Views(1067) Comments(0) Diggs(0) Edit