schmerl / LLStaging

Staging area for releases to Lincoln Labs
2 stars 0 forks source link

Work out NUC CPU data collection on simulation environment #37

Closed schmerl closed 7 years ago

schmerl commented 7 years ago

We need a way to report the percentage of CPU used in the LL simulation environment, that discounts the amount of processing that gazebo consumes.

One possible way to do this is to simply:

  1. Get total CPU percentage
  2. Get CPU percentage spent by process gzserver
  3. Subtract the two

A backup plan is to use the configuration information and the model generated by Miguel and Pooyan to "fake" the CPU percentage.

schmerl commented 7 years ago

Will also assign Roykrong and Miguel when they accept my invite.

pooyanjamshidi commented 7 years ago

so you need a script using "mpstats" to measure cpu usage at runtime? to clarify, all the measurements that Migule has done collect CPU usage of acml excluding the gzserver, so we can safely use the data.

ivoysey commented 7 years ago

Is that a standard Unix tool? It's easy to add things like that to the build if you want them. Anything in apt, really, but circa three ish years ago.

On Mon, Feb 27, 2017 at 17:53 Pooyan Jamshidi notifications@github.com wrote:

so you need a script using "mpstats" to measure cpu usage at runtime? to clarify, all the measurements that Migule has done collect CPU usage of acml excluding the gzserver, so we can safely use the data.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/schmerl/LLStaging/issues/37#issuecomment-282883739, or mute the thread https://github.com/notifications/unsubscribe-auth/AD6MIPNTsTjJRuFnuKF-XnV2xN6koa11ks5rg1QBgaJpZM4MNTvQ .

-- ---Ian

schmerl commented 7 years ago

Let's explore getting real time CPU usage data in the test, with a fallback to use the learned data if it turns out to be too much of a hassle.

(Note, that the adaptive system can use the learned model for NUC fine -- but we're talking about simulating the real world in the base system, so that needs to be closer to ground truth.)

pooyanjamshidi commented 7 years ago

have a look at the script I pushed at installation/customlibs/cpu_mon.sh change the nTime and delay (measures the average of nTimes snapshots of the cpu usage in a whole of nTimes*delay second) use it as ./cpu_mon.sh pid. so you can specify the ros related PIDs and average them all, for that I can write another script, but please let me know whether this is the thing you want?

schmerl commented 7 years ago

This is useful, but we need something like it publishing to a ros topic. let's come back to this tomorrow.

In the meantime, we are using git LFS for customlibs bin and debs. If you check something into one of these directories, and don't have LFS installed and initialized, then it screws up the repo. Took me a while to work out how to fix this.

pooyanjamshidi commented 7 years ago

OK, I can make it work to publish to a topic, sorry about the LFS, I didn't know ;)

schmerl commented 7 years ago

Yep, that's OK. Let's meet tomorrow- I need to find out what topic it should publish to, and work or what we need to publish (probably a float).

Bradley On Mon, Feb 27, 2017 at 9:22 PM Pooyan Jamshidi notifications@github.com wrote:

OK, I can make it work to publish to a topic, sorry about the LFS, I didn't know ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/schmerl/LLStaging/issues/37#issuecomment-282921881, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9_AFIG-GxIrR0pRrpjtIFDp_ISZIi7ks5rg4TLgaJpZM4MNTvQ .

schmerl commented 7 years ago

Yep, that's OK. Let's meet tomorrow- I need to find out what topic it should publish to, and work or what we need to publish (probably a float).

schmerl commented 7 years ago

New brass_cpu_monitor.py in cp_gazebo should do this now.