Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #emingh,#kafamiziyap
- print "Processor clock ticks (idle processing) N*100"
- -- ssCpuRawUser
- The number of 'ticks' (typically 1/100s) spent
- processing user-level code.
- On a multi-processor system, the 'ssCpuRaw*'
- counters are cumulative over all CPUs, so their
- sum will typically be N*100 (for N processors).
- cycle time = 1/clock rate = 1/3,000,000,000 * (n core) = 0.3 nanosecond (1 core)
- secondary stage (network bandwith)
- #1 megabit = 125 kilobyte
- #1 kilobit = 10^3 bits
- inban=fetch("IF-MIB::ifHCInOctets")[actualethaddr]
- outban=fetch("IF-MIB::ifHCOutOctets")[actualethaddr]
- times=(0xf-0x9-0x1)
- time.sleep(times)
- intwo=fetch("IF-MIB::ifHCInOctets")[actualethaddr]
- outtwo=fetch("IF-MIB::ifHCOutOctets")[actualethaddr]
- ROOTOUT=(int(out2)-int(outban))
- ROOTIN=(int(in2)-int(inban))
- inputbw=(((ROOTIN)/times)*8/1024)
- outputbw=(((ROOTOUT)/times)*8/1024)
- inputbw indicates Input bandwith
- outputbw indicates Output bandwith
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement