GithubHelp home page GithubHelp logo

mongo-tools's Introduction

mongo tools

install via pip

pip install mongo-tools

mongo-info

list dbs and print storage size, number of documents etc. of each db

mongo-info dbs

example output

db_name
                  ns         storageSize                size      totalIndexSize               count
               links              13.4 M              10.0 M             503.0 K               8.9 k
      system.indexes               1.3 M             504.0                 0.0                 5.0  
             archive               3.7 M               3.3 M               2.4 M               6.8 k
            fs.files             168.0 K              62.2 K              39.9 K             264.0  
           fs.chunks             218.8 M             173.4 M              87.8 K             751.0  
            sessions             680.0 K              79.7 K              47.9 K             340.0  

print info of a single database

mongo-info db local

list all connections

mongo-info connections

example output:

           ip          counts
    127.0.0.1              41
      0.0.0.0               2

more options see mongo-info -h

mongo-profile

profile for 60 seconds, log queries that takes longer than 100 ms

mongo-profile start db_name 100 60

more options see mongo-profile -h

mongo-files

find file by \_id

mongo-files dbname find 106e001a79074b8c2e706466

list 10 largest files

mongo-files dbname largest 10

count files

mongo-files dbname count

mongo-tools's People

Contributors

zweifisch avatar

Watchers

iThanos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.