ms_diag

Purpose:

Check for tasks lagging behind the required rate or for tasks that have died.

Enter:

ms_diag [opt]

Where:

opt

Specify c to clear the overrun counters.

Example:

ms_diag c

Notes:

The initial display provided by ms_diag shows all the tasks that have made an interface call to the scheduler and the intervals they were spawned with. For example, if a task was spawned as follows ‘my_task SLO MED &’ there would be 2 entries for ‘my_task’, one in the list of tasks for the SLO interval and one in the list of tasks for the MED interval. Initially the active flag will be set to 0, indicating that the scheduler knows about the task but the task has not connected to any ms timers. When a task requests to be connected to an ms timer, the active flag will be set to 1. This is repeated for each interval that a task requests to be connected to. If a task that has become active fails to respond to the scheduler the overrun counter will be incremented. If the overrun counter exceeds the ‘limit count’, the active flag will be set to 0 for the associated interval. If all intervals that have been made active become inactive, then the task will be marked as DEAD.

Note that an active flag of 0 can mean two things.

1. Task has been spawned with that interval but has never requested to be connected to that interval, or

2. Task has been spawned with that interval and has been connected to that interval but has failed to respond to the scheduler and it has exceeded its overrun limit.

For case 2, the ‘Overrun’ column should indicate the overrun count and what the limit is. If the task eventually responds for that interval, the active flag will be set back to 1 and the overrun count will be set to zero. However, it the task was a ‘critical’ task. the watchdog would have already been tripped and responding will not reset the watchdog.

See Also: