Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-03 Thread Sep Ng
Yeah. It would save quite a bit of time and effort if we could get a list of thread ids as this is the prime use of the code we inherited. I'm going to have a look at the XOTcl Request Monitor module on openacs and see if there's anything I can use from that. On Jun 4, 1:06 am, Jade Rubick wrote

Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-03 Thread Jade Rubick
This is code we inherited. Basically it wraps ns_schedule_proc with a job scheduled, that ensures everything has been run, and schedules items that didn't to run again. We could probably rewrite this code, but if there was an easy way to look up the thread id of all current threads, it would save

Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-02 Thread Sep Ng
Hello everyone, I would like to say first of all I appreciate all the thought and ideas you've brought to the table. What I hope to achieve is to be able produce a rudimentary load management. I will take a look at ns_pools and see if I can lift anything from it. Tom, you are right that AOLserv

Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-02 Thread Tom Jackson
This is an interesting topic, but I can't think of anything to be gained from a list of threads. Who cares that a thread exists? But if you are just concerned with threads, you can use ns_pools. All worker threads in AOLserver are in some named thread "pool". If you don't use threadpools, all req

Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-02 Thread Gustaf Neumann
It certainly depends on what your application needs. There is no principal problem obtaining the thread id (eg. ns_thread id, ::thread::id). One could either use the sketched approach and simply record whatever the application needs, or ffone can to extend the xotcl-request monitor to track this i

Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-02 Thread Sep Ng
Hi Gustav! Thanks for the info. I'm afraid xotcl-request-monitor may not be good enough if I do not have the thread ids, although I guess I could rewrite it to work with what xotcl-request-monitor provides. I did not know of one such monitoring page on OpenACS. I will take a look and see what I

Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-02 Thread Gustaf Neumann
Sep Ng schrieb: Is there a way in AOLserver to do live monitoring on threads? We're sort of hoping to get info on what thread ids are running as of the moment on aolserver. The xotcl-request-monitor watches running requests, essentially via defining filters/traces for requsts and using a m

Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-01 Thread Sep Ng
Hi Jim! Thanks for the reply, Jim. I sort of felt that way too about ns_info threads. Is there a way in AOLserver to do live monitoring on threads? We're sort of hoping to get info on what thread ids are running as of the moment on aolserver. On Jun 2, 12:03 am, Jim Davidson wrote: > Hi, > >

Re: [AOLSERVER] Is ns_info threads safe to use?

2009-06-01 Thread Jim Davidson
Hi, The code for "ns_info threads" looks about the same in 4.0 and 4.5 and it doesn't look super safe. It does have a lock around walking the list of threads but there are place where it copies data from strings which may be changing. And, like "ns_server active", it's really designed

[AOLSERVER] Is ns_info threads safe to use?

2009-05-31 Thread Sep Ng
I'm handling aolserver 4.0.10 and yeah, I know it's kind of old. If I'm not mistaken, ns_info threads was not totally thread safe in that version and it caused quite a few crashes here. I think I've managed to get that number of crashing down a bit with mutex and a bit of aolserver 4.5 code, but