Sponsored Content
Full Discussion: script hanging???
Top Forums Shell Programming and Scripting script hanging??? Post 302276336 by Dagaswolf on Tuesday 13th of January 2009 02:06:25 PM
Old 01-13-2009
script hanging???

ok... this is where i am at... i need a script to call another script as a wrapper because the first script creates a sub-shell.

here is what i got... i kick off the first script "CCBDEMO-threadpoolworker.sh"
Code:
#!/bin/bash

clear #clearing screen

directory="/data1/spl/cis/CCBDEMO/bin"
startenviron="splenviron.sh -e CCBDEMO -c threadworkerstart.sh"

cd $directory
$startenviron
exit

as you can see... that is pretty self explanitory... i am kicking off a script called splenviron.sh that basically sets all the environment variables for the instance of CCBDEMO for Oracle's CC&B application. then once it does that it kicks off another shell script that actuall sends the command to start the threadpoolworker for batch-processing...

threadworkerstart.sh:
Code:
#!/bin/bash

directory="/data1/spl/cis/CCBDEMO/bin"
tpws="nohup threadpoolworker.sh -p DEFAULT=5 -d Y >/dev/null &"

cd $directory
$tpws

echo "**********************************************"
echo "** START OF THREADPOOLWORKER HAS COMPLETED. **"
echo "** PLEASE TYPE EXIT TO REMOVE YOURSELF FROM **"
echo "** THE CURRENT ENVIRONMENT SETTINGS.        **"
echo "**********************************************"

what this is supposed to do, is start up the batchprocessing threadpools... in the background, so that i don't need to keep a terminal (putty session) open all the time... well it all works until i get to the nohup part... it actually does kick off the threadpool, and starts sending everything to the nohup.out, but it will not give me my prompt back unless i kill it... here is the output from the start of the first shell script, to the hang...

Code:
 /data1/spl/cis/CCBDEMO/bin> CCBDEMO-threadpoolstarter.sh
Java version = 1.5.0
Java vendor = IBM Corporation
Java OS name = AIX
Java OS arch = ppc
Java OS version = 5.3
BEADIR=/opt/bea
Version ................ (SPLVERSION) : V2.1.0
Database Type ............... (SPLDB) : oracle
ORACLE_SID ............. (ORACLE_SID) : CCBDEMO
NLS_LANG ................. (NLS_LANG) : AMERICAN_AMERICA.UTF8
Environment Name ....... (SPLENVIRON) : CCBDEMO
Environment Code Directory (SPLEBASE) : /data1/spl/cis/CCBDEMO
App Output Dir - Logs ... (SPLOUTPUT) : /data1/spl/sploutput/CCBDEMO
Build Directory .......... (SPLBUILD) : /data1/spl/cis/CCBDEMO/cobol/build
Runtime Directory .......... (SPLRUN) : /data1/spl/cis/CCBDEMO/runtime
Sending output to nohup.out
Build Directory .......... (SPLBUILD) : /data1/spl/cis/CCBDEMO/cobol/build
Runtime Directory .......... (SPLRUN) : /data1/spl/cis/CCBDEMO/runtime
Sending output to nohup.out

at this point it just hangs... doesn't give me a prompt back, nothing... until i hit CTRL+C... then it completes with the "echo" commands and then back to the first script and does the exit as requested...

am i doing something wrong in my code?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

hanging sql script

Need your help pls... I have integrated my shell script with sqlplus statements that will fetch necessary data for the rest of the script. As observed, sometimes problems at the oracle database occurs wherein users can not login via sqlplus, so does the script. During execution, the logging of... (4 Replies)
Discussion started by: inquirer
4 Replies

2. Shell Programming and Scripting

script hanging - remsh

Greetings to everyone, My Problem: I have a script which inturn calls couple of other scripts in different servers (solaris) to do a server startups on the respecitve boxes. My script ... #!/usr/bin/ksh siebsrvr_root=/users/siebelserver/siebsrvr cd $siebsrvr_root . ./siebenv.sh... (2 Replies)
Discussion started by: vivsiv
2 Replies

3. UNIX for Dummies Questions & Answers

Help with EXPECT script hanging

I am new at developing EXPECT scripts. I'm trying to create a script that will automatically connect to a UNIX server via FTP and download a log file from the server within a specified server directory on the remote machine. I'm having problems with the EXPECT script "hanging" at the password... (0 Replies)
Discussion started by: markus2008
0 Replies

4. Linux

Script to simulate hanging process

