Hi Azeez,

Created a crucible project : https://wso2.org/crucible/cru/COMPONENT-70
And added you as a reviewer.

Thanks,
Dileepa

On Mon, Feb 6, 2012 at 3:03 PM, Afkham Azeez <az...@wso2.com> wrote:

> Please create a Crucible project to review this component & add me as a
> reviewer. I will go through the code & provide feedback. Hope that all the
> recommendations from the previous review have been incorporated.
>
>
> On Mon, Feb 6, 2012 at 12:40 AM, Dileepa Jayakody <dile...@wso2.com>wrote:
>
>> Hi All,
>>
>> The bootup validator's purpose is to validate certain recommended
>> configurations/settings at server bootup and give warnings if they are not
>> satisfied. This includes JVM configurations (init/max heap, permGen size),
>> system configurations such as CPU, RAM, Swap, supported operating systems
>> etc.  The component can be extended by adding new validators and specifying
>> them in the config-validation.xml in repository/conf. A sample
>> config-validation.xml can be found at svn location [1].
>>
>> The component is committed to Trunk under Revision: 120131 and can be
>> found at [2]. It is not yet integrated with the carbon build as the
>> component is not yet finalised.
>> Suggestions to improve the code/component are most welcome.
>>
>> Thanks,
>> Dileepa
>>
>> [1]
>> https://svn.wso2.org/repos/wso2/trunk/carbon/core/distribution/carbon-home/repository/conf/config-validation.xml
>> [2]
>> https://svn.wso2.org/repos/wso2/trunk/carbon/core/org.wso2.carbon.core.bootup.validator/
>>
>>
>> On Sat, Feb 4, 2012 at 3:12 AM, Afkham Azeez <az...@wso2.com> wrote:
>>
>>> No need to complicate stuff.  We have recommend memory settings for
>>> production. If somebody is running with lower values we just warn them
>>> about it.  That is it.
>>>
>>> --
>>> Afkham Azeez
>>> Sent from my phone
>>> On Feb 4, 2012 2:01 AM, "Senaka Fernando" <sen...@wso2.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm just running through the discussion. Does it make sense to actually
>>>> validate memory? I mean, memory settings are defined in
>>>> wso2server.sh/bat anyway. And, it "should have" the recommended
>>>> minimum values. If someone is setting it lower than expected, they are
>>>> deliberately doing that, so is it necessary to validate memory settings?
>>>>
>>>> Or if your counter argument is to validate whether the OS has enough
>>>> memory (as allocated), to run the application, the JVM actually does that
>>>> and if there is insufficient memory, it will get back to you. So, can
>>>> someone please clarify the necessity?
>>>>
>>>> Thanks,
>>>> Senaka.
>>>>
>>>> On Tue, Jan 24, 2012 at 1:17 PM, Dileepa Jayakody <dile...@wso2.com>wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Jan 24, 2012 at 12:49 PM, Sameera Jayasoma 
>>>>> <same...@wso2.com>wrote:
>>>>>
>>>>>> Hi Dileepa,
>>>>>>
>>>>>> I got one question. Is there a way to disable this validator? If a
>>>>>> use wants to execute this once in his system and for all the other
>>>>>> restarts, he wants to disable this validation step. I guess we need to
>>>>>> support this as well.
>>>>>>
>>>>>> We can do something like below.
>>>>>>
>>>>>> <configuration enabled="false" >
>>>>>>
>>>>>> +1 will add this feature.
>>>>>
>>>>>
>>>>>> Great work btw,
>>>>>>
>>>>>> Thanks,
>>>>>> Sameera.
>>>>>>
>>>>>>
>>>>>> On Mon, Jan 23, 2012 at 7:19 AM, Afkham Azeez <az...@wso2.com> wrote:
>>>>>>
>>>>>>> Most of our deployments are on Linux. It is ok to go with OS
>>>>>>> specific commands. Please schedule a review.
>>>>>>>
>>>>>>> --
>>>>>>> Afkham Azeez
>>>>>>> Sent from my phone
>>>>>>> On Jan 23, 2012 12:37 PM, "Dileepa Jayakody" <dile...@wso2.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Dear all,
>>>>>>>>
>>>>>>>> The bootup validator component now can be configured with custom
>>>>>>>> Configuration Validators and Data Collectors as shown in the below 
>>>>>>>> sample
>>>>>>>> [1]. A Data collector basically retrieves system information using some
>>>>>>>> mechanism (OS independent library etc.) and the collected data can be 
>>>>>>>> used
>>>>>>>> for the validation process by Configuration Validators.
>>>>>>>>
>>>>>>>> In HWDataCollector, system hardware related data such as CPU
>>>>>>>> frequency, physical memory are collected; For this I have used a 3rd 
>>>>>>>> party
>>>>>>>> library named JavaSysMon [2]. The initial attempt was to use SIGAR 
>>>>>>>> API, but
>>>>>>>> it was unsuccessful as I had issues with loading native libraries of 
>>>>>>>> it.
>>>>>>>> JavaSysMon seems to be a very good alternative for this requirement.
>>>>>>>>
>>>>>>>> Last few days I was looking at ways of retrieving the number of
>>>>>>>> open file handles as per a requirement of the bootup validator 
>>>>>>>> component
>>>>>>>> [3]. But AFAIU listing open files is OS dependent and cannot be 
>>>>>>>> achieved
>>>>>>>> through regular Java APIs.
>>>>>>>> For example in Linux the command to list open files for a
>>>>>>>> particular process is: lsof -p <PID>
>>>>>>>> Does anybody have an idea of retrieving the number of open file
>>>>>>>> handles in Java? The only mechanism I can think of, at the moment is 
>>>>>>>> to use
>>>>>>>> Runtime.getRuntime().exec("the cmd to list open files"); But this
>>>>>>>> doesn't look like the smoothest solution for this, does anybody have a
>>>>>>>> better idea?
>>>>>>>> Appreciate your views on this.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Dileepa
>>>>>>>>
>>>>>>>> [1]Sample  config_recommendations.xml to configure bootup validator:
>>>>>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>>>>>> <!--configuration bit values should be given in Mega bytes (1KB =
>>>>>>>> 1024 bytes, 1MB = 1024 KB, 1GB = 1024 MB), CPU value in MHz-->
>>>>>>>> <Configuration>
>>>>>>>>     <Validator
>>>>>>>> class="org.wso2.carbon.core.bootup.validator.HWValidator">
>>>>>>>>         <Parameter name="cpu">800</Parameter>
>>>>>>>>         <Parameter name="ram">1024</Parameter>
>>>>>>>>     </Validator>
>>>>>>>>     <Validator
>>>>>>>> class="org.wso2.carbon.core.bootup.validator.JVMValidator">
>>>>>>>>         <Parameter name="heapMemory">512</Parameter>
>>>>>>>>         <Parameter name="nonHeapMemory">512</Parameter>
>>>>>>>>         <Parameter name="totalMemory">1024</Parameter>
>>>>>>>>         <Parameter name="freeMemory">512</Parameter>
>>>>>>>>     </Validator>
>>>>>>>>
>>>>>>>>     <!--Configuration Data Collectors to collect system-data for
>>>>>>>> configuration validators to validate-->
>>>>>>>>     <Collector
>>>>>>>> class="org.wso2.carbon.core.bootup.data.collector.HWDataCollector"/>
>>>>>>>>     <Collector
>>>>>>>> class="org.wso2.carbon.core.bootup.data.collector.JVMDataCollector"/>
>>>>>>>>
>>>>>>>> </Configuration>
>>>>>>>>
>>>>>>>> [2] https://github.com/jezhumble/javasysmon
>>>>>>>> [3] https://wso2.org/jira/browse/CARBONROADMAP-15
>>>>>>>>
>>>>>>>> On Wed, Jan 18, 2012 at 11:05 AM, Dileepa Jayakody <
>>>>>>>> dile...@wso2.com> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> As per the offline discussion had with Pradeep and Azeez few days
>>>>>>>>> back, I have implemented the bootup-validator component's framework 
>>>>>>>>> to be
>>>>>>>>> extensible.
>>>>>>>>>
>>>>>>>>> The component can be extended with new bootup validation tests by
>>>>>>>>> adding new ConfigurationValidator classes with relevant parameters to
>>>>>>>>> validate; in the config_recommendations.xml (the newly introduced xml 
>>>>>>>>> in
>>>>>>>>> repository/conf)
>>>>>>>>>
>>>>>>>>> A sample config_recommendations.xml:
>>>>>>>>>
>>>>>>>>> <Configuration>
>>>>>>>>>     <Validator
>>>>>>>>> class="org.wso2.carbon.core.bootup.validator.HWValidator">
>>>>>>>>>         <Parameter name="cpu">800</Parameter>
>>>>>>>>>         <Parameter name="ram">1000</Parameter>
>>>>>>>>>     </Validator>
>>>>>>>>>     <Validator
>>>>>>>>> class="org.wso2.carbon.core.bootup.validator.JVMValidator">
>>>>>>>>>         <Parameter name="heapMemory">6000</Parameter>
>>>>>>>>>         <Parameter name="nonHeapMemory">4000</Parameter>
>>>>>>>>>         <Parameter name="totalMemory">10000</Parameter>
>>>>>>>>>         <Parameter name="freeMemory">2000</Parameter>
>>>>>>>>>     </Validator>
>>>>>>>>> </Configuration>
>>>>>>>>>
>>>>>>>>> The system data collection can also be extended in the same
>>>>>>>>> manner.
>>>>>>>>> At the moment I'm having trouble with Sigar API to retrieve HW
>>>>>>>>> configuration data (CPU, RAM), will update the thread with progress.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Dileepa
>>>>>>>>>
>>>>>>>>> On Fri, Jan 13, 2012 at 1:01 PM, Pradeep Fernando <
>>>>>>>>> prad...@wso2.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> are we going to allow users to implement their own bootup tests,
>>>>>>>>>> using somekind of extension mechanism. (we are providing all the 
>>>>>>>>>> gathered
>>>>>>>>>> info, they decide on what to do with those). Is it a overkill ?
>>>>>>>>>>
>>>>>>>>>> are we doing any native calls within the carbon-env (Now). ?
>>>>>>>>>>
>>>>>>>>>> thanks,
>>>>>>>>>> --Pradeep
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Carbon-dev mailing list
>>>>>>>>>> Carbon-dev@wso2.org
>>>>>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Dileepa Jayakody,
>>>>>>>>> Software Engineer, WSO2 Inc.
>>>>>>>>> Lean . Enterprise . Middleware
>>>>>>>>>
>>>>>>>>> Mobile : +94777-857616
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Dileepa Jayakody,
>>>>>>>> Software Engineer, WSO2 Inc.
>>>>>>>> Lean . Enterprise . Middleware
>>>>>>>>
>>>>>>>> Mobile : +94777-857616
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Carbon-dev mailing list
>>>>>>>> Carbon-dev@wso2.org
>>>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>>>
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Carbon-dev mailing list
>>>>>>> Carbon-dev@wso2.org
>>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sameera Jayasoma
>>>>>> Technical Lead and Product Manager, WSO2 Carbon
>>>>>>
>>>>>> WSO2, Inc. (http://wso2.com)
>>>>>> email: same...@wso2.com
>>>>>> blog: http://tech.jayasoma.org
>>>>>>
>>>>>>
>>>>>> Lean . Enterprise . Middleware
>>>>>>
>>>>>> _______________________________________________
>>>>>> Carbon-dev mailing list
>>>>>> Carbon-dev@wso2.org
>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dileepa Jayakody,
>>>>> Software Engineer, WSO2 Inc.
>>>>> Lean . Enterprise . Middleware
>>>>>
>>>>> Mobile : +94777-857616
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Carbon-dev mailing list
>>>>> Carbon-dev@wso2.org
>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Senaka Fernando*
>>>> Product Manager - WSO2 Governance Registry;
>>>> Associate Technical Lead; WSO2 Inc.; http://wso2.com*
>>>> Member; Apache Software Foundation; http://apache.org
>>>>
>>>> E-mail: senaka AT wso2.com
>>>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>>>> Linked-In: http://linkedin.com/in/senakafernando
>>>>
>>>> *Lean . Enterprise . Middleware
>>>>
>>>>
>>>> _______________________________________________
>>>> Carbon-dev mailing list
>>>> Carbon-dev@wso2.org
>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>
>>>>
>>> _______________________________________________
>>> Carbon-dev mailing list
>>> Carbon-dev@wso2.org
>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>
>>>
>>
>>
>> --
>> Dileepa Jayakody,
>> Software Engineer, WSO2 Inc.
>> Lean . Enterprise . Middleware
>>
>> Mobile : +94777-857616
>>
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * <http://www.apache.org/>**
> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
> *
> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>
> *
> *
> *Lean . Enterprise . Middleware*
>
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
Dileepa Jayakody,
Software Engineer, WSO2 Inc.
Lean . Enterprise . Middleware

Mobile : +94777-857616
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to