I don't know if I can do it with nohup, but this is the question.... I have this command:
nohup java -XX:MaxHeapFreeRatio=70 -Xmx2048M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof -jar $iscsiJar &
and I want that when the day change I save the before day nohupYYYYMM01.out and create another file nohupYYYYMM02.out , of course, with out kill my process. =)
Is it possible, how do I program it in shell script?
thanks a lot!
I think one solution for this is using Supervisord.
Below a example of /etc/supervisord.conf
Using supervisord you can stop/start this process like was a service.