Beispiel #1
0
	def updateInfo(self):
		self.DynamicTimer.start(1000)
		rc = system("df -h > /tmp/syinfo.tmp")
		if config.osd.language.value == 'es_ES':
			self.text = "RECEPTOR\n"
		else:
			self.text = "BOX\n"
		f = open("/proc/stb/info/model",'r')
		if config.osd.language.value == 'es_ES':
			self.text += "Modelo:\t" + about.getBoxType() + "\n"
		else:
			self.text += "Model:\t" + about.getBoxType() + "\n"
		f.close()
		#f = open("/proc/stb/info/chipset",'r')
		#self.text += "Chipset:\t" + about.getChipSetString() + "\n"
		#f.close()
		cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
		cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
		try:
			res = popen(cmd).read()
			res2 = popen(cmd2).read()
		except:
			res = ""
			res2 = ""
		cpuMHz = ""
		bogoMIPS = ""
		if res:
			cpuMHz = "   \t(" + res.replace("\n", "") + " MHz)"
		if res2:
			bogoMIPS = "" + res2.replace("\n", "")
		f = open('/proc/cpuinfo', 'r')
		self.text += "CPU: \t" + about.getCPUString() + cpuMHz + "\n"
		self.text += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
		self.text += "BogoMIPS \t" + bogoMIPS + "\n"
		f.close()
		if config.osd.language.value == 'es_ES':
			self.text += "\nMEMORIA\n"
		else:
			self.text += "\nMEMORY\n"
		memTotal = memFree = swapTotal = swapFree = 0
		for line in open("/proc/meminfo",'r'):
			parts = line.split(':')
			key = parts[0].strip()
			if key == "MemTotal":
				memTotal = parts[1].strip()
			elif key in ("MemFree"):
				memFree = parts[1].strip()
			elif key == "SwapTotal":
				swapTotal = parts[1].strip()
			elif key == "SwapFree":
				swapFree = parts[1].strip()
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Total:\t%s\n" % memTotal
		else:
			self.text += "Total memory:\t%s\n" % memTotal
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Libre:\t%s \n" % memFree
		else:
			self.text += "Free memory:\t%s \n" % memFree
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Usada:\t%s" % str(about.getRAMusageString()) + "\n"
		else:
			self.text += "Memory Usage:\t%s" % str(about.getRAMusageString()) + "\n"
		out_lines = file("/proc/meminfo").readlines()
		for lidx in range(len(out_lines) - 1):
			tstLine = out_lines[lidx].split()
			if "Buffers:" in tstLine:
				Buffers = out_lines[lidx].split()
				self.text += _("Buffers:") + "\t" + Buffers[1] + ' kB'"\n"
			if "Cached:" in tstLine:
				Cached = out_lines[lidx].split()
				self.text += _("Cached:") + "\t" + Cached[1] + ' kB'"\n"
		if config.osd.language.value == 'es_ES':
			self.text += "Swap total:\t%s \n" % swapTotal
		else:
			self.text += "Swap total:\t%s \n" % swapTotal
		if config.osd.language.value == 'es_ES':
			self.text += "Swap libre:\t%s \n" % swapFree
		else:
			self.text += "Swap free:\t%s \n" % swapFree
		if config.osd.language.value == 'es_ES':
			self.text += "\nALMACENAMIENTO\n"
		else:
			self.text += "\nSTORAGE\n"
		f = open("/tmp/syinfo.tmp",'r')
		line = f.readline()
		parts = line.split()
		self.text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
		line = f.readline()
		parts = line.split()
		self.text += "Flash" + "\t" + parts[1].strip() + "  " + parts[2].strip()  + "  " +  parts[3].strip()  + "  " +  parts[4] + "\n"
		for line in f.readlines():
			if line.find('/media/') != -1:
				line = line.replace('/media/', '   ')
				parts = line.split()
				if len(parts) == 6:
					self.text += parts[5] + "\t" + parts[1].strip() + "  " + parts[2].strip() + "  " + parts[3].strip() + "  " + parts[4] + "\n"
		f.close()
		os_remove("/tmp/syinfo.tmp")

		self.text += "\nSOFTWARE\n"
		openLD = "OpenLD "
		self.text += "Firmware:\t %s" % openLD + str(about.getImageVersion()) + "\n"
		self.text += "Kernel: \t " + about.getKernelVersionString() + "\n"
		self.text += _("DVB drivers:\t %s") % str(about.getDriverInstalledDate()) + "\n"
		self.text += _("Last update:\t %s") % str(getEnigmaVersionString()) + "\n"
		self.text += _("GStreamer:\t%s") % str(about.getGStreamerVersionString().replace('GStreamer','')) + "\n"
		#self.text += _("FFmpeg:\t%s") % str((' 3.1.4')) + "\n"
		self.text += _("Python:\t %s") % about.getPythonVersionString() + "\n\n"

		self["lab1"].setText(self.text)
