Opened 12 years ago

Closed 12 years ago

#2328 closed Enhancement (fixed)

Allow the remote to query the daemon for stats

Reported by: Waldorf Owned by: charles
Priority: Normal Milestone: 1.74
Component: Daemon Version: 1.73
Severity: Normal Keywords:
Cc:

Description

it is triggered using the -st or --session-stats switch

OVERVIEW
  Torrents: 6
  Active: 2
  Paused: 4

BANDWIDTH
  Download Speed: 0/s
  Upload Speed: 0/s
  Uploaded: None (3.5 GB total)
  Downloaded: None (6.4 GB total)

STATISTICS
  Ratio: None (0.54 total)
  Files Added: 0 (800 total)
  Running Time: 18sec (8 days total)
  Session Started: 630 times

Attachments (4)

remote_stats.diff (4.9 KB) - added by Waldorf 12 years ago.
strltime_fix.patch (994 bytes) - added by KyleK 12 years ago.
stat_man.diff (410 bytes) - added by Waldorf 12 years ago.
eta_fix.diff (1.3 KB) - added by Longinus00 12 years ago.

Download all attachments as: .zip

Change History (19)

Changed 12 years ago by Waldorf

comment:1 Changed 12 years ago by jhujhiti

Is "Transfer" a better name for the section than "Bandwidth"?

comment:2 Changed 12 years ago by charles

  • Type changed from Bug to Enhancement

comment:3 Changed 12 years ago by Lacrocivious

Does the OS X client still refer to the torrent data on disk as a 'transfer' ? If so it would be confusing in the stats context.

Also, do the figures returned for 'Uploaded' and 'Downloaded' refer only to the current session, or to the total over the possibly multi-session life of that torrent?

comment:4 Changed 12 years ago by Waldorf

http://img.skitch.com/20090812-rkct3h9wwxq7epegxf2gtsgt4n.jpg

comment:5 Changed 12 years ago by charles

http://imgur.com/H5gbB.png

comment:6 Changed 12 years ago by charles

  • Milestone changed from 1.80 to 1.74
  • Owner set to charles
  • Status changed from new to assigned

This patch is pretty good but I'm going to tweak it to make the stats read like the gtk+ and qt clients' stats windows.

comment:7 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

added to trunk in r8908 for 1.74

comment:8 Changed 12 years ago by KyleK

  • Resolution fixed deleted
  • Status changed from closed to reopened

This patch breaks compilation of daemon/remote.c if libintl is not available on the system (embedded NAS), because of the use of ngettext().

I fixed it with the (somewhat awkward) attached patch.

Changed 12 years ago by KyleK

comment:9 Changed 12 years ago by charles

KyleK: thanks for the heads-up. Good to get this regression fixed before 1.74.

comment:10 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

Since none of the rest of transmission-remote is i18nized, IMO your fix is in spirit with the rest of the code... :)

committed to trunk in r8936 for 1.74

comment:11 Changed 12 years ago by Waldorf

  • Resolution fixed deleted
  • Status changed from closed to reopened

I seem to have forgotten the man page update

Changed 12 years ago by Waldorf

comment:12 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

committed to trunk in r8951 for 1.74

comment:13 Changed 12 years ago by charles

  • Resolution fixed deleted
  • Status changed from closed to reopened

The code I added to this patch creates a new formatting bug:

http://forum.transmissionbt.com/viewtopic.php?p=39768#p39768

The list command (-l) is no longer returns a nicely formated list because the function that generates the "ETA" string can now return strings that are much longer (up to 22 characters long, overflowing the 16 char string passed) than the 8 characters expected by printf for that column.

Torrents that are stopped but not done show an ETA of "0 seconds" instead of the previous "Unknown". The web client and the gtk client both just don't show anything so maybe an empty string would be best to keep consistency.

comment:14 Changed 12 years ago by Longinus00

Since whatever trac problem I was having earlier seems to have taken care of itself.

http://forum.transmissionbt.com/viewtopic.php?f=1&t=8435&start=15#p39783

Changed 12 years ago by Longinus00

comment:15 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

fixed in trunk by r8982 for 1.74.

thanks for the patch!

Note: See TracTickets for help on using tickets.