08-05-2008
Hello have created script like follwoing ,,, thanks anybody to check and advice
set a=3800000
if [ $a -lt'ps -p `pgrep SpectroSERVER` -o rss=' ]
then
pkill -TERM ArchMgr
b= tail -f $SPECROOT/SS/DDM/ARCHMGR.OUT | grep "ArchMgr has successfully shut down"
if [ $b ='ArchMgr has successfully shut down' ];
then
pkill -TERM SpectroSERVER
fi
c= tail -f $SPECROOT/SS/VNM.OUT | grep "SpectroSERVER has successfully shut down"
if [ $c ="SpectroSERVER has successfully shut down" ]
then sudo /opt/spectrum/lib/SDPM/processd.pl stop
fi
if [ `pgrep processd`]
then pkill processd
fi
procs2kill="LocServer NSAgent telnetd osagent VnmShd"
for proc in `echo $procs2kill`
do
pkill $proc
done
sudo /opt/spectrum/lib/SDPM/processd.pl start
. /home/specadm/spectrum_env ; $SPECROOT/bin/launchinstdbapp `/usr/bin/hostname` SS n VNM.OUT
x= tail -f $SPECROOT/SS/VNM.OUT | grep "is now ready on port 0xbeef..."
if [ $c ="is now ready on port 0xbeef..." ]
then . /home/specadm/spectrum_env ; $SPECROOT/bin/launchinstdbapp `/usr/bin/hostname` ARCHMGR y ARCHMGR.OUT
fi
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
Please help me to know, How to find out the how much amount of process addres space is required/is used for/by a process.
Tnx & Regards
Vishwa. (1 Reply)
Discussion started by: S.Vishwanath
1 Replies
2. Programming
Hi,
In Linux how to find out what will be the stack size allocated for a process?
Actually i have to fork n number of processess, and will call exec. I will be execing an executable which is already multithreaded and each thread size is defined. My doubt is how to know if the size of the... (2 Replies)
Discussion started by: rvan
2 Replies
3. Shell Programming and Scripting
Hi,
I am writing a script which takes the input file name and concat as a new file by appending a "1" to the file name. However i am not able to get the size of this new file. I am not sure where i am going wrong. Please check the script and help me get this working.
#!/bin/sh ... (1 Reply)
Discussion started by: ragsnovel
1 Replies
4. UNIX for Dummies Questions & Answers
Hi, I have a directory PRIVATE in which I have several directories and each of these have several files. Therefore, I need to find those files by size and date to back up those files in another directory.
I don't know how to implement this shell script using ''find''.
appreciate any... (1 Reply)
Discussion started by: dadadc
1 Replies
5. Shell Programming and Scripting
Please could anyone provide me the Command/script to find the size and usage of Unix box ASAP ? (6 Replies)
Discussion started by: sakthifire
6 Replies
6. Shell Programming and Scripting
Hi,
I need to execute a script to find the tablespace size in oracle.But i get an error.:confused:
Script Executed:-
#!/bin/ksh
ORACLE_SID= oracelinstance
ORACLE_HOME= oracle path
PATH=$ORACLE_HOME/bin
export ORACLE_SID ORACLE_HOME PATH
sqlplus... (4 Replies)
Discussion started by: vighna
4 Replies
7. Programming
Hi,
I am looking to work on unix systems which include (hp-ux, ibm aix, solaris and linux). I want to get the total virtual address space of a process, the used virtual memory i am able to get without any problem. I have tried using getrlimit and getrlimit64, but that gives only ... (4 Replies)
Discussion started by: uiqbal
4 Replies
8. Shell Programming and Scripting
Hi
I have to find size of subdirectory and automate it in CRON.
Eg: parent directory name is NVBKP inside it there are several subdirectories
I want to get the size of recent two subdirectories.
I have tried ls -ltr diretory path | tail -2
But it is providing only size of the folder not... (8 Replies)
Discussion started by: ankit2012
8 Replies
9. Shell Programming and Scripting
Hi All, Looking for a quick LINUX shell script which can continuously monitors the flle size, report the process which is creating a file greater than certain limit and also kill that process. Can someone please help me on this? (4 Replies)
Discussion started by: vasavimacherla
4 Replies
10. UNIX for Beginners Questions & Answers
I wish to by pass a process if the file is over a certain size?
not sure this makes sense
current bit of the script below
#if we are bypAssing the OCR
if ; then
echo Bypassing HOTFOLDER OCR
HOT_FOLDER_DIR=$BATCH_POST_OCR_DIR;
potential change below? would this work would I need... (1 Reply)
Discussion started by: worky
1 Replies
LEARN ABOUT DEBIAN
service
service(8) System Manager's Manual service(8)
NAME
service - run a System V init script
SYNOPSIS
service SCRIPT COMMAND [OPTIONS]
service --status-all
service --help | -h | --version
DESCRIPTION
service runs a System V init script in as predictable an environment as possible, removing most environment variables and with the current
working directory set to /.
The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT. The supported values of COMMAND depend on the
invoked script. service passes COMMAND and OPTIONS to the init script unmodified. All scripts should support at least the start and stop
commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start com-
mand.
service --status-all runs all init scripts, in alphabetical order, with the status command.
EXIT CODES
service calls the init script and returns the status returned by it.
FILES
/etc/init.d
The directory containing System V init scripts.
ENVIRONMENT
LANG, TERM
The only environment variables passed to the init scripts.
SEE ALSO
/etc/init.d/skeleton,
update-rc.d(8),
init(8),
invoke-rc.d(8).
Jan 2006 service(8)