I am connected to remote machine Linux RH6 directly via ssh (key imported on server), when I execute a shell script with arguments for restarting the java service, I have a strange issue with ulimit:
- when I manually run
./script.sh stop;./catalina.sh startI see that the number of open files is not OK (1024) as defined in system file
- when a weekly job is executed which I have set up from
cron, I have the correct value from
- when I do
/bin/su - userand then restart, I have the correct value
I need a solution to modify the script to somehow source my system value and have real login shell in the bash script and to have the correct number of open files when I need to restart the service manually.
Hard limit for current shell:
ulimit -Ha open files (-n) 4096
cat /etc/security/limits.conf oracle hard nofile 16384
when cron job is executed number of opened files is 16384 good!, when i run script from current shell .
/script.sh stop; ./script.sh start i have 4096. Question is
how to get 16384 when i run script manually ?
Ps editing of
ulimit -n <number> does not help.