Shell script for start stop and restart standard
Hi,
I'd like to know if there's a standard template for shellscript for a kind of stop|start|restart execution of a server or stub.
If you have any link or some info that explain how to do that nicely it would be nice!
Thank you
There's plenty of live examples in /etc/rc.d
Similar Messages
-
Shell script to start, stop and restart a JAR
Hi everyone,
Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can indicate a method or parameter? Thanks!
this JAR inculdes a class with main method like this:
public class Client(){
public Client(String name){
public void stopClient(){
public static void main(String[] args){
new Client("/tmp/text.log");
}Does anyone have idea to write a shell script to
start, stop and restart a JAR under linux? That part isn't really clear.
Start would be java -jar myjar.jar.
Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication. -
Shell script to start, stop and restart a JAR under linux
Hi everyone,
Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can also indicate a method or parameter? Thanks!
this JAR inculdes a class with main method like this:
public class Client(){
public Client(String name){
public void stopClient(){
public static void main(String[] args){
new Client("/tmp/text.log");
}Does anyone have idea to write a shell script to
start, stop and restart a JAR under linux? That part isn't really clear.
Start would be java -jar myjar.jar.
Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication. -
Start, stop and restart while loops
Hi, my qustion is i have 2 example a and example b. Example b lets u start counting up in seconds when u want to. as long as the toggle switchs are in correct position. it also lets u start, stop and restart if need be. i want to be able to that with example a, but for some reason the while loop always sets of running independent of what position the the toggle switch. Any help greatly appreciated.
Thanks Stuart
Attachments:
examplealib.llb 202 KB
exampleb.vi 25 KBAn example as the attachment.
Attachments:
switch.vi 23 KB -
How to start, stop and restart task
Hello Everyone,
Need advice on what is the correct way to start, stop and restart a Java task?
I have tried with Executors.newCachedThreadPool() or fixedThreadPool() however I was only able to submit the task once. My program crashed when i tried to resubmit the task again after a shutdownnow command()Tasks are designed to be run once. If you want restart functionality, use a service:
http://docs.oracle.com/javafx/2/api/javafx/concurrent/Service.html
The sample service I posted in the following thread demonstrates how to do this:
Multithreading
Use of Executors is not necessary as a Service encapsulates the execution thread management (though you can set your own executor on the service if you really needed it). All you need to do is make use of the service start, cancel, restart and reset methods as required. If you do use the cancel method, then you need to make sure that your service is properly interrupt aware for the cancel to function as you expect. -
Scripts for starting/stopping managed servers
All,
Could someone provide me with some sample scripts for starting/stopping managed Weblogic servers? I'm specifically looking for ways to start/stop them WITHOUT starting the AdminServer. I'm running WLS 10.3.6 on Windows Server 2003, and I have NodeManager set to start automatically as a Windows service.
I know how to set my managed servers up as Windows services so that they will start automatically at boot, but this requires the AdminServer to be running, which I do not want. I just want a few scripts for starting/stopping the managed servers (and maybe some hints as to how to make them start automatically without starting the AdminServer).
Thanks in advance,
TomHello Puneet,
Admin console is an web application deployed into AdminServer. Hence if you shutdown AdminServer then you wouldn't able to access Admin console.
Managed Server would function in MSI mode, however you will not be able to make any configuration or administration activities like deployment , any configuration changes , etc.
Hello PRISM,
Can you confirm your requirement about why you don't want AdminServer to be running?
As I said, you will loose the administration capability if you don't have admin server running.
Regards
Rosario -
How do I start, stop and restart a sequence with a periodic input?
Hi,
I have written some code that will monitor my com port (rs-232) continuously for an ASCII character (in this case a 'P'). When the P is received, I want a sequence structure to start working. The P will only appear once for a short while, but the sequence should carry on running until it finishes all the frames. On the next time a P appears on my monitor, I want to either stop the sequence structure regardless of which frame its in and restart the sequence from the beginning again or to run the sequence from the start again if it has already completed all the frames.
What sort of structure do I need to do this, are there any examples?
JamesJames,
Indiana is correct, my take on this is similiar.
If you have a 3 element sequence structure for example which runs if 'P' is returned from your COMs thread, you will need to query a variable in each element of the sequence in order to suspend execution of the next/remaining elements in the sequence if this event occurs. You can do this by reading the variable that your COMs thread sets using a case structure in each element of your sequence. In order to re-run your sequence if 'P' is returned during the execution you can simply set the suspend variable and ensure the code is in a while loop to recall the code.
See the attached example code/screen shot:
This is however not an elegant solution and the best way would probably be using the events structure and a user event to queue the P events. This is available in 6.1 but I believe its the professional package. See also my implementation using this method, again attached below:
Hope this helps,
Kind Regards
Steven Bird
Applications Engineer
National Instruments
Attachments:
Example.JPG 194 KB -
Shell script to start forms and reports server on reboot
Does anyone have on shell script to automatically start up the forms and reports server on unix after a reboot?
thanks muchI also recompiled the "test.fmb" that came with the 10g Forms and Server on my windows xp machine and when I downloaded it back to the Linux Forms and Server machine, it loss the functionality of the "OK" button which is suppose to perform "exit_form" when pressed.
BTW, I am using 10G developer suite on windows xp. -
Shell Script for Startup and Shutdown the database
Hi,
i want Shell Script for Startup and Shutdown the database in Solaries.
could any one can hep me where i can get this script. or send to me to [email protected]
Thanks & Regards,
Gangi reddySHUTDOWN
SHUTDOWN ABORT]
Shuts down a currently running Oracle instance, optionally closing and dismounting a database.
Terms
Refer to the following list for a description of each term or clause:
ABORT
Proceeds with the fastest possible shutdown of the database without waiting for calls to complete or users to disconnect.
Uncommitted transactions are not rolled back. Client SQL statements currently being processed are terminated. All users currently connected to the database are implicitly disconnected and the next database startup will require instance recovery.
You must use this option if a background process terminates abnormally.
IMMEDIATE
Does not wait for current calls to complete or users to disconnect from the database.
Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
NORMAL
NORMAL is the default option which waits for users to disconnect from the database.
Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
TRANSACTIONAL [LOCAL]
Performs a planned shutdown of an instance while allowing active transactions to complete first. It prevents clients from losing work without requiring all users to log off.
No client can start a new transaction on this instance. Attempting to start a new transaction results in disconnection. After completion of all transactions, any client still connected to the instance is disconnected. Now the instance shuts down just as it would if a SHUTDOWN IMMEDIATE statement was submitted. The next startup of the database will not require any instance recovery procedures.
The LOCAL mode specifies a transactional shutdown on the local instance only, so that it only waits on local transactions to complete, not all transactions. This is useful, for example, for scheduled outage maintenance.
Usage
SHUTDOWN with no arguments is equivalent to SHUTDOWN NORMAL.
You must be connected to a database as SYSOPER, or SYSDBA. You cannot connect via a multi-threaded server. For more information about connecting to a database, see the CONNECT command earlier in this chapter.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1013607
Joel Pérez -
I've been trying to download IOS5 for more than 2 hours. Do I need to stop and restart?
I've been trying to download IOS5 for more than 2 hours. Do I need to stop and restart the download?
I think I would cancel it. Unplug phone, then plug back in and then maybe only select download instead of download and install. Thats what I did for our phones and so far we have no issues at all with any of the features - new or old. I don't know why that would make a difference though. But it will allow you to unplug your phone once the download starts and go do your thing while its downloading. Then you can come back later and when u plug in iTunes will ask you to install new software for phone.
-
Have to stop and restart Q-Master for it to show up in Compressor 3.5.1 SL
I am having a problem with Q-Master in Snow Leopard, running compressor 3.5.1, where every time I restart, when I go into compressor, it does not show up my Q-Master cluster. Instead I must go into the control panel (which has to restart into 32 bit mode, COME ON APPLE LETS MAKE Q-MASTER 64 BIT!) and stop and restart Q-Master and then it shows up in Compressor.
Is this because the control panel has to be in 32 bit mode for it to work? Is anyone else having a similar problem?I have the exact same thing happening!!! Funny how you haven't got a response to fix the issue. I called Apple and the guys said I needed to reformat my drive and install FCS from scratch to get rid of any files from FCS 2, only because I used some FCP utility to remove the previous version.< </div>
Sorry you got that advice from Apple. Reinstalling Apple software is rarely effective and a scorched earth approach rarely solves anything. It simply takes everything back to a default state.
I've had this same issue with Qmaster on my system and I'm still running 10.5+ so it's not a Snow Leopard issue. I solved it, at least for now, by simply deleting Qmaster only and reinstalling just Qmaster. However, I deleted and installed Qmaster to solve a problem with FCP; it was crashing immediately upon launch.
This is important: I have no way of knowing if there is a direct or causal relationship between any of these events.
bogiesan -
How to start a shell script for a java app
Hi all,
I have a java application and have got a shell script to start it.
How can I start this app just from the finder?
Thanks
ConfidemusFernardo,
the following links should help you:
- Technical Note TN2065
- Applescript and Unix commands
Mihalis. -
I can't play youtube videos. I will play for about 12 seconds, then stop, and restart over again. I tried youtube on IE and it works there. What do you suggest I do? edit
This problem can be solved selecting manually the video resolution.
-
Want to create unix shell script for Clone procedure in 11i and r12
Want to create unix shell script for Clone procedure in 11i and r12 .Can anyone help me on this as I m new to oracle apps and scripting.
Thanks in advance .user11958935 wrote:
Thanks but I want it for application cloning ie adcfgclone and autoconfig etc .Please see old threads for similar topic/discussion.
https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+Rapid+AND+Clone&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+AutoConfig&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
Redhat linux 6 VM - stop and restart
Hi,
I've installed new HVM - Redhat Linux 6, standard installation. I have the problem with stop and restart initiated from the OVM console. Job is running, but the OS inside VM doesn't start the shutdown process.
For example another VM running Oracle Linux 6 works. The same problem is with the restart and live migration - both works for Oracle Linux, but redhat no.
Do you have an idea what are the requirements for stopping and restarting the VM from OVM console?DN,
I take all your questions, don't I?
Anyhow, this command adds your Report Server to the Oracle Process Manager and Notification Server's (opmn) and Enterprise Control:
$OH/bin/addNewServerTarget.sh reports_server_name
After that your Reports server will be started and stopped whenever you issue "opmnctl startall / stopall". Issue a opmnctl reload after running that script, or opmnctl restart.
You can also start and stop it individual with: (the choice is yours)
opmnctl startproc ias-component=reports_server_name
opmnctl stopproc ias-component=reports_server_name
opmnctl startproc process-type=reports_server_name
opmnctl stopproc process-type=reports_server_name
Check status with:
opmnctl status
Maybe you are looking for
-
I need help figuring out how to enable my phone to connect to my itunes after the update.
-
after updating to 6.0.1 on my iphone 4 ... the wifi bearly works if at all and it dosent vibrate at all .. all settings are switched on ... any tips or ideas to these matters?
-
Connecting iPod to computer/ transfering songs to computer
I would like to transfer the songs on my ipod onto my computer... How can I do this without it automatically updating with itunes, and deleting all the songs, and then which programs work best with Windows to transfer songs onto the computer? Thanks
-
I installed Leopard onto my Macbook (from Tiger) and now the Leopard system keeps freezing on me (i get a message saying Mac OS X has quit unexpectedly), forcing me to restart by holding down the power button. I never had this problem with Tiger. Any
-
Automatically po deletion after latest GRN date
HI expert i would like to know after "Lates GR date" on the "Delivery" tab of the item details. after that date my PO should get deleted automatically or line item should get lock and for the same i can developed a Z report where i can come to know w