I want to create a script to simulate a process that hangs to test a java application. My java app executes a system command, which can also be executing scripts, etc. Any ideas on such a script? The java code is: Runtime rt = Runtime.getRuntime(); Process p = rt.exec("sh... (4 Replies)
Discussion started by: brendan76
4 Replies

5. Shell Programming and Scripting

Script is hanging

Hello, I have the following shell script and when i execute, it keeps hanging and nothing happens Please let me know. Requirement is to read data from file and pass it to the sql and create files as shown. code /******** #!/bin/sh while read user.dat do echo "user = $1 email =... (1 Reply)
Discussion started by: rakeshsr12
1 Replies

6. Shell Programming and Scripting

Perl Script Hanging

Hey, Does anyone know why my Perl script is hanging when i execute it. print "looking around ...\n"; my ($out, $err, $exit) = $scon->cmd('ls'); print "done"; i get the following error: channel 1: open confirm rwindow 131043 rmax 32768 I'm using use Net::SSH::W32Perl Module.... (4 Replies)
Discussion started by: Phi01
4 Replies

7. UNIX for Dummies Questions & Answers

Process Hanging

Hi! I have written a program three threads will be created to execute three different Sybase SQLs. so three thread will call a method runQuery. In run query again we create child process to execute the actuall SQL by connecting to the SQL. When I run the process first three threading working fine.... (0 Replies)
Discussion started by: jramesh1
0 Replies

8. Solaris

df command hanging

Hi Folks, When i execute the command df -kh in my system the o/p hangs.. The command runs fine but takes a lot of time before coming back to the # prompt. Can anyone please suggest the possible cause and solution?. (10 Replies)
Discussion started by: vivek.goel.piet
10 Replies

9. Shell Programming and Scripting

sed hanging

/bin/sed -n '$q;5633653,0 p' lfile lfile is a log file that is being updated several times a second. so, the command above figures out the line number it wants in the lfile and then proceeds to output all lines from that line number to the end of the file. the problem is, the end of the... (2 Replies)
Discussion started by: SkySmart
2 Replies

10. UNIX for Beginners Questions & Answers

Shell script is hanging up every time even after it's successful

We are using a korn shell script which is meant to trigger a Oracle job to load the data from a flat file to an Oracle database . Also the same script addresses the following tasks also like triggering a SFTP job to pick the file from one path to the target location and checking the same with... (6 Replies)
Discussion started by: senmng
6 Replies
spl(9r) 																   spl(9r)

NAME
spl - General: Sets the processor priority to mask different levels of interrupts SYNOPSIS
#include <machine/cpu.h> int getspl( void ); int splbio( void ); int splclock( void ); int spldevhigh( void ); int splextreme( void ); int splhigh( void ); int splimp( void ); int splnet( void ); int splnone( void ); int splsched( void ); int splsoftclock( void ); int spltty( void ); int splvm( void ); int splx( int x ); ARGUMENTS
Specifies a CPU priority level. This level must be a value returned by a previous call to one of the spl routines. DESCRIPTION
The operating system supports the naming of spl routines to indicate the associated device types. Named spl routines make it easier to determine which routine you should use to set the priority level for a given device type. The following table summarizes the uses for the different spl routines: Obtains the spl value. Masks all disk and tape controller interrupts. Masks all hardware clock interrupts. Masks all device and software interrupts. Blocks against all but halt interrupts. Masks all interrupts except for realtime devices, machine checks, and halt interrupts. Masks all LAN hardware interrupts. Masks all network software interrupts. Unmasks (enables) all interrupts. Masks all scheduling interrupts (usually the hardware clock). Masks all software clock interrupts. Masks all tty (terminal device) inter- rupts. Masks all virtual memory clock interrupts. Resets the CPU priority to the level specified by the argument. NOTES
The binding of any spl routine with a specific CPU priority level is highly machine dependent. With the exceptions of the splhigh and splnone routines, knowledge of the explicit bindings is not required to create new device drivers. You always use splhigh to mask (disable) all interrupts and splnone to unmask (enable) all interrupts. RETURN VALUES
Upon successful completion, each spl routine returns an integer value that represents the CPU priority level that existed before it was changed by a call to the specified spl routine. EXAMPLE
The following code fragment shows the use of spl routines as part of a disk strategy routine: int s; . . . s = splbio(); /* Mask (disable) all disk interrupts */ . . . [Code to deal with data that can be modified by the disk interrupt code] . . . splx(s); /* Restore CPU priority to what it was */ spl(9r)
All times are GMT -4. The time now is 06:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy