上一页 1 2 3 4 5 6 7 8 ··· 16 下一页

2020年10月5日

RabbitMQ

摘要: 1 安装 启动服务器 rabbitmq-server 你也可以添加 -detached 属性来让它在后台运行(注意:只有一个破折号) sudo rabbitmq-server -detached 永远不要用 kill 停止 RabbitMQ 服务器,而是应该用 rabbitmqctl 命令: sud 阅读全文

posted @ 2020-10-05 23:11 思此狂 阅读(130) 评论(0) 推荐(0)

python的文件锁操作

摘要: 相关链接: https://cloud.tencent.com/developer/section/1372550 import fcntl import time import sys class TestLock: def __init__(self, filename): self.filen 阅读全文

posted @ 2020-10-05 12:59 思此狂 阅读(410) 评论(0) 推荐(0)

2020年10月4日

cloud-init alibaba

摘要: # The top level settings are used as module # and system configuration. # A set of users which may be applied and/or used by various modules # when a 阅读全文

posted @ 2020-10-04 21:25 思此狂 阅读(207) 评论(0) 推荐(0)

2020年9月30日

cloud-init tencent

摘要: users: - default disable_root: 0 ssh_pwauth: 1 datasource_list: [ ConfigDrive, TencentCloud ] datasource: ConfigDrive: dsmode: local TencentCloud: met 阅读全文

posted @ 2020-09-30 14:41 思此狂 阅读(207) 评论(0) 推荐(0)

2020年9月27日

关于 python 的类

摘要: 查看类的属性 用 dir(Classname) 仅返回对象的属性的一个名字列表和 classname.__dict__ 返回一个字典,他的key是属性名, 键值是相应的属性对象的数据值 关于 __name__ #test15.pyclass Stuent(): def __init__(self,n 阅读全文

posted @ 2020-09-27 23:50 思此狂 阅读(94) 评论(0) 推荐(0)

2020年9月25日

jnija2模板渲染

摘要: cat temp.temp hello {{ name }} {% for love in love_sports %} my loves sport is {{ love }} {% endfor %} {% if is_boy %} i am a good boy {% else %} i am 阅读全文

posted @ 2020-09-25 16:39 思此狂 阅读(182) 评论(0) 推荐(0)

2020年9月15日

python multiprocessing

摘要: from multiprocessing import Process import os # 子进程要执行的代码 def run_proc(name): print('Run child process %s (%s)...' % (name, os.getpid())) if __name__= 阅读全文

posted @ 2020-09-15 17:38 思此狂 阅读(299) 评论(0) 推荐(0)

2020年9月14日

运维开发面试题

摘要: 1 什么是僵尸进程 怎么查看 僵尸进程是怎么产生的 当一个进程完成它的工作终止之后,它的父进程需要调用wait()或者waitpid()系统调用取得子进程的终止状态。 一个进程使用fork创建子进程,如果子进程退出,而父进程并没有调用wait或waitpid获取子进程的状态信息,那么子进程的进程描述 阅读全文

posted @ 2020-09-14 21:56 思此狂 阅读(1112) 评论(0) 推荐(0)

python 守护进程daemon

摘要: import time import os import sys def close_std_fd(): f = open(os.devnull, 'w') sys.stdin = f sys.stdout = f sys.stderr = f def daemon(func): pid = os. 阅读全文

posted @ 2020-09-14 16:05 思此狂 阅读(476) 评论(0) 推荐(0)

2020年8月24日

kubernets 应用部署

摘要: apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: 阅读全文

posted @ 2020-08-24 15:26 思此狂 阅读(90) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 ··· 16 下一页

导航