Signed-off-by: JiÅÃ Åupka <jzupka@xxxxxxxxxx> --- client/common_lib/utils.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py index 2cbc740..8d6c1f7 100644 --- a/client/common_lib/utils.py +++ b/client/common_lib/utils.py @@ -1105,6 +1105,14 @@ def get_pid_from_file(program_name): return pid +def get_process_name(pid): + """ + Get process name from PID. + @param pid: PID of process. + """ + return get_field(read_file("/proc/%d/stat" % pid), 1)[1:-1] + + def program_is_alive(program_name): """ Checks if the process is alive and not in Zombie state. -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html