content = {}
	if Core.getSection(fileOpen, section, content):
		for line in content:
			if content[line].startswith('vm.pagecache_limit_mb'):
				VALUE = int(content[line].split()[-1])
				if( VALUE > 0 ):
					return True
				else:
					return False
	return False

##############################################################################
# Main Program Execution
##############################################################################
SERVER = SUSE.getHostInfo()
AFFECTED_VERSION = '3.0.101-0.35'
if( SERVER['DistroVersion'] == 11 and SERVER['DistroPatchLevel'] == 3 ):
	if( Core.compareVersions(SERVER['KernelVersion'], AFFECTED_VERSION) == 0 ):
		if( pageCacheSet() ):
			Core.updateStatus(Core.CRIT, "The vm.pagecache_limit_mb is non-zero and may cause memory corruption, update system to apply fixed kernel")
		else:
			Core.updateStatus(Core.IGNORE, "The vm.pagecache_limit_mb is zero, memory corruption AVOID")
	else:
		Core.updateStatus(Core.ERROR, "Outside the kernel version scope, not applicable")
else:
	Core.updateStatus(Core.ERROR, "Outside the distribution and patch level scope, not applicable")

Core.printPatternResults()


# Local Function Definitions
##############################################################################

def delayedBootMessages():
	FILE_OPEN = "boot.txt"
	SECTION = "/dmesg"
	CONTENT = []
	ERROR_STRING = re.compile("pci.*vpd.*failed.*firmware bug", re.IGNORECASE)
	if Core.getRegExSection(FILE_OPEN, SECTION, CONTENT):
		for LINE in CONTENT:
			if ERROR_STRING.search(LINE):
				return True
	return False

##############################################################################
# Main Program Execution
##############################################################################

SERVER = SUSE.getHostInfo()
thisVersion = '3.0.101-71'
thatVersion = SERVER['KernelVersion']
if( Core.compareVersions(thisVersion, thatVersion) == 0 ):
	Core.updateStatus(Core.WARN, "Kernel is susceptible to delayed boots, update system to resolve")
	if( delayedBootMessages() ):
		Core.updateStatus(Core.CRIT, "Boot delays due to kernel issue, update system to resolve")
else:
	Core.updateStatus(Core.IGNORE, "The kernel version " + str(SERVER['KernelVersion']) + " is sufficient")

Core.printPatternResults()

		SERVICE = SUSE.getServiceDInfo(SERVICE_NAME)
		if( len(SERVICE) > 0 and SERVICE['ActiveState'].lower() == 'active' ):
			INFO['Active'] = True
	return INFO

##############################################################################
# Main Program Execution
##############################################################################

SERVER = SUSE.getHostInfo()
if 'ppc64le' in SERVER['Architecture'].lower():
	if( SERVER['DistroVersion'] == 12 and SERVER['DistroPatchLevel'] < 1 ):
		PACKAGE = 'kdump'
		AFFECTED_PACKAGE_VER = '0.8.15-10.1'
		KDUMP = getKdumpInfo()
		if( KDUMP['Active'] ):
			if( Core.compareVersions(SUSE.getRpmInfo(PACKAGE)['version'], AFFECTED_PACKAGE_VER) <= 0 ):
				Core.updateStatus(Core.CRIT, "Triggering kdump will fail to create a crashdump, consider makedumpfile")
			else:
				Core.updateStatus(Core.IGNORE, "Active Kdump crash issue resolved, not applicable")
		else:
			Core.updateStatus(Core.ERROR, "Kdump disabled, not applicable")
	else:
		Core.updateStatus(Core.ERROR, "Outside distribution and patchlevel scope, not applicable")
else:
	Core.updateStatus(Core.ERROR, "Outside architecture scope, not applicable")

Core.printPatternResults()