[Fusioninventory-devel] /usr/sbin/system_profiler timeout on MacOSX

Gonéri Le Bouder goneri at rulezlan.org
Wed Apr 3 14:17:56 UTC 2013


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?

Best regards,
--
    Gonéri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/fusioninventory-devel/attachments/20130403/a279cff0/attachment.pgp>


More information about the Fusioninventory-devel mailing list