Samuel
2 Samuel 8:16BSB·traditional attribution

Joab son of Zeruiah was over the army; Jehoshaphat son of Ahilud was the recorder;

Matthew Henry Presbyterian @wholebiblehenry

David was not so engaged in his wars abroad as to neglect the administration of the government at home. I. His care extended itself to all the parts of his dominion: He reigned over all Israel (Sa2 8:15); not only he had a right to reign over all the tribes, but he did so; they were all safe under his protection, and shared in the fruits of his good government.

Commenting on 2 Samuel 8:15-18

John Gill Reformed Baptist @doctorgill

And Joab the son of Zeruiah was over the host,.... Which was not only owing to his relation to David, being his sister's son, but to his promise that whoever smote the Jebusites first should be chief and captain; that is, should have the command of the army under him; this Joab did; and so was entitled to this office, and was put into it...

Jamieson-Fausset-Brown Reformed @jfbcommentary

Joab . . . was over the host--by virtue of a special promise (Sa2 5:8). recorder--historiographer or daily annalist, an office of great trust and importance in Eastern countries.