[Nagiosplug-devel] Check_mem (linux)

BOLLENGIER Eric eric at eb.homelinux.org
Tue Jul 26 07:54:05 CEST 2005


Hi,

Sorry, but your sys_stats function is very ugly...
you launch 7 sub process to get 2 values.
(you can do the same with only one call to free -mt)

>    chomp($mem_total = `free -mt | grep Mem | awk '{print \$2}'`);
>    chomp($mem_used = `free -mt | grep cache | tail -1 | awk '{print \$3}'`);

There more than way to do...

Regards

Le Tuesday 26 July 2005 08:09, Rouven Homann a écrit :
> This is v1.4 made by Garrett Honeycutt and me, Rouven Homann. This perl
> linux plugin checks the percentage of memory usage with performance
> data.
>
>
> Best Regards,
>
> Rouven Homann
>
> cimt AG
> Burchardstr. 17
> 20095 Hamburg
> Tel.: +49.40.53302-0 Fax: -22
>
> email: rouven.homann at cimt-ag.de
> http://www.cimt-ag.de




More information about the Devel mailing list