UTRACE_ATTACH_TASK(9) utrace core API UTRACE_ATTACH_TASK(9)NAME
utrace_attach_task - attach new engine, or look up an attached engine
struct utrace_engine * utrace_attach_task(struct task_struct * target, int flags, const struct utrace_engine_ops * ops, void * data);
thread to attach to
flag bits combined with OR, see below
callback table for new engine
engine private data pointer
The caller must ensure that the target thread does not get freed, i.e. hold a ref or be its parent. It is always safe to call this on
current, or on the child pointer in a report_clone callback. For most other cases, it's easier to use utrace_attach_pid instead.
Create a new engine. If UTRACE_ATTACH_CREATE is not specified, you only look up an existing engine already attached to the thread.
Attempting to attach a second (matching) engine fails with -EEXIST.
Only consider engines matching ops.
Only consider engines matching data.
Calls with neither UTRACE_ATTACH_MATCH_OPS nor UTRACE_ATTACH_MATCH_DATA match the first among any engines attached to target. That means
that UTRACE_ATTACH_EXCLUSIVE in such a call fails with -EEXIST if there are any engines on target at all.
Kernel Hackers Manual 2.6. July 2010 UTRACE_ATTACH_TASK(9)
Check Out this Related Man Page
UTRACE_SET_EVENTS(9) utrace core API UTRACE_SET_EVENTS(9)NAME
utrace_set_events - choose which event reports a tracing engine gets
int utrace_set_events(struct task_struct * target, struct utrace_engine * engine, unsigned long events);
thread to affect
attached engine to affect
new event mask
This changes the set of events for which engine wants callbacks made.
This fails with -EALREADY and does nothing if you try to clear UTRACE_EVENT(DEATH) when the report_death callback may already have begun,
if you try to clear UTRACE_EVENT(REAP) when the report_reap callback may already have begun, or if you try to newly set UTRACE_EVENT(DEATH)
or UTRACE_EVENT(QUIESCE) when target is already dead or dying.
This can fail with -ESRCH when target has already been detached, including forcible detach on reaping.
If target was stopped before the call, then after a successful call, no event callbacks not requested in events will be made; if
UTRACE_EVENT(QUIESCE) is included in events, then a report_quiesce callback will be made when target resumes.
If target was not stopped and events excludes some bits that were set before, this can return -EINPROGRESS to indicate that target may have
been making some callback to engine. When this returns zero, you can be sure that no event callbacks you've disabled in events can be made.
If events only sets new bits that were not set before on engine, then -EINPROGRESS will never be returned.
To synchronize after an -EINPROGRESS return, see utrace_barrier.
When target is current, -EINPROGRESS is not returned. But note that a newly-created engine will not receive any callbacks related to an
event notification already in progress. This call enables events callbacks to be made as soon as engine becomes eligible for any callbacks,
These rules provide for coherent synchronization based on UTRACE_STOP, even when SIGKILL is breaking its normal simple rules.
Kernel Hackers Manual 2.6. July 2010 UTRACE_SET_EVENTS(9)
Working on AIX 4.3. An internal error from my apps engine suddenly causes the engine to die. During this time i do notice a core file being dumped in the directory from where I try to re-start my engine.
Q is how does one read this core file, or I should say 'what is this core file'?
thnx (2 Replies)
We need to make a regexp based rule engine.
The rules would be applied to any file specified and the data not matching should be logged.
Would awk be the right scripting language.
Dikesh Shah. (2 Replies)