[collectd] [PATCH] Disable LFS flags to avoid 32-bit solaris sys/swap.h error

Peter Bray pdb_ml at yahoo.com.au
Sat May 23 16:42:06 CEST 2009


Hi All,

   I tested this on a system with 16G swap and 4G of real memory 
(X86_64) using csv output and it _looks_ OK (ie no calculator used).

Regards,
Peter

[root at tabula] # more *
::::::::::::::
swap-free-2009-05-24
::::::::::::::
epoch,value
1243089287,16228065280.000000
1243089322,16227827712.000000
1243089332,16227819520.000000
1243089342,16227811328.000000
1243089352,16227811328.000000
::::::::::::::
swap-reserved-2009-05-24
::::::::::::::
epoch,value
1243089287,433324032.000000
1243089322,433319936.000000
1243089332,433319936.000000
1243089342,433319936.000000
1243089352,433319936.000000
1243089362,433344512.000000
::::::::::::::
swap-used-2009-05-24
::::::::::::::
epoch,value
1243089287,3455582208.000000
1243089322,3455815680.000000
1243089332,3455823872.000000
1243089342,3455832064.000000
1243089352,3455832064.000000
1243089362,3455971328.000000

[root at tabula] # swap -s
total: 3374836k bytes allocated + 423564k reserved = 3798400k used, 
15847032k available


Doug MacEachern wrote:
> I found an older thread on this subject, so as you may recall solaris'
> sys/swap.h has:
> 
> #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
> #error  "Cannot use swapctl in the large files compilation environment"
> #endif
> 
> I don't see any function calls in swap.c that would require LFS, so this
> workaround just disables the flags.
> 
> t2000:~/collectd% ./src/collectd -C ~/test/test.conf -T      
> PUTVAL t2000/swap/swap-used interval=10 1243030706:5711740928.000000
> PUTVAL t2000/swap/swap-free interval=10 1243030706:928456704.000000
> PUTVAL t2000/swap/swap-reserved interval=10 1243030706:740540416.000000
> [2009-05-22 15:18:26] Exiting normally.
> 
> t2000:~/collectd% /usr/sbin/swap -s                         
> total: 5577480k bytes allocated + 723296k reserved = 6300776k used,
> 906984k available



More information about the collectd mailing list