PluginTools Fix in __system {solaris}

This commit is contained in:
fbsanchez 2017-11-29 13:31:27 +01:00
parent 3f82db6c6c
commit 0edf8cd046

View File

@ -47,6 +47,7 @@ our @EXPORT = qw(
decrypt decrypt
empty empty
encrypt encrypt
get_lib_version
get_unit get_unit
get_unix_time get_unix_time
get_sys_environment get_sys_environment
@ -80,6 +81,13 @@ our @EXPORT = qw(
trim trim
); );
################################################################################
#
################################################################################
sub get_lib_version {
return $VERSION;
}
################################################################################ ################################################################################
# Get current time (milis) # Get current time (milis)
@ -850,14 +858,19 @@ sub init_system {
$system{devnull} = "/dev/null"; $system{devnull} = "/dev/null";
$system{cat} = "cat"; $system{cat} = "cat";
$system{os} = "Linux"; $system{os} = "Linux";
$system{ps} = "ps -eo comm,pmem,pcpu"; $system{ps} = "ps -eo pmem,pcpu,comm";
$system{grep} = "grep"; $system{grep} = "grep";
$system{echo} = "echo"; $system{echo} = "echo";
$system{wcl} = "wc -l"; $system{wcl} = "wc -l";
if ($^O =~ /hpux/i) { if ($^O =~ /hpux/i) {
$system{os} = "HPUX"; $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";
} }
} }