General :: Check If Process Is Running / If Not / Execute Another Script

Jul 11, 2011

I have a game server running using java, and it tends to crash sometimes, and only way to start it now is manually, so i thought i could create a script to check periodically if java is running, and if it isn't, run my startup script for the game server also, if it's possible it should log when it actually started the server startup script into a text file or something, so i can check why it crashed.

View 6 Replies


ADVERTISEMENT

General :: Bash Script - Check Process Is Running, If Not Start?

Feb 7, 2010

I am using Sphinx search on my webserver and it quits after a certain amount of time leaving my search page broken.Here is a bash script that I want to run every 10mins via cron:

Code:
#!/bin/bash
if pgrep searchd | grep "[0-9]"

[code]...

View 24 Replies View Related

Debian :: Monitor Running Process And Execute A Command When Change?

Jan 31, 2010

I want to monitor the process running and execute a command if some new process start. For example send a mail if any new process start.

View 1 Replies View Related

Ubuntu :: Execute Bash Script After Running Process Finishes?

Jul 28, 2011

I have a computation going which takes a long, but uncertain, amount of time. I have another computation which needs to be run, but _after_ the first one is done. I won't be at the computer at that time to manually start the new process. I've done some Googling, and I found how to delay execution by a specific amount of time (e.g. "start process x in exactly 8 minutes from now), but that isn't quite what I want to do. Essentially, I'd like to tell the shell, "When process #nnnn finishes running, then start process x". Is there a way to do this?

View 6 Replies View Related

Programming :: Check If A Process Is Running - Syntax Error Near Unexpected Token `else'

Feb 10, 2011

I have an ubuntu 10.10 server and want to run a script on it to check if a process is running. If it is not running, it will start the process and also write into a log file.

When running the script i get the following error message:

syntax error near unexpected token `else'

Here is my script.

View 7 Replies View Related

General :: Get Crontab To Execute Process Every 10 Minutes?

Jan 31, 2011

I am trying to get a process ( SARG access log report tool ) to run every 10 minutes but I cannot get it to work.
Here is the content of the crontab file
______________________________
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command

[code]....

View 5 Replies View Related

General :: Execute File In Different Process On Ubuntu?

Oct 28, 2010

Means I want to execute two executables one by one at the same time as shown below:execute1
execute2these are two executables. but the second one is executed after 1st one is closed is there any way two execute both.One way isgnome-terminal -e execute1execute2but here i want to hide the terminal window..........

View 3 Replies View Related

General :: Give Permission To Execute Process As Super User?

Jul 27, 2010

I have a program(that is written by me) which need super user permission to execute it. But I need to let the normal users to execute it without using 'sudo ./executable' and just './executable'. how i can set the program to execute by the normal users without using 'sudo' or password prompting.

View 2 Replies View Related

General :: Get UserName In Place Of UID In The Process Check?

Apr 17, 2010

I add a user in my linux machine using the command 'useradd' as shown below. # /usr/sbin/useradd -c "Non Root User" -d "/home/testUser" -g root testUser "/etc/passwd" file shows that user created with uid '517'

cat /etc/passwd
ot:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin

[code]...

View 1 Replies View Related

General :: Check A Process Which Is Over Loading The Serve?

May 12, 2011

How do I check a process which is over loading the server. I give command Top andthe average load of the server is so high.

How should I kill the over loading process.

View 5 Replies View Related

General :: Bash Shell Script To Check / If Empty Files Are Being Created & Start Process

Jun 25, 2010

I have an Ubuntu server in which a file is dumped every hour and a new file for the next hour and the process continues. If there is any problem due to which the creation of file stops then empty files are created every minute till the process is killed & started again. I need help to make a shell script to check if the empty files are being created and then kill the process and start it again.It would be a great help if anyone can help me regarding this.

View 9 Replies View Related

General :: Check Whether A Service Is Running?

Jan 29, 2010

I run a script manually like/usr/lib/openoffice.org/program/soffice and when I run

:ps -ef|grep openoffice

I get the following,

root 700 1 0 10:45 ? 00:00:00 /bin/sh /usr/lib/openoffice.org/program/soffice -calc

My question is how to check whether this script is running or not (It can be checked every 10 minutes) and how to make it as a service. (I don't have root access to put this in rc.local file or somewhere else).

View 2 Replies View Related

General :: Check If NFS Mounts Are Still Up And Running?

Apr 27, 2011

How do i check if NFS mounts are still up and running?

when i do the command MOUNT , i get some result, but how can i see (or check) if they still up and running? I'm not so familiar with this command, so i hope that someone can guide me

I know that there must be some NFS links mounted, so if one fails, i need to see that with like an echo or something.

View 12 Replies View Related

General :: Failed To Execute Child Process "realplay" (No Such File , Directory) / What To Do?

Sep 16, 2009

What can I do about this?
Failed to execute child process "realplay" (No such file or directory)

using gdome Ubuntu, realplayer is in my Home folder (RealPlayer11GOLD)

View 3 Replies View Related

General :: Running A Check In Bash Script?

Apr 3, 2011

so I wrote a small script that pretty much just takes in two numbers and counts from the first to the second, e.g.

unknown-hacker|544> count.sh 1 3
1
2
3

My problem is I want to make it so that if you input invalid parameters, such as non-numerical characters, more than 2 numbers, etc., you'd get an error message

View 15 Replies View Related

General :: Check Which Version Of Bash I'm Running ?

Aug 16, 2010

How can I check which version of bash I'm running

View 2 Replies View Related

General :: Can Bash Check If Screensaver Is Running

Nov 13, 2010

I have a bash script that messages the user periodically. Is there any way in the script to check if the screensaver is running, so the script doesn't spam messages while the user is away? The xscreensaver process is always running in the background, I've noticed.

View 5 Replies View Related

General :: Check If Service Is Running Or Not Using Java

Feb 26, 2011

i've some trouble to write a script on java on linux to check if service(ie:smbd) is runing or not,, could you give me some example? Or if is there any source about it for me to learn? i've two days search with zero result...

View 5 Replies View Related

General :: Ps Show Where Process Is Running From?

Nov 10, 2010

Is it possible, using ps, to determine where a process is running from? I have two applications, both are identical and running in parallel directories, such as /app1/start.sh and /app2/start.sh. If I run ps -ef then I'm unable to tell the difference between the two

Using ps (or alternative), how can I tell that PID 123 belongs to app1?

View 3 Replies View Related

General :: Cron: Run A Process But Only If It Isn't Running?

Feb 10, 2011

Is there a way for me to tell cron to run an app BUT not run it if a process exist already?

View 5 Replies View Related

General :: Way To See Only Process Running In Background?

Feb 23, 2011

Is there some way to see only the process running in the background?

View 4 Replies View Related

General :: Get The Notification Of Process Which Are Currently Running?

Apr 7, 2011

How can i get the notification of process which are currently running?

We wrote one script which is being fired for every minute, instead of that is there any to trigger the event from linux core implicitly if there is any change in my process(pid)?

View 3 Replies View Related

General :: Running Process In Background

Jan 14, 2011

Is there any way to run a long process in background so that it still remain in running state even if the user logout the system.

View 12 Replies View Related

General :: Command To Check Whether Service Installed / Running?

Feb 26, 2010

Is there a unique command ( common to all Linux Distros, Solaris, Windows ) to know whether a service is installed and running on my system or not??

View 5 Replies View Related

General :: Check If Your Dcopserver Is Running - ASUS Eee Netbook ?

Dec 17, 2010

Cannot activate Task Manager.

Message: 'Check if your dcopserver is running'

(ASUS Eee Netbook)

View 1 Replies View Related

General :: Script To Check Tomcat And Pgsql Running Or Not?

Jun 23, 2011

I have Linux server with cent OS.I have installed tomacat6.0 and postgresSQL8.3 on it.The thing is i wanna know whether the tomcat and postgresSQL is running or not using the script.

View 1 Replies View Related

General :: Move Running Process To Background

Mar 10, 2011

How do you move a running process to the background? For example, type the command sleep 60 on the command line and try moving that process to the background.

View 1 Replies View Related

General :: Change Cpu Utilization Of Running Process?

Apr 28, 2011

Can we change cpu utilization if its have very high in running mode without stop that process.

View 1 Replies View Related

General :: How To Rename An Already Running Script / Process?

Dec 22, 2009

Is it possible to rename a process that is currentley running i.e. from "batch.sh" to "donotkill" etc

View 4 Replies View Related

General :: How To Get Stack Size Of Running Process?

Apr 17, 2011

Can anyone tell me that how to get information about stack, allocated by kernel to a running process? for this ,is there any api function,any system call is available in ubuntu 8.04 ?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved