- ioBroker Community Home
- Deutsch
- Skripten / Logik
- Anzahl Files und dafür belegter Speicherplatz auslesen
Anzahl Files und dafür belegter Speicherplatz auslesen
-
Wunderbar, der Speicherplatz klappt ja dann ähnlich.
Hast ja da n den ersten "ftp" vom Pfad an dem du dich orientieren kannst, um den Datenpunkt ohne den ganzen Pfad beschreiben zu müssen der da noch mit ausgegeben wird.Den belegten Speicherplatz würde ich auch einzeln auslesen.
Interessant, dass er bei dir die Variablen füllt und bei mir nicht.
@david-g Ich habe nun das Skript fertig und es strukturiert und zerteilt die Daten schon mal sehr gut. Es gefällt mir nur nicht, dass in meinem Falle 8x in einem Script das Exec Commando genutzt wird. Ich kanns ned festmachen, aber ich denke es ist ned gescheit. Hier mal das aktuelle Skript, ich überlege mir nur schon eine andere Lösung anzugehen.






LG, mxa -
@david-g Ich habe nun das Skript fertig und es strukturiert und zerteilt die Daten schon mal sehr gut. Es gefällt mir nur nicht, dass in meinem Falle 8x in einem Script das Exec Commando genutzt wird. Ich kanns ned festmachen, aber ich denke es ist ned gescheit. Hier mal das aktuelle Skript, ich überlege mir nur schon eine andere Lösung anzugehen.






LG, mxa -
hätte hier mal eine lösung mit einem exec befehl
dazu nutze ich diesen exec befehl
cd /Daten/tst && for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" | awk '{print $1}' && echo "!" && find $dir ! -path . | wc -l && echo ":" ; donedanach wird das ganze zerlegt - da sic die ordner nicht ändern und immer den gleichen namen haben, verzichte ich auf die ausgabe des ordner namens
das blockly dazu sieht so aus:

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="}Q%9|3sA+_JAy-nQitWX">x</variable> <variable id="8)AW;D@mAp44t}wvt_|e">result</variable> <variable id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</variable> <variable id="|p6v1M$#+S{J)Bw2Z_oP">folder1</variable> <variable id="qb*mqaDqTNym%P/ow:lH">folder2</variable> </variables> <block type="exec" id="sAV5M1n8=yfwkuPV}4?O" x="62" y="-337"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="fm)hU(q@YE/ghEy#1Uy,"> <field name="TEXT">cd /Daten && for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" && echo "," && find $dir ! -path . | wc -l && echo ":" ; done</field> </shadow> <block type="text_join" id="2w7U,KoKjz`66J^e#2R]"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="V{-|:sSjp(.Q8^p{l!.B"> <field name="TEXT">cd /Daten/tst &&</field> </block> </value> <value name="ADD1"> <block type="text" id="^It#Lk-[ObISw[6/O-Bh"> <field name="TEXT"> for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" | awk '{print $1}' && echo "!" && find $dir ! -path . | wc -l && echo ":" ; done</field> </block> </value> </block> </value> <statement name="STATEMENT"> <block type="debug" id="df;V]pD;MJvDs,W[XNe}"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="VAs+PBiWP[Ms8bn.]ul2"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="pTh@%uw3`RkQ1+Q^S@*6"> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> </block> </value> <next> <block type="comment" id=":.OFdoZD5YAp0)nuho8z"> <field name="COMMENT">ergebnis in einen dp schreiben</field> <next> <block type="control" id="m`F_7,8]|]jz_0~0%IPm" disabled="true"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.daten-exec</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="9^!=Ho$uhdsm.%O$5F:z"> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> </block> </value> <next> <block type="variables_set" id=")v0-yhs=R(]PS@]==Z::"> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="LG**PB`/{}=T/e[ovRf}"> <mutation name="etwas tun2"> <arg name="x"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="TUL*_WGDMTzIkGCv:,e0"> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> </block> </value> </block> </value> <next> <block type="variables_set" id="9(3yPN|9!yhUHC.[,K3l"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> <value name="VALUE"> <block type="lists_create_with" id="{ws?zJvprU]rO|Wm-upX"> <mutation items="0"></mutation> </block> </value> <next> <block type="variables_set" id="x-H6kkb5GRS3Px`K+*fQ"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> <value name="VALUE"> <block type="lists_split" id="VZwEGc1-ZEht`[=X@/IJ"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="variables_get" id="sx)les~jw_!sd0Mz31*["> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> </block> </value> <value name="DELIM"> <shadow type="text" id="5|!nL4UX?%o^Hez]b?:S"> <field name="TEXT">:</field> </shadow> </value> </block> </value> <next> <block type="debug" id="_wt]`P`hgm,t*4LSz8Z;"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="|kZsk|RU##;e-empnnTP"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="{-iiKp,%$t#-GM#`Fy-%"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> </block> </value> <next> <block type="variables_set" id="=|:#.}_W|cVf*l(*?4X7"> <field name="VAR" id="|p6v1M$#+S{J)Bw2Z_oP">folder1</field> <value name="VALUE"> <block type="lists_split" id="eZVrVw3bzRqjYqvFnKhg"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="lists_getIndex" id="SyciJ@~R7DS4:Aao`@-5"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="i_Wh_!?_y@MTN_MB]y)V"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> </block> </value> <value name="AT"> <block type="math_number" id="[zh3V2~d9yV*0uf;63#^"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="DELIM"> <shadow type="text" id="X06{xbe^z.@0Ka$HJ5=8"> <field name="TEXT">!</field> </shadow> </value> </block> </value> <next> <block type="comment" id="1N4YMAw27YY%k0*v@I:S"> <field name="COMMENT">hier ann in die dp geschrieben werden</field> <next> <block type="comment" id="S[+FJ#B@STH?;sh)dk]l"> <field name="COMMENT">größe</field> <next> <block type="debug" id="fil?:$4a(c=YXpx,f!#_"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="lists_getIndex" id="dxVBJGr[xS`+5bb(NRl{"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="J8x,atUNuBT409a`OWL6"> <field name="VAR" id="|p6v1M$#+S{J)Bw2Z_oP">folder1</field> </block> </value> <value name="AT"> <block type="math_number" id="dH(Pc@nL=pHS(^4STKbB"> <field name="NUM">1</field> </block> </value> </block> </value> <next> <block type="comment" id=")3S]-9:_D8DIwv6[7$vp"> <field name="COMMENT">anzahl files</field> <next> <block type="debug" id="fn;;/-^.ja:laGsJUMC+"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="]o[:e$4`GVy37.;!c+#{"> <field name="TEXT">test</field> </shadow> <block type="math_arithmetic" id="^!N%44B3mVkegZ=p$R:b"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="C@Z{d;RK/DtE0bUpvs2P"> <field name="NUM">1</field> </shadow> <block type="lists_getIndex" id="xAs~Rj%@2V9lpe455b7^"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="]9%{7VyN?H-TUAO{v{bR"> <field name="VAR" id="|p6v1M$#+S{J)Bw2Z_oP">folder1</field> </block> </value> <value name="AT"> <block type="math_number" id="WK*B.v1*S;{o5[i^=:Qn"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="t2d8B`)=0%eZd,{{h8;]"> <field name="NUM">1</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="OvR^GKjRohbG0qCj@(QL"> <field name="VAR" id="qb*mqaDqTNym%P/ow:lH">folder2</field> <value name="VALUE"> <block type="lists_split" id="GK=]o5.m7H#085YqB8Zx"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="lists_getIndex" id="~X~@JU+U3AUUeV|:wq#7"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="yEXe~TS##Kg0EM%Oq)ud"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> </block> </value> <value name="AT"> <block type="math_number" id="Ybi$JKX45leDj|!80Y~I"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="DELIM"> <shadow type="text" id="zF(1[A@*Y?NA7?m_-s-$"> <field name="TEXT">!</field> </shadow> </value> </block> </value> <next> <block type="debug" id="d{cBv=eb2+ME|ML]k+Nh"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="i7r^9~o%lu[DFY[Ju1-p"> <field name="TEXT">test</field> </shadow> <block type="lists_getIndex" id=",)z/t5Un@9$#|[3S.%x;"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="I`=)FzifuIcR_l%/!DJK"> <field name="VAR" id="qb*mqaDqTNym%P/ow:lH">folder2</field> </block> </value> <value name="AT"> <block type="math_number" id="b^Pzm{~y3S@,w(`rGBiX"> <field name="NUM">1</field> </block> </value> </block> </value> <next> <block type="debug" id="i=o6M4x2P.yR*$:^)Nmt"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="i4GjMIrrl*`#5,LiruP5"> <field name="TEXT">test</field> </shadow> <block type="math_arithmetic" id="Hyg3tq}cJAw_,;-~~lro"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="UA1!UyVhH31mP3P^eG2Q"> <field name="NUM">1</field> </shadow> <block type="lists_getIndex" id="@FBZDM)j~;N:O?Gri~Mk"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="GG~5vi,%R~%iHUZ[5#3H"> <field name="VAR" id="qb*mqaDqTNym%P/ow:lH">folder2</field> </block> </value> <value name="AT"> <block type="math_number" id="BTnPhD3+)Oaev7.gbSmO"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="yD5GwHBEGeI_,#aVUcyb"> <field name="NUM">1</field> </shadow> </value> </block> </value> <next> <block type="comment" id="+.9q(aN/,[2L-BL#TE^8"> <field name="COMMENT">usw</field> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> <block type="procedures_defcustomreturn" id="G+G|FF.jplS-,36(V7!J" x="787" y="-338"> <mutation statements="false"> <arg name="x" varid="}Q%9|3sA+_JAy-nQitWX"></arg> </mutation> <field name="NAME">etwas tun2</field> <field name="SCRIPT">DQoNCnJldHVybiB4LnJlcGxhY2UoL1xuL2dtLCIiKTsNCg==</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html
-
hätte hier mal eine lösung mit einem exec befehl
dazu nutze ich diesen exec befehl
cd /Daten/tst && for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" | awk '{print $1}' && echo "!" && find $dir ! -path . | wc -l && echo ":" ; donedanach wird das ganze zerlegt - da sic die ordner nicht ändern und immer den gleichen namen haben, verzichte ich auf die ausgabe des ordner namens
das blockly dazu sieht so aus:

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="}Q%9|3sA+_JAy-nQitWX">x</variable> <variable id="8)AW;D@mAp44t}wvt_|e">result</variable> <variable id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</variable> <variable id="|p6v1M$#+S{J)Bw2Z_oP">folder1</variable> <variable id="qb*mqaDqTNym%P/ow:lH">folder2</variable> </variables> <block type="exec" id="sAV5M1n8=yfwkuPV}4?O" x="62" y="-337"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="fm)hU(q@YE/ghEy#1Uy,"> <field name="TEXT">cd /Daten && for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" && echo "," && find $dir ! -path . | wc -l && echo ":" ; done</field> </shadow> <block type="text_join" id="2w7U,KoKjz`66J^e#2R]"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="V{-|:sSjp(.Q8^p{l!.B"> <field name="TEXT">cd /Daten/tst &&</field> </block> </value> <value name="ADD1"> <block type="text" id="^It#Lk-[ObISw[6/O-Bh"> <field name="TEXT"> for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" | awk '{print $1}' && echo "!" && find $dir ! -path . | wc -l && echo ":" ; done</field> </block> </value> </block> </value> <statement name="STATEMENT"> <block type="debug" id="df;V]pD;MJvDs,W[XNe}"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="VAs+PBiWP[Ms8bn.]ul2"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="pTh@%uw3`RkQ1+Q^S@*6"> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> </block> </value> <next> <block type="comment" id=":.OFdoZD5YAp0)nuho8z"> <field name="COMMENT">ergebnis in einen dp schreiben</field> <next> <block type="control" id="m`F_7,8]|]jz_0~0%IPm" disabled="true"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.daten-exec</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="9^!=Ho$uhdsm.%O$5F:z"> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> </block> </value> <next> <block type="variables_set" id=")v0-yhs=R(]PS@]==Z::"> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="LG**PB`/{}=T/e[ovRf}"> <mutation name="etwas tun2"> <arg name="x"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="TUL*_WGDMTzIkGCv:,e0"> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> </block> </value> </block> </value> <next> <block type="variables_set" id="9(3yPN|9!yhUHC.[,K3l"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> <value name="VALUE"> <block type="lists_create_with" id="{ws?zJvprU]rO|Wm-upX"> <mutation items="0"></mutation> </block> </value> <next> <block type="variables_set" id="x-H6kkb5GRS3Px`K+*fQ"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> <value name="VALUE"> <block type="lists_split" id="VZwEGc1-ZEht`[=X@/IJ"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="variables_get" id="sx)les~jw_!sd0Mz31*["> <field name="VAR" id="8)AW;D@mAp44t}wvt_|e">result</field> </block> </value> <value name="DELIM"> <shadow type="text" id="5|!nL4UX?%o^Hez]b?:S"> <field name="TEXT">:</field> </shadow> </value> </block> </value> <next> <block type="debug" id="_wt]`P`hgm,t*4LSz8Z;"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="|kZsk|RU##;e-empnnTP"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="{-iiKp,%$t#-GM#`Fy-%"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> </block> </value> <next> <block type="variables_set" id="=|:#.}_W|cVf*l(*?4X7"> <field name="VAR" id="|p6v1M$#+S{J)Bw2Z_oP">folder1</field> <value name="VALUE"> <block type="lists_split" id="eZVrVw3bzRqjYqvFnKhg"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="lists_getIndex" id="SyciJ@~R7DS4:Aao`@-5"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="i_Wh_!?_y@MTN_MB]y)V"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> </block> </value> <value name="AT"> <block type="math_number" id="[zh3V2~d9yV*0uf;63#^"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="DELIM"> <shadow type="text" id="X06{xbe^z.@0Ka$HJ5=8"> <field name="TEXT">!</field> </shadow> </value> </block> </value> <next> <block type="comment" id="1N4YMAw27YY%k0*v@I:S"> <field name="COMMENT">hier ann in die dp geschrieben werden</field> <next> <block type="comment" id="S[+FJ#B@STH?;sh)dk]l"> <field name="COMMENT">größe</field> <next> <block type="debug" id="fil?:$4a(c=YXpx,f!#_"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="lists_getIndex" id="dxVBJGr[xS`+5bb(NRl{"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="J8x,atUNuBT409a`OWL6"> <field name="VAR" id="|p6v1M$#+S{J)Bw2Z_oP">folder1</field> </block> </value> <value name="AT"> <block type="math_number" id="dH(Pc@nL=pHS(^4STKbB"> <field name="NUM">1</field> </block> </value> </block> </value> <next> <block type="comment" id=")3S]-9:_D8DIwv6[7$vp"> <field name="COMMENT">anzahl files</field> <next> <block type="debug" id="fn;;/-^.ja:laGsJUMC+"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="]o[:e$4`GVy37.;!c+#{"> <field name="TEXT">test</field> </shadow> <block type="math_arithmetic" id="^!N%44B3mVkegZ=p$R:b"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="C@Z{d;RK/DtE0bUpvs2P"> <field name="NUM">1</field> </shadow> <block type="lists_getIndex" id="xAs~Rj%@2V9lpe455b7^"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="]9%{7VyN?H-TUAO{v{bR"> <field name="VAR" id="|p6v1M$#+S{J)Bw2Z_oP">folder1</field> </block> </value> <value name="AT"> <block type="math_number" id="WK*B.v1*S;{o5[i^=:Qn"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="t2d8B`)=0%eZd,{{h8;]"> <field name="NUM">1</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="OvR^GKjRohbG0qCj@(QL"> <field name="VAR" id="qb*mqaDqTNym%P/ow:lH">folder2</field> <value name="VALUE"> <block type="lists_split" id="GK=]o5.m7H#085YqB8Zx"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="lists_getIndex" id="~X~@JU+U3AUUeV|:wq#7"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="yEXe~TS##Kg0EM%Oq)ud"> <field name="VAR" id="?Y-XAI0#Lg.Z)vdM[*(u">myArr</field> </block> </value> <value name="AT"> <block type="math_number" id="Ybi$JKX45leDj|!80Y~I"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="DELIM"> <shadow type="text" id="zF(1[A@*Y?NA7?m_-s-$"> <field name="TEXT">!</field> </shadow> </value> </block> </value> <next> <block type="debug" id="d{cBv=eb2+ME|ML]k+Nh"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="i7r^9~o%lu[DFY[Ju1-p"> <field name="TEXT">test</field> </shadow> <block type="lists_getIndex" id=",)z/t5Un@9$#|[3S.%x;"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="I`=)FzifuIcR_l%/!DJK"> <field name="VAR" id="qb*mqaDqTNym%P/ow:lH">folder2</field> </block> </value> <value name="AT"> <block type="math_number" id="b^Pzm{~y3S@,w(`rGBiX"> <field name="NUM">1</field> </block> </value> </block> </value> <next> <block type="debug" id="i=o6M4x2P.yR*$:^)Nmt"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="i4GjMIrrl*`#5,LiruP5"> <field name="TEXT">test</field> </shadow> <block type="math_arithmetic" id="Hyg3tq}cJAw_,;-~~lro"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="UA1!UyVhH31mP3P^eG2Q"> <field name="NUM">1</field> </shadow> <block type="lists_getIndex" id="@FBZDM)j~;N:O?Gri~Mk"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="GG~5vi,%R~%iHUZ[5#3H"> <field name="VAR" id="qb*mqaDqTNym%P/ow:lH">folder2</field> </block> </value> <value name="AT"> <block type="math_number" id="BTnPhD3+)Oaev7.gbSmO"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="yD5GwHBEGeI_,#aVUcyb"> <field name="NUM">1</field> </shadow> </value> </block> </value> <next> <block type="comment" id="+.9q(aN/,[2L-BL#TE^8"> <field name="COMMENT">usw</field> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> <block type="procedures_defcustomreturn" id="G+G|FF.jplS-,36(V7!J" x="787" y="-338"> <mutation statements="false"> <arg name="x" varid="}Q%9|3sA+_JAy-nQitWX"></arg> </mutation> <field name="NAME">etwas tun2</field> <field name="SCRIPT">DQoNCnJldHVybiB4LnJlcGxhY2UoL1xuL2dtLCIiKTsNCg==</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>@liv-in-sky Hi und danke! Kannst du mir mal einen Screen hier reinstellen wie die erzeugten DP in der Praxis aussehen?
Lieben Dank -
@liv-in-sky Hi und danke! Kannst du mir mal einen Screen hier reinstellen wie die erzeugten DP in der Praxis aussehen?
Lieben Dankdu kannst deine eigenen d-punkte nehmen (anstatt meinen debugs , schreibst du in deine datenpunkte )- im script muss du nur deinen folder noch im exec eingeben und dann mal im log schauen, was da raus kommt
es kommt immer die größe und dann die anzahl
teste mal ohne datenpunjte zu schreiben und im log erkennst du schon, was da kommt
nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html
-
du kannst deine eigenen d-punkte nehmen (anstatt meinen debugs , schreibst du in deine datenpunkte )- im script muss du nur deinen folder noch im exec eingeben und dann mal im log schauen, was da raus kommt
es kommt immer die größe und dann die anzahl
teste mal ohne datenpunjte zu schreiben und im log erkennst du schon, was da kommt
@liv-in-sky sagte in Anzahl Files und dafür belegter Speicherplatz auslesen:
deine datenpunkte
Du hast recht, ein Versuch ist es allemal wert ;-)
Wobei, ich bin mit meinem endgültigen Ergebnis auch recht zufrieden, probiere aber deine Herangehensweise natürlich aus.

