title: /proc/net/dev unit conversion
body: <p>I'm looking at the file /proc/net/dev and wondering about unit conversion of the receive bytes value.</p>
  
  <p>Here's the part of the file I'm contemplating:</p>
  
  <pre><code>Inter-|   Receive
   face |bytes
    eth0: 7060880392
  </code></pre>
  
  <p>ifconfig uses /proc/net/dev to produce the following:</p>
  
  <pre><code>eth0      Link encap:Ethernet 
            ...
            RX bytes:7060880392 (7.0 GB)
  </code></pre>
  
  <p>That's what I don't understand.  Given that the unit of the value is in bytes (rather than bits), I would have expected to convert to GB through divisions of 1024.  7060880392/1024/1024/1024 = 6.6GB.  But clearly ifconfig has used divisions of 1000 to convert from B to GB.</p>
  
  <p>Can someone explain why they did this?  I know bandwidth is generally expressed in bits; perhaps the labeling in /proc/net/dev is incorrect in referring to the unit of the value as bytes?  I checked the manpage for proc, but there's not a lot of detail on this file.</p>