Open ievans opened 3 years ago
hey @ievans sorry for the slow reply (not sure why I didn't see a notif for this).
A quirk of the front-end being hacked together is it appears it needs paths to NOT start with /
As you can see in the deployed version, it is run from the current directory
and if you run on a non-docker dir from the cli you can see (note: this may be what you are trying to achieve anyway?)
➜ whaler /
Running bash -c cd / && du -a -k
which will mean all paths are pre-pended with a single root .
So I would say change directory into /
and then run without a location argument.
Please let me know if this fixes your problem!
hi @alex-treebeard -- thanks for the advice and response! I tried running cd / && du -a -k > $whaler_dir/public/du.txt but had the same issue. A little bit more digging and it seemed I could reproduce that I can also get that error when something like this occurs:
ok:
...
328038 /Volumes/SomeDrive
6408628 /Volumes
85013501 /
not ok:
...
328038 /Volumes/SomeDrive
85013501 /
basically it seems that if an intermediary path is missing, the "no root" exception occurs. I'm not sure how exactly to narrow it down, but du
might not be guaranteed to produce a listing for every intermediary folder?
@ievans which platform are you on?
On both OS X and Ubuntu, if I run du
without a location arg then all paths start in .
There are three problems with your second example on my end:
328038 /Volumes/SomeDrive
85013501 /
.
-- no idea why you are getting this on your end, perhaps it is platform related?Volumes
line. If I fix the other problems, then i see: Uncaught (in promise) Error: missing: ./Volumes at stratify (stratify.js:46)
here is a du.txt which should trigger 3:
328038 ./Volumes/SomeDrive
85013501 .
the following is how I expect this to work properly:
328038 ./Volumes/SomeDrive
424242 ./Volumes
85013501 .
Note two things:
.
not /
@alex-treebeard thanks for the detailed follow up, and sorry for my delayed reply. I'm on OSX 11.2.1, but I was a bit careless in my previous report: I tried to truncate the reproduction for brevity, and in doing so converted tabs to spaces. And also I also observe that all paths start with .
if not specifying a directory--looks like I did my reproduction example specifying /
explicitly, sorry!
Here's a direct copy-paste of the final couple lines of du.txt
, generated via cd / && du -a -k | tee /tmp/du.txt
2683808 ./Volumes/BOOTCAMP/Windows/WinSxS
10426844 ./Volumes/BOOTCAMP/Windows
64086028 ./Volumes/BOOTCAMP
64086028 ./Volumes
0 ./tmp
0 ./cores
714699253 .
Even with the proper invocation so that we see .
everywhere, I still get the no root exception.
If you run it on a live OSX system, are you able to successfully render the result? I have a lot of files, so I don't see an easy way to narrow down the issue.
$ wc -l public/du.txt
9186392 public/du.txt
I think the next step would be to individually run du
on every / subdirectory and recurse until I'm able to find the directory structure that causes the issue. Will do but it might take me a while, had to deprioritize this for now.
Hi! I just discovered this project and I really like it! I'm trying to use the UI directly to analyze a local disk, and I am wondering if you can help me debug something or if there is a bug in the code -- I'm not familiar enough with d3-hierarchy to quite understand the inner workings. When I run
du
on/
and try to load the result, I get an exception through saying "no root."I thought this might mean there was no
/
entry in du.txt but there is: