For Processes: If you are submitting SPSS batch jobs using large data sets you may find the next two commands handy. Display process status: ps Terminate a process: kill PID Occasionally you may begin a large batch job and then for some reason decide that you need to cancel the job. In UNIX this is a relatively simple operation, yet one that should not be done with undue frequency as there are risks involved. For example, when you invoke SPSS a short message will preceed your command. This contains your process id number. % spss -m <first.sps >first.lis &
Terminating a process is quite simple if you remember this number. When you type the command kill followed by the process id number (PID) the job will be terminated at the point of interruption. This means if SPSS has all ready calculated half of your output before you terminated the job that half of the output will not be deleted, but will be located in the specified output file. % kill 5809
If you forget the PID number and on that rare occasion need to know what it is, use the command ps. When you see the example below, you will notice that there are numerous jobs listed that you did not specifically request. Some of these are vital processes that UNIX automatically invokes. BE CAREFUL NOT TO DELETE THE WRONG PROCESS! Again, it
is best not to use the kill command unless absolutely necessary as there
is risk involved.
% spss -m <first.sps >first.lis
5809 ttyx12 0:00 spsscmd
% kill 5809
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|