一、logging模块 默认情况下,logging将日志打印到屏幕,日志级别为WARNING; 日志级别大小关系为:CRITICAL > ERROR > WARNING > INFO > DEBUG > NOTSET,当然也可以自己定义日志级别。 ● DEBUG:详细的信息,通常只出现在诊断问题上。 ...
分类:
编程语言 时间:
2017-11-11 00:38:15
阅读次数:
280
commands 模块通常用于执行一些 shell 命令 commands.getoutput() :用于执行 shell 命令,如 commands.getoutput('ls /tmp/') commands.getstatusoutput() :用于执行 shell 命令,并返回命令执行后的状 ...
分类:
其他好文 时间:
2017-11-10 21:42:00
阅读次数:
119
Given the following RMAN commands, choose the option that reflects the order required to restoreyour currently operational ARCHIVELOG-mode database.A. ...
分类:
其他好文 时间:
2017-11-10 15:11:17
阅读次数:
165
Which commands are used for RMAN database recovery? (Choose all that apply.)A. restoreB. repairC. copyD. recoverE. replace The restore command is used ...
分类:
其他好文 时间:
2017-11-10 15:04:56
阅读次数:
125
在自动化运维和测试中,经常需要查找操作文件,比如说查找配置文件(从而读取配置文件的信息),查找测试报告(从而发送测试报告邮件),经常要对大量文件和大量路径进行操作,对于python而言这就需要依赖于os模块。下面就学习下os模块常用的几个方法。>>>importos#导..
分类:
编程语言 时间:
2017-11-10 10:58:23
阅读次数:
208
日志对于程序运行和技术人员来说是很必要且非常重要的,排查问题一般都是从分析程序运行日志开始的,再复杂再庞大的程序都必须要有日志输入,否则就算不上合格的程序。Python中为技术人员提供了方便的logging模块来定义和输出日志。先来看下logging的日志级别和简单的输出,如..
分类:
编程语言 时间:
2017-11-10 10:50:40
阅读次数:
196
1.commands模块linux系统环境下用于支持shell的一个模块1)getoutput()返回值只有返回结果(字符串类型),没办法判断执行结果是否正常例子importcommandscmd="ls/data/temp"result1=commands.getoutput(cmd)print(type(result1))#类型为strprint(result1)结果:<type‘str‘&..
分类:
编程语言 时间:
2017-11-09 18:38:31
阅读次数:
215
if 语句格式: 最精简的 if 命令的语法是:if TEST-COMMANDS; then CONSEQUENT-COMMANDS; fi if条件判断语句可以嵌套,以实现多重条件的检测。关键词 “fi” 表示里层 if 语句的结束,所有 if 语句必须使用关键词 “fi” 来结束。 1)字符串判 ...
分类:
系统相关 时间:
2017-11-09 11:46:10
阅读次数:
192
Which of the following ALTER DISKGROUP commands does not use V$ASM_OPERATION torecord the status of the operation?A. ADD DIRECTORYB. DROP DISKC. RESIZ ...
分类:
其他好文 时间:
2017-11-08 15:08:36
阅读次数:
123
cat /usr/local/ssdb/moniter_ssdb.py #!/usr/bin/env python import os import sys import commands #ssdb port Precosslist = ('17000','17005','17010','1701... ...
分类:
编程语言 时间:
2017-11-07 21:01:42
阅读次数:
389