1 |
commit: 8e951cb44fa2e6a0d62ea10c927215e91113c964 |
2 |
Author: Jeremy Olexa <darkside <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 20:19:18 2011 +0000 |
4 |
Commit: Jeremy Olexa <darkside <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 20:19:18 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=8e951cb4 |
7 |
|
8 |
add a simple script to show usage of FILESDIRs in the tree |
9 |
|
10 |
--- |
11 |
README | 5 +++-- |
12 |
filesdir-usage.sh | 13 +++++++++++++ |
13 |
htdocs/index.html | 2 ++ |
14 |
3 files changed, 18 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/README b/README |
17 |
index 0e2173e..992f4aa 100644 |
18 |
--- a/README |
19 |
+++ b/README |
20 |
@@ -26,7 +26,8 @@ Current runtimes: |
21 |
(As of 2011-04-15) |
22 |
|
23 |
- emerge --sync: hourly. Assume PORTDIR=/usr/portage (may change in future) |
24 |
-- genrdeps, run-genrdeps-index.sh: hourly |
25 |
-- eapi_usage.sh: 2x daily |
26 |
- check_eclasses_eapis.sh: 4x daily |
27 |
+- eapi_usage.sh: 2x daily |
28 |
+- filesdir-usage.sh: daily |
29 |
+- genrdeps, run-genrdeps-index.sh: hourly |
30 |
- mask_check.py: daily |
31 |
|
32 |
diff --git a/filesdir-usage.sh b/filesdir-usage.sh |
33 |
new file mode 100755 |
34 |
index 0000000..4677277 |
35 |
--- /dev/null |
36 |
+++ b/filesdir-usage.sh |
37 |
@@ -0,0 +1,13 @@ |
38 |
+#!/bin/bash |
39 |
+ |
40 |
+# $1 is a number, N. The top N directories that are consuming space. Defaults to |
41 |
+# all. |
42 |
+ |
43 |
+cd /usr/portage/ |
44 |
+if [[ -z $1 ]]; then |
45 |
+ du -h */*/files | sort -nr |
46 |
+else |
47 |
+ du -h */*/files | sort -nr | head -n $1 |
48 |
+fi |
49 |
+echo |
50 |
+echo $(emerge --info | grep Timestamp) |
51 |
|
52 |
diff --git a/htdocs/index.html b/htdocs/index.html |
53 |
index 0f11314..8d710d6 100644 |
54 |
--- a/htdocs/index.html |
55 |
+++ b/htdocs/index.html |
56 |
@@ -49,6 +49,8 @@ |
57 |
<a href=http://qa-reports.gentoo.org/output/eapi-per-eclass/>EAPI Usage per eclass</a> |
58 |
<br /> |
59 |
<a href=http://qa-reports.gentoo.org/output/invalid-mask.txt>Invalid package.mask entries</a> |
60 |
+ <br /> |
61 |
+ <a href=http://qa-reports.gentoo.org/output/filesdir-usage.txt>Top 100 largest FILESDIRs</a> |
62 |
<h2> |
63 |
Rsync Usage: |
64 |
</h2> |