Giter Club home page Giter Club logo

disk-analyzer's Introduction

DiskAnalyzer

Creati un daemon care analizeaza spatiul utilizat pe un dispozitiv de stocare incepand de la o cale data, si construiti un program utilitar care permite folosirea acestei functionalitati din linia de comanda. Daemonul trebuie sa analizeze spatiul ocupat recursiv, pentru fiecare director continut, indiferent de adancime.

Utilitarul la linia de comanda se va numi ”da” si trebuie sa expuna urmatoarele functionalitati:

  • Crearea unui job de analiza, pornind de la un director parinte si o prioritate data
    • prioritatile pot fi de la 1 la 3 si indica ordinea analizei in raport cu celelate joburi (1-low, 2-normal, 3-high)
    • un job de analiza pentru un director care este deja parte dintr-un job de analiza, nu trebuie sa creeze task-uri suplimentare
  • Anularea / stergerea unui job de analiza
  • Intreruperea si restartarea (pause/resume) unui job de analiza
  • Interogarea starii unui job de analiza (preparing, in progress, done)
   Usage: da [OPTION]... [DIR]...
   Analyze the space occupied by the directory at [DIR]
      -a, --add           analyze a new directory path for disk usage
      -p, --priority   set priority for the new analysis (works only with -a argument)
      -S, --suspend <id>  suspend task with <id>
      -R, --resume <id>  resume task with <id>
      -r, --remove <id>  remove the analysis with the given <id>
      -i, --info <id>  print status about the analysis with <id> (pending, progress, d
      -l, --list   list all analysis tasks, with their ID and the corresponding root p
      -p, --print <id>  print analysis report for those tasks that are "done"

Exemplu de folosire:

  $> da -a /home/user/my_repo -p 3
  Created analysis task with ID ’2’ for ’/home/user/my_repo’ and priority ’high’.

  $> da -l
  ID  PRI Path  Done Status            Details
  2 *** /home/user/my_repo  45% in progress       2306 files, 11 dirs

  $> da -l
  6
  ID  PRI Path  Done Status            Details
     2 *** /home/user/my_repo  75% in progress       3201 files, 15 dirs
     
  $> da -p 2
     Path  Usage  Size Amount
     /home/user/my_repo 100%   100MB  #########################################
     |
     |-/repo1/ 31.3%  31.3MB #############
     |-/repo1/binaries/ 15.3%  15.3MB ######
     |-/repo1/src/ 5.7%   5.7MB ##
     |-/repo1/releases/ 9.0%   9.0MB  ####
     |
     |-/repo2/ 52.5%  52.5MB #####################
     |-/repo2/binaries/ 45.4%  45.4MB ##################
     |-/repo2/src/ 5.4%   5.4MB ##
     |-/repo2/releases/ 2.2%   2.2MB #
     |
     |-/repo3/ 17.2%  17.2MB ########
     [...]
     
  $> da -a /home/user/my_repo/repo2
  Directory ’home/user/my_repo/repo2’ is already included in analysis with ID ’2’
  
  $> da -r 2
  Removed analysis task with ID ’2’, status ’done’ for ’/home/user/my_repo’
  
  $> da -p 2
  No existing analysis for task ID ’2’

disk-analyzer's People

Contributors

airineiandrei avatar alexbanilean avatar nfjjunior 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.