Main Menu

friends

Banner

Latest articles

monitor I/O with iotop
11/03/2010 | mad mad mod

iotop is a nice tool to monitor I/O usage information output by the Linux kernel (requires 2.6.20 or later). To install iotop with yum as root (for RedHat / Fedora / Centos based systems only)&nb [ ... ]


Installing VirtualBox on Linux (Fedora)
10/10/2009 | mad mad mod

If you want to run windows application on Linux, you have several options:use wineInstall Windows in a XEN VM (with full virtualization) Install Windows on a VMWare VM (Server or Player)Install Windo [ ... ]


Other Articles
Facebook MySpace Twitter Digg Delicious Stumbleupon Google Bookmarks 

Designed by:
SiteGround web hosting Joomla Templates
How to run a command in the background or after you exit from a shell prompt E-mail
sysadmin

Solution 1: use "nohup"

 

example:

[root@blackmod ~]# nohup sleep 1234 &
nohup: ignoring input and appending output to `nohup.out'
[1] 2800
[root@blackmod ~]# exit
logout

 

logon again and check the sleep process with ps:

[root@blackmod ~]# ps -Fp 2800
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root      2800     1  0  1331   476   0 06:54 pts/1    00:00:00 sleep 1234

 

A nice way to monitor the output of a nohup command ist to use tail -f:

[root@blackmod ~]# nohup find / -name test &
nohup: ignoring input and appending output to `nohup.out'
[1] 2909
[root@blackmod ~]# tail -f nohup.out

/test/myfile

/test/myfilex

 

 

Solution 2: use "at"

 

To submit a command with "at" you just have to echo your command and pipe it to at:

 

[root@blackmod ~]# echo sleep 11111 | at now
job 1 at 2010-03-10 07:01

exit

 

logon again and check the sleep process with ps:


[root@blackmod ~]# ps -ef | grep 11111
root      2942  2941  0 07:01 ?        00:00:00 sleep 11111

 

 

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting