6. Let $[x]$ denote the greatest integer not exceeding the real number $x$,
$$
\begin{array}{c}
S=\left[\frac{1}{1}\right]+\left[\frac{2}{1}\right]+\left[\frac{1}{2}\right]+\left[\frac{2}{2}\right]+\left[\frac{3}{2}\right]+ \\
{\left[\frac{4}{2}\right]+\left[\frac{1}{3}\right]+\left[\frac{2}{3}\right]+\left[\frac{3}{3}\right]+\left[\frac{4}{3}\right]+} \\
{\left[\frac{5}{3}\right]+\left[\frac{6}{3}\right]+\cdots}
\end{array}
$$

up to 2016 terms, where, for a segment with denominator $k$, there are $2 k$ terms $\left[\frac{1}{k}\right],\left[\frac{2}{k}\right], \cdots,\left[\frac{2 k}{k}\right]$, and only the last segment may have fewer than $2 k$ terms. Then the value of $S$ is
6.1078.
$$
2+4+\cdots+2 \times 44=1980 \text {. }
$$

For any integer \( k \) satisfying \( 1 \leqslant k \leqslant 44 \), the sum includes \( 2k \) terms with the denominator \( k \): \(\left[\frac{1}{k}\right],\left[\frac{2}{k}\right], \cdots,\left[\frac{2 k}{k}\right]\), whose sum is \( k+2 \).

Also, \( 2016-1980=36 \), so the sum includes 36 terms with the denominator 45: \(\left[\frac{1}{45}\right],\left[\frac{2}{45}\right], \cdots,\left[\frac{36}{45}\right]\), whose sum is zero.
$$
\text { Therefore, } S=\sum_{k=1}^{44}(k+2)=1078 \text {. }
$$