<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
No, no need to change that, it was only question, for me it's ok,
stats are working well on my ADSL line.<br>
<br>
<div class="moz-cite-prefix">W dniu 2015-08-06 o 21:40, Florian
Eckert pisze:<br>
</div>
<blockquote
cite="mid:CALPCC5y35hb2sN1EBgJKS8MOg7AW_hFA7bW8FTp4NRpUCLzHtQ@mail.gmail.com"
type="cite">
<p dir="ltr"><br>
Am 06.08.2015 4:01 nachm. schrieb "Sylwek ScApi" <<a
moz-do-not-send="true" href="mailto:sscapi@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:sscapi@gmail.com">sscapi@gmail.com</a></a>>:<br>
><br>
> I don't know that You done something wrong, You
misunderstood me, as example We will use this part of patch:<br>
> :<br>
> @@ -226,16 +609,21 @@ line_state() {<br>
> fi<br>
> else<br>
> if [ "$ls" = "0x801" ]; then<br>
> - echo "Line State: UP
[$ls: $s]"<br>
> + echo "Line State:
UP [$ls: $s]"<br>
> else<br>
> - echo "Line State:
DOWN [$ls: $s]"<br>
> + echo "Line State:
DOWN [$ls: $s]"<br>
> fi<br>
> fi<br>
> }<br>
><br>
> Why You replace tab separated "words" with space separated
"words" ?<br>
I replaced this with space so i get a well formated output for
"dsl_control status", If i use 3 tabs the out put will get too
fare left on screen i think. I could change it If you want.<br>
><br>
> Patch is send correctly but why replace "tabs" ?<br>
><br>
> My thunderbird is white space broken so You need to look in
Your source patch for reference.<br>
><br>
> Best Regards<br>
><br>
> 2015-08-06 11:52 GMT+02:00 Florian Eckert <<a
moz-do-not-send="true"
href="mailto:eckert.florian@googlemail.com"><a class="moz-txt-link-abbreviated" href="mailto:eckert.florian@googlemail.com">eckert.florian@googlemail.com</a></a>>:<br>
>><br>
>> Hello Petela<br>
>><br>
>> sorry but i dont understand your question!<br>
>><br>
>> I checked out openwrt with git and edited the file.
After that i made<br>
>> "git format-patch -1" and then "git send-email --to<br>
>> <a moz-do-not-send="true"
href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a><br>
>>
0001-lantiq-get-more-status-information-from-xDSL.patch". I used
the<br>
>> same whitespaces in this file as in the other functions
of this file<br>
>> -> in this case it was an tab. What did i made
wrong?<br>
>><br>
>> Kind Regards Flo<br>
>><br>
>> 2015-08-06 9:15 GMT+02:00 Sylwester Petela <<a
moz-do-not-send="true" href="mailto:sscapi@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:sscapi@gmail.com">sscapi@gmail.com</a></a>>:<br>
>> > W dniu 2015-08-06 o 07:41, feckert pisze:<br>
>> ><br>
>> >> Signed-off-by: Florian Eckert <<a
moz-do-not-send="true"
href="mailto:Eckert.Florian@googlemail.com"><a class="moz-txt-link-abbreviated" href="mailto:Eckert.Florian@googlemail.com">Eckert.Florian@googlemail.com</a></a>><br>
>> >> Signed-off-by: Helge Mader <<a
moz-do-not-send="true" href="mailto:hmader@tdt.de"><a class="moz-txt-link-abbreviated" href="mailto:hmader@tdt.de">hmader@tdt.de</a></a>><br>
>> >> Tested-by: Martin Blumenstingl <<a
moz-do-not-send="true"
href="mailto:martin.blumenstingl@googlemail.com"><a class="moz-txt-link-abbreviated" href="mailto:martin.blumenstingl@googlemail.com">martin.blumenstingl@googlemail.com</a></a>><br>
>> >> Tested-by: Andre Heider <<a
moz-do-not-send="true" href="mailto:a.heider@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:a.heider@gmail.com">a.heider@gmail.com</a></a>><br>
>> >> ---<br>
>> >><br>
>> >> v2 fix annex and line mode comma<br>
>> >> v2 fix latency to ms<br>
>> >> v3 fix latency syntax quotation error "x ms"<br>
>> >> v3 fix echo "----" separation removed from
status function<br>
>> >><br>
>> >>
.../lantiq/base-files/lib/functions/lantiq_dsl.sh | 412<br>
>> >> +++++++++++++++++++-<br>
>> >> 1 file changed, 400 insertions(+), 12
deletions(-)<br>
>> >> mode change 100644 => 100755<br>
>> >>
target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh<br>
>> >><br>
>> >> diff --git
a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh<br>
>> >>
b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh<br>
>> >> old mode 100644<br>
>> >> new mode 100755<br>
>> >> index 56b8652..7809d01<br>
>> >> ---
a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh<br>
>> >> +++
b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh<br>
>> >> @@ -19,6 +19,9 @@ dsl_cmd() {<br>
>> >> dsl_val() {<br>
>> >> echo $(expr "$1" :
'.*'$2'=\([-\.[:alnum:]]*\).*')<br>
>> >> }<br>
>> >> +dsl_string() {<br>
>> >> + echo $(expr "$1" :
'.*'$2'=(\([A-Z0-9,]*\))')<br>
>> >> +}<br>
>> >> #<br>
>> >> # Simple divide by 10 routine to cope with
one decimal place<br>
>> >> @@ -49,6 +52,16 @@ scale() {<br>
>> >> fi<br>
>> >> }<br>
>> >> +scale_latency() {<br>
>> >> + local val=$1<br>
>> >> + local a<br>
>> >> + local b<br>
>> >> +<br>
>> >> + a=$(expr $val / 100)<br>
>> >> + b=$(expr $val % 100)<br>
>> >> + printf "%d.%d ms" ${a} ${b}<br>
>> >> +}<br>
>> >> +<br>
>> >> #<br>
>> >> # Read the data rates for both directions<br>
>> >> #<br>
>> >> @@ -77,7 +90,7 @@ data_rates() {<br>
>> >> echo
"dsl.data_rate_down_s=\"$sdrd\""<br>
>> >> echo
"dsl.data_rate_up_s=\"$sdru\""<br>
>> >> else<br>
>> >> - echo "Data Rate:
${sdrd}/s / ${sdru}/s"<br>
>> >> + echo "Data Rate:
Down:<br>
>> >> ${sdrd}/s / Up: ${sdru}/s"<br>
>> >> fi<br>
>> >> }<br>
>> >> @@ -92,11 +105,340 @@ chipset() {<br>
>> >> vig=$(dsl_cmd vig)<br>
>> >> cs=$(dsl_val "$vig" DSL_ChipSetType)<br>
>> >> csv=$(dsl_val "$vig"
DSL_ChipSetHWVersion)<br>
>> >> + csfw=$(dsl_val "$vig"
DSL_ChipSetFWVersion)<br>
>> >> + csapi=$(dsl_val "$vig"
DSL_DriverVersionApi)<br>
>> >> if [ "$action" = "lucistat" ]; then<br>
>> >> echo "dsl.chipset=\"${cs}
${csv}\""<br>
>> >> + echo
"dsl.firmware_version=\"${csfw}\""<br>
>> >> + echo
"dsl.api_version=\"${csapi}\""<br>
>> >> else<br>
>> >> - echo "Chipset: ${cs}
${csv}"<br>
>> >> + echo "Chipset:
${cs}<br>
>> >> ${csv}"<br>
>> >> + echo "Firmware Version:
${csfw}"<br>
>> >> + echo "API Version:
${csapi}"<br>
>> >> + fi<br>
>> >> +}<br>
>> >> +<br>
>> >> +#<br>
>> >> +# Vendor information<br>
>> >> +#<br>
>> >> +vendor() {<br>
>> >> + local lig<br>
>> >> + local vid<br>
>> >> + local svid<br>
>> >> +<br>
>> >> + lig=$(dsl_cmd g997lig 1)<br>
>> >> + vid=$(dsl_string "$lig" G994VendorID)<br>
>> >> + svid=$(dsl_string "$lig"
SystemVendorID)<br>
>> >> +<br>
>> >> + if [ "$action" = "lucistat" ]; then<br>
>> >> + echo
"dsl.atuc_vendor_id=\"${vid}\""<br>
>> >> + echo
"dsl.atuc_system_vendor_id=\"${svid}\""<br>
>> >> + else<br>
>> >> + echo "ATU-C Vendor ID:
${vid}"<br>
>> >> + echo "ATU-C System Vendor ID:
${svid}"<br>
>> >> + fi<br>
>> >> +}<br>
>> >> +<br>
>> >> +#<br>
>> >> +# XTSE capabilities<br>
>> >> +#<br>
>> >> +xtse() {<br>
>> >> + local xtusesg<br>
>> >> + local xtse1<br>
>> >> + local xtse2<br>
>> >> + local xtse3<br>
>> >> + local xtse4<br>
>> >> + local xtse5<br>
>> >> + local xtse6<br>
>> >> + local xtse7<br>
>> >> + local xtse8<br>
>> >> +<br>
>> >> + local xtse_s=""<br>
>> >> +<br>
>> >> + local annex_s=""<br>
>> >> + local line_mode_s=""<br>
>> >> + local cmd=""<br>
>> >> +<br>
>> >> + xtusesg=$(dsl_cmd g997xtusesg)<br>
>> >> + xtse1=$(dsl_val "$xtusesg" XTSE1)<br>
>> >> + xtse2=$(dsl_val "$xtusesg" XTSE2)<br>
>> >> + xtse3=$(dsl_val "$xtusesg" XTSE3)<br>
>> >> + xtse4=$(dsl_val "$xtusesg" XTSE4)<br>
>> >> + xtse5=$(dsl_val "$xtusesg" XTSE5)<br>
>> >> + xtse6=$(dsl_val "$xtusesg" XTSE6)<br>
>> >> + xtse7=$(dsl_val "$xtusesg" XTSE7)<br>
>> >> + xtse8=$(dsl_val "$xtusesg" XTSE8)<br>
>> >> +<br>
>> >> + # Evaluate Annex (according to
G.997.1, 7.3.1.1.1)<br>
>> >> + if [ $((xtse1 & 13)) != 0 \<br>
>> >> + -o $((xtse2 & 1)) != 0 \<br>
>> >> + -o $((xtse3 & 12)) != 0 \<br>
>> >> + -o $((xtse4 & 3)) != 0 \<br>
>> >> + -o $((xtse6 & 3)) != 0 \<br>
>> >> + -o $((xtse8 & 1)) != 0 ]; then<br>
>> >> + annex_s=" A,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse1 & 48)) != 0 \<br>
>> >> + -o $((xtse2 & 2)) != 0 \<br>
>> >> + -o $((xtse3 & 48)) != 0 \<br>
>> >> + -o $((xtse6 & 12)) != 0 \<br>
>> >> + -o $((xtse8 & 2)) != 0 ]; then<br>
>> >> + annex_s="$annex_s B,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse1 & 194)) != 0 \<br>
>> >> + -o $((xtse2 & 12)) != 0 \<br>
>> >> + -o $((xtse8 & 4)) != 0 ]; then<br>
>> >> + annex_s="$annex_s C,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse4 & 48)) != 0 \<br>
>> >> + -o $((xtse5 & 3)) != 0 \<br>
>> >> + -o $((xtse6 & 192)) != 0 ]; then<br>
>> >> + annex_s="$annex_s I,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse4 & 192)) != 0 \<br>
>> >> + -o $((xtse7 & 3)) != 0 ]; then<br>
>> >> + annex_s="$annex_s J,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse5 & 60)) != 0 ]; then<br>
>> >> + annex_s="$annex_s L,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse5 & 192)) != 0 \<br>
>> >> + -o $((xtse7 & 12)) != 0 ]; then<br>
>> >> + annex_s="$annex_s M,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + annex_s=`echo ${annex_s:1}`<br>
>> >> + annex_s=`echo ${annex_s%?}`<br>
>> >> +<br>
>> >> + # Evaluate Line Mode (according to
G.997.1, 7.3.1.1.1)<br>
>> >> +<br>
>> >> + # Regional standard: ANSI T1.413<br>
>> >> + if [ $((xtse1 & 1)) != 0 ]; then<br>
>> >> + line_mode_s=" T1.413,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + # Regional standard: TS 101 388<br>
>> >> + if [ $((xtse1 & 1)) != 0 ]; then<br>
>> >> + line_mode_s="$line_mode_s TS
101 388,"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse1 & 252)) != 0 ];
then<br>
>> >> + line_mode_s="$line_mode_s
G.992.1 (ADSL),"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse2 & 15)) != 0 ]; then<br>
>> >> + line_mode_s="$line_mode_s
G.992.2 (ADSL lite),"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse3 & 60)) != 0 \<br>
>> >> + -o $((xtse4 & 240)) != 0 \<br>
>> >> + -o $((xtse5 & 252)) != 0 ]; then<br>
>> >> + line_mode_s="$line_mode_s
G.992.3 (ADSL2),"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse4 & 3)) != 0 \<br>
>> >> + -o $((xtse5 & 3)) != 0 ]; then<br>
>> >> + line_mode_s="$line_mode_s
G.992.4 (ADSL2 lite),"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse6 & 199)) != 0 \<br>
>> >> + -o $((xtse7 & 15)) != 0 ]; then<br>
>> >> + line_mode_s="$line_mode_s
G.992.5 (ADSL2+),"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ $((xtse8 & 7)) != 0 ]; then<br>
>> >> + line_mode_s="$line_mode_s
G.993.2 (VDSL2),"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + #!!! PROPRIETARY & INTERMEDIATE
USE !!!<br>
>> >> + if [ $((xtse8 & 128)) != 0 ];
then<br>
>> >> + line_mode_s="$line_mode_s
G.993.1 (VDSL),"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + line_mode_s=`echo ${line_mode_s:1}`<br>
>> >> + line_mode_s=`echo ${line_mode_s%?}`<br>
>> >> +<br>
>> >> + xtse_s="${xtse1}, ${xtse2}, ${xtse3},
${xtse4}, ${xtse5},<br>
>> >> ${xtse6}, ${xtse7}, ${xtse8}"<br>
>> >> +<br>
>> >> + if [ "$action" = "lucistat" ]; then<br>
>> >> + echo "dsl.xtse1=$xtse1"<br>
>> >> + echo "dsl.xtse2=$xtse2"<br>
>> >> + echo "dsl.xtse3=$xtse3"<br>
>> >> + echo "dsl.xtse4=$xtse4"<br>
>> >> + echo "dsl.xtse5=$xtse5"<br>
>> >> + echo "dsl.xtse6=$xtse6"<br>
>> >> + echo "dsl.xtse7=$xtse7"<br>
>> >> + echo "dsl.xtse8=$xtse8"<br>
>> >> + echo "dsl.xtse_s=\"$xtse_s\""<br>
>> >> + echo
"dsl.annex_s=\"${annex_s}\""<br>
>> >> + echo
"dsl.line_mode_s=\"${line_mode_s}\""<br>
>> >> + else<br>
>> >> + echo "XTSE Capabilities:
${xtse_s}"<br>
>> >> + echo "Annex:<br>
>> >> ${annex_s}"<br>
>> >> + echo "Line Mode:<br>
>> >> ${line_mode_s}"<br>
>> >> + fi<br>
>> >> +}<br>
>> >> +<br>
>> >> +#<br>
>> >> +# Power Management Mode<br>
>> >> +#<br>
>> >> +power_mode() {<br>
>> >> + local pmsg=$(dsl_cmd g997pmsg)<br>
>> >> + local pm=$(dsl_val "$pmsg"
nPowerManagementStatus);<br>
>> >> + local s;<br>
>> >> +<br>
>> >> + case "$pm" in<br>
>> >> + "-1") s="Power
management state is not<br>
>> >> available" ;;<br>
>> >> + "0") s="L0 -
Synchronized" ;;<br>
>> >> + "1") s="L1 - Power
Down Data transmission<br>
>> >> (G.992.2)" ;;<br>
>> >> + "2") s="L2 - Power
Down Data transmission<br>
>> >> (G.992.3 and G.992.4)" ;;<br>
>> >> + "3") s="L3 - No
power" ;;<br>
>> >> + *) s="unknown" ;;<br>
>> >> + esac<br>
>> >> +<br>
>> >> + if [ "$action" = "lucistat" ]; then<br>
>> >> + echo "dsl.power_mode_num=$pm"<br>
>> >> + echo "dsl.power_mode_s=\"$s\""<br>
>> >> + else<br>
>> >> + echo "Power Management Mode:
$s"<br>
>> >> + fi<br>
>> >> +}<br>
>> >> +<br>
>> >> +#<br>
>> >> +# Latency type (interleave delay)<br>
>> >> +#<br>
>> >> +latency_delay() {<br>
>> >> + local csg<br>
>> >> +<br>
>> >> + local idu<br>
>> >> + local idu_s;<br>
>> >> + local sidu<br>
>> >> +<br>
>> >> + local idd<br>
>> >> + local idd_s;<br>
>> >> + local sidd<br>
>> >> +<br>
>> >> + csg=$(dsl_cmd g997csg 0 1)<br>
>> >> + idd=$(dsl_val "$csg"
ActualInterleaveDelay)<br>
>> >> +<br>
>> >> + csg=$(dsl_cmd g997csg 0 0)<br>
>> >> + idu=$(dsl_val "$csg"
ActualInterleaveDelay)<br>
>> >> +<br>
>> >> + [ -z "$idd" ] && idd=0<br>
>> >> + [ -z "$idu" ] && idu=0<br>
>> >> +<br>
>> >> + if [ "$idd" > 100 ]; then<br>
>> >> + idd_s="Interleave"<br>
>> >> + else<br>
>> >> + idd_s="Fast"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + if [ "$idu" > 100 ]; then<br>
>> >> + idu_s="Interleave"<br>
>> >> + else<br>
>> >> + idu_s="Fast"<br>
>> >> + fi<br>
>> >> +<br>
>> >> + sidu=$(scale_latency $idu)<br>
>> >> + sidd=$(scale_latency $idd)<br>
>> >> +<br>
>> >> + if [ "$action" = "lucistat" ]; then<br>
>> >> + echo
"dsl.latency_num_down=\"$sidu\""<br>
>> >> + echo
"dsl.latency_num_up=\"$sidd\""<br>
>> >> + echo
"dsl.latency_s_down=\"$idd_s\""<br>
>> >> + echo
"dsl.latency_s_up=\"$idu_s\""<br>
>> >> + else<br>
>> >> + echo "Latency / Interleave
Delay: Down:<br>
>> >> ${idd_s} (${sidd}) / Up: ${idu_s} (${sidu})"<br>
>> >> + fi<br>
>> >> +}<br>
>> >> +<br>
>> >> +#<br>
>> >> +# Errors<br>
>> >> +#<br>
>> >> +errors() {<br>
>> >> + local lsctg<br>
>> >> + local dpctg<br>
>> >> + local ccsg<br>
>> >> + local esf<br>
>> >> + local esn<br>
>> >> + local sesf<br>
>> >> + local sesn<br>
>> >> + local lossf<br>
>> >> + local lossn<br>
>> >> + local uasf<br>
>> >> + local uasn<br>
>> >> +<br>
>> >> + local crc_pf<br>
>> >> + local crc_pn<br>
>> >> + local crcp_pf<br>
>> >> + local crcp_pn<br>
>> >> + local hecf<br>
>> >> + local hecn<br>
>> >> +<br>
>> >> + local fecn<br>
>> >> + local fecf<br>
>> >> +<br>
>> >> + lsctg=$(dsl_cmd pmlsctg 1)<br>
>> >> + esf=$(dsl_val "$lsctg" nES)<br>
>> >> + sesf=$(dsl_val "$lsctg" nSES)<br>
>> >> + lossf=$(dsl_val "$lsctg" nLOSS)<br>
>> >> + uasf=$(dsl_val "$lsctg" nUAS)<br>
>> >> +<br>
>> >> + lsctg=$(dsl_cmd pmlsctg 0)<br>
>> >> + esn=$(dsl_val "$lsctg" nES)<br>
>> >> + sesn=$(dsl_val "$lsctg" nSES)<br>
>> >> + lossn=$(dsl_val "$lsctg" nLOSS)<br>
>> >> + uasn=$(dsl_val "$lsctg" nUAS)<br>
>> >> +<br>
>> >> + dpctg=$(dsl_cmd pmdpctg 0 1)<br>
>> >> + hecf=$(dsl_val "$dpctg" nHEC)<br>
>> >> + crc_pf=$(dsl_val "$dpctg" nCRC_P)<br>
>> >> + crcp_pf=$(dsl_val "$dpctg" nCRCP_P)<br>
>> >> +<br>
>> >> + dpctg=$(dsl_cmd pmdpctg 0 0)<br>
>> >> + hecn=$(dsl_val "$dpctg" nHEC)<br>
>> >> + crc_pn=$(dsl_val "$dpctg" nCRC_P)<br>
>> >> + crcp_pn=$(dsl_val "$dpctg" nCRCP_P)<br>
>> >> +<br>
>> >> + ccsg=$(dsl_cmd pmccsg 0 1 0)<br>
>> >> + fecf=$(dsl_val "$ccsg" nFEC)<br>
>> >> +<br>
>> >> + ccsg=$(dsl_cmd pmccsg 0 0 0)<br>
>> >> + fecn=$(dsl_val "$ccsg" nFEC)<br>
>> >> +<br>
>> >> + if [ "$action" = "lucistat" ]; then<br>
>> >> + echo
"dsl.errors_fec_near=$fecn"<br>
>> >> + echo
"dsl.errors_fec_far=$fecf"<br>
>> >> + echo "dsl.errors_es_near=$esn"<br>
>> >> + echo "dsl.errors_es_far=$esf"<br>
>> >> + echo
"dsl.errors_ses_near=$sesn"<br>
>> >> + echo
"dsl.errors_ses_far=$sesf"<br>
>> >> + echo
"dsl.errors_loss_near=$lossn"<br>
>> >> + echo
"dsl.errors_loss_far=$lossf"<br>
>> >> + echo
"dsl.errors_uas_near=$uasn"<br>
>> >> + echo
"dsl.errors_uas_far=$uasf"<br>
>> >> + echo
"dsl.errors_hec_near=$hecn"<br>
>> >> + echo
"dsl.errors_hec_far=$hecf"<br>
>> >> + echo
"dsl.errors_crc_p_near=$crc_pn"<br>
>> >> + echo
"dsl.errors_crc_p_far=$crc_pf"<br>
>> >> + echo
"dsl.errors_crcp_p_near=$crcp_pn"<br>
>> >> + echo
"dsl.errors_crcp_p_far=$crcp_pf"<br>
>> >> + else<br>
>> >> + echo "Forward Error Correction
Seconds (FECS): Near:<br>
>> >> ${fecn} / Far: ${fecf}"<br>
>> >> + echo "Errored seconds (ES):
Near:<br>
>> >> ${esn} / Far: ${esf}"<br>
>> >> + echo "Severely Errored Seconds
(SES): Near:<br>
>> >> ${sesn} / Far: ${sesf}"<br>
>> >> + echo "Loss of Signal Seconds
(LOSS): Near:<br>
>> >> ${lossn} / Far: ${lossf}"<br>
>> >> + echo "Unavailable Seconds
(UAS): Near:<br>
>> >> ${uasn} / Far: ${uasf}"<br>
>> >> + echo "Header Error Code Errors
(HEC): Near:<br>
>> >> ${hecn} / Far: ${hecf}"<br>
>> >> + echo "Non Pre-emtive CRC
errors (CRC_P): Near:<br>
>> >> ${crcp_pn} / Far: ${crcp_pf}"<br>
>> >> + echo "Pre-emtive CRC errors
(CRCP_P): Near:<br>
>> >> ${crcp_pn} / Far: ${crcp_pf}"<br>
>> >> fi<br>
>> >> }<br>
>> >> @@ -118,11 +460,6 @@ line_uptime() {<br>
>> >> [ -z "$et" ] && et=0<br>
>> >> - if [ "$action" = "lucistat" ]; then<br>
>> >> - echo "dsl.line_uptime=${et}"<br>
>> >> - return<br>
>> >> - fi<br>
>> >> -<br>
>> >> d=$(expr $et / 86400)<br>
>> >> etr=$(expr $et % 86400)<br>
>> >> h=$(expr $etr / 3600)<br>
>> >> @@ -137,7 +474,16 @@ line_uptime() {<br>
>> >> [ "${d}" -ne 0 ] && rc="${d}d
${rc}"<br>
>> >> [ -z "$rc" ] && rc="down"<br>
>> >> - echo "Line Uptime: ${rc}"<br>
>> >> +<br>
>> >> +<br>
>> >> + if [ "$action" = "lucistat" ]; then<br>
>> >> + echo "dsl.line_uptime=${et}"<br>
>> >> + echo
"dsl.line_uptime_s=\"${rc}\""<br>
>> >> + else<br>
>> >> +<br>
>> >> + echo "Line Uptime Seconds:
${et}"<br>
>> >> + echo "Line Uptime:
${rc}"<br>
>> >> + fi<br>
>> >> }<br>
>> >> #<br>
>> >> @@ -147,35 +493,72 @@ line_data() {<br>
>> >> local lsg<br>
>> >> local latnu<br>
>> >> local latnd<br>
>> >> + local satnu<br>
>> >> + local satnd<br>
>> >> local snru<br>
>> >> local snrd<br>
>> >> + local attndru<br>
>> >> + local attndrd<br>
>> >> + local sattndru<br>
>> >> + local sattndrd<br>
>> >> + local actatpu<br>
>> >> + local actatpd<br>
>> >> lsg=$(dsl_cmd g997lsg 1 1)<br>
>> >> latnd=$(dsl_val "$lsg" LATN)<br>
>> >> + satnd=$(dsl_val "$lsg" SATN)<br>
>> >> snrd=$(dsl_val "$lsg" SNR)<br>
>> >> + attndrd=$(dsl_val "$lsg" ATTNDR)<br>
>> >> + actatpd=$(dsl_val "$lsg" ACTATP)<br>
>> >> lsg=$(dsl_cmd g997lsg 0 1)<br>
>> >> latnu=$(dsl_val "$lsg" LATN)<br>
>> >> + satnu=$(dsl_val "$lsg" SATN)<br>
>> >> snru=$(dsl_val "$lsg" SNR)<br>
>> >> + attndru=$(dsl_val "$lsg" ATTNDR)<br>
>> >> + actatpu=$(dsl_val "$lsg" ACTATP)<br>
>> >> [ -z "$latnd" ] && latnd=0<br>
>> >> [ -z "$latnu" ] && latnu=0<br>
>> >> + [ -z "$satnd" ] && satnd=0<br>
>> >> + [ -z "$satnu" ] && satnu=0<br>
>> >> [ -z "$snrd" ] && snrd=0<br>
>> >> [ -z "$snru" ] && snru=0<br>
>> >> latnd=$(dbt $latnd)<br>
>> >> latnu=$(dbt $latnu)<br>
>> >> + satnd=$(dbt $satnd)<br>
>> >> + satnu=$(dbt $satnu)<br>
>> >> snrd=$(dbt $snrd)<br>
>> >> snru=$(dbt $snru)<br>
>> >> + actatpd=$(dbt $actatpd)<br>
>> >> + actatpu=$(dbt $actatpu)<br>
>> >> +<br>
>> >> + [ -z "$attndrd" ] && attndrd=0<br>
>> >> + [ -z "$attndru" ] && attndru=0<br>
>> >> +<br>
>> >> + sattndrd=$(scale $attndrd)<br>
>> >> + sattndru=$(scale $attndru)<br>
>> >><br>
>> >> if [ "$action" = "lucistat" ]; then<br>
>> >> echo
"dsl.line_attenuation_down=$latnd"<br>
>> >> echo
"dsl.line_attenuation_up=$latnu"<br>
>> >> echo
"dsl.noise_margin_down=$snrd"<br>
>> >> echo
"dsl.noise_margin_up=$snru"<br>
>> >> + echo
"dsl.signal_attenuation_down=$satnd"<br>
>> >> + echo
"dsl.signal_attenuation_up=$satnu"<br>
>> >> + echo
"dsl.actatp_down=$actatpd"<br>
>> >> + echo "dsl.actatp_up=$actatpu"<br>
>> >> + echo
"dsl.max_data_rate_down=$attndrd"<br>
>> >> + echo
"dsl.max_data_rate_up=$attndru"<br>
>> >> + echo
"dsl.max_data_rate_down_s=\"$sattndrd\""<br>
>> >> + echo
"dsl.max_data_rate_up_s=\"$sattndru\""<br>
>> >> else<br>
>> >> - echo "Line Attenuation:
${latnd}dB / ${latnu}dB"<br>
>> >> - echo "Noise Margin:
${snrd}dB / ${snru}dB"<br>
>> >> + echo "Line Attenuation
(LATN): Down:<br>
>> >> ${latnd}dB / Up: ${latnu}dB"<br>
>> >> + echo "Signal Attenuation
(SATN): Down:<br>
>> >> ${satnd}dB / Up: ${satnu}dB"<br>
>> >> + echo "Noise Margin (SNR):
Down:<br>
>> >> ${snrd}dB / Up: ${snru}dB"<br>
>> >> + echo "Aggregate Transmit
Power(ACTATP): Down:<br>
>> >> ${actatpd}dB / Up: ${actatpu}dB"<br>
>> >> + echo "Max. Attainable Data
Rate (ATTNDR): Down:<br>
>> >> ${sattndrd}/s / Up: ${sattndru}/s"<br>
>> >> fi<br>
>> >> }<br>
>> >> @@ -226,16 +609,21 @@ line_state() {<br>
>> >> fi<br>
>> >> else<br>
>> >> if [ "$ls" = "0x801" ]; then<br>
>> >> - echo "Line State:
UP [$ls: $s]"<br>
>> >> + echo "Line State:
UP<br>
>> >> [$ls: $s]"<br>
>> >> else<br>
>> >> - echo "Line State:
DOWN [$ls: $s]"<br>
>> >> + echo "Line State:<br>
>> >> DOWN [$ls: $s]"<br>
>> >> fi<br>
>> >> fi<br>
>> >> }<br>
>> ><br>
>> ><br>
>> > Above change intrigues me a lot.<br>
>> > Is this patch intended whitespace broken or by
mistake every "tab is<br>
>> > converted into "space"?<br>
>> ><br>
>> ><br>
>> >> status() {<br>
>> >> + vendor<br>
>> >> chipset<br>
>> >> + xtse<br>
>> >> line_state<br>
>> >> + errors<br>
>> >> + power_mode<br>
>> >> + latency_delay<br>
>> >> data_rates<br>
>> >> line_data<br>
>> >> line_uptime<br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Mit freundlichen Grüßen<br>
><br>
><br>
</p>
</blockquote>
<br>
</body>
</html>