Section 17. The sergeant-at-arms shall serve such processes and execute such orders as may be enjoined upon him by the general court or by either branch thereof, attend the members or clerks of either branch when they are charged with a message from one branch to the other or to the governor and council, maintain order among the spectators admitted into the chambers in which the respective branches hold their sessions, prevent the interruption of either branch or of the committees thereof, and shall have the control of, and superintendence over, his subordinate officers, taking care that they promptly perform their duties. In respect to any criminal offense committed in any part of the state house assigned to or used by either branch of the general court or any committee or officer thereof, or to any such offense committed against any member of the general court, including any member of a special commission composed in part of members of the general court, while acting within the commonwealth in his official capacity as such member, whether such offense is committed within the state house elsewhere than as aforesaid, or upon premises outside the state house while officially used by a committee of the general court or by such a special commission, the sergeant-at-arms, the chief general court officers and assistant chief general court officers of either branch thereof, and its general court officers shall have and exercise all the powers of police officers, and in respect to the service within the commonwealth of such processes and orders as may be enjoined upon them by the general court or either branch or by any committee of the general court or either branch, they shall have the powers of constables.