Solved

Find Process ID of Job Created with AT

Posted on 1999-01-25
7
249 Views
Last Modified: 2010-05-18
When I start a command with AT, I wish to know its process ID to kill it, and see if its finished.  How is this done?
I normally use tail -f <logfile> to watch its log progress.
0
Comment
Question by:snydero
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 7

Expert Comment

by:HalldorG
ID: 2009410
pstree will give you some clues
0
 
LVL 1

Author Comment

by:snydero
ID: 2009411
Sorry I didn't mention that its Sun Solaris 2.6 - bash shell.
The pstree command is not found.  Could i change shell and use it.  How do I change shell?

0
 
LVL 7

Expert Comment

by:HalldorG
ID: 2009412
The pstree is a linux command :( sorry
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Accepted Solution

by:
jcea earned 50 total points
ID: 2009413
* Write in the AT invocation something like "cat $$ >/path/pid". So, when AT executes your process,. its PID will be saved into "pid" file.

* Run your AT jobs as a special user. You can use "ptree" to see the processes tree per User or per PID.
0
 
LVL 1

Author Comment

by:snydero
ID: 2009414
I had to use "echo $$ >/path/pid" in this version (bash)
Thanks for the expertise
0
 
LVL 1

Expert Comment

by:jcea
ID: 2009415
Yeah, a typo, you know :-). You're right, of course.
0
 

Expert Comment

by:ssaldhi
ID: 2009416
After giving the at command ,just give echo $$ to have its PID
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now