摘要: [root@swarm-213 ~]# cat systemissue.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2018-12-17 17:16 # @Author : opsonly # @Site : # @File : systemissue.py # @Software: PyCharm import psut 阅读全文
posted @ 2019-08-26 16:46 菩提花开 阅读(214) 评论(0) 推荐(0) 编辑
摘要: [root@zabbix-server python3]# cat dir.py 1 #!/usr/bin/python3 2 # -*- coding: utf-8 -*- 3 import os 4 dir = "/home/o2ouser/python3" 5 if os.path.isdir(dir): 6 print('%s is a dir' % dir) 7 else: 8 prin 阅读全文
posted @ 2019-08-26 15:48 菩提花开 阅读(221) 评论(0) 推荐(0) 编辑
摘要: [root@dn3 hadoop]# cat install.py #!/usr/bin/python #coding=utf-8 import os import sys if os.getuid() == 0: pass else: print('当前用户不是root用户,请用root用户运行') sys.exit(1) version = raw_input('请输... 阅读全文
posted @ 2019-08-26 15:07 菩提花开 阅读(919) 评论(0) 推荐(0) 编辑