Hi,
I have a script to determine the max memory to set a worker to start up at. The variable will need to end up being "-Xmx512m" or "-Xmx256m" or "-Xmx768m."
Everything works fine BUT when I set the "MEMORY" variable I get the "Cmmand not foundine 40: -Xmx512m" msg though the variable is the correct value and it starts up fine. Why do I get this message? Does it have something to do with "-" or "x"?
1) You shouldn't have space after = sign
2) You should use quote
yes, I will make changes thanks
---------- Post updated at 12:56 PM ---------- Previous update was at 12:50 PM ----------
hmm, strange
So if I do this
MEMORY= '-Xmx'$maxMemSize
my worker starts up correctly but I get the error msg listed above.
if I do this
MEMORY='-Xmx'$maxMemSize or MEMORY=-Xmx$maxMemSize
I dont get the error msg and the worker doesnt start up...ideas?
my line to startup a worker is below(if it helps)
nohup $JAVA_HOME/bin/java -DappName=IPLoader -Xms128m $MEMORY -Duser.timezone=GMT -verbose:gc -cp $IPWORKER_CLASSPATH:$IPWORKER_HOME:$CLASSPATH Loader $LOADER_DIR >> $logfile 2>&1 &
how to get the outout from script to console.
i am running one script msg.sh using cron job every suday midnight. as soon as i logged in i want to see the staus is service started or service failed on console.
what command i need to add to script ?
msg.sh
#!/bin/bash
if
then
echo... (1 Reply)
Hello out there,
I got a script that stops and restarts a webapp. I would like to be able to send warning reminders to the webusers as a warning like 5 minutes before it happens. Can I do this an if so how? (1 Reply)
Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered.
The script is as follow:
#!/bin/sh
for file in file_1.txt file_2.txt file_3.txt
do
awk '{ print "0" }' $file > tmp.tmp
mv tmp.tmp $file
done
And the cron... (2 Replies)
Hello,
I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me
1) How could I check my script when it is running from cron like... (3 Replies)
Hello ,
i have a problem in writing the shell script..
i have a script already written n just need to make a change in which when the script is not able to connect to the database ..it should print an error msg on the screen.
I have already seen previous posts on how to connect to the... (3 Replies)
I want to display a message when the script is done running, but I do not want to use echo. Is there another command I can use besides echo? If so, show me how it is done. (1 Reply)
hi...
i posted the code earlier but it wasnt quite readbale... ive added a few comments and made the indentation problem right...
the problem is that it doent seem to be working... ive almost pulled out my hair tryin to fix the prob
another wierd thing is that it worksthe 1st time when i... (0 Replies)
What do you think of the netstat msg about :
udp 2320 0 *:xdmcp *:* The 2320? Does that mean an error?
I used netstat -l | grep 'xdmcp' to get that, but does the 2320 indicate an error? I'm trying to figure out why, after i've enabled xdmcp to true, it is still not showing up... (2 Replies)