How to monitor variables not using the serial?

It's not in the ISR

Then, how do you determine how many characters can fit in the partially empty buffer? How do you determine when to call flush()? How do you ENSURE that flush() is NOT interrupted?