|
|
@ -578,12 +578,18 @@ def removeDir(rmDir):
|
|
|
|
|
|
|
|
|
|
|
|
def getRunCommands():
|
|
|
|
def getRunCommands():
|
|
|
|
"""List run program"""
|
|
|
|
"""List run program"""
|
|
|
|
|
|
|
|
def getCmd(procNum):
|
|
|
|
|
|
|
|
cmdLineFile = '/proc/%s/cmdline'%procNum
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
if os.path.exists(cmdLineFile):
|
|
|
|
|
|
|
|
return open(cmdLineFile,'r').read().strip()
|
|
|
|
|
|
|
|
except:
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
return ""
|
|
|
|
if not os.access('/proc',os.R_OK):
|
|
|
|
if not os.access('/proc',os.R_OK):
|
|
|
|
return []
|
|
|
|
return []
|
|
|
|
return map(lambda x:open('/proc/%s/cmdline'%x).read().strip() \
|
|
|
|
return map(getCmd,filter(lambda x:x.isdigit(),
|
|
|
|
if os.path.exists('/proc/%s/cmdline') else "",
|
|
|
|
os.listdir('/proc')))
|
|
|
|
filter(lambda x:x.isdigit(),
|
|
|
|
|
|
|
|
os.listdir('/proc')))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def isFstabMount(pathname):
|
|
|
|
def isFstabMount(pathname):
|
|
|
|
"""Get mount point or device from fstab"""
|
|
|
|
"""Get mount point or device from fstab"""
|
|
|
|