Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vfs: add vfs/transfers endpoint for active transfer stats#9186

Open
aakhter wants to merge 1 commit intorclone:masterfrom
aakhter:vfs-transfers-endpoint
Open

vfs: add vfs/transfers endpoint for active transfer stats#9186
aakhter wants to merge 1 commit intorclone:masterfrom
aakhter:vfs-transfers-endpoint

Conversation

@aakhter
Copy link

@aakhter aakhter commented Feb 17, 2026

What is the purpose of this change?

Add a new vfs/transfers RC 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:

  • Cache status: cacheBytes, cachePercentage, cacheStatus (none/partial/full/unknown)
  • Download state: downloading, downloadBytes, downloadSpeed, downloadSpeedAvg
  • Read position tracking: readBytes, readOffset, readOffsetPercentage, readSpeed
  • File metadata: name, size, opens, dirty, lastAccess
  • Summary: activeReads, activeDownloads, totalOpenFiles, totalCacheBytes, totalCacheFiles, outOfSpace

The 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/stats endpoint provides aggregate cache stats but no per-file transfer detail. This endpoint fills that gap - it's the equivalent of watching rclone mount activity in real time via the RC API.

Was the change discussed in an issue or in the forum before?

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant