python记录程序运行时间
我们在用python编程时经常需要记录程序运行时间,可以借助time模块的time 方法: time.time 返回当前时间的时间戳 1970纪元后经过的浮点秒数 . coding=utf 8 import time starttime = time.time time.sleep 2.1 延时2.1s endtime = time.time dt
我们在用python编程时经常需要记录程序运行时间,可以借助time模块的time 方法: time.time 返回当前时间的时间戳 1970纪元后经过的浮点秒数 . coding=utf 8 import time starttime = time.time time.sleep 2.1 延时2.1s endtime = time.time dt
1.故障问题: 近日配置linux服务器,,在使用useradd命令添加帐号 的 时候出现: unable to lock password file cannot lock shadow password file useradd: unable to lock password file 2.解決技巧: 在/etc/目錄下會有passwd.lock、group.lock
安装: yum y install strace 使用: 解决phpinfo 中Loaded Configuration File none 的问题. 命令: strace /usr/local/php7/sbin/php fpm i 2 1.log 查看在日志里搜索 php.ini ,就知道程序去哪里查找了. 普通追踪程序: strace ls
亲测可用的网易源: base name=CentOS 6 Base 163.com baseurl=http://mirrors.163.com/centos/6/os/$basearch/ mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os gpgcheck=1 gpgkey=h
从网上找了几个速度比较快的镜像地址: Docker 官方中国区: https://registry.docker cn.com 网易: http://hub mirror.c.163.com ustc: https://docker.mirrors.ustc.edu.cn 修改方法: 直接设置 –registry mirror 参数,仅对当前的命令有效: docker ru
Zabbix安装好之后,监控图形页面出现字符集乱码. 解决方法: 1、复制本地电脑 C:\Windows\Fonts\simkai.ttf 楷体 上传到zabbix服务器网站目录的fonts目录下. 2、zabbix网站目录fonts目录查找如下: $ whereis zabbix zabbix: /usr/lib/zabbix /etc/zabbix /usr/share/zabbix
a.安装 数据库 $ rpm Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86 64/zabbix release 4.2 1.el7.noarch.rpm $ yum clean all b.安装Zabbix server,Web前端,agent $ yum y install zabbix server mysql