-
Notifications
You must be signed in to change notification settings - Fork 12
Email Reports, Logs
The system can send automatic email reports about various activities with the help of ssmtp and cron and you can easily create your own. It also logs every major event to a file.
Queue Manager sends email reports about its regular activity or about various problems.
It can include 5 different activities in its regular reports (all of them are configurable and enabled by default):
- deleted torrents by Disk free space manager
- bogus torrents in
.queue
directory by Downloading queue manager - duplicated torrents in
incomplete
directory by Downloading queue manager - oversized torrents in
.queue
directory by Downloading queue manager - queued torrents by Downloading queue manager
A possible email report that includes all 3 components looks like this:
- subject:
U - Making Free space, Bogus torrents!, Duplicated torrents!, Oversized torrents!, Queued 3 torrents
Free space before action: 5GiB Deleted torrents (free space required: 4.0GiB + 2.9GiB - 5GiB = 1.9GiB): 275MiB - gasslight2015-08-01.flac16 3.3GiB - Pushing Through the Pavement Remixes Deleted data size: 3.6GiB Bogus torrents has been moved into bogus directory, manual interaction is required. 0 - Notvalidtorrentfile Duplicated torrents has been moved into duplicated directory, manual interaction is required. 18MiB - HealthFoodChoicesInThailand 8.3MiB - 050815LOSHIJOSDELBOLERO Oversized torrents has been moved into oversized directory, manual interaction is required. 235.4GiB / 978.2GiB - OverSizeMe Queued 3 torrents: 1.8GiB - Atlantic Anime Blend Ezine 256.5MiB - Baen_CD-08-Into_the_Looking_Glass.iso 912.1MiB - JPFO 2A Today for the USA MP4 Downloadable data size: 2.9GiB
It will also notify you about various problems.
It can happen that deletion wasn't successful, it sends a report with subject U - Error: insufficient disk space!!!!
like this:
Free space before action: 5GiB Error in disk space: deleting from rotating directories wasn't enough... :( You have to fix it manually :( Uptime: 18:30:18 up 61 days, 10 min, 1 user, load average: 0.07, 0.08, 0.04
It can happen that rTorrent-PS-CH
stopped running, it sends a report with subject U - Error: rtorrent is not running!!!!
like this:
Free space before action: 5GiB Error in rtorrent: not running for some reason ... :( Uptime: 18:30:18 up 61 days, 10 min, 1 user, load average: 0.07, 0.08, 0.04
It can happen that mounted HDD was dropped, it sends a report with subject U - Error: Mount!!!!
like this:
Error in mount: probably the HDD got lost again ... :( Uptime: 18:30:18 up 61 days, 10 min, 1 user, load average: 0.07, 0.08, 0.04
These reports use rtcontrol
command from pyrocore
utilities and are created as bash functions in ~/.profile_rtfunctions to be able to be used at the command line as well.
It can happen that data of a torrent gets abandoned, consuming only disk space but actually not used by rTorrent-PS-CH
.
reportOrphans.sh lists orphaned torrents, runs in every 10 day as a reminder, a possible email report with subject U - List of Orphaned torrents
looks like this:
Free space before action: 6.6GiB There are orphaned torrents, manual interaction is required. 1.8 GiB - incomplete/Atlantic Anime Blend Ezine 256.5 MiB - apps/Baen_CD-08-Into_the_Looking_Glass.iso 912.1 MiB - songs/JPFO 2A Today for the USA MP4 Orphaned data size: 2.9 GiB
It can happen that meta files of a torrent gets abandoned, not used by rTorrent-PS-CH
.
reportOrphanMetas.sh lists orphaned meta files, runs in every 10 day as a reminder, a possible email report with subject U - List of Orphaned meta files
looks like this:
Free space before action: 6.6GiB There are orphaned meta files, manual interaction is required. .rtorrent/.completed/rotating/Baen_CD-08-Into_the_Looking_Glass.torrent
Since public torrents are officially supported it's good to know which they are and how much disk space they occupy.
reportPublic.sh lists public torrents, runs in every 10 day as a reminder, a possible email report with subject U - List of Public torrents
looks like this:
Free space before action: 6.6GiB There are public torrents, manual interaction is required. 1.8 GiB - incomplete/Atlantic Anime Blend Ezine mininova.org 256.5 MiB - apps/Baen_CD-08-Into_the_Looking_Glass.iso bt1.archive.org 912.1 MiB - songs/JPFO 2A Today for the USA MP4 mininova.org Public data size: 2.9 GiB
It can happen that a torrent gets deleted from the tracker, consuming only disk space but actually can not be used by rTorrent-PS-CH
.
reportMessages.sh lists torrents with unusual tracker message, runs every day as a reminder, a possible email report with subject U - List of torrents with unusual Tracker Message
looks like this:
Free space before action: 6.6GiB There are torrents with unusual tracker message, manual interaction is required. 1.8 GiB incomplete/Atlantic Anime Blend Ezine mininova.org Tracker: [Failure reason "torrent not registered with this tracker"] 256.5 MiB apps/Baen_CD-08-Into_the_Looking_Glass.iso bt1.archive.org Tracker: [Failure reason "torrent not registered with this tracker"] 912.1 MiB songs/JPFO 2A Today for the USA MP4 mininova.org Tracker: [Failure reason "torrent not registered with this tracker"] Data size of torrents with tracker message: 2.9 GiB
This setup never
stops any torrent, all the torrents are running all the time. If this happens that means something is wrong with those ones.
reportStopped.sh lists stopped torrents, runs every day as a reminder, a possible email report with subject U - List of Stopped torrents
looks like this:
Free space before action: 6.6GiB There are stopped torrents, manual interaction is required. 256.5 MiB apps/Baen_CD-08-Into_the_Looking_Glass.iso bt1.archive.org 912.1 MiB songs/JPFO 2A Today for the USA MP4 mininova.org Stopped data size: 1.1 GiB
Normally, all the data of torrents get moved from incomplete
directory into their final category when their download is finished. If this happens that means that target data
directory/file (in one of the sub-directories of main
directory) OR meta
file (in one of the sub-directories of .completed
directory) exists.
reportStuck.sh lists stuck torrents in incomplete
directory, runs every day as a reminder, a possible email report with subject U - List of Stuck torrents in 'incomplete' dir
looks like this:
Free space before action: 6.6GiB There are stuck torrents in 'incomplete' directory, manual interaction is required. 256.5 MiB Baen_CD-08-Into_the_Looking_Glass.iso bt1.archive.org 912.1 MiB JPFO 2A Today for the USA MP4 mininova.org Stuck data size: 1.1 GiB
reportLowRotatingSpace.sh reports low amount (configurable in script) of rotating space (in rotating and unsafe directory, including free space as well), runs every day as a reminder, a possible email report with subject U - Low Rotating space
looks like this:
Free space before action: 102GiB There is low rotating space (in rotating and unsafe directory), manual interaction is required: 668GiB
You can easily create your own report with the help of rtcontrol
, this is what needs to be done:
- create a new bash function in ~/.profile_rtfunctions
- export the new function in .profile like the rest are to be able to be used at the command line as well
- copy and modify an existing report script to your needs in ~/bin/
- add the new report script to cron
That's it. :)
In addition to email reports rTorrent-PS-CH
can produce log files into .log
directory as well.
Logs various data of download items (event
, title
, size
, uploaded data
, ratio
, seeders/leechers
scrape info, loaded time
, disk free space
, tracker
) during different events and startup time, being logrotated.
2018-04-26 8:18:04 LOADED Great Southern Stand Breaking News - Stupid Warning Labels Comedy 1.4G U: 0.0K R: ·.00 S: ·/L: · 26/04/2018 8:18:04 ( 47.3G) opentrackr.org 2018-04-26 8:18:04 STARTED Great Southern Stand Breaking News - Stupid Warning Labels Comedy 1.4G U: 0.0K R: ·.00 S: ·/L: · 26/04/2018 8:18:04 ( 47.3G) opentrackr.org 2018-04-26 8:19:01 COMPLETED Great Southern Stand Breaking News - Stupid Warning Labels Comedy 1.4G U:235.4M R: ·.16 S:17/L: 6 26/04/2018 8:18:04 ( 45.9G) opentrackr.org 2018-04-26 11:19:01 DELETED Great Southern Stand Breaking News - Stupid Warning Labels Comedy 1.4G U:941.6M R: ·.64 S:49/L: 2 26/04/2018 8:18:04 ( 45.9G) opentrackr.org