23:1 When David was old and full of days, he made Solomon his son king over Israel.
2 David  assembled all the leaders of Israel and the priests and the Levites. 3 The Levites, thirty years old and upward, were numbered, and the total was 38,000 men. 4 “Twenty-four thousand of these,” David said,  “shall have charge of the work in the house of the Lord, 6,000 shall be officers and judges, 5 4,000 gatekeepers, and 4,000 shall offer praises to the Lord with the instruments that I have made for praise.” 6 And David organized them in divisions corresponding to the sons of Levi: Gershon, Kohath, and Merari.
7 The sons of Gershon  were Ladan and Shimei. 8 The sons of Ladan: Jehiel the chief, and Zetham, and Joel, three. 9 The sons of Shimei: Shelomoth, Haziel, and Haran, three. These were the heads of the fathers' houses of Ladan. 10 And the sons of Shimei: Jahath, Zina, and Jeush and Beriah. These four were the sons of Shimei. 11 Jahath was the chief, and Zizah the second; but Jeush and Beriah did not have many sons, therefore they became counted as a single father's house.
12 The sons of Kohath: Amram, Izhar, Hebron, and Uzziel, four. 13 The sons of Amram: Aaron and Moses. Aaron was set apart to dedicate the most holy things, that he and his sons forever should make offerings before the Lord and minister to him and pronounce blessings in his name forever. 14 But the sons of Moses the man of God were named among the tribe of Levi. 15 The sons of Moses: Gershom and Eliezer. 16 The sons of Gershom: Shebuel the chief. 17 The sons of Eliezer: Rehabiah the chief. Eliezer had no other sons, but the sons of Rehabiah were very many. 18 The sons of Izhar: Shelomith the chief. 19 The sons of Hebron: Jeriah the chief, Amariah the second, Jahaziel the third, and Jekameam the fourth. 20 The sons of Uzziel: Micah the chief and Isshiah the second.
21 The sons of Merari: Mahli and Mushi. The sons of Mahli: Eleazar and Kish. 22 Eleazar died having no sons, but only daughters; their kinsmen, the sons of Kish, married them. 23 The sons of Mushi: Mahli, Eder, and Jeremoth, three.
24 These were the sons of Levi by their fathers' houses, the heads of fathers' houses as they were listed according to the number of the names of the individuals from twenty years old and upward who were to do the work for the service of the house of the Lord. 25 For David said, “The Lord, the God of Israel, has given rest to his people, and he dwells in Jerusalem forever. 26 And so the Levites no longer need to carry the tabernacle or any of the things for its service.” 27 For by the last words of David the sons of Levi were numbered from twenty years old and upward. 28 For their duty was to assist the sons of Aaron for the service of the house of the Lord, having the care of the courts and the chambers, the cleansing of all that is holy, and any work for the service of the house of God. 29 Their duty was also to assist with the showbread, the flour for the grain offering, the wafers of unleavened bread, the baked offering, the offering mixed with oil, and all measures of quantity or size. 30 And they were to stand every morning, thanking and praising the Lord, and likewise at evening, 31 and whenever burnt offerings were offered to the Lord on Sabbaths, new moons, and feast days, according to the number required of them, regularly before the Lord. 32 Thus they were to keep charge of the tent of meeting and the sanctuary, and to attend the sons of Aaron, their brothers, for the service of the house of the Lord. (ESV)