|
|
@ -4426,29 +4426,33 @@ static int iax2_show_threads(int fd, int argc, char *argv[])
|
|
|
|
ast_cli(fd, "IAX2 Thread Information\n");
|
|
|
|
ast_cli(fd, "IAX2 Thread Information\n");
|
|
|
|
time(&t);
|
|
|
|
time(&t);
|
|
|
|
ast_cli(fd, "Idle Threads:\n");
|
|
|
|
ast_cli(fd, "Idle Threads:\n");
|
|
|
|
|
|
|
|
#ifdef DEBUG_SCHED_MULTITHREAD
|
|
|
|
ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, {
|
|
|
|
ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, {
|
|
|
|
ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d, func ='%s'\n",
|
|
|
|
ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d, func ='%s'\n",
|
|
|
|
iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount,
|
|
|
|
iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount, iterator->curfunc);
|
|
|
|
#ifdef DEBUG_SCHED_MULTITHREAD
|
|
|
|
threadcount++;
|
|
|
|
iterator->curfunc
|
|
|
|
});
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
""
|
|
|
|
ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, {
|
|
|
|
#endif
|
|
|
|
ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d\n",
|
|
|
|
);
|
|
|
|
iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount);
|
|
|
|
threadcount++;
|
|
|
|
threadcount++;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
#endif
|
|
|
|
ast_cli(fd, "Active Threads:\n");
|
|
|
|
ast_cli(fd, "Active Threads:\n");
|
|
|
|
ASTOBJ_CONTAINER_TRAVERSE(&activelist, 1, {
|
|
|
|
|
|
|
|
ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d, func ='%s'\n",
|
|
|
|
|
|
|
|
iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount,
|
|
|
|
|
|
|
|
#ifdef DEBUG_SCHED_MULTITHREAD
|
|
|
|
#ifdef DEBUG_SCHED_MULTITHREAD
|
|
|
|
iterator->curfunc
|
|
|
|
ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, {
|
|
|
|
|
|
|
|
ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d, func ='%s'\n",
|
|
|
|
|
|
|
|
iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount, iterator->curfunc);
|
|
|
|
|
|
|
|
threadcount++;
|
|
|
|
|
|
|
|
});
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
""
|
|
|
|
ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, {
|
|
|
|
#endif
|
|
|
|
ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d\n",
|
|
|
|
);
|
|
|
|
iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount);
|
|
|
|
threadcount++;
|
|
|
|
threadcount++;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
#endif
|
|
|
|
ast_cli(fd, "%d of %d threads accounted for\n", threadcount, iaxthreadcount);
|
|
|
|
ast_cli(fd, "%d of %d threads accounted for\n", threadcount, iaxthreadcount);
|
|
|
|
return RESULT_SUCCESS;
|
|
|
|
return RESULT_SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|