We are having a requirement where one shell script, say a.sh (which uses Java and connects to Oracle database using JDBC) keeps on running everytime. I created a wrapper (to check whether a.sh is running and if not then to start it) and scheduled it in the crontab. Now all the output from this script gets written to the mail file of the user.
To avoid the whole stuff being written to the mail file, i thought about re-directing the same to some log files (generated on the daily basis). I tried this:
But now the issue is, if a.sh keeps on running without any issues, wrapper doesn't find anything to do and the the output keeps on getting appended to the very first logfile (logfile when first time a.sh started). Is there a possible way out so that i can generat logs in files created for everyday.
Hi,
I hope this is problem makes sense and that someone can offer some advice.
Basically i have a perl script which accesses a database and outputs the information to a file.
Is it possible to use a 'system' command to embeb some Unix command which moves that file to another directory... (3 Replies)
Is it possible to run <talk> such that both sides of the conversation are written to the screen and also to a file?
I use the utility to chat with collaborators and sometimes it would be nice to have a record of our conversation while we are problem solving.
I am running OS X, so <talk>... (4 Replies)
Hi. I'm a newbie in scripting and i have this problem: i want to use the 'fuser' command on a file to tell if it's being accessed (for my purposes: still being written). I want to save the output of the command and later compare with the 'not being used' result.
the script:
#!/bin/bash... (2 Replies)
I have a Bourne Shell script that is normally run as a background job and redirects it's output to a file internally (using exec >>); I use "set -x" to capture each command which provides me with a nice shell execution log if it all goes to pieces.
I now also need to be able to also run this as... (4 Replies)
Hi,
Below is the whole string which is to be redirected to the new file.
su - oracle -c "exp $user/$pass file=/oracle/oradata/backup/exp_trn_tables_`date +%d_%b_20%y_%H_%M_%S`.dmp log=/oracle/oradata/backup/exp_trn_tables_`date +%d_%b_20%y_%H_%M_%S`.log tables=table1,table2 statistics=none"
... (3 Replies)
Hello All,
I have some unique requirement.
I have written a very lengthy script which calls number of resource script to execute a particular task.
What I want is output of each command(called from main script and resource scripts) should go to a... (3 Replies)
When i am issuing chage command, it reporting the output properly.
But when i redirect the output, i am not getting the output in the mentioned path.
chage -l root >> /tmp/chage.txt.
I need to use this into the script to capture the data. I think its seems to be bug with RHEL 6.3. Same... (3 Replies)
Hi,
I have to redirect output of the command "perldoc perllocal" to new file which
contains all the perl module installed.
Currently using
perldoc perllocal >> mod_data
This does not contain all perl modules installed locally on machine, and each character is doubled.
Please... (3 Replies)
Hi,
I have created script which redirect the output to file.I am able to get the output in file but not in the format.
Output :Content of the log which have 10 -15 lines.
Actal :Line1 ..Line 2Line3 Line4 Line 5
Expected:Line1
Line 2
Line3
Please... (7 Replies)
Discussion started by: karthik771
7 Replies
LEARN ABOUT OPENSOLARIS
imqdbmgr
imqdbmgr(1M) System Administration Commands imqdbmgr(1M)NAME
imqdbmgr - manage a plugged-in JDBC-compliant Message Queue data store
SYNOPSIS
/usr/bin/imqdbmgr subcommand argument [ [option...]]
/usr/bin/imqdbmgr -h | -help
/usr/bin/imqdbmgr -v | -version
DESCRIPTION
The imqdbmgr utility creates and manages a Java DataBase Connectivity (JDBC) compliant database used for Message Queue persistent storage.
The database can be either embedded or external. To use a JDBC-compliant database (and the imdbmgr utility), you need to first set a number
of JDBC-related properties in the broker instance configuration file. See the Sun Java System Message Queue Administrator's Guide for addi-
tional information.
imqdbmgr supports four management subcommands. These subcommands, and their corresponding arguments and options follow the imqdbmgr command
on the command line. See USAGE and OPTIONS.
The following subcommands are supported:
create Create a Message Queue database schema.
delete Delete Message Queue database tables in the current data store.
recreate Delete Message Queue database tables and recreate Message Queue database schema in the curent data store.
reset Reset the database table lock to allow other processes to access database tables.
The imqdbmgr subcommands support the following arguments:
all Indicates the subcommand applies to the data store, as well as the database tables.
lck Indicates the subcommand applies to the database table lock.
oldtbl Indicates the subcommand applies to an older version of the database tables.
tbl Indicates the subcommand applies to the database tables only.
OPTIONS
The following options are supported:
-b brokerName Specify the broker instance name and corresponding instance configuration properties. If this option is not specified,
the default broker instance is assumed.
Use this option with the create, delete, recreate, or reset subcommands.
-D property=value Set system property property to value.
Use this option with the create, delete, recreate, or reset subcommands.
-h | -help Display usage help. Execute nothing else on the command line.
-p password Specify the database password.
Use this option with the create, delete, recreate, or reset subcommands.
-u userName Specify the database user name.
Use this option with the create, delete, recreate, or reset subcommands.
-v | -version Display version information. Execute nothing else on the command line.
USAGE
The following subcommands and associated arguments are supported:
create all
Create a new embedded data store and Message Queue database schema for a specified or default broker instance.
create tbl [-u userName] [-p password]
Create Message Queue database schema in an existing data store for a specified or default broker instance.
delete tbl [-u userName] [-p password]
Delete Message Queue database tables in the current data store for a specified or default broker instance.
delete oldtbl [-u userName] [-p password]
Delete the earlier version of Message Queue database tables. Used after the data store has been automatically migrated to the current
version of Message Queue.
recreate tbl [-u userName] [-p password]
Delete Message Queue database tables and recreate Message Queue database schema in the current data store for a specified or default
broker instance.
reset lck
Reset the database table lock to allow other processes to access database tables.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of this command:
IMQ_JAVAHOME Specify the Java 2 compatible runtime. When this environment variable is not set it defaults to /usr/j2se.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/var/imq/instances/brokerName/dbstore
Recommended directory in which to create an embedded database.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWiqu |
+-----------------------------+-----------------------------+
SEE ALSO imqadmin(1M), imqbrokerd(1M), imqcmd(1M), imqusermgr(1M), imqkeytool(1M), imqobjmgr(1M), attributes(5)
Sun Java System Message Queue Administrator's Guide
SunOS 5.11 29 Mar 2004 imqdbmgr(1M)