Exemplo n.º 1
0
	def buildReport(self):
		nmonPlotter = pyNmonPlotter.pyNmonPlotter(self.processedData, self.args.outdir, debug=self.args.debug)
				
		# Note: CPU and MEM both have different logic currently, so they are just handed empty arrays []
		#       For DISKBUSY and NET please do adjust the columns you'd like to plot
		
		if os.path.exists(self.args.confFname):
			reportConfig = self.loadReportConfig(configFname=self.args.confFname)
		else:
			log.error("something went wrong.. looks like %s is missing. run --defaultConfig to generate a template" % (self.args.confFname))
			sys.exit()
		
		if self.isAIX():
			# check whether a Linux reportConfig is being used on an AIX nmon file
			wrongConfig = False
			indicators = {"DISKBUSY":"sd","NET":"eth","MEM":"memtotal"}
			for cat,param,_ in reportConfig:
				if cat in indicators and indicators[cat] in param:
					wrongConfig=True
			
			if wrongConfig:
				if not self.args.force:
					log.error("It looks like you might have the wrong settings in your report.config.")
					log.error("From what we can see you have settings for a Linux system but an nmon file of an AIX system")
					log.error("if you want to ignore this error, please use --force")
					sys.exit()
		
		# TODO implement plotting options
		outFiles = nmonPlotter.plotStats(reportConfig, self.isAIX())
		
		# Build HTML report
		pyNmonReport.createReport(outFiles, self.args.outdir)
Exemplo n.º 2
0
	def buildReport(self):
		nmonPlotter = pyNmonPlotter.pyNmonPlotter(self.processedData, args.outdir, debug=self.args.debug)
				
		# Note: CPU and MEM both have different logic currently, so they are just handed empty arrays []
		#       For DISKBUSY and NET please do adjust the collumns you'd like to plot
		
		if os.path.exists(self.args.confFname):
			reportConfig = self.loadReportConfig(configFname=self.args.confFname)
		else:
			print "something went wrong.. looks like %s disappeared while pyNmonAnalyzer was running" % (self.args.confFname)
			exit()
			'''
			# TODO: this could be broken out into a wizard or something
			print "WARNING: looks like the specified config file(\""+self.args.confFname+"\") does not exist."
			
			if os.path.exists("report.config") == False:
				ans = raw_input("\t Would you like us to write the default file out for you? [y/n]:")
				
				if ans.strip().lower() == "y":
					self.saveReportConfig(self.stdReport)
					print "\nwrote default config to report.config"
			else:
				print "\nNOTE: you could try using the default config file with: -r report.config"
				
			exit()'''
			
		
		# TODO implement plotting options
		outFiles = nmonPlotter.plotStats(reportConfig)
		
		# Build HTML report
		pyNmonReport.createReport(outFiles, self.args.outdir)
Exemplo n.º 3
0
	def buildReport(self):
		nmonPlotter = pyNmonPlotter.pyNmonPlotter(self.processedData, args.outdir, debug=self.args.debug)
				
		# Note: CPU and MEM both have different logic currently, so they are just handed empty arrays []
		#       For DISKBUSY and NET please do adjust the collumns you'd like to plot
		
		if os.path.exists(self.args.confFname):
			reportConfig = self.loadReportConfig(configFname=self.args.confFname)
		else:
			log.error("something went wrong.. looks like %s is missing. run --defaultConfig to generate a template" % (self.args.confFname))
			exit()			
		
		# TODO implement plotting options
		outFiles = nmonPlotter.plotStats(reportConfig)
		
		# Build HTML report
		pyNmonReport.createReport(outFiles, self.args.outdir)
Exemplo n.º 4
0
    def buildReport(self):
        nmonPlotter = pyNmonPlotter.pyNmonPlotter(self.processedData,
                                                  self.args.outdir,
                                                  debug=self.args.debug)

        # Note: CPU and MEM both have different logic currently, so they are just handed empty arrays []
        #       For DISKBUSY and NET please do adjust the columns you'd like to plot

        if os.path.exists(self.args.confFname):
            reportConfig = self.loadReportConfig(
                configFname=self.args.confFname)
        else:
            log.error(
                "something went wrong.. looks like %s is missing. run --defaultConfig to generate a template"
                % (self.args.confFname))
            sys.exit()

        if self.isAIX():
            # check whether a Linux reportConfig is being used on an AIX nmon file
            wrongConfig = False
            indicators = {"DISKBUSY": "sd", "NET": "eth", "MEM": "memtotal"}
            for cat, param, _ in reportConfig:
                if cat in indicators and indicators[cat] in param:
                    wrongConfig = True

            if wrongConfig:
                if not self.args.force:
                    log.error(
                        "It looks like you might have the wrong settings in your report.config."
                    )
                    log.error(
                        "From what we can see you have settings for a Linux system but an nmon file of an AIX system"
                    )
                    log.error(
                        "if you want to ignore this error, please use --force")
                    sys.exit()

        # TODO implement plotting options
        outFiles = nmonPlotter.plotStats(reportConfig, self.isAIX())

        # Build HTML report
        pyNmonReport.createReport(outFiles,
                                  self.args.outdir,
                                  in_fname=self.nmonParser.fname)
Exemplo n.º 5
0
    def buildReport(self):
        nmonPlotter = pyNmonPlotter.pyNmonPlotter(self.processedData,
                                                  args.outdir,
                                                  debug=self.args.debug)

        # Note: CPU and MEM both have different logic currently, so they are just handed empty arrays []
        #       For DISKBUSY and NET please do adjust the collumns you'd like to plot

        if os.path.exists(self.args.confFname):
            reportConfig = self.loadReportConfig(
                configFname=self.args.confFname)
        else:
            log.error(
                "something went wrong.. looks like %s is missing. run --defaultConfig to generate a template"
                % (self.args.confFname))
            exit()

        # TODO implement plotting options
        outFiles = nmonPlotter.plotStats(reportConfig)

        # Build HTML report
        pyNmonReport.createReport(outFiles, self.args.outdir)