-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcerinte.txt
57 lines (56 loc) · 2.66 KB
/
cerinte.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
DiskAnalyzer (3–4 student, i) –
Creat, i un daemon care analizeaz˘a spat, iul utilizat pe un dispozitiv de stocare ˆıncepˆand de la
un cale dat˘a, s, i construit, i un program utilitar care permite folosirea acestei functionalit˘at, i
din linia de comand˘a.
Daemonul trebuie s˘a analizeze spat, iul ocupat recursiv, pentru fiecare director cont, inut,
indiferent de adˆancime.
Utilitarul la linia de comanda se va numi ”da” s, i trebuie sa expun˘a urm˘atoarele funct, ionalit˘at, i:
(1) Crearea unui job de analiz˘a, pornind de la un director p˘arinte s, i o prioritate dat˘a
(a) - priorit˘at, ile pot fi de la 1 la 3 s, i indic˘a ordinea analizei ˆın raport cu celelate joburi
(1-low, 2-normal, 3-high)
(b) - un job de analiz˘a pentru un director care este deja parte dintr-un job de analiz˘a, nu
trebuie s˘a creeze task-uri suplimentare
(2) Anularea/s, tergerea unui job de analiz˘a
(3) ˆIntreruperea s, i restartarea (pause/resume) unui job de analiz˘a
(4) Interogarea st˘arii unui job de analiz˘a (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, done)
-l, --list list all analysis tasks, with their ID and the corresponding root parent
-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
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"