You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920
  1. #change paths etc
  2. #
  3. #! /bin/bash
  4. SCGI_SOCKET=/riddlebox/rt/rtorrent.sock
  5. if test \! -S $SCGI_SOCKET; then
  6. echo >&2 "rTorrent is not running (no socket $SCGI_SOCKET)"
  7. exit 1
  8. fi
  9. echo -n rTorrent $(rtxmlrpc system.client_version)/$(rtxmlrpc system.library_version)
  10. echo -n , up $(rtxmlrpc to_elapsed_time $(ls -l --time-style '+%s' $SCGI_SOCKET | awk '{print $6}'))
  11. echo -n \ [$(rtcontrol -qosize \* | awk '{ SUM += $1} END { print SUM/1024/1024/1024 }') GiB loaded]
  12. echo -n , D:$(rtxmlrpc to_mb $(rtxmlrpc get_down_total)) MiB
  13. echo -n \ @ $(rtxmlrpc to_kb $(rtxmlrpc get_down_rate))
  14. echo -n \ / $(rtxmlrpc to_kb $(rtxmlrpc get_download_rate)) KiB/s
  15. echo -n , U:$(rtxmlrpc to_mb $(rtxmlrpc get_up_total)) MiB
  16. echo -n \ @ $(rtxmlrpc to_kb $(rtxmlrpc get_up_rate))
  17. echo -n \ / $(rtxmlrpc to_kb $(rtxmlrpc get_upload_rate)) KiB/s
  18. echo