Beispiel #2
0
	def updateInfo(self):
		rc = system("df -h > /tmp/syinfo.tmp")
		text = "BOX\n"
		f = open("/proc/stb/info/model",'r')
		text += "Model:\t" + about.getBoxType() + "\n"
 		f.close()
		#f = open("/proc/stb/info/chipset",'r')
 		#text += "Chipset:\t" + about.getChipSetString() + "\n"
		#f.close()
		cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
		cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
		try:
			res = popen(cmd).read()
			res2 = popen(cmd2).read()
		except:
			res = ""
			res2 = ""
		cpuMHz = ""
		bogoMIPS = ""
		if res:
			cpuMHz = "   \t(" + res.replace("\n", "") + " MHz)"
		if res2:
			bogoMIPS = "" + res2.replace("\n", "")
		f = open('/proc/cpuinfo', 'r')
		text += "CPU: \t" + about.getCPUString() + cpuMHz + "\n"
		text += "BogoMIPS \t" + bogoMIPS + "\n"
		f.close()
		text += "\nMEMORY\n"
		memTotal = memFree = swapTotal = swapFree = 0
		for line in open("/proc/meminfo",'r'):
			parts = line.split(':')
			key = parts[0].strip()
			if key == "MemTotal":
				memTotal = parts[1].strip()
			elif key in ("MemFree", "Buffers", "Cached"):
				memFree += int(parts[1].strip().split(' ',1)[0])
			elif key == "SwapTotal":
				swapTotal = parts[1].strip()
			elif key == "SwapFree":
				swapFree = parts[1].strip()
		text += "Total memory:\t%s\n" % memTotal
		text += "Free memory:\t%s kB\n" % memFree
		text += "Memory Usage:\t%s" % str(about.getRAMusageString()) + "\n"
		text += "Swap total:\t%s \n" % swapTotal
		text += "Swap free:\t%s \n" % swapFree
		text += "\nSTORAGE\n"
		f = open("/tmp/syinfo.tmp",'r')
		line = f.readline()
		parts = line.split()
		text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
		line = f.readline()
		parts = line.split()
		text += "Flash" + "\t" + parts[1].strip() + "  " + parts[2].strip()  + "  " +  parts[3].strip()  + "  " +  parts[4] + "\n"
		for line in f.readlines():
			if line.find('/media/') != -1:
				line = line.replace('/media/', '   ')
				parts = line.split()
				if len(parts) == 6:
					text += parts[5] + "\t" + parts[1].strip() + "  " + parts[2].strip() + "  " + parts[3].strip() + "  " + parts[4] + "\n"
		f.close()
		os_remove("/tmp/syinfo.tmp")

		text += "\nSOFTWARE\n"
		f = open("/etc/ldversion",'r')
		text += "Firmware: \t" + f.readline() + "\n"
		f.close()
		text += "Version: \t" + about.getEnigmaVersionString() + "\n"
		text += "Kernel: \t" + about.getKernelVersionString() + "\n"

		self["lab1"].setText(text)
Beispiel #3
0
	def updateInfo(self):
		rc = system("df -h > /tmp/syinfo.tmp")
		text = "BOX\n"
		f = open("/proc/stb/info/model",'r')
		text += "Model:\t" + about.getBoxType() + "\n"
 		f.close()
		#f = open("/proc/stb/info/chipset",'r')
 		#text += "Chipset:\t" + about.getChipSetString() + "\n"
		#f.close()
		cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
		cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
		try:
			res = popen(cmd).read()
			res2 = popen(cmd2).read()
		except:
			res = ""
			res2 = ""
		cpuMHz = ""
		bogoMIPS = ""		
		if res:
			cpuMHz = "   \t(" + res.replace("\n", "") + " MHz)"
		if res2:
			bogoMIPS = "" + res2.replace("\n", "")
		f = open('/proc/cpuinfo', 'r')
		text += "CPU: \t" +  about.getCPUString() + cpuMHz + "\n"
		text += "BogoMIPS \t" + bogoMIPS + "\n"
 		f.close()
		text += "\nMEMORY\n"
		memTotal = memFree = swapTotal = swapFree = 0
		for line in open("/proc/meminfo",'r'):
			parts = line.split(':')
			key = parts[0].strip()
			if key == "MemTotal":
				memTotal = parts[1].strip()
			elif key in ("MemFree", "Buffers", "Cached"):
				memFree += int(parts[1].strip().split(' ',1)[0])
			elif key == "SwapTotal":
				swapTotal = parts[1].strip()
			elif key == "SwapFree":
				swapFree = parts[1].strip()
		text += "Total memory:\t%s\n" % memTotal
		text += "Free memory:\t%s kB\n"  % memFree
		text += "Swap total:\t%s \n"  % swapTotal
		text += "Swap free:\t%s \n"  % swapFree
		text += "\nSTORAGE\n"
		f = open("/tmp/syinfo.tmp",'r')
		line = f.readline()
		parts = line.split()
		text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
		line = f.readline()
		parts = line.split()
		text += "Flash" + "\t" + parts[1].strip() + "  " + parts[2].strip()  + "  " +  parts[3].strip()  + "  " +  parts[4] + "\n"
 		for line in f.readlines():
			if line.find('/media/') != -1:
				line = line.replace('/media/', '   ')
				parts = line.split()
				if len(parts) == 6:
					text += parts[5] + "\t" + parts[1].strip() + "  " + parts[2].strip() + "  " + parts[3].strip() + "  " + parts[4] + "\n"
		f.close()
		os_remove("/tmp/syinfo.tmp")
		
		text += "\nSOFTWARE\n"
		f = open("/etc/ldversion",'r')
		text += "Firmware: \t" + f.readline() + "\n"
		f.close()
		text += "Version: \t" +  about.getEnigmaVersionString() + "\n"
		text += "Kernel: \t" +  about.getKernelVersionString() + "\n"
		
		self["lab1"].setText(text)
