You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Mladen Turk <mt...@apache.org> on 2006/10/16 14:02:50 UTC
Adding sysinfo to the APR
Hi,
I wish to add the things we have inside tomcat-native
to the APR (with more generic API) for obtaining
various OS infos in a portable way.
Right now, inside tomcat-native we have a set of
functions that can obtain:
inf[0] - Total usable main memory size
inf[1] - Available memory size
inf[2] - Total page file/swap space size
inf[3] - Page file/swap space still available
inf[4] - Amount of shared memory
inf[5] - Memory used by buffers
inf[6] - Memory Load
inf[7] - Idle Time in microseconds
inf[8] - Kernel Time in microseconds
inf[9] - User Time in microseconds
inf[10] - Process creation time (apr_time_t)
inf[11] - Process Kernel Time in microseconds
inf[12] - Process User Time in microseconds
inf[13] - Current working set size.
inf[14] - Peak working set size.
inf[15] - Number of page faults.
All that is available for a multiple platforms (linux, solaris, macosx, windows).
IMHO, something like that can be very usable with a proper API to the
much wider audience.
Comments?
Regards,
Mladen.
Re: Adding sysinfo to the APR
Posted by Graham Leggett <mi...@sharp.fm>.
Mladen Turk wrote:
> I wish to add the things we have inside tomcat-native
> to the APR (with more generic API) for obtaining
> various OS infos in a portable way.
> All that is available for a multiple platforms (linux, solaris, macosx,
> windows).
> IMHO, something like that can be very usable with a proper API to the
> much wider audience.
+1.
Regards,
Graham
--
Re: Windows Registry and other similar repositories
Posted by Mladen Turk <mt...@apache.org>.
William A. Rowe, Jr. wrote:
> David Horowitz wrote:
>> Would there be some way in APR to access the Windows Registry, and whatever
>> the analogs would be on other platforms?
>
> The code already exists, but I didn't think it really fits into apr since
> it's an 'anti-portability' feature :)
The Win32 registry can be easily exported to the plain
text file and used from multiple platforms like any other configuration
file. So, having a registry/file API would be usable on all platforms
if someone needs that.
--
Mladen.
RE: Windows Registry and other similar repositories
Posted by David Horowitz <da...@mcgrawsoftware.com>.
Thanks William for the link, and Mladen for the thought for the community.
David
> -----Original Message-----
> From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> Sent: Monday, October 16, 2006 12:52 PM
> To: David Horowitz
> Cc: 'APR Developer List'
> Subject: Re: Windows Registry and other similar repositories
>
> David Horowitz wrote:
> >
> > Would there be some way in APR to access the Windows Registry, and
> whatever
> > the analogs would be on other platforms?
>
> The code already exists, but I didn't think it really fits into apr since
> it's an 'anti-portability' feature :) See...
>
> http://svn.apache.org/repos/asf/httpd/httpd/trunk/os/win32/ap_regkey.c
Re: Windows Registry and other similar repositories
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
David Horowitz wrote:
>
> Would there be some way in APR to access the Windows Registry, and whatever
> the analogs would be on other platforms?
The code already exists, but I didn't think it really fits into apr since
it's an 'anti-portability' feature :) See...
http://svn.apache.org/repos/asf/httpd/httpd/trunk/os/win32/ap_regkey.c
Windows Registry and other similar repositories
Posted by David Horowitz <da...@mcgrawsoftware.com>.
Folks,
Would there be some way in APR to access the Windows Registry, and whatever
the analogs would be on other platforms?
Thanks.
David