![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connection problem with gui java program to postgreaql database using unix | uci | UNIX for Dummies Questions & Answers | 2 | 12-15-2007 05:16 AM |
| AIX, Hibernate, Java 1.5 website problem | coaxis | AIX | 0 | 09-21-2006 02:28 PM |
| Problem using Java Native Interface on Debian | QED | High Level Programming | 0 | 01-25-2006 07:59 AM |
| Java resousebundle problem | mskcc | OS X (Apple) | 0 | 11-21-2005 01:56 PM |
| Java vm problem | jeremiebarber | UNIX for Dummies Questions & Answers | 3 | 04-02-2002 10:00 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
ksh script and java problem
I have a problem with the execution of a ksh as deamon on linux. I explain you first the context.
We have developped a Java program that execute every minutes an external (that we don't have developped) program with a config file in parameter. The Java program is runned as deamon with a perl ("nohup javaprogram > logfile exit(0)") program. Java program execute every minute (with command exec) a ksh file "Epa.ksh" that contain "APIEpa.ksh $1 >> logfile". This ksh call the external program and redirect standard output of the external program to a log file. The ksh APIEpa.ksh execute an omnimark program and make an exit(0) when execution is finished. Our problem is that for each execution a lot of process are created and then aren't deleted when the execution is finished. Every minute more and more process are created!!! We can't change APIEpa.ksh. I have created Epades.ksh to redirect standard output of APIEpa.ksh in a file because when a lot of message was printed on the screen the program were stopped. But my solution doesn't work :-(. We can change Java execution, perl that launch java in deamon and Epades.ksh. They are launched in this order: 1. startMess_nohup.pl 2. PES_MessagingServer.ksh 3. Epa.ksh 4. APIEpa.ksh 1.startMess_nohup.pl `nohup MessagingServer/ae2.xml/Batch/PES_MessagingServer.ksh > MessagingServer/ae2.xml/Batch/PES_MessagingServer.log &`; exit(0); 2. PES_MessagingServer.ksh #!/bin/ksh -x /usr/java/java/jre/bin/java -cp lib/PES_MessagingServer.jar com.xt.pes.messaging.server.ServerManager -conf /ServerEpaMessagingProperties.xml 3. Epa.ksh APIEpa.ksh $1 >> Messaging.log 4. APIEpa.ksh #!/usr/bin/ksh PARENT_DIR="/MessagingServer/ae2.xml" # configuration des outils . ${PARENT_DIR}/Cfg/Epa.cfg ${OMNIMARKBIN}/omnimark -s ${PARENT_DIR}/Omnimark/Epa.xom -d Product "${PRODUCT}" -d Data "${DATA}" -d Provider "${PROVIDER}" -d ConfigFile "${ConfigFile}" -d ConfigDtd "${ConfigDtd}" -d TplInputDtd "${TplInputDtd}" -d TplOutputDtd "${TplOutputDtd}" -i ${OMNIMARKINC}/ -i ${PARENT_DIR}/Omnimark/ -i ${PARENT_DIR}/Api/ -x ${PARENT_DIR}/Api/=L.so -x ${OMNIMARKLIB}/=L.so -brief ReturnCode=$? if [ ${ReturnCode} -ne 0 ];then echo "Error with return code: ${ReturnCode}" else echo "Epa.ksh OK. Return Code = ${ReturnCode}" fi exit 0 Those are all the scripts. Can someone PLEASE help me to solve this issue?! Thank You, Adrian Mihai Network Engineer Last edited by adrian.mihai; 06-22-2005 at 02:37 AM. |
|||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|