vfs: add vfs/transfers endpoint for active transfer stats#9186
Open
aakhter wants to merge 1 commit intorclone:masterfrom
Open
vfs: add vfs/transfers endpoint for active transfer stats#9186aakhter wants to merge 1 commit intorclone:masterfrom
aakhter wants to merge 1 commit intorclone:masterfrom
Conversation
Implements a new vfs/transfers RC endpoint that provides detailed info about open VFS cache files including: - Read position tracking (readBytes, readOffset, readOffsetPercentage) - Read speed with EMA calculation (decays to 0 after 2s inactivity) - Cache status (downloading, cacheBytes, cachePercentage, cacheStatus) - File metadata (size, opens, dirty, lastAccess) The read metrics use exponential moving average for speed calculation with automatic decay when no reads occur, providing accurate real-time playback position for media streaming monitoring. Fixes rclone#5816
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this change?
Add a new
vfs/transfersRC endpoint that provides detailed information about active VFS cache file transfers, designed for real-time media streaming monitoring.What it returns per open/downloading file:
cacheBytes,cachePercentage,cacheStatus(none/partial/full/unknown)downloading,downloadBytes,downloadSpeed,downloadSpeedAvgreadBytes,readOffset,readOffsetPercentage,readSpeedname,size,opens,dirty,lastAccessactiveReads,activeDownloads,totalOpenFiles,totalCacheBytes,totalCacheFiles,outOfSpaceThe read speed uses an exponential moving average (EMA) that automatically decays to 0 after 2 seconds of inactivity, giving accurate real-time playback speed without stale values.
Use case: I built a media streaming application on top of rclone VFS that needs to monitor which files are actively being read, their cache fill progress, and read speed. The existing
vfs/statsendpoint provides aggregate cache stats but no per-file transfer detail. This endpoint fills that gap - it's the equivalent of watchingrclone mountactivity in real time via the RC API.Was the change discussed in an issue or in the forum before?
Checklist