Job management in the linux foreground

Source: Internet
Author: User
1. check jobs: hadoop11: usrlibhivejobs [1] & amp; 43; Running.

1. check jobs:

Hadoop11:/usr/lib/hive # jobs
[1] + Running nohup hive -- service hiveserver-p 10000 & (wd:/usr/lib/hadoop-0.20.2/bin)

Hadoop11:/usr/lib/hive # jobs-l
[1] + 5813 Running nohup hive -- service hiveserver-p 10000 & (wd:/usr/lib/hadoop-0.20.2/bin)

2. the background process is forwarded to the foreground

Hadoop11:/usr/lib/hive # fg % 1
Nohup hive -- service hiveserver-p 10000 (wd:/usr/lib/hadoop-0.20.2/bin)

Ctrl + z
You can put a command that is being executed on the foreground in the background and pause it.

3. run the following command in the background:

Hadoop11:/usr/lib/hive # nohup hive -- service hiveserver-p 10000 &
[1] 12550
Hadoop11:/usr/lib/hive # nohup: appending output to 'nohup. out'

4. kill the job:

Hadoop11 :~ # Nohup hive -- service hiveserver-p 10000 &
[1] 13284
Nohup: appending output to 'nohup. out'
Hadoop11 :~ # Jobs-l
[1] + 13284 Running nohup hive -- service hiveserver-p 10000 &
Hadoop11 :~ # Kill-9 13284
-Bash: kill: (13284)-No such process
[1] + Done nohup hive -- service hiveserver-p 10000
Hadoop11 :~ # Nohup hive -- service hiveserver-p 10000 &
[1] 13368
Nohup: appending output to 'nohup. out'
Hadoop11 :~ # Kill % 1
-Bash: kill: (13368)-No such process
[1] + Done nohup hive -- service hiveserver-p 10000

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.