[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netsaintplug-devel
Subject:    Re: [Netsaintplug-devel] plugin update: check_mem.pl
From:       Dan Larsson <dl () tyfon ! net>
Date:       2000-07-20 19:53:52
[Download RAW message or body]

On 20 Jul 2000, Hugo Gayosso wrote:

| 1) Why are you using `awk' when it is a perl plug-in?

Most probably due to that the original script was a shell-script.

|    I think that using `awk' inside a perl script is redundant. Perl
|    can do what `awk' can do in this case. Same for `tail'.

You should download a newer version of check_mem.pl

| 2) I enabled Taint checking in your perl script and it complained:
| 
| ./check_mem.pl -v
| Insecure $ENV{PATH} while running with -T switch at ./check_mem.pl line 64.
| 
| 
|          Ah!!, but I have a tremendous patch for this!! :)
| 
|          Just add the following line after the `use' statements:
| 
| $ENV{'PATH'}="";
| $ENV{'ENV'}="";
| $ENV{'BASH_ENV'}="";

Thanks! :)

| 3) The output of vmstat in a Red Hat 6.2 machine:
| 
|   procs                      memory    swap          io     system         cpu
|  r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  id
|  0  0  0  25152   6500   2624  45680   4   4    19     5  305   466   5   3  92

Hmm.. I see.. Let me know how this comes out with check_mem.pl v1.2.2
which uses regexps instead of awk

|   My suggestion for a check_mem for GNU/Linux would be to parse the
|   results of `cat /proc/meminfo':

If you look in the contrib directory of the plugins distr. you'll find a
check_memory.tgz file. This one is particularly written for Linux. Which
was the catalyst for me to write something that would work on FreeBSD.

Please note that the plugin is intended for use on Free/Net/OpenBSD.
I have no means of testing anything for use on Linux platforms.

Regards
+------
Dan Larsson      | Tel:   +46 8 550 120 21
Tyfon Svenska AB | Fax:   +46 8 550 120 02
Public PGP keys  | finger dl@hq1.tyfon.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic