Service Virtualization

  • 1.  How can we restart devtest components automatically

    Posted Oct 30, 2018 11:37 AM

    we connect devtest in our local machine to a registry via an IP which is installed in that server. Lets say devtest components (Registry, VSE, Dashboard etc )are down or stopped due to some reasons. I want to have a setup which can start the components whenever it identifies that these are down/stopped.

     

    There can be a job which can keep running and check for status in specified time interval. that can also help here.

    There can be a another way through which we can re-start the components.

     

    If anyone have any idea, please suggest. Thanks.

    ----

    Kailash



  • 2.  Re: How can we restart devtest components automatically

    Broadcom Employee
    Posted Oct 30, 2018 04:43 PM

    I would be more inclined for a solution that notifies someone when a server component goes down so that the root-cause can be determined and removed, instead of automatically trying to restart something. Very likely it will go down again if the root cause is not removed.

    I find that if your installation is properly configured the server components like Registry, VSE, … are quite stable and don’t often need restarting.

    I would however recommend that they are proactively restarted example during a weekend when not in use. (see task scheduler discussion below)

     

    Are the devtest components so unstable in your environment? If so, any suspicion why?

     

    Anyways, back to your actual question.

     

    What is your server operating system, Unix/Linux? Or Windows?

     

    You will need a task scheduler, the obvious candidate for Unix/linux is cron. Windows also comes with its own in-build Task Scheduler (you can find it under System Administration). With this you can run a script every x minutes.

     

    You will need to code a script.

     

    For Unix/Linux your script can work by calling the /bin directory, e.g. CoordinatorService, VirtualServiceEnvironmentService, … You can call these with parameter status – e.g. “CoordinatorService status” - and it will report “Running” or “Stopped”. You can call these with “start” and the service will be started again.

     

    For Windows, it will be different (executing “CoordinatorService.exe status” gives back nothing). I would go for a PowerShell script, and use the Get-Service command in there. Check this link to find already a powershell script that seems to do what you want https://social.technet.microsoft.com/Forums/lync/en-US/79bf9de7-1c17-45c0-a02b-7558af89807a/powershell-script-to-check-service-status?forum=ITCG

     

     

    Cheers,

    Danny



  • 3.  Re: How can we restart devtest components automatically

    Broadcom Employee
    Posted Oct 30, 2018 05:24 PM

    Danny,

     

    Thank you, I had a webex this morning with Kailash.  He has both Windows and Linux.  I came up with scripts for both Windows and Linux, that i am going to share with him.  He will have to work with his admin to get the jobs scheduled.  Agreed instead of just starting again the root cause for the component going down should be investigated.

     

    ~Marcy

    Attachment(s)

    zip
    CheckWindowsServices.zip   2 KB 1 version
    zip
    CheckLINUXServices.zip   1 KB 1 version


  • 4.  Re: How can we restart devtest components automatically
    Best Answer

    Broadcom Employee
    Posted Oct 30, 2018 04:53 PM

    All DevTest server components are Java services. Something like a Java Service Wrapper could be used to monitor and (re)launch any of the server processes. I presume your company would have a corporate standard for this kind of thing (ask the Operations team). If they don't, you could investigate one of the freely-available ones.



  • 5.  Re: How can we restart devtest components automatically

    Broadcom Employee
    Posted Nov 02, 2018 01:31 PM
      |   view attached

    Kailash,

     

    Attached is a script to check all Windows DevTest services and if not started, start them.  You can use Task Scheduler to schedule for when you want this to run. 

     

    ~Marcy

    Attachment(s)



  • 6.  Re: How can we restart devtest components automatically

    Broadcom Employee
    Posted Nov 06, 2018 05:42 PM

    Kailash,

     

    Attached is a script to check all Linux DevTest services and if not started, start them.  You will have to work with your Linux Admin to get this scheduled. 

     

    ~Marcy



  • 7.  Re: How can we restart devtest components automatically

    Posted Nov 07, 2018 12:59 PM

    Hi Marcy Nunns,

     

    I have requirement like need to restart VSE automatically based on CPU utilization.

     

    I am using Devtest 10.1 and we have 5 VSE's , which are configured in different machines with. can you please guide me how to restart specific VSE server which is more than 85% CPU  Utilization?

     

    Thanks,

    Venu



  • 8.  Re: How can we restart devtest components automatically

    Broadcom Employee
    Posted Nov 07, 2018 02:32 PM

    Venu,

     

    Unfortunately no.  You would have to work with your system admin to determine the CPU usage of the particular VSE and then you can use the scripts I provided on this post to get the code for the restart, but you will have to provide the check for CPU usage.

     

    ~Marcy