Le 2013-04-03 16:17, Gonéri Le Bouder a écrit :
On Wed, Apr 03, 2013 at 09:58:01AM +0200, Guillaume Rousse wrote:
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 had a similar issue on a Windows system with the software module. I
believe we can increase backend-collect-timeout back to 180s. At best it
will be armless for more of the users.

>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.
I use the agent on MacOSX a lot and I'm surprise by this performance issue
with system_profiler. Maybe it's related to a specific slow device?

Mac mini installed yesterday

_______________________________________________
Fusioninventory-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/fusioninventory-devel

Répondre à