It can be confusing to keep track of all the characters introduced in the first few chapters of 2 Samuel. Here is some help.
Position: One of David’s military leaders and, later, commander in chief
Whose Side? David’s
Position: Saul’s commander in chief
Whose Side? Saul and Ishbosheth’s, but made overtures to David
Position: High officer in David’s army—Commander of “the Thirty”
Whose Side? Joab and David’s
Position: High officer—one of David’s 30 select warriors (“mighty men”)
Whose Side? Joab and David’s
Position: Saul and Abner’s selection as king
Whose Side? Saul’s