Batch file to start and stop services

I've setup a CF Probe on my Development Server to ensure my
CF Production server is up and running (services = Apache and CF
Application Server). It checks the PROD login page and if it times
out in 30 sec the probe fails. I understand I can execute a file
(batch file with net start and net stop) but the problem is I need
to have the probe somehow point to the .bat file on the PROD server
and not on the local machine. How can I remotely access this batch
file and execute it? I don't know how to point to the file on the
other server... can anyone help?

Hi Ken,
You had pointed me in the right direction regarding the
psstools in order to create a batch file that can remotely start
and stop services.
i used the psexec command and am able to successfully restart
the services needed remotely... however when i pick the file in the
coldfusion administrator (in the probes section) how to i point to
the batch file to run? it seems like the probe is not running the
script like i want... the file is located on the c:\ so i entered
c:\test2.bat...
Thanks,
Matt
Matt,
You should review the online help in the cfadmin for probes
and the links it points you to in the developer's guide. Basically
you need to define a new probe in the cfadmin by clicking the
"Define New Probe" button. One of the probe's attributes will be
what action. Define the action as a program and point it at a batch
file running psexec. You will probably need to run CFMX as a
specific user and not as localsystem, which is the default.

Similar Messages

  • Batch file to start and stop

    Hi All,
    Can we create a batch file to start and stop the services. I need to start all the services like shared, essbase, eas, planning, webanlysis and financial reporting, and at also need to stop them using windows batch file.(Using windows 2003 server....service pack 1). Any help would be appreciated.
    Thanks

    Hi,
    The simplest script would be something like this. Save it as a .bat file, set all your services to manual and then set up a scheduled task to run this script when the computer starts.
    Gee
    ::          Startup Script for Hyperion Services          ::
    date/t >> startup.log
    time/t >> startup.log
    echo "Starting Hyperion Services" >> startup.log
    net start "Hyperion S9 OpenLDAP" >> startup.log
    net start "Hyperion S9 Shared Services" >> startup.log
    :: Insert pause of 5 seconds to ensure HSS has finished starting
    ping localhost -n 6 >nul
    net start "Hyperion S9 BI+ Analytic Services 9.3.1 - Essbase" >> startup.log
    net start "Hyperion S9 Administration Services ATS5" >> startup.log
    net start "HyperionRMIRegistry" >> startup.log
    net start "Hyperion S9 Planning" >> startup.log
    net start "Hyperion S9 Provider Services ATS5" >> startup.log
    net start "Hyperion S9 Apache 2.0" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Core Services 1" >> startup.log
    :: Insert pause of 10 seconds to ensure Core has finished starting
    ping localhost -n 11 >nul
    net start "Hyperion S9 BI+ 9.3 Workspace" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Java RMI Registry" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Print Server" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Report Server" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Scheduler Server" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Web application" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Web Analysis" >> startup.log
    date/t >> startup.log
    time/t >> startup.log
    echo "Finished Starting Hyperion Services" >> startup.log
    echo "###################################################################" >> startup.log

  • Does Golden Gate provide any Webservices to start and stop services?

    Hi all,
    We are trying to use GG in our application. But we need a way to start and stop services from java code.
    Is there any Webservice interface or API to start and stop Golden gate services like GG manager, extract and replicat processes??
    Thanks in advance for your help.
    Yamini.

    You can control this at a database level using EVENTACTIONS parameter.
    Create a table at source & target called "EVENT" with field EVENT_TYPE ( example names only - please call it what you like ) .
    at Replicat config actions based on the data passed into the EVENT_TYPE column
    MAP GG_ADM.EVENT TARGET GG_ADM.EVENT, &
    FILTER ( (@STREQ(@IF(@COLTEST(EVENT_TYPE,PRESENT),EVENT_TYPE,"No EVENT"),"STOP") = 1)), &
    EVENTACTIONS (IGNORE , LOG,STOP);
    You'll need a seperate replicat to handle the start
    MAP GG_ADM.EVENT TARGET GG_ADM.EVENT, &
    FILTER ( (@STREQ(@IF(@COLTEST(EVENT_TYPE,PRESENT),EVENT_TYPE,"No EVENT"),"START_APP_02") = 1)), &
    EVENTACTIONS ((SHELL (${GG_HOME}/diroby/start.ksh R1APP_02 )));
    Hope that helps

  • Starting and stopping services of SAP and database

    pls tell what are the Starting and stopping services of SAP and database

    Hi Ranga,
    The services dealing with SAP and database(Ex: Oracle in this case) are:
    SAP<SID>_<Instance No.>  (For ex: SAPECC_01)
    SAPOsCol
    Oracle<SID><No>Listener
    OracleCSSservice
    OracleService<SID>
    Reward points if it is helpful##
    Thanks & Regards,
    Santhosh P
    Please change the status to answered if you got the solution...
    Message was edited by:
            Santhosh Kumar P

  • About the bat file to start and stop the weblogic server10.3

    I am using windows 2003 os.
    i installed the WLS 10.3 .
    can anyone help me how to write the bat file for starting and stoping the weblogic server instance.so that it willl run as background service.
    I am new to this .Please suggest me
    Any help is appreciated.
    Thanks
    Sailaja.

    Hi David,
    yes.i am talking about Admin server.
    when i am creating the new domain,i didn't encounter any prompt asking me to run the Admin server as windows services.why i am not getting this prompt?where exactly i will get this prompt while creating domain.
    i am using the weblogic 10.3
    how can i make the admin server as windows services.
    Thanks
    Sailaja.
    Edited by: sj0609 on Dec 2, 2008 4:02 PM

  • Starting and Stopping Services Based on Network

    Hi everyone,
    This is something I've been playing with and I'd like to share it with you and get your thoughts.
    The services I want to run at any given point depend on what network I'm attached to. For example, if I'm at home, I'll want avahi-daemon and cupsd started but I won't need iptables, since I'm behind my router's firewall. On the other hand if I'm at an internet cafe I need iptables but not the other two.
    What I've done is set up a script in /etc/NetworkManager/dispatch.d which starts services based on the UUID of each connection (extracted from that connection's file in /etc/NetworkManager/system-connections.
    I'm currently using the following script:
    #!/bin/bash
    IF=$1
    STATUS=$2
    function start_service {
    for i in "$@"
    do
    if [ `/usr/bin/systemctl show "$i".service | grep -c "ActiveState=inactive"`=1 ]
    then
    /usr/bin/systemctl start "$i".service
    fi
    done
    function stop_service {
    for i in "$@"
    do
    if [ `/usr/bin/systemctl show "$i".service | grep -c "ActiveState=active"`=1 ]
    then
    /usr/bin/systemctl stop "$i".service
    fi
    done
    if [ "$IF" = "wlan0" ] && [ "$STATUS" = "up" ]; then
    UUID=`nmcli --nocheck -t --fields UUID con status`
    case $UUID in
    f5320fcd-43e2-4cc1-ba1a-9606f66b5332)
    start_service avahi-daemon cupsd
    logger "M5DKQ (home network) up"
    5bfff3c5-c349-436b-953b-90de15c854d7)
    start_service iptables
    logger "EVO (4G hotspot) up"
    40d74743-f809-41ce-821c-71f9f40b8513)
    logger "GuestAccess (office guest network) up"
    start_service iptables
    logger "Starting cafe-specific services"
    esac
    fi
    if [ "$IF" = "wlan0" ] && [ "$STATUS" = "down" ]; then
    stop_service avahi-daemon cupsd iptables
    logger "Stopped location-specific services"
    logger "wlan0 down"
    fi
    Is there a better way to do this, like maybe a systemd custom target? Is there a cleaner way to script this?
    Thanks in advance,

    Hi Ranga,
    The services dealing with SAP and database(Ex: Oracle in this case) are:
    SAP<SID>_<Instance No.>  (For ex: SAPECC_01)
    SAPOsCol
    Oracle<SID><No>Listener
    OracleCSSservice
    OracleService<SID>
    Reward points if it is helpful##
    Thanks & Regards,
    Santhosh P
    Please change the status to answered if you got the solution...
    Message was edited by:
            Santhosh Kumar P

  • EHPI not able to start and stop services shadowsystem

    All,
    I am working on an installation of EHP4 but am running in the following issue:
    When I get to the phase SHDINST_OS the EHPI is not able to stop and start the service for the shadowsystem. The ehpi log gives:
    Phase SHDINST_OS:
    SAPehpi> Starting subprocess sapstartsrv.exe with id 7348 at 20100512081320
    Environment: JAVA_HOME=C:\Program Files\Java\jdk1.5.0_19
    Environment: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    Environment: Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;F:\usr\sap\HRS\SYS\exe\uc\NTAMD64;F:\usr\sap\HRS\SYS\exe\nuc\NTAMD64
    Environment: auth_shadow_upgrade=0
    Environment: dbs_mss_schema=hrs
    Service not started.
    Process with ID 8132 terminated with status -1
    The EHPI gives:
    An error occurred during the installation of the
    SAP service SAPHRS_03:
    Possibly the password for user .\SAPServiceHRS entered in phase
    INITPUT was wrong. You can reset it by calling 'SAPehpi set stdpar'.
    Try to execute SAPSTARTSRV.EXE manually using the following syntax:
    G:\EHPI\abap\exe\sapstartsrv.exe -r
    -p G:\EHPI\abap\HRS\SYS\profile\START_DVEBMGS03_NLDBHRS01 -s HRS -n 03
    -U .\SAPServiceHRS -P <PASSWORD> -e NLDBHRS01\hrsadm
    and check if the service SAPHRS_03 can be stopped and restarted.
    When I follow up on the sapstartsrv first I can start/create it but that when I restart the EHPI it fails again on the same issue.
    Anybody any ideas?
    the passwords given in the EHPI are the ones of the SAPService user in the windows environment
    Chris

    Hi
    Have you tried below option as suggested in logs ?
    > Possibly the password for user .\SAPServiceHRS entered in phase
    > INITPUT was wrong. You can reset it by calling 'SAPehpi set stdpar'.
    > Try to execute SAPSTARTSRV.EXE manually using the following syntax:
    > G:\EHPI\abap\exe\sapstartsrv.exe -r
    > -p G:\EHPI\abap\HRS\SYS\profile\START_DVEBMGS03_NLDBHRS01 -s HRS -n 03
    > -U .\SAPServiceHRS -P <PASSWORD> -e NLDBHRS01\hrsadm
    > and check if the service SAPHRS_03 can be stopped and restarted.
    >
    Thanks
    Sunny

  • Maxl Script to Start and Stop Service

    Hi All,
    to stop essbase service i had used below  script in maxl  but it did not work
    alter system shudown;
    is there any script that  i want to stop Essbase services through MAXL  ?
    is there any script i want to start essbase services through MAXL?
    Thanks

    Its as simple as this :
      alter system kill request all;
      alter system logout session all;
      alter system unload application all ;
      alter application 'App' disable connects;
    Use all these when you are trying to Isolate the system from users .
    But to answer your question Unload command is nothing but Stop , load is start !

  • Batch file to Start / stop Import server

    Hi,
    I would like to know any approach or example to make a batch file to start and stop Import/Syndication server in MDM.
    Appreciate a small sample for better understanding to start with.
    Thanks,
    Reo

    Hi Reo,
    the proper way to handle the Import Server is not to start it and restart it with a batch. This was the way the Import Manager Batch worked -> to execute an import one time.
    You can define an time interval in the ini file how often the import should be executed.
    If you want to use the Import Server anyway:
    Write a little batch file which executes a DOS service start tool like "ntscmgr.exe". With that you can start and stop a service. If you want this to happen at a certain time of the day, just schedule the batch file under your operating system.
    I hope that helps.
    Best regards
    Nicolas

  • How to create services start and stop automation script for diff servers

    Hi All,
    i want to create a bat file for automation purpose to start and stop services
    i have some services in 1st server aand some in 2nd server and some in 3rd servers.
    has you all know i have to follow sequences to start and stop services can any help me in creating .bat by linking 3 servers fo starting and stoping services.
    Thanks in advance
    Regards
    SM

    Hi,
    this is the list of start oder for services in 11.1.2.1 from the Installation and Configuration Guide
    1. Databases for repositories.
    2. Any corporate user directories that you plan to configure for use with Shared Services.
    3. Foundation Services Managed Server application server, which includes Shared Services,
    and EPM Workspace.
    4. Reporting and Analysis Framework — Agent Service (if required for your environment)
    5. Reporting and Analysis Framework Application Server (if required for your environment)
    6. Web server
    The remaining services and processes can be started in any order:
    1. Performance Management Architect Services
    2. Performance Management Architect application server
    3. Performance Management Architect Data Synchronizer application server
    4. Essbase Server
    5. Administration Services application server
    284 Starting and Stopping EPM System Products
    6. Integration Services Server
    7. Essbase Studio Server
    8. Provider Services application server
    9. Financial Reporting Services
    10. Financial Reporting application server
    11. Web Analysis application server
    12. Calculation Manager application server
    13. Planning application server and the Hyperion RMI Registry
    14. Financial Management service
    15. Financial Management Web application server
    16. Strategic Finance service
    17. Performance Scorecard application server
    18. Performance Scorecard Alerter application server
    19. Profitability and Cost Management application server
    to start services on different servers you can use the sc command in your batch file
    for eg
    sc \\10.121.201.21 start HypS9FrameworkAgent

  • Need help getting Tomcat 5.0.28 to start (and stop, eventually)

    Hi!
    I am such a newbie to the Terminal and writing scripts, so please forgive my naiveté. I have successfully installed Tomcat in my /usr/local directory, but I am having trouble creating files to start and stop Tomcat, per the instructions on the following page:
    http://developer.apple.com/internet/java/tomcat1.html
    I've followed the directions but continue to get the following error after I execute ~/bin/start_tomcat.
    -bash: start_tomcat: command not found
    My file contains the following code:
    #!/bin/sh /n
    export CATALINA_HOME=/usr/local/jakarta-tomcat-5.0.28 /n
    export JAVA_HOME=/usr /n
    $CATALINA_HOME/bin/startup.sh /n
    If anyone can help me, I would really, really, really appreciate it!
    Thanks!
    PowerBook G4 12"   Mac OS X (10.4.5)  

    Why are there all those "/n" there? Either you or the place you copied from has the wrong slash. But still, it's wronger than that to have them at all: "\n" means a newline (i.e., press "return") not the actual "backslash en" characters. Sometimes people post code with those \n visible: by making it explicit where a line-break should be, one doesn't have as much trouble when a web browser reformats the text and puts line breaks where they don't belong.

  • How to append data in same log after start and stop signal express

    how can i append my data to the same log file after starting and stopping the signal express ? Is there some option to do this. After start/stop it always makes a new log file. How can append datat to the same log file. 
    Thanks in advance. 
    Munir

    Hello mbhatti,
    I founded a KB which seems do describe the way to solve your problem.
    Appending Data to the Same File when Logging in LabVIEW SignalExpress :
    http://digital.ni.com/public.nsf/allkb/C38AEE499D5CC8C6862572CF006875D2?OpenDocument
    I hiope this will help you
    Regards
    Florian Abry
    Application Engineer Group Leader
    NI Germany

  • Start and stop Cisco Secure ACS services using batch.

    Hello.
    I need to start and stop Windows service using a batch.
    What is the correct order?
    Thanks.
    Andrea

    Here is the batch file I use to stop and start services on ACS 4.x Windows and it works perfectly. @ECHO OFF net stop csmon >null 2>&1 net stop cslog >null 2>&1 net stop csdbsync >null 2>&1 net stop csauth >null 2>&1 net stop csadmin >null 2>&1 net stop cstacacs >null 2>&1 net stop csradius >null 2>&1 net start csauth >null 2>&1 net start csmon >null 2>&1 net start cslog >null 2>&1 net start csdbsync >null 2>&1 net start csadmin >null 2>&1 net start cstacacs >null 2>&1 net start csradius >null 2>&1 echo Complete restart finished exit 0

  • Starting and Stopping Repository Mgr Service

    Hello All,
    I am running Forte 3.0.D.0 on Windows NT 4.0. At night, I run batch files to backup and clean the repository.
    With previous versions of Forte (before 2.H) my scripts simply did an rpstop, rpcopy, rpclean and finally a rpstart to start the repository again. This worked great.
    Now, however, I am running the Repository Manager as an NT service, so I can no longer run rpstop or rpstart (rpstart does not start the Repository Manager service).
    One solution I have found is to use Net Stop and Net Start to stop and start the Repository Manager service, so my script looks something like this:
    rpcopy...
    net stop "Forte Repository Manager 3.0.D.0"
    rpclean...
    net start "Forte Repository Manager 3.0.D.0"
    This seems to work fine most of the time, but occasionally the service won't stop or start (like when a workspace is open). My questions are:
    1) Are there any other command line processes that people know of to start and stop a service?
    2) What is Forte's recommended process for starting and stopping the Repository Manager service in a script?
    Thanks for your help
    John Bruning
    IBIS Consulting Inc.
    www.ibis-consulting.com

    Your object could actually bind to a port using serverSocket.accecpt() and when a connection comes in, it exists.

  • Apple mobile device service started and stopped

    my iPod touch cant be synced or even recognized on my iTunes and it says i gotta *start the apple mobile device service*.
    i finally found it and it tells me that *"apple mobile device service started and stopped..."*
    how can i fix it?
    help!!!!

    Hello and Welcome to Apple Discussions. 
    Follow the instructions in this article:
    http://docs.info.apple.com/article.html?artnum=307078
    mrtotes

