Currently used drive space per satellite

Is there a way to find out how much space is being used by each satellite?

continuing the discussion from :arrow_down:

The suggested ways from :arrow_up: are:

1 - you can track it via log by pieces id:

Not everyone has redirected their log and some systems have logs overwritten after X size or deleted.

You can divide last day value for "space used this month " from Dashboard by 24 to convert GB**hours back to just GB.

Still it will give “space used this month” and we are interested in currently used space per satellite.

You can send graceful-exit command (there will be 2 prompts before actual start of GE, so you do not kill node this way) and client will show you disk space currently used by each satellite before GE confirmation.

Currently this is the ONLY way but I would like other options which doesn’t involve risking GE.

4 you can select a satellite on your dashboard

Still gives current month

5 you can calculate the size of the each folder in the blobs folder

Directory traversal is already pushing CPU to the max. Personally I don’t want to use this option. Also its cumbersome and rather prefer getting said data programmatically.

6 you can request data from the storagenode API: Script for Audits stat by satellites , just modify the script to show the whole data instead of only audits.

Still gives current month.

I hope a dev can shed more light on this but I don’t want to tag anyone specific :slight_smile:

Currently, the ability to directly access the current disk usage for each satellite is only accessible through graceful exit or directory traversal. As you mentioned, neither of these is ideal. But I just looked at the code and it seems like a pretty straightforward process to make a new command similar to graceful exit, but called “satellite-info” or something which just gives information about each satellite. I will make a new change to add this command then try to get some reviews.

3 Likes

That sounds awesome, thank you. Also could it be implemented through API too.

As for the name I would like to suggest a name too “current-disk-usage”. Its straight forward.

IMO “satellite-info” would mean information about satellite which is already available via api/sno/satellites & api/sno/satellite/(invididual sat id)

Yeah, I made a quick change and put it up for review, but someone suggested adding it to the dashboard instead so that operators wouldn’t have to exec into docker or anything like that - I am investigating that now, but the backup cli tool is ready just in case that falls through.

1 Like

Noted. I will do this if I end up going the CLI route.

1 Like

Thank you for taking time to review my request :slight_smile:

1 Like

API is (more) important in my opinion. Many SNOs use external tools for statistics. It’s also less effort than adding to the SNOboard :smiley:

2 Likes

Update: I have a change to add currently used space per satellite to the api: https://review.dev.storj.io/c/storj/storj/+/2782

I have one approval but am still seeking another. If I can get it merged soon enough, it should be in v1.15.x. Otherwise, it might not be until v1.16.x or a point release for v1.15.

6 Likes

Second approval is in and build is running. I’ll try to get this merged tonight :slight_smile:

5 Likes