Example #1
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Memory Information"))
        self.skinName = ["SystemMemoryInfo", "About"]
        self["lab1"] = StaticText(_("INFO RAM / FLASH"))
        self["AboutScrollLabel"] = ScrollLabel()

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown,
            })

        out_lines = file("/proc/meminfo").readlines()
        self.AboutText = _("RAM") + '\n'
        RamTotal = "-"
        RamFree = "-"
        for lidx in range(len(out_lines) - 1):
            tstLine = out_lines[lidx].split()
            if "MemTotal:" in tstLine:
                MemTotal = out_lines[lidx].split()
                self.AboutText += _(
                    "Total Memory:") + "\t" + MemTotal[1] + "\n"
            if "MemFree:" in tstLine:
                MemFree = out_lines[lidx].split()
                self.AboutText += _("Free Memory:") + "\t" + MemFree[1] + "\n"
                if config.osd.language.value == 'es_ES':
                    self.AboutText += _("Memoria Usada:\t%s") % str(
                        about.getRAMusageString()) + "\n"
                else:
                    self.AboutText += _("Memory Usage:\t%s") % str(
                        about.getRAMusageString()) + "\n"
            if "Buffers:" in tstLine:
                Buffers = out_lines[lidx].split()
                self.AboutText += _("Buffers:") + "\t" + Buffers[1] + "\n"
            if "Cached:" in tstLine:
                Cached = out_lines[lidx].split()
                self.AboutText += _("Cached:") + "\t" + Cached[1] + "\n"
            if "SwapTotal:" in tstLine:
                SwapTotal = out_lines[lidx].split()
                self.AboutText += _("Total Swap:") + "\t" + SwapTotal[1] + "\n"
            if "SwapFree:" in tstLine:
                SwapFree = out_lines[lidx].split()
                self.AboutText += _("Free Swap:") + "\t" + SwapFree[1] + "\n\n"

        self["actions"].setEnabled(False)
        self.Console = Console()
        self.Console.ePopen("df -mh / | grep -v '^Filesystem'",
                            self.Stage1Complete)
Example #2
0
	def __init__(self, session):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Memory Information"))
		self.skinName = ["SystemMemoryInfo", "About"]
		self["lab1"] = StaticText(_("INFO RAM / FLASH"))
		self["AboutScrollLabel"] = ScrollLabel()

		self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown,
			})

		out_lines = file("/proc/meminfo").readlines()
		self.AboutText = _("RAM") + '\n'
		RamTotal = "-"
		RamFree = "-"
		for lidx in range(len(out_lines) - 1):
			tstLine = out_lines[lidx].split()
			if "MemTotal:" in tstLine:
				MemTotal = out_lines[lidx].split()
				self.AboutText += _("Total Memory:") + "\t" + MemTotal[1] + "\n"
			if "MemFree:" in tstLine:
				MemFree = out_lines[lidx].split()
				self.AboutText += _("Free Memory:") + "\t" + MemFree[1] + "\n"
				if config.osd.language.value == 'es_ES':
					self.AboutText += _("Memoria Usada:\t%s") % str(about.getRAMusageString()) + "\n"
				else:
					self.AboutText += _("Memory Usage:\t%s") % str(about.getRAMusageString()) + "\n"
			if "Buffers:" in tstLine:
				Buffers = out_lines[lidx].split()
				self.AboutText += _("Buffers:") + "\t" + Buffers[1] + "\n"
			if "Cached:" in tstLine:
				Cached = out_lines[lidx].split()
				self.AboutText += _("Cached:") + "\t" + Cached[1] + "\n"
			if "SwapTotal:" in tstLine:
				SwapTotal = out_lines[lidx].split()
				self.AboutText += _("Total Swap:") + "\t" + SwapTotal[1] + "\n"
			if "SwapFree:" in tstLine:
				SwapFree = out_lines[lidx].split()
				self.AboutText += _("Free Swap:") + "\t" + SwapFree[1] + "\n\n"

		self["actions"].setEnabled(False)
		self.Console = Console()
		self.Console.ePopen("df -mh / | grep -v '^Filesystem'", self.Stage1Complete)
Example #3
0
    def updateInfo(self):
        self.DynamicTimer.start(12600, True)
        self.AboutText = _("MEMORY") + '\n'
        self.AboutText += _("Total:\t%s") % str(
            about.getRAMTotalString()) + " MB\n"
        self.AboutText += _("Free:\t%s ") % str(
            about.getRAMFreeString()) + " MB  (" + str(
                about.getRAMFreePorcString()) + ")\n"
        self.AboutText += _("Usage:\t%s") % str(
            about.getRAMUsedString()) + " MB  (" + str(
                about.getRAMusageString()) + ")\n"
        self.AboutText += _("Shared:\t%s") % str(
            about.getRAMSharingString()) + " MB" + "\n"
        self.AboutText += _("Stored:\t%s") % str(
            about.getRAMStoredString()) + " MB" + "\n"
        self.AboutText += _("Cached:\t%s") % str(
            about.getRAMCachedString()) + " MB" + "\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.AboutText += _(
                    "Buffers:") + "\t" + Buffers[1] + ' kB' "\n"
            if "Cached:" in tstLine:
                Cached = out_lines[lidx].split()
                self.AboutText += _("Cached:") + "\t" + Cached[1] + ' kB' "\n"
        self.AboutText += _("Swap total:\t%s") % str(
            about.getRAMSwapTotalString()) + " MB\n"
        self.AboutText += _("Swap free:\t%s") % str(
            about.getRAMSwapFreeString()) + " MB\n\n"

        self["actions"].setEnabled(False)
        self.Console = Console()
        self.Console.ePopen("df -mh / | grep -v '^Filesystem'",
                            self.Stage1Complete)
Example #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)
Example #5
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)
Example #6
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)