Mailinglist Archive: opensuse (3653 mails)
| < Previous | Next > |
Re: [SLE] memory protection
- From: Alexandr Malusek <Alexandr.Malusek@xxxxxxxxxx>
- Date: 21 Jun 2002 15:47:30 +0200
- Message-id: <86d6uk3frh.fsf@xxxxxxxxxxxxxxxxx>
"Berge, Harry ten" <berge@xxxxxxx> writes:
> 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@xxxxxxxxxx
> 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@xxxxxxxxxx
| < Previous | Next > |