11 from __future__
import print_function
13 from ProfileMTTStage
import *
31 ProfileMTTStage.__init__(self)
33 self.
options[
'kernelName'] = (
True,
"Kernel name", [
"uname",
"-s"])
34 self.
options[
'kernelRelease'] = (
True,
"Kernel release string", [
"uname",
"-r"])
35 self.
options[
'kernelVersion'] = (
True,
"Kernel version string", [
"uname",
"-v"])
36 self.
options[
'machineName'] = (
True,
"Machine name", [
"uname",
"-m"])
37 self.
options[
'processorType'] = (
True,
"Processor type", [
"uname",
"-p"])
38 self.
options[
'nodeName'] = (
True,
"Node name", [
"uname",
"-n"])
43 IPlugin.activate(self)
48 IPlugin.deactivate(self)
52 return "DefaultProfile"
55 lines = testDef.printOptions(self.
options)
61 testDef.logger.verbose_print(
"Collect system profile")
66 testDef.parseOptions(log, self.
options, keyvals, cmds)
67 keys = list(cmds.keys())
68 opts = self.options.keys()
70 if cmds[key]
and key
in opts:
71 status, stdout, stderr, time = testDef.execmd.execute(cmds, self.
options[key][2], testDef)
73 log[
'status'] = status
74 log[
'stdout'] = stdout
75 log[
'stderr'] = stderr
80 log[
'profile'] = myLog