How it can be done without writing additional daemon?
P.S. I can't use cron because I need lesser time intervals.
P.P.S. Debian 6 x64
Use Monit as a lightweight system monitoring tool.
Here's the documentation. You will find examples of how to do alerts and actions depending on system conditions, like load. For example:
Where "alert" is defined in a different configuration section.
Monit should be available in apt on Debian. Yes, it's an extra thing to install and run, but it's fairly lightweight, and it'll be better than anything you will cook up in a shell script.