Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. ioBroker Allgemein
  4. [gelößt] größe influxDB ermitteln

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    705

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    5.8k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.5k

[gelößt] größe influxDB ermitteln

Scheduled Pinned Locked Moved ioBroker Allgemein
influxdb
13 Posts 4 Posters 7.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Thomas BraunT Thomas Braun

    @ente34 Ohne sudo geht es auch.

    E Offline
    E Offline
    ente34
    wrote on last edited by
    #4

    @Thomas-Braun
    Bei mir nicht (warum?)

    pi@raspi-iobroker:~ $  du -sh  /var/lib/influxdb/data/
    du: das Verzeichnis '/var/lib/influxdb/data/_internal' kann nicht gelesen werden: Keine Berechtigung
    du: das Verzeichnis '/var/lib/influxdb/data/iobroker' kann nicht gelesen werden: Keine Berechtigung
    12K     /var/lib/influxdb/data/
    pi@raspi-iobroker:~ $
    
    
    E Thomas BraunT 2 Replies Last reply
    0
    • E ente34

      @Thomas-Braun
      Bei mir nicht (warum?)

      pi@raspi-iobroker:~ $  du -sh  /var/lib/influxdb/data/
      du: das Verzeichnis '/var/lib/influxdb/data/_internal' kann nicht gelesen werden: Keine Berechtigung
      du: das Verzeichnis '/var/lib/influxdb/data/iobroker' kann nicht gelesen werden: Keine Berechtigung
      12K     /var/lib/influxdb/data/
      pi@raspi-iobroker:~ $
      
      
      E Offline
      E Offline
      ente34
      wrote on last edited by
      #5

      @ente34
      Berechtigungen bei mir:

      pi@raspi-iobroker:~ $ ls -l /var/lib/influxdb/data/
      insgesamt 8
      drwx------ 4 influxdb influxdb 4096 Sep  7 18:13 _internal
      drwx------ 4 influxdb influxdb 4096 Sep  8 17:03 iobroker
      
      
      1 Reply Last reply
      0
      • E ente34

        @Thomas-Braun
        Bei mir nicht (warum?)

        pi@raspi-iobroker:~ $  du -sh  /var/lib/influxdb/data/
        du: das Verzeichnis '/var/lib/influxdb/data/_internal' kann nicht gelesen werden: Keine Berechtigung
        du: das Verzeichnis '/var/lib/influxdb/data/iobroker' kann nicht gelesen werden: Keine Berechtigung
        12K     /var/lib/influxdb/data/
        pi@raspi-iobroker:~ $
        
        
        Thomas BraunT Online
        Thomas BraunT Online
        Thomas Braun
        Most Active
        wrote on last edited by
        #6

        @ente34
        Oh, sorry, mein Fehler, hab in einem anderen Verzeichnis geschaut.

        Linux-Werkzeugkasten:
        https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten
        NodeJS Fixer Skript:
        https://forum.iobroker.net/topic/68035/iob-node-fix-skript
        iob_diag: curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh

        J 1 Reply Last reply
        0
        • Thomas BraunT Thomas Braun

          @ente34
          Oh, sorry, mein Fehler, hab in einem anderen Verzeichnis geschaut.

          J Offline
          J Offline
          jeti
          wrote on last edited by
          #7

          ah perfekt! danke!
          aber was stimmt hier nicht:

          var result;
          
          
          schedule("* * * * *", async function () {
            exec('sudo du -sh /var/lib/influxdb/data/', async function (error, result, stderr) {
                setState("javascript.0.System.influxDB_size"/*influxDB_size*/, result);
            });
          });
          

          das Skript scheint nichts zu tun, folgende info Meldung gibts, sonst nichts...

          javascript.0 (14224) script.js.Datenbank.DB_size: registered 0 subscriptions and 1 schedule
          

          wo liegt mein Denkfehler?
          Gruß

          E 1 Reply Last reply
          0
          • J jeti

            ah perfekt! danke!
            aber was stimmt hier nicht:

            var result;
            
            
            schedule("* * * * *", async function () {
              exec('sudo du -sh /var/lib/influxdb/data/', async function (error, result, stderr) {
                  setState("javascript.0.System.influxDB_size"/*influxDB_size*/, result);
              });
            });
            

            das Skript scheint nichts zu tun, folgende info Meldung gibts, sonst nichts...

            javascript.0 (14224) script.js.Datenbank.DB_size: registered 0 subscriptions and 1 schedule
            

            wo liegt mein Denkfehler?
            Gruß

            E Offline
            E Offline
            ente34
            wrote on last edited by
            #8

            @jeti
            Nein, das ist ein sudo-Problem.
            (Ich gehe davon aus, dass Du in der javascript-Instanz "exec" erlaubt hast)
            Du siehst es, wenn Du stderr ausgibts.

            Meine Unix Kenntnisse stammen von AIX(IBM) Mitte der 90er, da gab es noch kein sudo.
            Du kannst Dir aber (einmalig) die Leserechte setzen und dann in Deinem Script ohne sudo arbeiten.

            sudo chmod -R ugoa+r /var/lib/influxdb/data 
            sudo find /var/lib/influxdb/data/ -type d -exec chmod uoga+x {} \;
            

            Kontrollieren ohne sudo:

            du -sh /var/lib/influxdb/data/ | cut -f1
            
            Thomas BraunT 1 Reply Last reply
            0
            • E ente34

              @jeti
              Nein, das ist ein sudo-Problem.
              (Ich gehe davon aus, dass Du in der javascript-Instanz "exec" erlaubt hast)
              Du siehst es, wenn Du stderr ausgibts.

              Meine Unix Kenntnisse stammen von AIX(IBM) Mitte der 90er, da gab es noch kein sudo.
              Du kannst Dir aber (einmalig) die Leserechte setzen und dann in Deinem Script ohne sudo arbeiten.

              sudo chmod -R ugoa+r /var/lib/influxdb/data 
              sudo find /var/lib/influxdb/data/ -type d -exec chmod uoga+x {} \;
              

              Kontrollieren ohne sudo:

              du -sh /var/lib/influxdb/data/ | cut -f1
              
              Thomas BraunT Online
              Thomas BraunT Online
              Thomas Braun
              Most Active
              wrote on last edited by
              #9

              @ente34 @jeti
              Bevor ich die Rechte da so biegen würde würde ich mal mit

              sudo -u influxdb
              

              mein Glück versuchen.

              Linux-Werkzeugkasten:
              https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten
              NodeJS Fixer Skript:
              https://forum.iobroker.net/topic/68035/iob-node-fix-skript
              iob_diag: curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh

              E J 2 Replies Last reply
              0
              • Thomas BraunT Thomas Braun

                @ente34 @jeti
                Bevor ich die Rechte da so biegen würde würde ich mal mit

                sudo -u influxdb
                

                mein Glück versuchen.

                E Offline
                E Offline
                ente34
                wrote on last edited by
                #10

                @Thomas-Braun
                Guter Tipp, hat aber bei mir nicht funktioniert.
                Und mit /etc/sudoers.d/ kenne ich mich leider nicht aus ...

                1 Reply Last reply
                0
                • Thomas BraunT Thomas Braun

                  @ente34 @jeti
                  Bevor ich die Rechte da so biegen würde würde ich mal mit

                  sudo -u influxdb
                  

                  mein Glück versuchen.

                  J Offline
                  J Offline
                  jeti
                  wrote on last edited by
                  #11

                  @Thomas-Braun du hast recht, hier liegt der Hund begraben:

                  sudo -u iobroker du -sh /var/lib/influxdb/data/
                  du: cannot read directory '/var/lib/influxdb/data/_internal': Permission denied
                  du: cannot read directory '/var/lib/influxdb/data/iobroker': Permission denied
                  12K     /var/lib/influxdb/data/
                  

                  dann fix die rechte vergeben:

                  sudo chmod -R 755 /var/lib/influxdb/data/
                  

                  und schon klappts:

                  sudo -u iobroker du -sh /var/lib/influxdb/data/
                  

                  Skript pass ich morgen an uns stelle es hier rein

                  J 1 Reply Last reply
                  0
                  • J jeti

                    @Thomas-Braun du hast recht, hier liegt der Hund begraben:

                    sudo -u iobroker du -sh /var/lib/influxdb/data/
                    du: cannot read directory '/var/lib/influxdb/data/_internal': Permission denied
                    du: cannot read directory '/var/lib/influxdb/data/iobroker': Permission denied
                    12K     /var/lib/influxdb/data/
                    

                    dann fix die rechte vergeben:

                    sudo chmod -R 755 /var/lib/influxdb/data/
                    

                    und schon klappts:

                    sudo -u iobroker du -sh /var/lib/influxdb/data/
                    

                    Skript pass ich morgen an uns stelle es hier rein

                    J Offline
                    J Offline
                    jeti
                    wrote on last edited by
                    #12

                    Skript sieht nun so aus:

                    var result;
                    
                    
                    schedule('{"time":{"start":"00:00","end":"24:00","mode":"hours","interval":6},"period":{"days":1}}', async function () {
                      exec('du -sh /var/lib/influxdb/data/', async function (error, result, stderr) {
                          setState("javascript.0.System.influxDB_size"/*influxDB_size*/, parseFloat(result));
                      });
                    });
                    

                    Danke für die Hilfe

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      loverz
                      wrote on last edited by
                      #13

                      Wenn der Befehl:

                      sudo du -sh /var/lib/influxdb/data/
                      

                      folgendes ausspuckt:
                      19M /var/lib/influxdb/data/

                      ist meine Datenbank dann 19 MB groß?

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      Support us

                      ioBroker
                      Community Adapters
                      Donate
                      FAQ Cloud / IOT
                      HowTo: Node.js-Update
                      HowTo: Backup/Restore
                      Downloads
                      BLOG

                      421

                      Online

                      32.7k

                      Users

                      82.6k

                      Topics

                      1.3m

                      Posts
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Home
                      • Recent
                      • Tags
                      • Unread 0
                      • Categories
                      • Unreplied
                      • Popular
                      • GitHub
                      • Docu
                      • Hilfe