Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Projects

Page tree
Skip to end of metadata
Go to start of metadata

Primary mentor

Pascal Brandt

Backup mentor

Jan Flowers
GSoC studentVineet Kumar

Abstract

Extend the OpenMRS module "System Performance and Utilization Module" to supply additional information on system performance and utilization in order to monitor reliability and impact of the electronic medical record system installation.  This module monitors OpenMRS and transfers specific system indicators, possibly using the Performance and Utilization Monitoring Program framework developed for an OpenMRS network implementation in Kenya.  The expansion of indicators could include system indicators (CPU load, etc) and application level indicators (# of opened charts, etc), as well as, the further development of the visualization of these indicators (drill-down to view details within those statistics - which users logged in, which charts were opened, etc).

Theory

 

The major focus of the module currently is to show indicators of following type:-

  • System Level Indicators - Memory Usage
  • Application Level Indicators - Number of Login User

 

Basic Theory behind the Indicator Working, Which is require for future development and extension

1. Selecting Indicator purpose : - this could be a System or Application Level Indicator. our Aim is to consider what kind of System Usage and Application Usage we have to show.

2. Update And Syncing data from Database:- The data which have to shown on indicators is update and retrieved from database.

  • Created HibernateDAO object of MetricTypeObject then called that in PerformanceMonitoringServiceImpl service to add/remove/modify MetricType values. 
  • Instead of mapping hbm.xml here used JPA annoatations.
  • Created MetricType object and annotate it with Table and column annotations as below. As we define table name, primary key, column names here there is no need to refer a .hbm.xml file Also the class needed to implement Serializable in order to define Id, which is primary key. 
  • When the module is loaded the new table is created now and you can add data there using DAO objects.

3. Updating Data Base:- Querying the used memory for this is done using the Java Management beans where it expose both use memory and free memory values with MemoryMXBean. The following link is explaining about the structure of the beans API.

  1. http://docs.oracle.com/javase/7/docs/api/java/lang/management/ManagementFactory.html
  2.  https://docs.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/OperatingSystemMXBean.html

Objectives

  1. Add System Monitoring Indicators: System monitoring is mainly focused on gathering and presenting information on low level system indicators like CPU load, memory utilization etc.

     2.  Add Application Monitoring Indicators: The application monitoring is introduced to monitor what usage patterns are occurring number of opened charts during a set time period, number of modified charts during a set time period, number of active logins etc.

     3.  Advanced Visualization of Statistics: Ability to drill-down into the graphs for stratified views, such as, which roles/users were logged in, what kind of charts were opened, etc.

     4.  Export of Data:  CSV file export, as well as, exchange of data into a larger framework for dashboard view across sites

Extra credit

  1. Provide user interface to configure new indicators to collect

Suggested communication plan

During the project implementation period the student and mentors ( Pascal/Jan) will hold a weekly one hour meeting to discuss the progress of the project and decide on the tasks to be finished for each week.

 

GSoC 2015

 

Mockups

Mockup 1

Mocup 2

Mockup 3

Mockup 4

In short this module requires 
1. Add System Monitoring Indicators: System monitoring is mainly focused on gathering and presenting information on low level system indicators like CPU load, memory utilization etc.

System Monitoring can include:

- CPU usage
- Memory Usage
- Disk Usage
- System Information

Following resource will be helpful for getting CPU load information:

  1. http://docs.oracle.com/javase/7/docs/api/java/lang/management/ManagementFactory.html
  2. https://docs.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/OperatingSystemMXBean.html

 

2. Add Application Monitoring Indicators: The application monitoring is introduced to monitor what usage patterns are occurring number of opened charts during a set time period, number of modified charts during a set time period, number of active logins etc.

Application Monitoring can include:-

- Login Number
- Encounter Count
- Visit Count
- Observation Count
- Patient Count
- Report Run
- Cohort Count
- Concept Count
- Form Filled

3. Advanced Visualization of Statistics: Ability to drill-down into the graphs for stratified views, such as, which roles/users were logged in, what kind of charts were opened, etc. This can be done using Google Charts API, highcharts library. While we already have the data of CUP Load, Memory Utilization, Members Login, Application data etc. we can frame those data easily on a web page.

 

4. Export of Data: CSV file export, as well as, exchange of data into a larger framework for dashboard view across sites. Not only CSV we can also export it to excel sheets.

 

According to My collected data the timeline should look like this:-

Timeline (May 25 – August 24):

0. Studying the complete Module and get use to it. (by May 30)
1. Add System Monitoring Indicators (by June 25) :-

- CPU Usage - CPU Usage, CPU Time, Maximum Hourly CPU Usage, Average CPU Usage
- Disk Usage
- Memory Usage

2. Add Application Monitoring Indicators (by July 15)

- Fields Count
- Improvement In Login User Indicators

3. Advanced Visualization of Statistics. (by July 30)

- Adding tabular Data Section
- All Fields Statistics

4. Export of Data (by Aug 3)
5. Testing phase and refine phase (by Aug 10)
6. Documentation and Demo (by Aug 18)

Resources

Latest Documentation

System Performance and Utilization Module

Previous Work on Idea

 

 

  • No labels

12 Comments

  1. Hi Pascal, Jan,

     

    I am interested in this project, and I would like to discuss the requirements in more depth. 

     

    Regards, 

    Zakaria Amine

  2. Hi Zakaria,  

    Thank you for your interest in the project.  For now, the best thing to do is to review the resources from last year's GSOC student to understand where the project is currently.  We'd like to expand on that project with the ideas listed under the objectives.  It's up to you to propose how you might address those objectives and how you might approach them.  For example, last year the GSOC student proposed creating the tool to chart users logging in...etc.   Secondly, you'll want to become familiar with OpenMRS by picking a ticket from the active issues and addressing one of those.

    Looking forward to your proposal,

    Jan

  3. Hi, I would like to discuss more about this project. 

    • I downloaded the module from the module repository and installed it and tested it. 
    • I played with the module, got the charts for user logins, Created Encounters Count and Memory usage. 
    • i went though the last year final presentation vedio. 
    • Also went through the last year project page System Performance and Utilization Module

    I cloned the project and tried to build it , but it gives me errors.

    "Failed to execute goal on project systemmetrics-api: Could not resolve dependencies for project org.openmrs.module:systemmetrics-api:jar:1.1-SNAPSHOT: The following artifacts could not be resolved: org.openmrs.api:openmrs-api:jar:1.11.0-SNAPSHOT, org.openmrs.web:openmrs-web:jar:1.11.0-SNAPSHOT, org.openmrs.api:openmrs-api:jar:tests:1.11.0-SNAPSHOT, org.openmrs.web:openmrs-web:jar:tests:1.11.0-SNAPSHOT, org.openmrs.test:openmrs-test:pom:1.11.0-SNAPSHOT: Failure to find org.openmrs.api:openmrs-api:jar:1.11.0-SNAPSHOT in http://mavenrepo.openmrs.org/nexus/content/repositories/public was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-repo has elapsed or updates are forced -> [Help 1]
    [ERROR]"

     

    Do i need to add any additional things to the directory, before building the project? 

    Thank you!

     

    1. Hi,

      OpenMRS 1.11.0 has been released since the module was last touched (see nexus repo), so you can probably remove the -SNAPSHOT from those dependencies in the POM.

      Cheers,
      Pascal 

      1. Thanks Pascal,

        I changed all <version>1.1-SNAPSHOT</version> to <version>1.11.0</version> and now project starts to build. But several test cases are failed. specially,

        • testRemoveLoginValue(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext

         

        • testAddPerMinMetricValue(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext

         

        • testGetAllMetricTypes(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext

         

        • testRemoveMetricType(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext

         

        • testRemoveMetricVale(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext

         

        • testAddLoginValue(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext

         

        • testRemoveSavedEncounter(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext

         

        • testAddMetricType(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext

         

        • testAddFormsPerHourEntry(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext
        • testAddSavedEncounter(org.openmrs.module.systemmetrics.api.PerformanceMonitoringServiceTest): Failed to load ApplicationContext


        I have copied to full errror logs into http://pastebin.com/0VaXVUDw.

        Do you have any idea, why this happens?

         

  4. Hi JanPascal .

    I went through the existing module and able to identify few improvements that we can implement in this summer. 

    After implementing CPU usages, i suggest to dispaly both memory usage and CPU usage in a single page, rather than displaying them on seperate pages. I think that is more convenient. We can provide the end user to filter indicaters to show on the page. Either to display CPU usage, Memory usage or both. Since we are using Google chart API, we can use google.visualization.CategoryFilter for this. 

    In the login chart, currently we are showing decimal values too in the y-axis. I think there is no point of showing decimal values because the  number of users logged into the system is always a integer. So we can modify that chart to only show integers. 

  5. By refering PUMP Build Instructions and Kenya Workplanning- PUMP Demo.pdf I think we can understand more application level indicators that we can support in this module. As an example,

    • number of Reports generated in a given period of time, per day
    • number of visits entered.

    Apart from that why we are interested in # of opened charts? What kind of important information can be monitored by that?

  6. Hi JanPascal,

    I have created an initial version of the project proposal. Can you please have to look and give some feedbacks (smile)

    Thanks!

     

  7. Hi,

    The proposal is looking for now. We can discuss the specifications in detail if you are accepted. To increase your chances of being accepted, the best thing you can do for now is increase your involvement in the community (participate in Talk, IRC and weekly calls) and work on some introductory tickets as explained here: Getting Started as a Developer (Archived Version).

    Regards,
    Pascal 

    1. Hi Pascal,

      I've been gone through the page Getting Started as a Developer. I've created three pull requests 

      https://github.com/openmrs/openmrs-core/pull/1379
      https://github.com/openmrs/openmrs-core/pull/1381
      https://github.com/openmrs/openmrs-core/pull/1382 and awaiting for any feedback.

      But I will increase my involvement in the community as you suggested.

      Thanks (smile)

  8. Pascal Brandt: HI I have already fixed 8 bugs on JIRA. So I understand well how the openmrs code base works. I would like to work on this project. How can I contact you for further discussions? After that I would submit the proposal to milange. (smile)

  9. That's great Akshika.  It is best to contact us through here for now with any of your questions.