There's no API to access command line args. BPF_FUNC_get_current_comm will give you the task name. If it's not enough, you can try to get it via task_struct. Look for get_task_cmdline fs/proc/base.c in the Kernel source code as a starting point to get the cmdline from a task_struct.
On Wed, Jan 1, 2020 at 7:56 AM <[email protected]> wrote: > > Hi all, > > bcc monitoring tools which print a process being traced print only the > command (and pid, ppid) without the full args. In many cases the monitored > command is a script, so the command is just printed as (for example) "python" > which isn't very useful. I couldn't find a bpf API to get the command line > args. > > Ganesan > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1797): https://lists.iovisor.org/g/iovisor-dev/message/1797 Mute This Topic: https://lists.iovisor.org/mt/69365771/21656 Group Owner: [email protected] Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
