Profiler

Profiling class for updated information on process status

class DIRAC.Core.Utilities.Profiler.Profiler(pid=None)

Bases: object

Class for profiling both general stats about a machine and individual processes. Every instance of this class is associated to a single process by using its PID. Calls to the different methods of the class will return the current state of the process.

__init__(pid=None)
Parameters:pid (str) – PID of the process to be profiled
cpuUsage()

Returns the percentage of cpu used by the process

getAllProcessData()

Returns data available about a process

memoryUsage()

Returns the memory usage of the process in MB

numThreads()

Returns the number of threads the process is using

pid()

Returns the process PID

runningTime()

Returns the uptime of the process

status()

Returns the process status