0

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

2
Contributors
1
Reply
16
Views
5 Years
Discussion Span
Last Post by pyTony
0

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[:])

Edited by pyTony

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.