[Devel] [ openser-Bugs-1435350 ] fifo statistics module

SourceForge.net noreply at sourceforge.net
Tue Feb 21 11:30:10 CET 2006


Bugs item #1435350, was opened at 2006-02-20 19:44
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1435350&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Norman Brandinger (goestelecom)
>Assigned to: Bogdan (bogdan_iancu)
Summary: fifo statistics module

Initial Comment:
I found that the fifo get_statistics commands do not
appear to work as advertised.  For example:

:get_statistics all:REPLY_FILE_NAME
Response: 500 command 'get_statistics all' not available

and

:get_statistics core:REPLY_FILE_NAME
Response: 500 command 'get_statistics core' not available

I also tried

:get_statistics:REPLY_FILE_NAME
core

Which also didn't produce any output.

Note that "get_statistics" did produce a complete
listing before the changes below were applied.

After making two minor changes in the statistics.c
program, I was able to produce the following output:

:get_statistics:REPLY_FILE_NAME
core

Response: 200 OK
Response: Module name = core; statistics=8
Response: core:rcv_requests = 95
Response: core:rcv_replies = 0
Response: core:fwd_requests = 0
Response: core:fwd_replies = 0
Response: core:drop_requests = 0
Response: core:drop_replies = 0
Response: core:err_requests = 0
Response: core:err_replies = 0

I made two changes in routine fifo_get_stats(), I
changed the followging section as shown below:

if ( buf[n-1]==':' ) {
  /* whole argument is just statistic's name */
  is_mod = 0;
} else {
  /* arg is a module name */
  buf[n]=0;
  is_mod = 1;
}


I'm not positive of the original intent of this code
section so it is possible this change will cause some
undesirable behavior.  I did test using just
"get_statistics" with nothing else and as expected, a
complete listing was produced.

Regards,
Norm

----------------------------------------------------------------------

>Comment By: Bogdan (bogdan_iancu)
Date: 2006-02-21 12:30

Message:
Logged In: YES 
user_id=1275325

Norm,

please see my email about the statistics fifo usage:
http://www.openser.org/pipermail/users/2006-January/002793.html
(see section "How to use")

so, there is only one command , named "get_statistics"; it
expects a mandatory parameter which can be:
1) "all" (keyword) -> returns all statistics
2) "module:" -> a module name followed by ':' ; returns all
statistics from the given module
3) "var" -> returns the statistic variable definied by "var"

if you directly use the fifo file, the syntax is:

1)
:get_statistics:REPLY_FILE_NAME
all

2)
:get_statistics:REPLY_FILE_NAME
core:

3)
:get_statistics:REPLY_FILE_NAME
rcv_reqs

regards,
bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1435350&group_id=139143



More information about the Devel mailing list