06-12-2007
I would write a wrapper:
#! /usr/bin/ksh
exec >/some/log/file 2>&1
echo job started $(date)
/path/to/job
stat=$?
echo job finished $(date) with exit code $stat
exit 0
then just invoke the wrapper script.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How do you capture the return code from a background process?
I am dumping data to a fifo and then processing it in a c program.
I need to know that the sql finished successfully to ensure no missing data. Thanks.
ex.
sqlplus user/password < get_data.sql > data_fifo.txt &
bin/process_data... (2 Replies)
Discussion started by: korndog
2 Replies
2. SuSE
I have installed oracle 10g on suse sles9. I do not see oracle background processes.
ps -ef|grep ora_ gives me environment variables junk.
ps -ef|grep smon does not show anything however database is up and running.
Any idea how to tweak that? (1 Reply)
Discussion started by: vijayasawant
1 Replies
3. Shell Programming and Scripting
Hey!
I'm working on a script that will add a user, create some configfiles, and add a crontab for the user.
The crontab looks like the following:
@reboot /home/user/program config.conf &
I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies
4. Shell Programming and Scripting
Hi
I have a ksh script which fetches data from a db using a number of .arc files and creates CSV files for them and puts them on the server.
Question is, can I specifiy the start and stop times manually and run the script manually to fetch data for a certain period?
# Get the current... (0 Replies)
Discussion started by: shajju
0 Replies
5. Shell Programming and Scripting
Hi
I have a ksh script which fetches data from a db using a number of .arc files and creates CSV files for them and puts them on the server.
Question is, how can I specifiy the start and stop times specifically so that data is fetched for a certain period?
# Get the current time as the... (1 Reply)
Discussion started by: shajju
1 Replies
6. Shell Programming and Scripting
Ok guys so I have my first dummy shell almost done except for one tiny part: I do not know how to run a process in the background, from the code!
I already know how to do that in a normal shell:
$ program &
However, no clue when it comes to how to program that thing. :eek:
A very... (2 Replies)
Discussion started by: Across
2 Replies
7. AIX
Dear all experts,
I have a environment with 2 web, 2 apps and 2 db servers. Recently after I have patch the AIX O/S from 5300-11-02 to 5300-12-02, we found that the number of httpd processes increase largely. From originally 4 fix httpd processes become more than 600 processes. And it already... (1 Reply)
Discussion started by: kwliew999
1 Replies
8. Shell Programming and Scripting
Hi,
I have a schell script parent.ksh from which I am calling three background processes a.ksh,b.ksh and c.ksh. Once these three processes completes the next step in parent.ksh should execute. How to achieve this?
Please help me....
Thanks... (1 Reply)
Discussion started by: ravinunna
1 Replies
9. Shell Programming and Scripting
Hi,
I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies
10. Shell Programming and Scripting
Hi,
I have a log file (log.txt) that which contains lines of date/time.
I need to create a script to extract a CSV file (out.csv) that gets all the sequential times (with only 1 minute difference) together by stating the start time and end time of this period.
Sample log file (log.txt)
... (7 Replies)
Discussion started by: Mr.Zizo
7 Replies
fsx(8) System Manager's Manual fsx(8)
NAME
fsx - file system exerciser
SYNOPSIS
/usr/field/fsx [-h] [-ofile] [-tn] [-fpath] [-pm]
OPTIONS
The fsx options are: Prints the help messages for the fsx command. Saves the output diagnostics in file. Run time in minutes (n). The
default is to run until the process receives a Ctrl/C or a kill -15 pid command. Number (m) of fsx processes to spawn. The maximum is 250;
the default is 20. Path name of directory on file system you wish to test. For example, /mnt or /usr. The default is /usr/field.
DESCRIPTION
The fsx exerciser spawns the background process fsxr, and these two processes exercise a file system by creating, opening, writing, open-
ing, reading, validating, closing, and unlinking a test file. These test files are created in the /usr/field directory (the default)
unless the -fpath option is used.
You can spawn up to 250 (default is 20) fsx processes (fsxr1, fsxr2, ... fsxrn where n is the number of processes spawned). The exerciser
will run until a Ctrl/C or kill -15 pid command is sent to the process.
A logfile for you to examine and then remove is created in the current working directory. If there are errors in the logfile, make sure you
check the syslog file where the driver and kernel error messages are saved.
RESTRICTIONS
If you must run a system exerciser over an NFS link or on a diskless system, there are some restrictions. For exercisers such as fsx(8),
which must write into a file system, the target file system must be writable by root. Also, the directory in which any of the exercisers
are executed must be writable by root because temporary files are written into the current directory. These latter restrictions are some-
times difficult to overcome because often NFS file systems are mounted in a way that prevents root from writing into them. Some of the
restrictions may be overcome by copying fsx and fsxr to another directory and then executing it. Avoid using the fsx exerciser over an NFS
or diskless file system.
Each time you run fsx, it creates a log file. The exerciser allows you to accumulate up to 9 log files. If you run fsx to create a tenth
log file, it exits and displays the following error messages:
fsx: Remove old log files fsx: Can not start report generator, test aborted
When this situation occurs, remove at least one log file and run fsx again.
EXAMPLES
The following example runs 10 fsx processes on /mnt until the process receives a Ctrl/C or kill -15 pid command: % /usr/field/fsx -p10
-f/mnt The following example runs 20 fsx processes on /usr/field for 120 minutes in the background: % /usr/field/fsx -t120 &
SEE ALSO
Commands: cmx(8), diskx(8), memx(8), shmx(8), tapex(8)
fsx(8)