Using Dirichlet's hyperbola method and Dirichlet's formula Dirichlet Hyperbola Method.  For $x \geq 2$:
$$ \sum_{n \leq x} \frac{d(n)}{n} = \frac{1}{2} \log^2 x + 2\gamma \log x + \gamma^2 + O(\frac{\log x}{\sqrt{x}})$$
I know already that the summation of 1/n can be written $\log x + \gamma + O(1/x)$ and summation of $d(n)$ can be written $$ \sum_{n \leq x} d(n) = x \log x+(2 \gamma-1)x + O(\sqrt{x})$$ if this helps?
 A: Following the notation from the 
Planetmath Article
we note that
$$\frac{\tau(n)}{n} = 1/n * 1/n =
\sum_{d|n} \frac{1}{d} \left(\frac{n}{d}\right)^{-1}.$$
Substituting this into the formula for the method we obtain
$$\sum_{n\le x} \frac{\tau(n)}{n} =
\sum_{a\le\sqrt{x}} \sum_{b\le x/a} 
\frac{1}{a} \frac{1}{b}
+ \sum_{b\le\sqrt{x}} \sum_{a\le x/b} 
\frac{1}{a} \frac{1}{b}
- \sum_{a\le\sqrt{x}} \sum_{b\le\sqrt{x}} 
\frac{1}{a} \frac{1}{b}
\\ =
\sum_{a\le\sqrt{x}} \frac{1}{a} \sum_{b\le x/a} 
\frac{1}{b}
+ \sum_{b\le\sqrt{x}}  \frac{1}{b} \sum_{a\le x/b} 
\frac{1}{a}
- \sum_{a\le\sqrt{x}} \frac{1}{a}  \sum_{b\le\sqrt{x}} 
\frac{1}{b}
\\ =
\sum_{a\le\sqrt{x}} \frac{1}{a} (\log x - \log a + \gamma)
+ \sum_{b\le\sqrt{x}}  \frac{1}{b} (\log x - \log b + \gamma)
- (\log\sqrt{x} + \gamma)^2
\\ = 2\log x (\log\sqrt{x} + \gamma)
+ 2\gamma (\log\sqrt{x} + \gamma)
- 2 \sum_{q\le\sqrt{x}} \frac{\log q}{q}
- (\log\sqrt{x} + \gamma)^2
\\ = 2\log x (\log\sqrt{x} + \gamma)
+ \gamma^2
- 2 \sum_{q\le\sqrt{x}} \frac{\log q}{q}
- \frac{1}{4} \log^2 x
\\ = \log^2 x  + 2\gamma\log x
+ \gamma^2
- 2 \sum_{q\le\sqrt{x}} \frac{\log q}{q}
- \frac{1}{4} \log^2 x.$$
To evaluate the remaining sum term we could use the fact that
$$\left(\frac{1}{2} \log^2 x\right)' = \frac{\log x}{x}$$
but we need the constant term which is given in terms of the
Stiltjes constants
as $$\sum_{q=1}^n \frac{\log q}{q} \sim
\frac{1}{2} \log^2 n + \gamma_1.$$
This finally yields the formula
$$\log^2 x  + 2\gamma\log x
+ \gamma^2
- 2 \left(\frac{1}{2} \log^2\sqrt{x} + \gamma_1\right)
- \frac{1}{4} \log^2 x
\\ = \log^2 x  + 2\gamma\log x
+ \gamma^2
- 2 \left(\frac{1}{8} \log^2 x + \gamma_1\right)
- \frac{1}{4} \log^2 x
\\ = \log^2 x  + 2\gamma\log x
+ \gamma^2
- \frac{1}{4} \log^2 x - 2\gamma_1
- \frac{1}{4} \log^2 x
\\ = \frac{1}{2} \log^2 x  + 2\gamma\log x
+ \gamma^2 - 2\gamma_1.$$
The equalities are plus implicit lower order terms.
 Addendum. The bound on the error terms follows from the harmonic number asymptotics $H_n = \log n + \gamma + \frac{1}{2n} + \cdots$ We get from the first term $\sum_{a\le \sqrt{x}} \frac{1}{a} \frac{1}{2x/a} = \frac{1}{2x} \sum_{a\le \sqrt{x}} 1$ which is $O(1/\sqrt{x}).$ The second term is the same. The third term contributes $\log\sqrt{x} \times 1/\sqrt{x}$ which is $O(\log x/\sqrt{x}).$ We see  that the third lower order term dominates the first two, which gives exactly the formula proposed by the OP. 
