Service Virtualization

 View Only

Python code for Checking DevTest Server Components and Take Neccessary Action

  • 1.  Python code for Checking DevTest Server Components and Take Neccessary Action

    Posted Oct 23, 2020 09:37 PM
    Hi Team,

    We are running Scheduled Test runs from gitlab pipeline using Python code.
    For some reasons Coordinator or some other components of DevTest Server are down and our jobs are failing due to that.

    Server Installed OS: Linux
    DevTest Server Version: 10.3.0 and 10.6.0

    So we should have check before initiating any job based on following conditions:

    1. If All Server Components are up and running and Memory usage is Less than 50%, No Need to do anything Initiate a Scheduled job.
    2. If All or any one of the Server Components are Down and Memory usage is Less than 50%, Then Stop and Start the components in sequence. Then Initiate a Scheduled job.
    3. If All Server Components are up and but Memory usage is Greater Than 50%, Take back up of Registry.log,Coordinator.log,Simulatr.log and Portal.log from logs folder, and Delete the log files Then Stop and Start the components in sequence. Then Initiate a Scheduled job.
    4. If All or any one of the Server Components are Down and Memory usage is Greater Than 50%, Take back up of Registry.log,Coordinator.log,Simulatr.log and Portal.log from logs folder, and Delete the log files Then Stop and Start the components in sequence. Then Initiate a Scheduled job.

    Please let me know if anyone handled this requirement before and also let me know if we have any better approaches for handling this.

    Thanks & Regards,
    Saikiran Garapati,