I'm working on a pet project of mine and I've come across a seemingly simple problem that I can neither solve nor find any reference to in the literature. The problem is this: Given $x$ sufficiently large and $t$ an arbitrary but fixed parameter with $1\leq t \leq x$, compute an asymptotic formula for the (incomplete) sum $$ S_t(x) = \sum_{n\leq t} \left\{ \frac{x}{n} \right\} $$ with a power savings in $t$. Here $\left\{\cdot\right\}$ denotes the fractional part. In the particular case $t=x$, we have $$ S_x(x) = (1-\gamma)x + O(\Delta(x)), $$ where $\Delta(x)$ is the error term in the Dirichlet divisor problem. From some numerical computations, I conjecture that $$ S_t(x) \sim (1-\gamma)t, $$ but I have not been able to show this (or even postulate a conjecture for the error term). Note that understanding the sum $S_t(x)$ is equivalent to understanding $$ T_t(x) = \sum_{n\leq t} \left\lfloor \frac{x}{n} \right\rfloor, $$ where $\left\lfloor \cdot \right\rfloor$ denotes the integer part. This can be rewritten as $$ T_t(x) = \sum_{n\leq x} d_t(n), $$ where $d_t(n)$ counts the number of divisors of $n$ which are less than or equal to $t$. That is, understanding the sum $S_t(x)$ is equivalent to understanding how many "small divisors" an integer has on average.
This seems like a tractable problem, and I feel as though I just don't know where to look in the literature. Any references or suggestions would be most appreciated.
Edit: The conjectured asymptotic cannot hold. Using Euler-Maclaurin summation, one can show that $$ \sum_{n\leq t} \frac{x}{n} = x\log t + \gamma x - \frac{x}{t}\psi(t) + O\left(\frac{x}{t^2}\right), $$ where $\psi(x) = \left\{x\right\} - \frac{1}{2}$, and by geometric considerations via Dirichlet's hyperbola method, we have $$ \sum_{n\leq \sqrt{x}} \left\lfloor\frac{x}{n} \right\rfloor = \frac{x}{2}\log x + \gamma x -\left\{ \sqrt{x}\right\}\sqrt{x}+ O(\Delta(x)), $$ where $\Delta(x)$ denotes the error term in Dirichlet's divisor problem. It then follows that $$ \sum_{n\leq \sqrt{x}} \left\{ \frac{x}{n} \right\} = \frac{\sqrt{x}}{2} + O(\Delta(x)), $$ which violates the conjectured asymptotic. A closer look at the numerical results I tabulated in Mathematica would seem to indicate that there are some oscillatory terms which can be genuinely of size $t$. I have yet to determine a reasonable conjecture for the actual asymptotic in $t$.