8
1
I'm looking for an application or line of code that would let me observe a process, save the info in a number of variables, then put the gathered info on a file.
I've been trying with variations of top
but no luck. I am running several CentOS virtual servers, VM is a 2GB RAM, 2 processor.
A script that works over a specified amount of time while writing lines with the info on a text file so at the end I can have a sort of table with the data would work.
I'm going to stress test the server, and I would like to have the data to make some statistics.
thatas perfect, i had already made a long script to clean all the data from a top batch output, but the is way simple better and efficint i aprreciate t a lot, thanks! – keponk – 2010-06-09T14:55:05.780
at the end i kept using my script, since ps gives me the load average which is normally same as CPU% but is not a rule, more info of this in a quick google search – keponk – 2010-06-15T15:16:02.157
1The %CPU here is not the % used over the interval, but the average percent over the entire running time of the program. I believe this is misleading. – Will Sewell – 2014-04-01T14:55:28.643