Author |
Message
|
mikeHT |
Posted: Fri Dec 08, 2006 10:34 am Post subject: display mq process argument which has larger than 80 bytes |
|
|
Voyager
Joined: 01 Jul 2005 Posts: 82
|
I have more than 3 Queue managers which names QM_NAME1, QM_NAME2, ... QM_NAME4.
eg a process with a long argument will not properly display which Queue manager it really belongs because argument is more than 80 char/bytes long
ps -o pid -o args -u mqm |grep amqrrmfa
19295 /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME
19230 /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME
19165 /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME
How could I get ps -o pid -o args -u mqm to display something like
19295 /bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME1
19230 /bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME2
19165 /bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME3
Thanks. |
|
Back to top |
|
 |
wschutz |
Posted: Fri Dec 08, 2006 10:50 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
This works for me:
[wschutz@wschutz-t60p]$ ps -f -u mqm | grep amqrrmfa
mqm 7908 7866 0 08:05 ? 00:00:00 /opt/mqm/bin/amqrrmfa -m WSCHUTZ -t2332800 -s2592000 -p2592000 -g5184000 -c3600 _________________ -wayne |
|
Back to top |
|
 |
mikeHT |
Posted: Fri Dec 08, 2006 10:57 am Post subject: |
|
|
Voyager
Joined: 01 Jul 2005 Posts: 82
|
Wayne:
MQ v5.3 & on solaris 8.
ps -f -u mqm|grep amqrrmfa
mqm 1699 1658 0 Oct 27 ? 0:00 /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME
mqm 19092 19069 0 Oct 27 ? 0:03 /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME
mqm 18865 18854 0 Oct 27 ? 0:01 /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME
mqm 18965 18956 0 Oct 27 ? 1:35 /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME
I wish it was
/opt/mqm/bin/amqrrmfa -m QM_NAME1 -t2332800 -s2592000 -p2592000 -g5184000 -c3600
/opt/mqm/bin/amqrrmfa -m QM_NAME2 -t2332800 -s2592000 -p2592000 -g5184000 -c3600
but not in my case
Any other ideas? |
|
Back to top |
|
 |
wschutz |
Posted: Fri Dec 08, 2006 11:00 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Use "cut" or "sed" _________________ -wayne |
|
Back to top |
|
 |
mikeHT |
Posted: Fri Dec 08, 2006 11:26 am Post subject: |
|
|
Voyager
Joined: 01 Jul 2005 Posts: 82
|
How to get
"/opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME" in less than 80 characters?
I need it to display the fullname of the Queue manager.
like:
"/opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME1"
or
"/opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME4"
echo "/opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME4"|wc
1 8 81 -- Chars
System V ps only gives you the first 80 characters of the command name, |
|
Back to top |
|
 |
mikeHT |
Posted: Fri Dec 08, 2006 12:18 pm Post subject: |
|
|
Voyager
Joined: 01 Jul 2005 Posts: 82
|
All:
Is the information " /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m QM_NAME1" saved in a file on the system , solaris 8 , MQ5.3?
Thanks. |
|
Back to top |
|
 |
|