上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 22 下一页
摘要: package main import ( "fmt" "sync" "time" ) // 方法一: 通过sync.WaitGroup + chan自定义 var tokens chan struct{} var wg sync.WaitGroup func fprint(num int) { d 阅读全文
posted @ 2021-05-16 20:56 明天OoO你好 阅读(504) 评论(0) 推荐(0) 编辑
摘要: FROM centos:7 as build ADD nginx-1.19.6.tar.gz /usr/local/src # change dir to /usr/local/src/nginx-1.19.6 WORKDIR /usr/local/src/nginx-1.19.6 # runnin 阅读全文
posted @ 2021-01-22 00:28 明天OoO你好 阅读(165) 评论(0) 推荐(0) 编辑
摘要: [root@localhost apps]# cat /etc/supervisor/conf.d/command_analyzer_celery_* [program:book]command=/home/project/bookmanager/venv/bin/gunicorn -w 8 -b 阅读全文
posted @ 2021-01-11 20:20 明天OoO你好 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 1. 配置免密登陆: ansible -i costome_hosts all -m authorized_key -a "user=root key='{{ lookup('file', '/root/.ssh/id_rsa.pub')}}' path='/root/.ssh/authorized 阅读全文
posted @ 2020-12-15 16:42 明天OoO你好 阅读(219) 评论(0) 推荐(0) 编辑
摘要: count = 0 with open('/cm/com.file','rb') as f: while True: buffer = f.read(1024*8192) if not buffer: break count += buffer.count(b"\n") print(count) 阅读全文
posted @ 2020-11-30 22:29 明天OoO你好 阅读(1134) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- BADREQUEST = 400 UNAUTHORIZED = 401 FORBIDDEN = 403 GONE = 410 TOOMANYREQUESTS = 412 class DnsdbException(Exception): def __in 阅读全文
posted @ 2020-11-15 14:20 明天OoO你好 阅读(353) 评论(0) 推荐(0) 编辑
摘要: import configparser import logging from logging.handlers import RotatingFileHandler config = configparser.ConfigParser() config.read("config", encodin 阅读全文
posted @ 2020-11-07 11:41 明天OoO你好 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1. 采集服务器网卡1分钟平均流量(单位bit) rate(node_network_receive_bytes_total{device="ens33",instance="192.168.214.129:9100",job="node",name="JSONS"}[1m])*8 阅读全文
posted @ 2020-09-10 22:17 明天OoO你好 阅读(1056) 评论(0) 推荐(0) 编辑
摘要: 1. 下载grafana安装包 wget https://mirrors.huaweicloud.com/grafana/7.1.5/grafana-7.1.5-1.x86_64.rpm 2. 安装 rpm -Uvh grafana-7.1.5-1.x86_64.rpm 3. 设置开机启动并启动 / 阅读全文
posted @ 2020-09-10 22:15 明天OoO你好 阅读(367) 评论(0) 推荐(0) 编辑
摘要: prometheus.yml [root@bogon prometheus-2.20.1.linux-amd64]# cat prometheus.yml # my global config global: scrape_interval: 15s # Set the scrape interva 阅读全文
posted @ 2020-09-10 22:12 明天OoO你好 阅读(2903) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 22 下一页