Hi All,

I'm running some tests to assess system behaviour when memory is being hogged.
Found this on googling:

perl -np -e '$x="0123456789"x1000000' < /dev/zero

This works a charm. But my esxi platforms do not have perl installed. They have python supported though:)

Any thoughts on how that one liner can be written in python?

Thanks
David

hogging memory should be simple enough for example

m = []
while True:
   m.append(0)

If you want to do it exponentially:

m = ['a']
while True:
   m.extend(m[:])
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.