Beispiel #4
0
    def updateInfo(self):
        self.DynamicTimer.start(1000)
        rc = system("df -h > /tmp/syinfo.tmp")
        if config.osd.language.value == 'es_ES':
            self.text = "RECEPTOR\n"
        else:
            self.text = "BOX\n"
        f = open("/proc/stb/info/model", 'r')
        if config.osd.language.value == 'es_ES':
            self.text += "Modelo:\t" + about.getBoxType() + "\n"
        else:
            self.text += "Model:\t" + about.getBoxType() + "\n"
        f.close()
        #f = open("/proc/stb/info/chipset",'r')
        #self.text += "Chipset:\t" + about.getChipSetString() + "\n"
        #f.close()
        cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
        cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
        try:
            res = popen(cmd).read()
            res2 = popen(cmd2).read()
        except:
            res = ""
            res2 = ""
        cpuMHz = ""
        bogoMIPS = ""
        if res:
            cpuMHz = "   \t(" + res.replace("\n", "") + " MHz)"
        if res2:
            bogoMIPS = "" + res2.replace("\n", "")
        f = open('/proc/cpuinfo', 'r')
        self.text += "CPU: \t" + about.getCPUString() + cpuMHz + "\n"
        self.text += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
        self.text += "BogoMIPS \t" + bogoMIPS + "\n"
        f.close()
        if config.osd.language.value == 'es_ES':
            self.text += "\nMEMORIA\n"
        else:
            self.text += "\nMEMORY\n"
        memTotal = memFree = swapTotal = swapFree = 0
        for line in open("/proc/meminfo", 'r'):
            parts = line.split(':')
            key = parts[0].strip()
            if key == "MemTotal":
                memTotal = parts[1].strip()
            elif key in ("MemFree"):
                memFree = parts[1].strip()
            elif key == "SwapTotal":
                swapTotal = parts[1].strip()
            elif key == "SwapFree":
                swapFree = parts[1].strip()
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Total:\t%s\n" % memTotal
        else:
            self.text += "Total memory:\t%s\n" % memTotal
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Libre:\t%s \n" % memFree
        else:
            self.text += "Free memory:\t%s \n" % memFree
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Usada:\t%s" % str(
                about.getRAMusageString()) + "\n"
        else:
            self.text += "Memory Usage:\t%s" % str(
                about.getRAMusageString()) + "\n"
        out_lines = file("/proc/meminfo").readlines()
        for lidx in range(len(out_lines) - 1):
            tstLine = out_lines[lidx].split()
            if "Buffers:" in tstLine:
                Buffers = out_lines[lidx].split()
                self.text += _("Buffers:") + "\t" + Buffers[1] + ' kB' "\n"
            if "Cached:" in tstLine:
                Cached = out_lines[lidx].split()
                self.text += _("Cached:") + "\t" + Cached[1] + ' kB' "\n"
        if config.osd.language.value == 'es_ES':
            self.text += "Swap total:\t%s \n" % swapTotal
        else:
            self.text += "Swap total:\t%s \n" % swapTotal
        if config.osd.language.value == 'es_ES':
            self.text += "Swap libre:\t%s \n" % swapFree
        else:
            self.text += "Swap free:\t%s \n" % swapFree
        if config.osd.language.value == 'es_ES':
            self.text += "\nALMACENAMIENTO\n"
        else:
            self.text += "\nSTORAGE\n"
        f = open("/tmp/syinfo.tmp", 'r')
        line = f.readline()
        parts = line.split()
        self.text += parts[0] + "\t" + parts[1].strip() + "      " + parts[
            2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
        line = f.readline()
        parts = line.split()
        self.text += "Flash" + "\t" + parts[1].strip() + "  " + parts[2].strip(
        ) + "  " + parts[3].strip() + "  " + parts[4] + "\n"
        for line in f.readlines():
            if line.find('/media/') != -1:
                line = line.replace('/media/', '   ')
                parts = line.split()
                if len(parts) == 6:
                    self.text += parts[5] + "\t" + parts[1].strip(
                    ) + "  " + parts[2].strip() + "  " + parts[3].strip(
                    ) + "  " + parts[4] + "\n"
        f.close()
        os_remove("/tmp/syinfo.tmp")

        self.text += "\nSOFTWARE\n"
        openLD = "OpenLD "
        self.text += "Firmware:\t %s" % openLD + str(
            about.getImageVersion()) + "\n"
        self.text += "Kernel: \t " + about.getKernelVersionString() + "\n"
        self.text += _("DVB drivers:\t %s") % str(
            about.getDriverInstalledDate()) + "\n"
        self.text += _("Last update:\t %s") % str(
            getEnigmaVersionString()) + "\n"
        self.text += _("GStreamer:\t%s") % str(
            about.getGStreamerVersionString().replace('GStreamer', '')) + "\n"
        #self.text += _("FFmpeg:\t%s") % str((' 3.1.4')) + "\n"
        self.text += _(
            "Python:\t %s") % about.getPythonVersionString() + "\n\n"

        self["lab1"].setText(self.text)