[asterisk-bugs] [Asterisk 0013349]: [patch] 'core show sysinfo' on systems that dont have sysinfo but do have sysctl

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 20 17:59:50 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13349 
====================================================================== 
Reported By:                mvanbaak
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13349
Category:                   Core/Portability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 139204 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-20 17:25 CDT
Last Modified:              2008-08-20 17:59 CDT
====================================================================== 
Summary:                    [patch] 'core show sysinfo' on systems that dont
have sysinfo but do have sysctl
Description: 
'core show sysinfo' and the SYSINFO function use the sysinfo call.
This call is only present on linux systems.

Since I'm using OpenBSD and want at least the memory stats I created a
version of 'core show sysinfo' that uses sysctl and swap.h to grab the
numbers.

====================================================================== 

---------------------------------------------------------------------- 
 (0091617) mvanbaak (manager) - 2008-08-20 17:59
 http://bugs.digium.com/view.php?id=13349#c91617 
---------------------------------------------------------------------- 
new patch that adds sysctl check to configure.ac thanks to seanbright.

TODO:
- in main/asterisk.c replace the #if defined(HAVE_SYSINFO).... #else with
#if defined(HAVE_SYSINFO)... #elif defined(HAVE_SYSCTL)....
- we now have two functions with the same name, depending on the #if #else
stuff.
  It would be better to seperate the printing and data-gathering and only
call the correct data-gathering function based on the defined(HAVE_X)
stuff. That way we are not replicating code while there's no use for that.

Thanks go to seanbright for the feedback etc. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-20 17:59 mvanbaak       Note Added: 0091617                          
======================================================================




More information about the asterisk-bugs mailing list