Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running MTA from the CLI 1

Status
Not open for further replies.

john3voltas

Technical User
Nov 12, 2013
138
PT
Hi there.
We have a customer running a very old build of CM 6.3 that we inherited from another BP.
The system is way overdue in terms of patching. We are currently negotiating a release upgrade but I'm afraid it won't be approved in the next couple of months.
In the meantime, they're having DS1 trouble with a PRI trunk set up between CM and an IVR machine they have. Apparently some calls get disconnected for no apparent reason and we need to find out why.
It occurred to me using the MTA logs but there's a bug in this release where the logs are actually saved to /var/log/ecs but the SMI webpage somehow can't parse them and it outputs an error. It is actually documented as a bug and it needs an update which we would rather not run now because we are not very confident with the system installation.
One thing leads to another and we would like to run the 'mta' command from the CLI but it is asking us for init or inads privilege which being a BP we obviously don't have.
Is there any way we can run the mta command without init/inads? Is there any other way to decrypt the mta logs without using the mta/MessageTrace application?
We tried to simply convert the Hex to ASCII but it's not that simple.
Thanks in advance.
Cheers
 
if you got dadmin, you can run this. Got it from another guy on these boards.

/usr/bin/sudo /opt/ecs/bin/logc -c 'view%mta' -t 0626:1200-0626:1230 > /tmp/mstdecoded.m
 
Jeez, I just noticed that it only spells out the first few lines and then it errors.
That's probably why the SMI is also unable to show the output of MTA logs.
Say, would it be possible to move the log files under /var/log/ecs to another CM instance and then run the MTA from there?
I am trying to do so right now but I am failing because with dadmin user I don't have permission to copy files into /var/log/ecs.
Trying to copy using:
'sudo cp /tmp/logfiles /var/log/ecs/'
But it's asking me for:
'[sudo] password for dadmin:'
And if I use dadmin's password it says:
'Sorry, user dadmin is not allowed to execute '/usr/bin/cp /tmp/2019-0115-153929.log /var/log/ecs/' as root on server1.'

Any way I can work around this? Maybe point the MTA to the log files in /tmp ?
Thanks in advance.
Cheers
 
I think I just found the answer to my own question.
Just moved the logs to another CM server under the /tmp folder.
Then I ran:
'/usr/bin/sudo /opt/ecs/bin/logc -ld /tmp -c 'view%mta' -t 0115:1200-0115:1600 > /tmp/mstdecoded.m'

The trick here is setting the '-ld /tmp' which tells logc to check log files in /tmp instead of /var/log/ecs.
Again, thanks a bunch for your help kyle555.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top