Le 2013-04-03 09:58, Guillaume Rousse a écrit :
Le 03/04/2013 09:01, David Durieux a écrit :
In MacOSX(agent 2.2.x), the function getSystemProfilerInfos() run
command '/usr/sbin/system_profiler' and can make 2 or 3 minutes to
complete get information. We must increase 'backend-collect-timeout'
in
agent config.
I'd rather not change a global defaut value for everyone just because
you're facing the issue on a specific host. Is that true for all
macos
hosts, first ?
I have seen on some mac. I have added a line in documentation for macos
for that, I think it's ok ;)
Another problem is MacOSX run this command many time (one time for
each
CPU, Memory, storage and video) perhaps run only one time and store
result in memory to parse it when modules require it can be a good
idea?
All calls to the getSystemProfilerInfo() with the same parameters are
already cached, thanks to memoize usage line 17 in
FusionInventory::Agent::Tools::MacOs:
memoize('getSystemProfilerInfos');
According to grep, it is called either as:
getSystemProfilerInfo()
getSystemProfilerInfo(logger => $logger)
getSystemProfilerInfo(type => 'SPApplicationsDataType', logger =>
$logger)
Indeed, the first two ones should be merged, as this is strictly the
same command invocation. However, the last one requires a different
command execution, and can't be merged.
Oh, I haven't see code of master version (working on 2.2.x version
now), so yes of course, it's stable version :p
David
++
_______________________________________________
Fusioninventory-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/fusioninventory-devel