Maybe you are looking for

  • [Solved] Looking for a simple music player

    Hello there, I'm looking for a music player for a box I'm currently building. I only need it to have a GUI, playlist support and random playing. I've thought of xmms2, but the standard package comes without GUI and I haven't found any clients with ra

  • Lsmw Error during the specify files

    While doing Material master upload thru lsmw...using Batch input method During the specify files step i am getting this error File Name 'Converted Data': Max. 45 Characters. Remaining data saved. Message no. /SAPDMC/LSMW_OBJ_060028 Pls Guide me......

  • HT1199 iTunes quits on opening and gives me the error message -45054?  Does anyone know what this error message is all about?

    I use iCloud for my music and recently deleted some duplicates from my desktop iMac (about a year old.)  Then tried to launch iTunes from the laptop about a 2008 macbook and get the error message -45054 and it won't open. Any ideas?  Would upgrading

  • Can't get past the grey loading screen with the apple

    My ibook was working fine for a while and then all of a sudden I turned it on one day and the desktop came up but none of the icons or toolbars came up. I talked to a few people about that and they seem to think that is was the os going out of whack.

  • P6230y audio ports stopped working

    Model #: p6230y Product #: NY549AA-ABA Serial #: [text removed for privacy] Software Build #: 94NAv6PrA2 Service ID #: 121-409 PCBRAND: Pavilion Hey folks. I hopped on my computer today to discover that the front audio output port as well as all but