Tuesday, 5 May 2015

a little life lesson on nohup and using it

I would nohup everything in my life if it was possible, it’s a very nice way of ensuring that your jobs continue, even if your session does not.  I do a lot of command line driven processing in E1 where I submit a job and cross my fingers that it’s going to complete.  This is generally running a shed load of SQL in the back ground.  The thing is, if I do not use nohup, I pretty much at the mercy of the network connection between my putty session and my server for a solid commit and knowing that everything has finished nicely.

This is where you cannot write long running scripts without the use of nohup. 

The following linux command could be written like:

./convertBigTables.ksh 

but, it’s too risky for a go-live.  So, what should be done is the following:


nohup ./convertBigTables.ksh > ./uniconvlogs/convertBigTablesnohup.log 2>&1 &


Then you can just

tail –f ./uniconvlogs/convertBigTablesnohup.log 

To follow the progress.  It now does not matter what happens with your network, your processing will continue!

No comments:

Extending JDE to generative AI