LG, mxa -
@liv-in-sky sagte in Anzahl Files und dafür belegter Speicherplatz auslesen:
deine datenpunkte
Du hast recht, ein Versuch ist es allemal wert ;-)
Wobei, ich bin mit meinem endgültigen Ergebnis auch recht zufrieden, probiere aber deine Herangehensweise natürlich aus.

LG, mxa@metaxa nimm das, was dir am besten paßt - eigene scripte , die funktionieren, sind immer besser - selbst gemacht, da kennt man sich aus
edit:
deine dp-struktur bleibt gleich - nur du mußt halt nicht soviele exec ausführennach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html
-
@metaxa nimm das, was dir am besten paßt - eigene scripte , die funktionieren, sind immer besser - selbst gemacht, da kennt man sich aus
edit:
deine dp-struktur bleibt gleich - nur du mußt halt nicht soviele exec ausführen@liv-in-sky ich habe jetzt deine Befehlszeile angepasst ausgeführt.
Result:andreas@ioBroker-Prod:~$ cd /mnt/ftp_cam && for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" | awk '{print $1}' && echo "!" && find $dir ! -path . | wc -l && echo ":" ; done 3,2G ! 10911 : 3,1G ! 6818 : 6,0G 2,8G 8,8G 8,8G ! 33692 : 5,0G 6,0G 11G 11G ! 39365 :Die Werte die da stehen decken sich da und dort mit den Meinigen, aber nicht alle kann ich wirklich zuordnen.
Weist du eventuell, ob mehrere Execaufrufe - in meinem Skript 8 oder 9 - Probleme verursachen können? Die Prozessorlast in Proxmox bleibt davon unbeeindruckt wenn ich alle Stunden das Script laufen lasse. -
@liv-in-sky ich habe jetzt deine Befehlszeile angepasst ausgeführt.
Result:andreas@ioBroker-Prod:~$ cd /mnt/ftp_cam && for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" | awk '{print $1}' && echo "!" && find $dir ! -path . | wc -l && echo ":" ; done 3,2G ! 10911 : 3,1G ! 6818 : 6,0G 2,8G 8,8G 8,8G ! 33692 : 5,0G 6,0G 11G 11G ! 39365 :Die Werte die da stehen decken sich da und dort mit den Meinigen, aber nicht alle kann ich wirklich zuordnen.
Weist du eventuell, ob mehrere Execaufrufe - in meinem Skript 8 oder 9 - Probleme verursachen können? Die Prozessorlast in Proxmox bleibt davon unbeeindruckt wenn ich alle Stunden das Script laufen lasse.@metaxa Ich denke, dass sollte kein Performance Problem sein
Ich würde vielleicht noch ein&& exitAn jedes der befehlzeilen setzen, damit sicher ist, dass die Verbindungen geschlossen sind
Das& && fügt einfach einen Befehl dazu
nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html
-
@liv-in-sky ich habe jetzt deine Befehlszeile angepasst ausgeführt.
Result:andreas@ioBroker-Prod:~$ cd /mnt/ftp_cam && for dir in $(find . -maxdepth 1 ! -path . -type d | sort); do du -h "$dir" | awk '{print $1}' && echo "!" && find $dir ! -path . | wc -l && echo ":" ; done 3,2G ! 10911 : 3,1G ! 6818 : 6,0G 2,8G 8,8G 8,8G ! 33692 : 5,0G 6,0G 11G 11G ! 39365 :Die Werte die da stehen decken sich da und dort mit den Meinigen, aber nicht alle kann ich wirklich zuordnen.
Weist du eventuell, ob mehrere Execaufrufe - in meinem Skript 8 oder 9 - Probleme verursachen können? Die Prozessorlast in Proxmox bleibt davon unbeeindruckt wenn ich alle Stunden das Script laufen lasse.@metaxa wenn du das
| awk '{print $1}'Aus dem Befehl nimmst, solltest du auch das Verzeichnis in der Konsole sehen
Wegen der ZuOrdnung
Dann funktioniert es aber im Blocky nicht mehrnach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html