FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
293 views 2 comments
by anonymous

Running a simple script to enable / disable the IO scheduler via SMS messages.  On the whole this seems to be working fine, however in the use case where the scheduler is enabled at a time when the output is scheduled to be turned on, the output state is remaining off.  

Manually running /etc/init.d/ioman_scheduler reload or /etc/init.d/ioman_scheduler restart in a terminal shell achieves the desired result and the output status is switched to on, however if this same command is added to the script it appears to execute without any errors however the output is not turned on.

Is there an alternate scripting method for forcing an update of the output status after the ioman scheduler is enabled via UCI command?  I feel that there is something trivial that I'm missing here.

Example of script is as follows:

#!/bin/sh
uci set ioman.scheduler_general.enabled='1'
uci commit
/etc/init.d/ioman_scheduler reload

1 Answer

0 votes
by anonymous

Hello,

  

Thank you for reaching out!

I've recreated your setup on RUTX11, and the script seems to function as expected on RUTX_R_00.07.03.2.

Could you verify that this is the version in use on your setup?

Also, could you try disabling the ioset SMS rule? At least on the latest version, this rule needs to be disabled to enable the I/O Scheduler.

Otherwise, a factory reset is recommended, as there might be issues with your configuration files.

  

Let me know if any of these steps help.

Best regards,
DaumantasG

by anonymous
HI Daumantas,

Thanks for your reply.  With my original script everything was working except for the use case whereby the if the scheduler was re-enabled at a time that the output should be on (based on the schedule), the output would not turn on automatically right away.  I've since found a solution which was to restart the ioman service as well as the ioman_scheduler service.

/etc/init.d/ioman_scheduler restart

/etc/init.d/ioman restart
by anonymous

So to replicate the issue, the steps would be:

  • Enable the scheduler and set it to enable the output in a few minutes;
  • Once it enables the output, disable the scheduler;
  • Enable the scheduler using the SMS command that executes the script you wrote in the query.
Is that correct?

  

Best regards,
DaumantasG