[RFC PATCH v2] taskstats: introduce version 9 with exe file info

2018-03-27 Thread Dr. Thomas Orgis
This adds fields to the taskstats struct that give device and inode info for the executable file associated with the process as a safer way to get that than polling /proc/$pid/exe before a process ends. The getdelay example program is accompanied by a variant that just prints a stream of exiting t

[RFC] [PATCH] taskstats: introduce verison 9 with executable file info: empty device ID

2018-03-03 Thread Dr. Thomas Orgis
case TASKSTATS_TYPE_NULL: + break; + } + na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); + } + } while (loop); +done: + if (maskset) { + rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, + &cpumask, strlen(cpumask) + 1); + printf("Sent deregister mask, retval %d\n", rc); + if (rc < 0) + err(rc, "error sending deregister cpumask\n"); + } +err: + close(nl_sd); + if (fd) + close(fd); + if (cfd) + close(cfd); + return 0; +} -- 2.15.1 -- Dr. Thomas Orgis HPC @ Universität Hamburg