Sponsored Content
Top Forums Shell Programming and Scripting Executing MQ commands in Perl Post 302986572 by bakunin on Sunday 27th of November 2016 02:15:42 PM
Old 11-27-2016
Quote:
Originally Posted by giridhar276
But when I execute the below code.. it is displaying the output on the screen directly instead of storing to variable
I don't know for sure (but can test tomorrrow, whe back in the office) but i suppose that MQ is not using the usual UNIX stdout/stderr-mechanism for displaying output. What happens when you redirect the output on the commandline, like this?

Code:
$ crtmqm clientinfo > /tmp/somefile

Does the output end in the file or still on the screen? In the manual there is a parameter "-ld <pathname>" mentioned which specifies a log directory,but i suppose there only goes the logs for the newly created queue manager, not the output of the creation of the queue manager.

In case you want to just check if everything worked successfully you could just check the return code, according to this page they are meaningful (unlike other IBM tools, ~sigh~).

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

FTP - Executing Commands

I have written a script to ftp a file from Unix to an NT machine to authenticate ftp login I have added the information into the .netrc file when logged in using ftp the commands are not executed. Does anybody know how to make the command execute once username and password have been provided using... (2 Replies)
Discussion started by: hesmas
2 Replies

2. Shell Programming and Scripting

Executing mpirun commands

Basically, I would like to run an mpirun query on my web server to query your databases via yours when using the BLAST program, however the server seems not able to execute even basic mpirun programs such as cpi (to calculate pi). Are there any settings I should take note of? I am running Perl... (0 Replies)
Discussion started by: tesswulf
0 Replies

3. UNIX for Dummies Questions & Answers

Executing commands after I log off

Hi, guys ! I have at home a simple network. I have a server that shares the internet connection to my computer and another another computer which is located in another room. When I want to download something, I'd like to download directly on the server, without letting my computer on. The server... (2 Replies)
Discussion started by: Sergiu-IT
2 Replies

4. Red Hat

How commands are executing ?

Hi Folks, I have a small doubt, the binary commands under /bin and /sbin as well as other path binary files, if you peek deep into that, you can find the difference in the way of normal perl programming and some commands will be like binary files. how are the commands executing like the... (3 Replies)
Discussion started by: gsiva
3 Replies

5. Shell Programming and Scripting

Executing many commands at once

Hi, I want to run these two commands one after the other. awk 'BEGIN {OFS="\t"} {print $2}' sort -u rather than typing awk 'BEGIN {OFS="\t"} {print $2}' file1 > file2, then sort -u file2 > file3. Is it possible to run both commands on file1 then get output file3? Its kinda hard for... (5 Replies)
Discussion started by: kylle345
5 Replies

6. Shell Programming and Scripting

executing commands over ssh

Hi I am trying to send a command over ssh with a parameter but the shell fails to expand the command properly any ideas what am i doing wrong with this. This is ssh on AIX for i in 71 72 73 74 75 do for server in server1 server2 do somestr="Some String" echo "$server... (3 Replies)
Discussion started by: xiamin
3 Replies

7. Shell Programming and Scripting

Executing commands

I need to execute a command to run my script several times with varying parameters perl ex.pl -b 130198 -e 130884 -c plot plot.txt 1_plot.txt perl ex.pl -b 1345 -e 1308 -c plot plot.txt 2_plot.txt perl ex.pl -b 1345567 -e 130898 -c plot plot.txt 3_plot.txt . . . 100's of excutions ... (2 Replies)
Discussion started by: Lucky Ali
2 Replies

8. Shell Programming and Scripting

Executing two commands in parallel

Hi, I am stuck into a situation where i want to execute a command in my shell script well along with a previous command in order to achieve something but i am not figuring out a way. here is a snippet: service management restart rm -rf lock.file in the above, if you see, i am trying to... (5 Replies)
Discussion started by: sunrexstar
5 Replies

9. Shell Programming and Scripting

Trouble executing piped shell commands in perl code

I am trying to execute a piped combination of shell commands inside a perl program. However, it is not working as desired. This is my program, i am trying to print only filenames from the output of ls -l $ cat list_test #!/usr/bin/perl -w use strict; my $count=0; my @list=`ls -l|awk... (4 Replies)
Discussion started by: sam05121988
4 Replies

