0

In the networking world, we use bps (bits per second) to measure data traveling down a media (wire) see this useful question about why: https://superuser.com/questions/297290/why-are-network-speeds-measured-in-kbits-sec-instead-of-kbytes-sec. However, in a number of Debian and Linux programs the measurement of Bps (Bytes per second) is chosen instead.

I would like to know if Apt (or Apt-Get) has the ability to display its downloading (whether for updating the index list, installing new packages or upgrading old ones) in bits per second (human readable with engineering notation (kilo Kbps, mega Mbps, giga Gbps, not 1x10^6 or 1000000bps etc)). Thanks everyone!

1

No, that output isn't configurable. From the source, for example, the lines for showing the current speed and ETA:

unsigned long long ETA = (TotalBytes - CurrentBytes)/CurrentCPS;
std::string Tmp = " " + SizeToStr(CurrentCPS) + "B/s " + TimeToStr(ETA);
size_t alignment = Line.length() + Tmp.length();
if (alignment < ScreenWidth)
{
 alignment = ScreenWidth - alignment;
 for (size_t i = 0; i < alignment; ++i)
    Line.append(" ");
 Line.append(Tmp);
}

The output is always some prefix + B/s.

  • Thank you for answering the question to it's fullest. Perhaps I'll submit a feature request :) – Tmanok Nov 2 '18 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.