| Server IP : 103.4.122.14 / Your IP : 216.73.216.103 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux cwp2.slnet.com.au 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : statewid ( 1251) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/systemtap/tapset/linux/ |
Upload File : |
/*
* kernel pstrace tapset
* Copyright (C) 2012 Red Hat Corporation.
*
* This file is part of systemtap, and is free software. You can
* redistribute it and/or modify it under the terms of the GNU General
* Public License (GPL); either version 2, or (at your option) any
* later version.
*/
/**
* sfunction pstrace - Chain of processes and pids back to init(1)
* @task: Pointer to task struct of process
*
* This function returns a string listing execname and pid for each
* process starting from @task back to the process ancestor
* that init(1) spawned.
*/
function pstrace:string(task:long)
{
while (task_pid(task) > 1) {
trace = sprintf("%s %s(%d)", trace, task_execname(task), task_pid(task));
task = task_parent(task);
}
return trace;
}