Roderik_Wildenburg@domain.hid wrote: >>> when a xenomai-task crashs which created some queues >>> (rt_queue_create) >>> and I try to restart the task the creation of the queues >>> will fail as >>> the queue still exists (error EEXIST == 17). Is there a >>> possibility to >>> see which queues exist (I did not find a hint in the /proc/xenomai >>> directory) and to get rid of these queues (or geneally >>> spoken : to get >>> rid of allocated resources) e.g. with a commandline tool ? > >> Native or posix skin? Gilles added per-process resource >> cleanup to the posix skin in 2.2-rc3. >> > > following Murphys law, I, of course, use native skin where this mechanism isn?t > implemented yet ;-) > What does "per-process resource cleanup" mean ? > When the process/thread is killed the queues and other resources of this > process/thread are deleted automaticaly ? Exactly. > >> Otherwise: the names should be found in >> /proc/xenomai/registry. Writing a tiny tool to pick up a name >> and resources type, attach to it, and then release it should >> be straightforward. But I think we will have per-process >> cleanup also for other skins in the future. >> > > The trick with this is the attachement with the resource. > I can?t see a way to attach to a queue whos handle (RT_QUEUE) > is lost (it can?t be reconstructed out of the data from the > registry). Are there some other "tricks" ? If there is a name registered, rt_queue_bind() should do the trick - but that's pure theory, I may oversee some detail ATM. > > >> Stalled RTDM descriptors can be released via "echo DESCR_NO > >> /proc/xenomai/rtdm/open_fildes" (I still have to make use of Gilles' >> per-process cleanup also for the posix rtdm part...). >> >>> An other question, I would appreciate some help for, is : >>> How could I determine the CPU-load when a xenomai thread is >> running? >>> Is the data provided by /proc/stat valid with xenomai ? >> Nope, they aren't. We actually need to do something in this >> direction, maybe a simple per-xeno-thread execution time >> accounting if XENO_OPT_STATS is set. >> > > A summary of Xenomai used time in /proc/stat would be fine too: > CPU : "User time" "nice time" "system time" "xenomai time" "idle time". > But this probably is not compatible. > I've just hacked a patch for per-thread stats. Seems to work. I will post it in a few minutes on xenomai-core together with some explanations and suggestions. Stay tuned! Jan