Find the answer to your Linux question:
Results 1 to 5 of 5
Hi ! Could anybody help me to find decision in my training task. Situation: you have a poorly written web service, which stops responding from time to time. Moreover, we ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3

    Restarter script


    Hi !

    Could anybody help me to find decision in my training task.

    Situation: you have a poorly written web service, which stops responding
    from time to time. Moreover, we know, that if server has >N tcp sessions
    open, the service becomes unresponsive.

    Please write a restarter script, which
    1) restarts web service, if page is unretrievable in M seconds
    2) restarts web service, if service has >N incoming tcp sessions open

    I use Debian.

    Alex

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    ad 1: Not sure how to determine "hang". Maybe the server spawns child threads for each request, which then could be checked for uptime.

    ad 2: You can list open connections with the netstat command.
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3

    Fragment of script

    Thank you.

    But, may be some fragment of script.

    Alex

  4. #4
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    lol, forget it, pal.
    It's your training task...
    Debian GNU/Linux -- You know you want it.

  5. #5
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3

    Hint

    May be any hint ? I need the script by Monday

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •