![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
mirahs
这个作者很懒,什么都没留下…
展开
-
源码安装pysvn
[root@test ~]# wget http://pysvn.barrys-emacs.org/source_kits/pysvn-1.8.0.tar.gz[root@test ~]# tar xf pysvn-1.8.0.tar.gz[root@test ~]# cd pysvn-1.8.0[root@test ~]# cd Source/[root@test ~]# python s原创 2015-11-03 15:14:07 · 1232 阅读 · 0 评论 -
python通过SNMP协议收集服务器监控信息(安装、配置、示例)
安装snmp和启用python模块[root@test ~]# wget http://nchc.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz[root@test ~]# tar xf net-snmp-5.7.3.tar.gz[root@test ~]# cd net-snmp-5.7.3[r原创 2015-11-03 17:54:31 · 16985 阅读 · 2 评论 -
python守护进程编写
代码如下:#!/usr/bin/env python#coding:utf-8import osimport sysimport timeimport signaldef create_daemon(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'): # 忽略终端I/O信号,STOP信号 signal.sig原创 2015-09-16 15:20:09 · 456 阅读 · 0 评论 -
python指定时间运行函数
要求: 在指定时间删除/home/app下所有文件和目录并删除程序本身和清除历史记录代码如下:#!/usr/bin/env python#coding:utf-8import osimport sysimport timeimport signalimport schedtime_run = "2015-09-16 15:45:00" # 什么时候原创 2015-09-16 15:51:54 · 4570 阅读 · 0 评论 -
python通过sigar收集服务器信息
安装sigar的python模块[root@test ~]# wget ftp://195.220.108.108/linux/Mandriva/devel/cooker/x86_64/media/contrib/release/python-sigar-1.6.3.20100329-3mdv2011.0.x86_64.rpm[root@test ~]# rpm2cpio python-sigar原创 2015-11-06 13:23:40 · 1177 阅读 · 0 评论 -
celery安装测试
参考这篇文章:http://my.oschina.net/u/2306127/blog/417360由于选择RabbitMQ作为消息中间件,先安装运行RabbitMQ,详见http://blog.csdn.net/mirahs/article/details/48496611安装celerypip install celery编写一个简单的任务,tasks.pyfrom celery import原创 2015-09-22 11:00:49 · 797 阅读 · 0 评论 -
源码安装python
下载源码并解压配置[root@test ~]# wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz[root@test ~]# tar xf Python-2.7.10.tar.xz[root@test ~]# cd Python-2.7.10[root@test ~]# ./configure --prefix原创 2015-10-23 10:13:23 · 528 阅读 · 0 评论