Changes

no edit summary
Line 7: Line 7:  
Mobile Traffic Usage Logging is inactive by default and must first be enabled in the '''Configuration''' section in order to start logging data usage values:
 
Mobile Traffic Usage Logging is inactive by default and must first be enabled in the '''Configuration''' section in order to start logging data usage values:
   −
[[File:Rutxxx webui status mobile traffic configuration v1.png]]
+
[[File:{{{configuration_file}}}]]
 +
 
 +
<table class="nd-mantable">
 +
    <tr>
 +
        <th>field name</th>
 +
      <th>value</th>
 +
      <th>description</th>
 +
    </tr>
 +
    <tr>
 +
    <td>Enable</td>
 +
        <td>yes | no; Default: <b>no</b></td>
 +
        <td>Enables Mobile Traffic Usage Logging (can also be enabled from <b>Services → [[{{{name}}} Modbus|Modbus]]</b>)</td>
 +
    </tr>
 +
    <tr>
 +
    <td>Interval between records (sec)</td>
 +
        <td>integer [3..∞]; Default: <b>10</b></td>
 +
        <td>Specifies the frequency of logging records (in seconds)</td>
 +
    </tr>
 +
</table>
 +
 
    
==Mobile Traffic Usage periods==
 
==Mobile Traffic Usage periods==
Line 20: Line 39:  
The figure below is an example of the weekly data usage graph:
 
The figure below is an example of the weekly data usage graph:
 
   
 
   
[[File:Rutxxx webui status mobile traffic periods v1.png]]
+
[[File:{{{periods_file}}}]]
    
Data usage graphs for other periods of time are essentially identical, with the exception that different time units (hours for daily usage, days of the week/month for weekly/monthly usage, months for total data usage) are displayed at the top of the graphs.
 
Data usage graphs for other periods of time are essentially identical, with the exception that different time units (hours for daily usage, days of the week/month for weekly/monthly usage, months for total data usage) are displayed at the top of the graphs.
    
Take note that the '''Delete all data''' button (located in the bottom right corner of each graph) clears the entire data usage database, meaning that data usage values for '''all periods''' will be cleared and the '''data limit counter''' will be reset.
 
Take note that the '''Delete all data''' button (located in the bottom right corner of each graph) clears the entire data usage database, meaning that data usage values for '''all periods''' will be cleared and the '''data limit counter''' will be reset.
 +
 +
==Obtaining data usage values from command line==
 +
 +
Mobile data usage values can also be obtained by executing the '''mdcollectdctl''' command from a [[Command line interfaces|command line interface]]. The usage for this command is described bellow:
 +
<pre>
 +
usage: mdcollectdctl OPTIONS
 +
-cdayrx<SIM>                                        | GET today RX
 +
-cdaytx<SIM>                                        | GET today TX
 +
-clast24hrx<SIM>                                    | GET last 24h RX
 +
-clast24htx<SIM>                                    | GET last 24h TX
 +
-cweekrx<SIM>                                      | GET this week RX
 +
-cweektx<SIM>                                      | GET this week TX
 +
-pweekrx<SIM>                                      | GET last seven days RX
 +
-pweektx<SIM>                                      | GET last seven days TX
 +
-cmonthrx<SIM>                                      | GET this month RX
 +
-cmonthtx<SIM>                                      | GET this month TX
 +
-pmonthrx<SIM>                                      | GET last month(30 days) RX
 +
-pmonthtx<SIM>                                      | GET last month(30 days) TX
 +
-rx                                                | GET current sim RX from reset
 +
-tx                                                | GET current sim TX from reset
 +
-dayrx<SIM> <YEAR> <MONTH> <DAY>                    | GET entered day RX
 +
-daytx<SIM> <YEAR> <MONTH> <DAY>                    | GET entered day TX
 +
-monthrx<SIM> <YEAR> <MONTH>                        | GET entered month RX
 +
-monthtx<SIM> <YEAR> <MONTH>                        | GET entered month TX
 +
-fromtorx<SIM> <FROM_YEAR> <FROM_MONTH> <FROM_DAY>  | GET RX from entered date to today
 +
-fromtotx<SIM> <FROM_YEAR> <FROM_MONTH> <FROM_DAY>  | GET TX from entered date to today
 +
-fromtorx<SIM> <FROM_YEAR> <FROM_MONTH> <FROM_DAY>  <TO_YEAR> <TO_MONTH> <TO_DAY> | GET RX from entered date to entered date
 +
-fromtotx<SIM> <FROM_YEAR> <FROM_MONTH> <FROM_DAY>  <TO_YEAR> <TO_MONTH> <TO_DAY> | GET TX from entered date to entered date
 +
-clear                                              | Reset collected data
 +
-backup                                            | Backup database
 +
</pre>
 +
{{#ifeq: {{lc:{{{series}}}}} | rut2xx
 +
| The <SIM> value can be omitted when using the command on {{{name}}} routers
 +
|{{#ifeq: {{lc:{{{name}}}}} | rut850 | The <SIM> value can be omitted when using the command on {{{name}}} routers | }}
 +
}}
 +
To print the usage helper list, use '''mdcollectdctl --help'''.
 +
 +
'''Examples''':
 +
<ul>
 +
    <li>Print usage
 +
    <li>Get data usage of SIM1 for the current day:
 +
        <pre>root@Teltonika:~# mdcollectdctl -cdayrx{{#ifeq: {{lc:{{{series}}}}} | rut9xx |1|}}
 +
26558</pre>
 +
    </li>
 +
    <li>Get data usage of SIM1 for the current month:
 +
        <pre>root@Teltonika:~# mdcollectdctl -pmonthrx1
 +
77701</pre>
 +
</ul>

Navigation menu