From 0edf8cd046bf456b373ab0c54fa59bafd6ae3816 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 29 Nov 2017 13:31:27 +0100 Subject: [PATCH] PluginTools Fix in __system {solaris} --- pandora_server/lib/PandoraFMS/PluginTools.pm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index ed128ca7ca..61d9739442 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -47,6 +47,7 @@ our @EXPORT = qw( decrypt empty encrypt + get_lib_version get_unit get_unix_time get_sys_environment @@ -80,6 +81,13 @@ our @EXPORT = qw( trim ); +################################################################################ +# +################################################################################ +sub get_lib_version { + return $VERSION; +} + ################################################################################ # Get current time (milis) @@ -850,14 +858,19 @@ sub init_system { $system{devnull} = "/dev/null"; $system{cat} = "cat"; $system{os} = "Linux"; - $system{ps} = "ps -eo comm,pmem,pcpu"; + $system{ps} = "ps -eo pmem,pcpu,comm"; $system{grep} = "grep"; $system{echo} = "echo"; $system{wcl} = "wc -l"; if ($^O =~ /hpux/i) { $system{os} = "HPUX"; - $system{ps} = "ps -eo comm,pmem,pcpu"; + $system{ps} = "ps -eo pmem,pcpu,comm"; + } + + if ($^O =~ /solaris/i ) { + $system{os} = "solaris"; + $system{ps} = "ps -eo pmem,pcpu,comm"; } }