0

I need to get the size of an InfluxDb on disc. I am able to get the size on the windows cmd(I am in windows 11) using du -sh /var/lib/influxdb2/.

The problem is now that i want to access this data using node.js. Using child process, i can run docker commands and get the ouput e.g. docker ps.

But when i run docker exec -it influxdb du -sh /var/lib/influx2/engine which is the bash command, i am getting "the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'"

Any help or guidance would be highly appreciated.

1
  • 1
    Try exec instead of exec -it Commented Jul 23, 2022 at 15:59

1 Answer 1

0

docker exec -it nameofcontainer -- /bin/bash helps us to login to the container and after that you would be able to use du -sh /var/lib/influx2/engine to check the disk space

Sign up to request clarification or add additional context in comments.

2 Comments

Still getting the same error as mentioned above
seems problem creating interactive terminal while using -it flag . can you try this winpty docker exec -it nameofcontainer bash and later du -sh /var/lib/influx2/engine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.