I'm trying to monitor the memory usage of kweb running on a Pi. I have always found ps confusing with its multiple UNIX/BSD/GNU personalities. This is what I started with: $ps -F -C kweb UID PID PPID C SZ RSS PSR STIME TTY TIME CMD pi 936 756 1 67783 111088 1 09:53 ? 00:02:47 kweb -KFJHEP I find that the SZ/RSS values increase over time then drop, presumably due to some garbage collection (I'm really just guessing!). However the %age of memory used by kweb according to "top" keeps increasing, and is closer to the values I get from: $ps uax |grep -E '(kweb|USER)' USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND pi 936 1.1 11.7 271380 111304 ? Sl 09:53 2:47 kweb -KFJHEP What figures should I care about if I'm trying to track down a possible memory leak, and how do i coax them out of ps (or another tool)? Bonus question: What's the best way to get the values I'm interested in as a comma separated string (I'm trying to build a CSV file I can investigate in LibreOffice). A simple search & replace for spaces to commas doesn't work because spaces occur within some fields (and especially if I try to include other fields like start or running times). Mark -- Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450 Registered in England (0456 0902) 21 Drakes Mews, Milton Keynes, MK8 0ER
participants (1)
-
Mark Rogers