lg / murder

Large scale server deploys using BitTorrent and the BitTornado library (NOTE: project no longer maintained)
http://twitter.com
Other
2.53k stars 269 forks source link

Transfert monitoring #23

Closed eoli3n closed 7 years ago

eoli3n commented 8 years ago

Is there any way to see percentage of transfert ? I understood that, that wasnt possible with "pv" because bittorrent preallocates space on disk.

eoli3n commented 7 years ago

Just uncomment prints in murder_client.py, lign 165 or modify as you want it to display, i did

print '\n\n\n\n' for err in self.errors: print 'ERROR:\n' + err + '\n' print 'file: ', self.file,'to ',self.downloadTo print self.percentDone, '% ', self.timeEst, ' ', self.downRate, ' ', self.upRate print 'share rating: ', self.shareRating print 'seed status: ', self.seedStatus print 'peer status: ', self.peerStatus

eoli3n commented 7 years ago

If you want to pipe it to "dialog", just

    #print '\n\n\n\n'
    print "XXX"
    print self.percentDone[:-2]
    print "Write", self.file, "to", self.downloadTo
    print "\n"
    print "Share rating : ", self.shareRating
    print "\n"
    print "Seeders : ", self.seedStatus
    print "Leechers : ", self.peerStatus
    print "\n"
    print "Download speed    :", self.downRate
    print "Up speed    :", self.upRate
    print "\n"
    print "Time left    :", self.timeEst
    print "XXX"
    stdout.flush()

Then invoke murder_client.py with "| dialog --gauge torrent 40 80" to the end