Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [Solved] How to Check if a script is running? Post 302734589 by Yoda on Thursday 22nd of November 2012 11:41:43 AM
Old 11-22-2012
If you have ran this command by replacing script with your script name, then yes your script is not running.
Code:
ps -eaf | grep script | grep -v grep

This User Gave Thanks to Yoda For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check that script is not running twice

using ps -ef | fgrep "ld_data" how do i write a script to check that it didn't already run Thanks (2 Replies)
Discussion started by: Link_02
2 Replies

2. Shell Programming and Scripting

script to check if another script is running and if so, then sleep for sometime and check again

Hi, I am a unix newbie. I need to write a script to check wheteher another script is still running. If it is, then sleep for 30m and then check again if the script is running. If the script has stopped running then, I need to come out of the loop. I am using RHEL 5.2 (2 Replies)
Discussion started by: mathews
2 Replies

3. UNIX for Dummies Questions & Answers

Help Running a Check in Bash Script

Hey guys, 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... (2 Replies)
Discussion started by: Duo11
2 Replies

4. Shell Programming and Scripting

Script to check running of process

Hi, Can anyone please tell me how to write a shell script to check whether a process if running or not.... if its still running then wait for sometime and if not then run the next query. Also, Under my one main script main.sh I have to run 2 scripts simutaneously which take some time to... (2 Replies)
Discussion started by: lovepujain
2 Replies

5. Shell Programming and Scripting

[Solved] Help with running ps -e | less on nano script editor

p { margin-bottom: 0.08in; } This is just a portion of a script I'm writing on Linux nano script editor. When I run the script I get stuck on the ps -e | less command portion of the script:wall:. It displays all the process running but it does not allow me to move to the next line on the script.... (2 Replies)
Discussion started by: SANA4SPA
2 Replies

6. Shell Programming and Scripting

[Solved] Looking for script running before I run script again

Good afternoon! I have a script in cron that runs every ten minutes. Normally it only takes a minute or so to complete. However there are times when the amount of data it is looking at is large, and it has taken 20 minutes. So I want for it to look for the script before it starts. I was... (8 Replies)
Discussion started by: brianjb
8 Replies

7. Shell Programming and Scripting

[Solved] The SCRIPT command - Can we see the log file of a running session?

Hello. This is my situation. script .anything ls -l . ---How can I see the content of .anything using (i.e) cat .anything? If not possible can someone suggest a sequence to simulate a console-recorder to "observ" from a RUNNING script session? Thanks Paolo Please use code tags... (3 Replies)
Discussion started by: paolfili
3 Replies

8. Shell Programming and Scripting

Check to see if script is already running

Happy New Year Is there a quick way to check to see if a script is already running. I want to put in a check in the script to exit, if already running. Currerntly i can only think of doing it the following way. # ps -ef | grep -i 3_HOUSEKEEPING_FFTVTL_TO_FFTDSSU_DUPLICATION.ksh |... (5 Replies)
Discussion started by: Junes
5 Replies

9. Shell Programming and Scripting

[Solved] Running a R script with in a shell script

Hi, I do have an R script named KO.R. Basically reads thousands of files, whose name has a pattern that differs at a portion of the file name, List.txt. Row_file1_mile.txt Row_file2_mile.txt Row_file3_mile.txt ... ... Row_file1000_mile.txt Below is a portion of my Rscript that reads... (4 Replies)
Discussion started by: Kanja
4 Replies

10. UNIX for Beginners Questions & Answers

How to check if the script is already running?

I have one shell script in NAS shared location. Since NAS is mounted in many servers, script can be run from any of those servers. I want to make sure if the script is already running, it should not allow others to run it. I googled it and got some idea that i can touch one empty file in the... (8 Replies)
Discussion started by: thomasraj87
8 Replies
cdslinvchk(8)						      System Manager's Manual						     cdslinvchk(8)

NAME
cdslinvchk - Checks the CDSL inventory of the base operating system and layered applications. SYNOPSIS
/usr/sbin/cdslinvchk [log_file_path] OPTIONS
The path name to a location for the log file. By default this will be /var/adm/cdsl_check_list. DESCRIPTION
Use the cdslinvchk script to verify the current inventory of Context Dependent Symbolic Links (CDSLs) on a running system. CDSLs are spe- cial symbolic links that enable a system to work in a cluster. If CDSLs are accidentally removed, your system will not function correctly in a cluster. While this is not a problem for stand-alone systems, you may not be able to add the system as a member of a working cluster at some future time. You can run this script at any time or configure it to run at system start-up, or as a cron task. When you invoke the script, it checks the CDSLs on the running system against CDSLs of the installed inventory in /usr/.smdb and the addi- tional entries in /var/adm/cdsl_admin.inv, and ensures that each target file exists on the system as a properly-constituted CDSL. If the check is successful, the following message is displayed and the script terminates: Successful CDSL inventory check If the script finds inconsistencies in the inventory, warning messages are displayed on your terminal and logged to the default log file at /var/adm/cdsl_check_list. You can specify an alternate location for the log fill if required. The script locates any modified, missing, or replaced CDSLs. Note that the previous copy of the log file is renamed and retained for reference and is renamed by appending to the filename. Refer to the System Administration guide for information on recreating any missing or broken CDSLs. Refer to the hier(5) reference page for an inventory of CDSLs. MESSAGES One or more of the following messages may be displayed and logged to the log file: Unable to create <pathname> report file -- the script was not able to create a log file. Check the target directory and security. Expected CDSL: <cdsl_pathname> -> <pathname> CDSL Target has been modified to: <pathname> CDSL has been replaced with <pathname> CDSL is missing Failed CDSL inventory check. See details in <log file> FILES
Additional inventory file entries. This file will not exist on all systems. The current and previous log files for inventory errors and messages SEE ALSO
Commands: cron(8) Others: hier(5) See also the System Administration guide for details of CDSLs cdslinvchk(8)
All times are GMT -4. The time now is 10:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy