Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F31674367
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
JHedden
Mar 10 2020, 3:50 PM
2020-03-10 15:50:39 (UTC+0)
Size
1010 B
Referenced Files
None
Subscribers
None
raw.txt
View Options
```
$ curl -s -G --data-urlencode 'query=topk(10, node_directory_size_bytes{name="tools_home"})' http://localhost:9900/ops/api/v1/query | jq '.data | .result[] | (.metric.directory+" "+.value[1])' | head -n 20
"/exp/project/tools/home/computermacgyver 2147483647"
"/exp/project/tools/home/bovlb 2147483647"
"/exp/project/tools/home/blahma 2147483647"
"/exp/project/tools/home/baku 2147483647"
"/exp/project/tools/home/bgelley 2147483647"
"/exp/project/tools/home/arnab777as3uj 2147483647"
"/exp/project/tools/home/ashwinpp 2147483647"
```
Should be
```
$ du --block-size=1 --summarize /srv/tools/shared/tools/home/computermacgyver/
6963625984 /srv/tools/shared/tools/home/computermacgyver/
```
Proposed fix
```
$ du --block-size=1 --summarize /exp/project/tools/home/computermacgyver | awk -v name="${1}" '{ printf("node_directory_size_bytes{directory=\"%s\",name=\"%s\"} %.0f\n", $2, name, $1); }'
node_directory_size_bytes{directory="/exp/project/tools/home/computermacgyver",name=""} 6963625984
```
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8347283
Default Alt Text
raw.txt (1010 B)
Attached To
Mode
P10678 32-bit signed binary int on node_directory_size_bytes
Attached
Detach File
Event Timeline
Log In to Comment