Page 1 of 1

Scripting

Posted: 06 Jul 2009 23:51
by sonicpelican
Hi, I'm new at this Alcatel stuff so please excuse my ignorance. Question: is it possible to script something like resetting a coupler and run this script once a day.

Cheers,
Rod.

Re: Scripting

Posted: 07 Jul 2009 07:56
by tincho.rn
Hi. First, take into account that it is not the best way to reboot a board to solve a issue. Second, OXE works over a Linux SO. So shell scripting apply. Using crond and commands like rstcpl, you can program watch you need. Regards.

Re: Scripting

Posted: 08 Dec 2009 21:19
by sonicpelican
In some countries the telephony services are so poor that there is little option other than resetting the APA cards occasionally.

I have found the best way to do this is to edit the /usr2/mtcl/mtcl.cron file to include a line something like this:

15 2 * * * /DHS3bin/oneshot/mtcl/tool rstcpl 2 7 >/dev/null

This will reset the coupler in Shelf 2 slot 7 at 2.15am every morning

Explanation of syntax:

15 ……………………………… Minute (0-59)
2 ……………………………….. Hour of the day (0-23)
* ……………………………….. Day of the Month (0-31) (* indicates every day)
* ……………………………….. Month (1-12) 1=January etc. (* indicates every month)
* ……………………………….. Day of the week (0-6) 0=Sunday etc. (* indicates any day)
/DHS3bin/oneshot/mtcl/tool ….. Executable command including path
rstcpl ………………………….. 1st argument (in this case to reset the coupler)
2 ………………………………. 2nd argument (in this case the shelf containing the coupler)
7 ………………………………. 3rd argument (in this case the slot containing the coupler)
>/dev/null …………………....... redirects any output to the bit-bucket so no email is generated on errors.

Of course if you need to reset more than one coupler in the shelf then you have to add additional lines for each coupler.

Cheers,
Rod.

Re: Scripting

Posted: 09 Dec 2009 00:25
by krzysioD
sonicpelican wrote:In some countries the telephony services are so poor that there is little option other than resetting the APA cards occasionally.
Or reset S0 add-ons behind the UA sets, because they simply hang... been there, seen that.
sonicpelican wrote: I have found the best way to do this is to edit the /usr2/mtcl/mtcl.cron file to include a line something like this:
[/qoute]

No, no no!
Use

Code: Select all

crontab -e
or better i think it was an option in swinst menu to edit mctl's crontab, and preserve this crontab in linux-data backup. Or maybe it was not in swinst menu, well i'm getting old... was it cfgCron ?