ESP Workload Automation

Expand all | Collapse all

Have ESP start process after reboot of Unix Server

  • 1.  Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 10:40 AM

    After a Unix server has been rebooted, we need to execute a script to validate a certain unix process has been started and if not started the script will start the process. We would like to do something generic so that we don't have to create a job for every server and we don't want to create a script for every server, does anyone know of a good way for ESP to kick off a job when a server has been rebooted?

     

    Thanks,

    Sharon



  • 2.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 10:43 AM

    Isn’t that what the Sfile is for in /etc/init.d/rc… ??

     

     

     

    Steve C.

     

     

    Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

     

    Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or privileged material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this message in error, please contact the sender and delete it from your computer.



  • 3.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 10:46 AM

    Hi Steve,

     

    Yes that is true and we use that but for some reason this process does not always get added and we don't know about it until we run into an issue so we are looking into other ways to start the process if it's not already started.


    Thank you.

    Sharon



  • 4.  Re: Have ESP start process after reboot of Unix Server



  • 5.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 10:58 AM

    Thanks, we have been looking into those but seems we would need a job on each server and not sure we want to go down that path.



  • 6.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 11:02 AM

    That will always be the nature of reboots. It’s how the systems are designed. You are MUCH better off using the init.d for reboot specific processing.

    It’s THE safest route

     

     

    Steve C.

     

     

    Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

     

    Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or privileged material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this message in error, please contact the sender and delete it from your computer.



  • 7.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 10:55 AM

    If it doesn’t always run .. check the following

     

    It’s number. Generally any process you want to run should be the last thing to run. S99myprocess

    And you have to put a link under all the possible reboot scenarios.

     

    Rc2,3,4,5,6

     

    Which one did you use? And then check how the reboot occurred.

     

     

    It’s important not all reboots are equal

     

     

    Steve C.

     

     

    Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

     

    Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or privileged material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this message in error, please contact the sender and delete it from your computer.



  • 8.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 10:59 AM

    The problem is this process doesn't get added at all and we don't have access to add it, we have to depend on another team and it does get missed from time to time. That's why we were looking for other alternatives. Thank you.



  • 9.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 11:05 AM

    The only alternative is to have a process connect and run last | egrep reboot

    Then check the date against todays. And hope for the best. BUT like I said the SAFEST method is rc files

     

     

     

    Steve C.

     

     

    Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

     

    Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or privileged material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this message in error, please contact the sender and delete it from your computer.



  • 10.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 11, 2017 11:43 AM

    Create an ESP PROC with the following Workload Objects:

    • IP_MON - Monitor until server is down
    • IP_MON - Monitor until server and specific port is up
    • UNIX_JOB - Check for script and do conditional release
    • UNIX_JOB - Check that script is executable and do conditional release
    • UNIX_JOB - Execute script (since it exists and is executable)

     

    The solution suggested above does not require you to do anything on the UNIX server.

     

    Would something like this work?

     

    You could make it a TEMPLATE and invoke it and pass variables to it.

     

    Let me know if this is something you are interested in I will upload an example PROC.



  • 11.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 12, 2017 11:37 AM

    Looks like this would require a setup on each Unix server, I'm not sure what the 1st 2 Unix jobs are for, can you explain that part a bit more? Thank you.



  • 12.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 12, 2017 12:50 PM

    If you would like to discuss offline send me an email with you contact information and your availability and I will call you.



  • 13.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 13, 2017 10:43 AM

    Thank you for the explanation, you've been very helpful.



  • 14.  Re: Have ESP start process after reboot of Unix Server

    Broadcom Employee
    Posted Jan 25, 2017 08:37 AM

    Hi Sharon,

     

    Have you got the answer you need? If yes, will you mark this as "Answered"?

     

    Thank you,

     

    Lucy



  • 15.  Re: Have ESP start process after reboot of Unix Server

    Posted Jan 12, 2017 12:06 PM

    Since you had stated that another group would be putting the script on the target server, there is no guarantee that:

    • Script exists on the server
    • The script is set to be executable

    I use UNIX_JOB instead of a FILE_TRIGGER workload object since the UNIX_JOB supports the conditional release.

    •  UNIX_JOB
      • Check that the script exists on the target server
      • Conditional release allows the PROC to determine which job to run next.  If the script exists the next job would check that the script is executable.
    • UNIX_JOB
      • Check that the script is executable  on the target server
      • Conditional release allows the PROC to determine which job to run next.  If the script is executable the next job would run the script.

     

    Those 2 jobs are optional but would eliminate errors:

    • The first job would eliminate the CC=4001 Script/file not found
    • The second job would eliminate the CC=4024 Script not executable

     

     

    Is that a better explanation?