Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Naming a background process

Posted on 1999-10-14
4
Medium Priority
?
265 Views
Last Modified: 2010-04-21
How do I assign a name to a background process?  For example,  I want to execute a script ./test & and I want to be able to find it using ps -ef |grep test.  Right now, if I  ./test &, a process gets assigned to it and I only see a -ksh for the name.
0
Comment
Question by:scawthon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
elfie earned 400 total points
ID: 2127883
With interactively started programs, the name you type will be the name for the background process.

If you don't see the process anymore, the process has terminated.

Just try putting at the end of the script a "sleep 60", and execute the ps again. You must see it
0
 

Author Comment

by:scawthon
ID: 2130822
I still only get a -ksh.  But if I use nohup <filename> I see a -sh <filename>.

0
 
LVL 3

Expert Comment

by:elfie
ID: 2137872
When doing the ps , you also see teh 'controlling' terminal.

try executing ps -ft 'controlling terminal'
it looks like "ps -ft pts/9"
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6821690
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects that and the expert will now receive these points, all verified.

Please click on your Member Profile, select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.
 
Thanks,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question