ProcInfo
 

* ApMon - Application Monitoring Tool
* Version: 2.2.0

 
Modules
             
Logger




 
Classes
             
ProcInfo

 
class ProcInfo
       
  
__init__(this, logger)
ProcInfo constructor
addJobToMonitor(this, pid, workDir)
# Call this to add another PID to be monitored
countOpenFD(this, pid)
# count the number of open files for the given pid
countProcesses(this)
# read the number of processes currently running on the system
getChildren(this, parent)
# internal function that gets the full list of children (pids) for a process (pid)
getFilteredData(this, dataHash, paramsList)
# Return a hash containing (param,value) pairs with existing values from the requested ones
getJobData(this, pid, params)
# Return a filtered hash containing the job-related parameters and values
getSystemData(this, params)
# Return a filtered hash containting the system-related parameters and values
parsePSTime(this, my_time)
# internal function that parses a time formatted like "days-hours:min:sec" and returns the corresponding
# number of seconds.
readGenericInfo(this)
# reads the IP, hostname, cpu_MHz, uptime
readJobDiskUsage(this, pid)
# if there is an work directory defined, then compute the used space in that directory
# and the free disk space on the partition to which that directory belongs
# sizes are given in MB
readJobInfo(this, pid)
# read information about this the JOB_PID process
# memory sizes are given in KB
readLoadAvg(this)
# read system load average
readMemInfo(this)
# sizes are reported in MB (except _usage that is in percent).
readNetworkInfo(this)
# read network information like transfered kBps and nr. of errors on each interface
readNetStat(this)
# run nestat and collect sockets info (tcp, udp, unix) and connection states for tcp sockets from netstat
readStat(this)
# this has to be run twice (with the $lastUpdateTime updated) to get some useful results
# the information about pages_in/out and swap_in/out isn't available for 2.6 kernels (yet)
removeJobToMonitor(this, pid)
# Call this to stop monitoring a PID
update(this)
# This should be called from time to time to update the monitored data,
# but not more often than once a second because of the resolution of time()