10. Shell Programming and Scripting

Executing commands sequentially

Hello. I am new in shell script. Could anyone help me? I have un shell script. I need each command in it be sequentielly, when the first command ends the second starts. When the second ends et third starts, and so on Thanks in adavance (1 Reply)
Discussion started by: nurinolo
1 Replies
RSL(5)								  GRAM5 Commands							    RSL(5)

NAME
rsl - GRAM5 RSL Attributes DESCRIPTION
arguments The command line arguments for the executable. Use quotes, if a space is required in a single argument. count The number of executions of the executable. [Default: 1] directory Specifies the path of the directory the jobmanager will use as the default directory for the requested job. [Default: $(HOME)] dry_run If dryrun = yes then the jobmanager will not submit the job for execution and will return success. [Default: no] environment The environment variables that will be defined for the executable in addition to default set that is given to the job by the jobmanager. executable The name of the executable file to run on the remote machine. If the value is a GASS URL, the file is transferred to the remote gass cache before executing the job and removed after the job has terminated. expiration Time (in seconds) after a a job fails to receive a two-phase commit end signal before it is cleaned up. [Default: 14400] file_clean_up Specifies a list of files which will be removed after the job is completed. file_stage_in Specifies a list of ("remote URL" "local file") pairs which indicate files to be staged to the nodes which will run the job. file_stage_in_shared Specifies a list of ("remote URL" "local file") pairs which indicate files to be staged into the cache. A symlink from the cache to the "local file" path will be made. file_stage_out Specifies a list of ("local file" "remote URL") pairs which indicate files to be staged from the job to a GASS-compatible file server. gass_cache Specifies location to override the GASS cache location. gram_my_job Obsolete and ignored. [Default: collective] host_count Only applies to clusters of SMP computers, such as newer IBM SP systems. Defines the number of nodes ("pizza boxes") to distribute the "count" processes across. job_type This specifies how the jobmanager should start the job. Possible values are single (even if the count > 1, only start 1 process or thread), multiple (start count processes or threads), mpi (use the appropriate method (e.g. mpirun) to start a program compiled with a vendor-provided MPI library. Program is started with count nodes), and condor (starts condor jobs in the "condor" universe.) [Default: multiple] library_path Specifies a list of paths to be appended to the system-specific library path environment variables. [Default: $(GLOBUS_LOCATION)/lib] loglevel Override the default log level for this job. The value of this attribute consists of a combination of the strings FATAL, ERROR, WARN, INFO, DEBUG, TRACE joined by the | character logpattern Override the default log path pattern for this job. The value of this attribute is a string (potentially containing RSL substitutions) that is evaluated to the path to write the log to. If the resulting string contains the string $(DATE) (or any other RSL substitution), it will be reevaluated at log time. max_cpu_time Explicitly set the maximum cputime for a single execution of the executable. The units is in minutes. The value will go through an atoi() conversion in order to get an integer. If the GRAM scheduler cannot set cputime, then an error will be returned. max_memory Explicitly set the maximum amount of memory for a single execution of the executable. The units is in Megabytes. The value will go through an atoi() conversion in order to get an integer. If the GRAM scheduler cannot set maxMemory, then an error will be returned. max_time The maximum walltime or cputime for a single execution of the executable. Walltime or cputime is selected by the GRAM scheduler being interfaced. The units is in minutes. The value will go through an atoi() conversion in order to get an integer. max_wall_time Explicitly set the maximum walltime for a single execution of the executable. The units is in minutes. The value will go through an atoi() conversion in order to get an integer. If the GRAM scheduler cannot set walltime, then an error will be returned. min_memory Explicitly set the minimum amount of memory for a single execution of the executable. The units is in Megabytes. The value will go through an atoi() conversion in order to get an integer. If the GRAM scheduler cannot set minMemory, then an error will be returned. project Target the job to be allocated to a project account as defined by the scheduler at the defined (remote) resource. proxy_timeout Obsolete and ignored. Now a job-manager-wide setting. queue Target the job to a queue (class) name as defined by the scheduler at the defined (remote) resource. remote_io_url Writes the given value (a URL base string) to a file, and adds the path to that file to the environment throught the GLOBUS_REMOTE_IO_URL environment variable. If this is specified as part of a job restart RSL, the job manager will update the file's contents. This is intended for jobs that want to access files via GASS, but the URL of the GASS server has changed due to a GASS server restart. restart Start a new job manager, but instead of submitting a new job, start managing an existing job. The job manager will search for the job state file created by the original job manager. If it finds the file and successfully reads it, it will become the new manager of the job, sending callbacks on status and streaming stdout/err if appropriate. It will fail if it detects that the old jobmanager is still alive (via a timestamp in the state file). If stdout or stderr was being streamed over the network, new stdout and stderr attributes can be specified in the restart RSL and the jobmanager will stream to the new locations (useful when output is going to a GASS server started by the client that's listening on a dynamic port, and the client was restarted). The new job manager will return a new contact string that should be used to communicate with it. If a jobmanager is restarted multiple times, any of the previous contact strings can be given for the restart attribute. rsl_substitution Specifies a list of values which can be substituted into other rsl attributes' values through the $(SUBSTITUTION) mechanism. save_state Causes the jobmanager to save it's job state information to a persistent file on disk. If the job manager exits or is suspended, the client can later start up a new job manager which can continue monitoring the job. savejobdescription Save a copy of the job description to $HOME [Default: no] scratch_dir Specifies the location to create a scratch subdirectory in. A SCRATCH_DIRECTORY RSL substitution will be filled with the name of the directory which is created. stderr The name of the remote file to store the standard error from the job. If the value is a GASS URL, the standard error from the job is transferred dynamically during the execution of the job. There are two accepted forms of this value. It can consist of a single destination: stderr = URL, or a sequence of destinations: stderr = (DESTINATION) (DESTINATION). In the latter case, the DESTINATION may itself be a URL or a sequence of an x-gass-cache URL followed by a cache tag. [Default: /dev/null] stderr_position Specifies where in the file remote standard error streaming should be restarted from. Must be 0. stdin The name of the file to be used as standard input for the executable on the remote machine. If the value is a GASS URL, the file is transferred to the remote gass cache before executing the job and removed after the job has terminated. [Default: /dev/null] stdout The name of the remote file to store the standard output from the job. If the value is a GASS URL, the standard output from the job is transferred dynamically during the execution of the job. There are two accepted forms of this value. It can consist of a single destination: stdout = URL, or a sequence of destinations: stdout = (DESTINATION) (DESTINATION). In the latter case, the DESTINATION may itself be a URL or a sequence of an x-gass-cache URL followed by a cache tag. [Default: /dev/null] stdout_position Specifies where in the file remote output streaming should be restarted from. Must be 0. two_phase Use a two-phase commit for job submission and completion. The job manager will respond to the initial job request with a WAITING_FOR_COMMIT error. It will then wait for a signal from the client before doing the actual job submission. The integer supplied is the number of seconds the job manager should wait before timing out. If the job manager times out before receiving the commit signal, or if a client issues a cancel signal, the job manager will clean up the job's files and exit, sending a callback with the job status as GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED. After the job manager sends a DONE or FAILED callback, it will wait for a commit signal from the client. If it receives one, it cleans up and exits as usual. If it times out and save_state was enabled, it will leave all of the job's files in place and exit (assuming the client is down and will attempt a job restart later). The timeoutvalue can be extended via a signal. When one of the following errors occurs, the job manager does not delete the job state file when it exits: GLOBUS_GRAM_PROTOCOL_ERROR_COMMIT_TIMED_OUT, GLOBUS_GRAM_PROTOCOL_ERROR_TTL_EXPIRED, GLOBUS_GRAM_PROTOCOL_ERROR_JM_STOPPED, GLOBUS_GRAM_PROTOCOL_ERROR_USER_PROXY_EXPIRED. In these cases, it can not be restarted, so the job manager will not wait for the commit signal after sending the FAILED callback username Verify that the job is running as this user. University of Chicago 03/29/2012 RSL(5)
All times are GMT -4. The time now is 04:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy