If the motor is dying you will here the sound difference, and it will probably slow down and then stop. It may well start again and then do the same thing.. With the attachment hose attached it will show even more as this uses a higher power setting on the machine. If the motor is really burned out there will usually be a smell and possibly smoke. If theres not a smell or smoke then changing the motor brushes may well solve the problem.
Firstly check the lever on the front of the machine which operates the safety and speed switch. When the head is put on the machine it pushes this lever to the first speed position and when the hose is attached it pushes it to the higher speed position. If this lever has got bent it could well cause the machine to start and stop irregularly.
GJ
June 2011