> -----Original Message-----
> From: Harrie Hazewinkel [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 11:00 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PATCH] mgmt_get_vars hook
>
>
> HI all,
>
>
> I am trying to understand as well the new module code
> mod_mgmt.c and mod_mgmt.h as well the patch.
>
> I have two questions:
>
> 1) Is the approach you have based upon handling a request??
> At the moment a request is handled you execute this hook??
YES
>
> 2) Can I only get management data via the new hook??
> I.E. do I always have to run thru this hook and get everything??
>
YES
and no
you can run the hook
mgmt_get_vars("scoreboard.process.request_count")
which would return a int.
mgmt_get_vars("scoreboard.process.request_count.*")
which would return a hash table with a entry for every process/thread
or
mgmt_get_vars("*")
would perform like a SNMP walk.
>
> If these 2 questions are answered YES. It will create a problem
> for management applications which are not HTTP-request based
> and this solution will not work with SNMP.
>
what about this scenario..
I am running a SNMP agent on the machine
it has a 'GET' request for a OID.
IF it is part of the server it would run the hook, otherwise it could grab the data
via HTTP
and convert it to SNMP (ugly, but doable)
doing it via shared-mem outside of the server is a PITA,
as 1. the SNMP has to know the structure
2. i would need to modify the SNMP agent if I want to monitor
something non-standard, or if I have a custom module
holding a global structure is also a pain
1. pointers in shared mem don't work, so I couldn't store pointers
to functions to execute to get the info
2. storing this is process-memory would be too much of a resource drain
as the structure would consume a bit of memory for each process
3. summary data couldn't be held, and would have to be generated by the
SNMP agent itself
>
> Harrie
> --
> address: Covalent Technologies, 645 Howard St, San Francisco,
> CA - 94105
> phone: +1-415-536-5221
> fax:+1-415-536-5210
> personal website: http://www.lisanza.net/
>