I am attempting to set a ulimit inside of a script to be run by TWS/Maestro. Can't figure it out. Does anyone have any ideas? :-/
I think the easiest thing, and which might cut out some other problems for you, is to source the environment (user or global) into the script.
. /etc/profile # Read in the system profile
. /home/user/.profile # read in the users profile
That way you're script would inherit the environment that the user would be operating under, so you could test your theory outside of the script (or outside of running the script in cron) and be reasonably sure that the outcome you get is the same that you will get when the script runs.
To just set the ulimit - you can also just put that in your script. That setting will change back to whatever your ulimit is once the script exits, of course
ulimit -n 2048 # set the number of open files
Apologies if I misremembered the "-n" option to ulimit as I'm not in front of a computer to verify whether I'm correct, but that's the gist of it and you can set all the options to the ulimit within the script in that fashion.
Hope that helps :)
Thanks for the suggestions but still isn't working. I have attempted to set the ulimit within the script with ulimit -f unlimited and this is running as the root user but it isn't setting the filesize limit correctly. I have even tried putting it in with env ulimit -f unlimited, still no luck. This is bugging the heck out of me. Everything works fine from command line and crontab, this is only happening when I'm submitting the job through TWS. :ooh:
Isn't it: setenv ulimit -f -1
I think that -1 means unlimited.
Also, try setenv instead of just env.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.
This is the result of previous question answered :
code for the listbox - datagridview interaction
At the top of the code ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...