home
/
code
/
khatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b554fc
)
Use percentage given by df
author
Siraaj Khandkar
<siraaj@khandkar.net>
Fri, 29 Jun 2018 16:15:40 +0000
(12:15 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Fri, 29 Jun 2018 16:15:40 +0000
(12:15 -0400)
bin/khatus_show
patch
|
blob
|
blame
|
history
diff --git
a/bin/khatus_show
b/bin/khatus_show
index
e43b556
..
c54ff1e
100755
(executable)
--- a/
bin/khatus_show
+++ b/
bin/khatus_show
@@
-44,10
+44,9
@@
disk=$(
function round(n) {return int(n + 0.5)}
$1 == "/dev/mapper/kubuntu--vg-root" {
-
total = $2
;
-
used = $3
;
+
curr = $5
;
+
sub("%$", "", curr)
;
file = "/home/siraaj/var/run/status/disk_space_used_percentage";
- curr = round(used / total * 100);
getline prev < file;
print curr > file;
if (curr > prev) {
This page took
0.029031 seconds
and
4
git commands to generate.