1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Need alarm type app

Discussion in 'Programming & Webmastering' started by Solaris17, Mar 28, 2012.

  1. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    I need a program that you can add programs too. in my case.

    httpd.exe
    mysqld.exe

    etc
    etc

    and when the program closes i need an alarm to go off until it starts back up or I tell it to stop. Iv searched and SEARCHED for a program like this but I havent found one yet. I cant believe it doesnt exist. this would be a really useful app.
     
    10 Year Member at TPU More than 25k PPD
  2. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    18,981 (6.37/day)
    Thanks Received:
    8,225
    Location:
    IA, USA
    Shouldn't those be ran as a service? You can make Windows endlessly restart services.
     
    Crunching for Team TPU
  3. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    they are. but the .exe still shows and depending on what im doing apache stalls when starting backup and i dont notice (aka it isnt running) but do to the fact it is a server id rather not reboot it like every 7 days etc. Its just easier for me to hear an alarm. it doesnt happen often and usually when im doing something to it. but like i said. sometimes apache filezilla etc is stubborn and i dont notice its off. Since the server has no head (VNC only) and I dont check it often id like to know asap if something goes down.
     
    10 Year Member at TPU More than 25k PPD
  4. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    18,981 (6.37/day)
    Thanks Received:
    8,225
    Location:
    IA, USA
    Why do you need an alarm and just set Windows to restart them? It could even "run a program" which could be your alarm.
     
    Crunching for Team TPU
  5. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    because when it stalls i need to manually reboot the PC in order for them to start again.

    im assume you dont know of one since your giving me the 4th degree? I mean its not like I tell you how to manage your PCs or ask you why you like fords.
     
    theoneandonlymrk says thanks.
    10 Year Member at TPU More than 25k PPD
  6. theoneandonlymrk

    theoneandonlymrk

    Joined:
    Mar 10, 2010
    Messages:
    3,836 (1.56/day)
    Thanks Received:
    784
    Location:
    Manchester uk
    :)
    to be fair to him that would work if the program you set it to run on fail was just an annoying noise(or tune on repeat
    ), ive not tried it (actually) but it does look do able

    im thinking metronome soft but havent found the thing yet
    http://download.cnet.com/Weird-Metronome/3000-2133_4-10073673.html maybe

    sod, i might use that for a jam at some point but no auto play tut sos
     
    Last edited: Mar 28, 2012
    Solaris17 says thanks.
    Crunching for Team TPU More than 25k PPD
  7. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    18,981 (6.37/day)
    Thanks Received:
    8,225
    Location:
    IA, USA
    There's a "restart the computer" option too...
    -Take no action.
    -Restart the service.
    -Run a program.
    -Restart the computer.

    If you want to get real techincal, "run a program" and have it run shutdown.exe with the /r flag to restart.


    There's no sense using 3rd party software when Windows has everything you need to handle it entirely autonomously. There's a reason why services exist and why the program you're searching for doesn't exist. XD


    Yes, I could write you one that does what you ask but only if you exhaust the Windows Service feature set first. :p
     
    Last edited: Mar 28, 2012
    Crunching for Team TPU
  8. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida

    please explain to me.

    1. Were you missed that they were already installed as a service.
    2. Were i specifically stated the pc needed to be rebooted.
    3. How it never occured to you that i wouldnt want a website to go down so i could get a second rate service like filezilla running again.

    having it automatically reboot whenever something going down is ALSO a terrible idea. like i ALSO stated. If i am doing something to it and take a program offline and go to do some reaserch i do not want to be greeted with a forced reboot envoked. that would really just upset me. i would rather wait to reboot/start a service at a time i see fit. I never asked you to make one. I was asking the forums if they knew of one. IDK if your trolling or just somehow think your that important. I know the pc can be rebooted im 10ft from the server at all times. im asking for this [program for a specific reason and if all you can contribute is how much I dont need it then i half half a mind to report you. now if you please.
     
    10 Year Member at TPU More than 25k PPD
  9. Aquinus

    Aquinus Resident Wat-man

    Joined:
    Jan 28, 2012
    Messages:
    9,733 (5.48/day)
    Thanks Received:
    4,811
    Location:
    Concord, NH
    Apache 2 and MySQL? Would you happen to be using PHP in that mix to make a LAMP stack (but without the L)? When you run into an issue like this, it is much better to resolve the issue, not handle the symptoms of an issue instead (bandaids don't typically work). If that is the case, if I were you, I would run a virtual machine in something like VirtualBox and install Ubuntu Server and run a LAMP stack on that instead to keep you web serving (or development,) away from your Windows box.

    If you use ubuntu this will get you started:
    Code:
    sudo aptitude update; #Update aptitude repo.
    sudo aptitude install apache2 php5 php5-mysql mysql-server; # install php5, mysql, and apache (I might install openssh-server as well.)
    sudo shutdown -r now; # Restart for good measure, shouldn't be necessary, but it doesn't hurt.
    Seriously, those 3 lines (or two if you don't want to restart, it isn't needed) will setup a LAMP stack and will be 100% functional. Where is an "easy button" when you need it. :)

    By default, Apache will point to /var/www as the web root. Also if you *really* want to check to see if Apache is running or not you could write a simple bash script with some grep action since
    Code:
    sudo /etc/init.d/apache2 status
    will give you the status of apache, and you can do something similar with mysql.

    It would look something like this:
    Code:
    jdoane@plum:~$ sudo /etc/init.d/apache2 status
    Apache2 is running (pid 741).
    ...or this.
    Code:
    jdoane@plum:~$ sudo /etc/init.d/apache2 status
    Apache2 is NOT running.
     
    Last edited: Mar 28, 2012
    Jizzler says thanks.
  10. W1zzard

    W1zzard Administrator Staff Member

    Joined:
    May 14, 2004
    Messages:
    16,548 (3.60/day)
    Thanks Received:
    15,676
    windows task scheduler
     
    brandonwh64 says thanks.
    10 Year Member at TPU
  11. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    18,981 (6.37/day)
    Thanks Received:
    8,225
    Location:
    IA, USA


    You insisted as per #2. I would recommend restarting the service to restarting the computer. Windows can do both.


    Those options only kick on in the event of failure. If the application terminates peacefully (exit code 0), it is not considered a failure so it does not take the action.


    Run: services.msc
    Find: The services controlling Apache and MySQL
    Open: The details for the services.
    Click on: Recovery tab.
    Set: The options how you want them on the top half of that page for what to do on failure.
    Dance: Dance!
     
    Last edited: Mar 28, 2012
    Crunching for Team TPU
  12. Aquinus

    Aquinus Resident Wat-man

    Joined:
    Jan 28, 2012
    Messages:
    9,733 (5.48/day)
    Thanks Received:
    4,811
    Location:
    Concord, NH
    The Windows Event Viewer should also have a record of a service failure if it is returning a non-zero exit status.
     
    FordGT90Concept says thanks.
  13. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Hey Sol. Sorry for being a little late to the party.

    Do you need this to run on a Windows or 'Nix server?
    Or do you want a Windows (workstation) app that monitors a Windows or 'Nix server on the network?
    Do you want audible alarm(s) or is a visual notification sufficient?
    If you pause or stop the alarm, do you want it to automatically restart itself after a set period in case you forget to restart the services?
    Do you need an (optional) log file for a historical record of alarm events?
    Any other requirements you can think of off the top of your head?

    I'll be happy to code something for you if you haven't found something that does exactly what you want. :toast:


    EDIT : I got bored of waiting to see if you needed something, and it sounded like a fun project, so it's about halfway done. :D
     
    Last edited: Mar 30, 2012
  14. dick123 New Member

    Joined:
    Apr 19, 2012
    Messages:
    3 (0.00/day)
    Thanks Received:
    0
    I think used windows task scheduler.
     
  15. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    I didnt use anything. TPU wasnt the resource for what i needed.
     
    Kreij says thanks.
    10 Year Member at TPU More than 25k PPD

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)