Python: Afficher les information les configuration actuelles(UNIX)

Author:

 unix
{filelink=16970}

import resource
 
print "Taille de pagination", "=>", resource.getpagesize()
print "Etat d'utilisation des ressources", "=>", resource.getrusage(resource.RUSAGE_SELF)
print "max cpu", "=>", resource.getrlimit(resource.RLIMIT_CPU)
print "max data", "=>", resource.getrlimit(resource.RLIMIT_DATA)
print "max processus", "=>", resource.getrlimit(resource.RLIMIT_NPROC)