def xfsMounts(): FSLIST = SUSE.getFileSystems() for FS in FSLIST: if "xfs" in FS['Type']: if( FS['Mounted'] ): return True return False
def BootDetails(): FSLIST = SUSE.getFileSystems() for FS in FSLIST: if ("/boot" == FS['MountPoint']): C_TOTAL = DeHumanize(FS['Size']) C_USED = DeHumanize(FS['UsedSpace']) C_FREE = DeHumanize(FS['AvailSpace']) return {'total': C_TOTAL, 'used': C_USED, 'free': C_FREE} return {}
def separateBootPartition(): FSLIST = SUSE.getFileSystems() for FILESYSTEM in FSLIST: if( FILESYSTEM['MountPoint'] == "/boot" ): return True return False
OVERALL = Core.TEMP OVERALL_INFO = "NOT SET" OTHER_LINKS = "META_LINK_TID=https://www.suse.com/support/kb/doc.php?id=7021345|META_LINK_BUG=https://bugzilla.suse.com/show_bug.cgi?id=1048232" Core.init(META_CLASS, META_CATEGORY, META_COMPONENT, PATTERN_ID, PRIMARY_LINK, OVERALL, OVERALL_INFO, OTHER_LINKS) ############################################################################## # Main Program Execution ############################################################################## KERNEL_VERSION = '3.0.101-107' INSTALLED_VERSION = SUSE.compareKernel(KERNEL_VERSION) if( INSTALLED_VERSION <= 0 ): NFSFOUND = False NFSMOUNTED = False FSLIST = SUSE.getFileSystems() for FS in FSLIST: if( "nfs" in FS['Type'].lower() ): NFSFOUND = True #print "Found NFS Device: " + str(FS['ActiveDevice']) if( FS['Mounted'] ): #print " MOUNTED" NFSMOUNTED = True if( NFSMOUNTED ): Core.updateStatus(Core.WARN, "Mounted NFS Filesystems may experience long file list delays") elif( NFSFOUND ): Core.updateStatus(Core.WARN, "NFS Filesystems may experience long file list delays") else: Core.updateStatus(Core.ERROR, "No NFS filesystems found") else: Core.updateStatus(Core.IGNORE, "Bug fixes applied for kernel versions newer than " + KERNEL_VERSION)