"Process management" question


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers "Process management" question
# 1  
Old 01-12-2004
"Process management" question

This one will show how "wet behind the ears" I am but here it goes...

Suppose my boss wants me to run an app every day from the command line. The command line statement looks like this:

$> my_executable_program -my_parameter file > my_outfile

Let's say that one day, I do this:

$> my_executable_program -my_parameter file

and forget to send my output to a file. I have two problems:

1/ my program massages *tons* of data and takes 18 hours to run
2/ It is critical that my boss has the output file for data analysts to review.

Since I don't want to restart my program for scratch, can I...

-pause my process ... like "kill -24 <processnumber>" ,
-edit the command line ... like "fc -e vi my_executable_program..."
-restart my program where it left off... "kill -26 <processnumber>"

(I got the `kill` values on the HP-UX documentation...)

This may sound like a stupid question. I am only trying to learn...thank you for being patient/teaching me.

Al.
Smilie
# 2  
Old 01-12-2004
Not going to work. Sorry.

You can pause and restart the process. But it will resume where it left off.

You can use fc to edit the history and repair the command. But if you run it, you run a new copy of the process.

But there is a solution here. Your program, "my_executable_file", does not need to accept whatever the shell feeds it for stdin. If it must output to "my_outfile", it should simply open the file itself. Then the error you're worried about becomes impossible.

If you can't modify the program, write a tiny shell script that invokes it correctly. Then just run the script each day.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Advanced & Expert Users

Debian Package Management "Inside" Question

Greetings. After rifling through the policy manual to some significant extent, I've come to a question which doesn't seem to have any forthcoming answer out "in the wild", so here it is :) During dpkg installation processing, some libs wind up with an ":i386" or ":amd64" architecture string... (2 Replies)
Discussion started by: LinQ
2 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Red Hat

"service" , "process" and " daemon" ?

Friends , Anybody plz tell me what is the basic difference between "service" , "process" and " daemon" ? Waiting for kind reply .. .. (1 Reply)
Discussion started by: shipon_97
1 Replies

6. UNIX for Advanced & Expert Users

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses... Here is the configuration of my system: * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies

7. UNIX and Linux Applications

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or question of my own) is: Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

9. UNIX for Dummies Questions & Answers

Process seen in "ps aux" but not "top"

Hi, I have a process that can be seen after "ps aux" command. However when I do "top" command. This process cannot be seen. How can this happen? Is there anything wrong with my code? (3 Replies)
Discussion started by: monkfan
3 Replies
Login or Register to Ask a Question