Extend the structure to limit the number of running command actions.

This patch identifies the action with the logId. This makes it
easy to use the mechanism in the collected callback.