Something like this seems to work for me, fine (on Ubuntu). Perhaps, if you can provide more details as to your OS and a sample output, I may be able to help you better.
Again, a sample output from each of the commands would have helped. Seems like you have multiple instances of MSTRSvr. If the intent is to get the pid for one of them, try: