Gossamer Forum
Home : General : Internet Technologies :

Pretty cool - nohup

Quote Reply
Pretty cool - nohup
Got told a couple of days ago about a quite cool feature for using in SSH/Telnet.

nohup perl script.cgi --args > log.txt &

...this will run the process on your server without having to stay logged into the SSH session (unlike perl script.cgi --args > log.txt & would do).

Another cool thing I learned about tail is this;

tail -50 -f log.txt

This will show you the contents of log.txt dynamically (i.e as the process is running), without slowing the process down (maybe a little bit of a slowdown in CPU, cos it is doing one more task).... but none the less,the script will keep running, and you can see the process without holding it up :) This is pretty cool when it comes to build processes in LSQL, which can sometimes be pretty large.

Anyway, I learned these 2 commands off a client (who learned them off a tech support guy Sly), so I thought I would just pass them on to you log, as they are pretty cool Cool

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Pretty cool - nohup In reply to
http://www.gossamer-threads.com/...string=nohup;#257862

Wink

By the way:

Quote:
(unlike perl script.cgi --args > log.txt & would do).

That *would* infact do the same - its the "&" that keeps the process running, not the nohup. The nohup command causes the SIGHUP command to be ignored.
Quote Reply
Re: [Coombes] Pretty cool - nohup In reply to
>>>That *would* infact do the same - its the "&" that keeps the process running, not the nohup. The nohup command causes the SIGHUP command to be ignored. <<<

I don't think so. Whenever I use the & command, it simply puts it as a background process, but as soon as you close the SSH window, it stops. May just be a server restriction.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Coombes] Pretty cool - nohup In reply to
BTW;

Quote:
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=257862;search_string=nohup;#257862

I think that is my client Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!