Unix Commands Related to MQ :
ls [–l] : Lists the files and directories information in long format
[-a] : Lists the files and directories information along with hidden files.
cp : Copies the files or directories from one location to another.
tar [xf] : To extract tar file.
tar xf source.tar –c destdir
[xzf] : To extract tar file in zip file.
tar xzf source.tar.gz –c destdir
rpm –a | grep MQ : To check what are the rpm packages installed on unix machine.
rpm –q | grep MQ : To know version of the rpm package installed.
rpm –i or –ivh packageName : To install a rpm package on unix machine.
rpm –uvh packageName : To update a rpm package on unix machine.
rpm –e installedPackageName : To uninstall a rpm package on unix machine.
export LD_ASSUME_KERNEL = 2.4.19 : To set the Kernel Level.
cat /etc/group : To know the groups which are already created.
cat /etc/group | grep groupName : To know particular group is already exist or not.
kill –9 pid1 pid2 etc., : To Kill the process[es].
ps –ef | grep QmgrName : To know the services which are running for Qmgr.
ps –A | grep pid : To know a process is belongs to which service.
netstat –anp | grep port_number : To know particular port is already in use or not.
uname [-a][-r][-v][-s] : To know o/s information like o/s name, version etc.,
chmod : To change the file/dir permissions.
chmod user/group/other +/- permissions
chmod 755 fileName
chown : To change the owner of the file or dir.
chown ownerName filename/dirName
chgrp : To change the group of the file or dir.
chgrp ownerName filename/dirName
UNIX BASIC COMMANDS: GREP
The grep command allows you to search one file or multiple files for lines that contain a pattern. Exit status is 0 if matches were found, 1 if no matches were found, and 2 if errors occurred.
SYNTAX
The syntax for the grep command is:
grep [options] pattern [files]
OPTIONS
Option | Description |
---|---|
-b | Display the block number at the beginning of each line. |
-c | Display the number of matched lines. |
-h | Display the matched lines, but do not display the filenames. |
-i | Ignore case sensitivity. |
-l | Display the filenames, but do not display the matched lines. |
-n | Display the matched lines and their line numbers. |
-s | Silent mode. |
-v | Display all lines that do NOT match. |
-w | Match whole word. |
Usefull MQ command
here are some usefull comand to use when working with MQ
command to display the queuestatus of a queue:
dis qs() type(handle) all
command to display the queuestatus of a queue (and only display the pid) :dis qs() type(handle) pid
command to display the queuestatus of a queue (and display the applicationtag and the pid) :dis qs() type(handle) appltag pid display all the queues that contains more then 0 messages: dis ql(*) where (curdepth gt 0)
start an api trace: strmqtrc -m [QM] -t api (the -t has several options. Logs are written to: /trace)
end a trace: endmqtrc -m [QM]
on windows you can read the TRC files via text viewer.
command to display the queuestatus of a queue:
dis qs(
command to display the queuestatus of a queue (and only display the pid) :dis qs(
command to display the queuestatus of a queue (and display the applicationtag and the pid) :dis qs(
start an api trace: strmqtrc -m [QM]
end a trace: endmqtrc -m [QM]
on windows you can read the TRC files via text viewer.
No comments:
Post a Comment