I'm trying to read the spark Acdblu counter using the following command:
cpustat - C Instr_cnt .1
this command will always running) until interrupted by the user for some time (. Sample output:
time CPU event pic1 1.011 0 TIC 6450 1.011 1 TIC 9681 1.011 2 TIC 2015 1.012 3 last 535 1.012 4 last 615 1.012 5 TIC 7513 1.012 6 last 615 1.013 7 TIC 5187 1.013 8 Tic 615 1.013 9 last 615 1.013 10 Tic 615 1.014 11 tick 60077 1.014 12 Tic 438 1.014 13 Tic 615 1.014 14 Tic 615 1.015 15 Tic 615 1.015 16 Tic 615 1.015 17 Tic 438 1.016 18 Tic 615 1.016 19 Tic 615 ^ C
I'm trying to get all four CPU cores now (each core has 4 CPU), add photo number 1 and their average. Once one reaches an average limit, then I want to balance some load.
I think logic is: insert all the elements of line 2 into the array and then add 4 of them. As for the output:
** Core # Averaging # utility (# ofInst / cpu_cycle_perSec) ** Core_0 xxxxxxxx 10% Core_1 xxxxxxxx 20% and so on ....
I am a novice in coding and if someone can help me in this some simple direction, then it would be great. It can be done in a shell / dragon.
Thanks in advance.
No comments:
Post a Comment