21 Jun
2002
21 Jun
'02
13:47
"Berge, Harry ten"
So, basically, I want the following:
I monitor application which keeps track of certain process. When the process uses more than a configurable amount, there will be warning or something like that.
A simple shell wrapper can do it, just define the function do_something and process_too_big. See "man 5 proc" for the description of the /proc FS (e.g. vsize). #!/bin/bash job & pid=$! # start the process and remember its PID while :; do if process_too_big /proc/$pid/status; then do_something fi sleep 1 done It's just a skeleton some enhancements may be needed. Also consider ulimit. -- Alexandr.Malusek@imv.liu.se