Re: Perl script to monitor memory usage on unix box

2010-02-08 Thread 蔡超
Hi Dave, There is a tool sysusage which is a open source coded in perl. It might be worth to have a look. 2010/2/8 Dave Tang : > Hi everybody, > > I want to write a script that checks memory usage of my RHEL box, and ran as > a cron job say every 10 minutes. > > I could write the Perl script to r

Re: Perl script to monitor memory usage on unix box

2010-02-08 Thread Yue Chen
Hi Dave Have you ever tried module Proc-ProcessTable? It is a wonderful tool to collect process information such as PID, cmdline, CPU usage and Mem usage. > Hi everybody, > > I want to write a script that checks memory usage of my RHEL box, and ran as > a cron job say every 10 minutes. > > I coul

Re: Perl script to monitor memory usage on unix box

2010-02-08 Thread Shawn H Corey
Dave Tang wrote: > Very recently a user wrote a script that crashed the server, by using > all the memory. So also I wanted to capture the process information too. > Is this information available in the /proc directory? Yes, google "linux proc". -- Just my 0.0002 million dollars worth, Sh

Re: Perl script to monitor memory usage on unix box

2010-02-08 Thread Dave Tang
On Mon, 08 Feb 2010 22:52:37 +1000, Shawn H Corey wrote: Dave Tang wrote: Hi everybody, I want to write a script that checks memory usage of my RHEL box, and ran as a cron job say every 10 minutes. I could write the Perl script to run a system command like "ps aux", parse that information

Re: Perl script to monitor memory usage on unix box

2010-02-08 Thread Shawn H Corey
Dave Tang wrote: > Hi everybody, > > I want to write a script that checks memory usage of my RHEL box, and > ran as a cron job say every 10 minutes. > > I could write the Perl script to run a system command like "ps aux", > parse that information and kill a job if >90% of the total system memory

Perl script to monitor memory usage on unix box

2010-02-08 Thread Dave Tang
Hi everybody, I want to write a script that checks memory usage of my RHEL box, and ran as a cron job say every 10 minutes. I could write the Perl script to run a system command like "ps aux", parse that information and kill a job if >90% of the total system memory (and I realise most of