SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can a PHP script monitor it's own memory usage

    I often use PHP at the command line for data transformation but many times it runs out of memory. My scripts always account for this but I was curious as to if there was a way for a script to monitor it's own memory usage.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    From the example, this looks like what you want:
    http://us2.php.net/memory_get_usage

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Guess I should have used the quick search on php.net by doing php.net/memory. Instead I searched Google and got a lot of non related info.

    Thanks, that is what I needed.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •