a04c
![]() |
|
|
|
|
|||||||
| Userland Programming & Scripting C, Shell, Perl, Sed & Awk |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I need to get CPU miliseconds used since boot. Total user + system + interrupt time. My idea is to get it from the cp_times counter, but I could not figure out what time units are used.
Code:
kern.cp_times: 99980046 216471 24984081 1176383 1487354560 71668989 126252 23494859 10703 1518410383 131623419 250473 23864059 96 1457972935 118043958 142876 19560244 58 1475964202 122076248 131112 18928452 113 1472575112 112635562 103018 16450420 111 1484522108 92257836 132166 24627838 306285 1496387411 49457466 59102 14902169 989885 1548302924 Last edited by hsn; April 26th, 2012 at 11:35. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816 |
|
#3
|
|||
|
|||
|
Units seems to be closest to stathz, but in reality they are slightly faster then 133 Hz.
Code:
ponto:(admin)main/swg>sysctl kern.clockrate
kern.clockrate: { hz = 1000, tick = 1000, profhz = 2000, stathz = 133 }
Last edited by DutchDaemon; April 15th, 2012 at 02:08. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Kern.maxfiles | rbizzell33 | General | 33 | April 27th, 2010 09:47 |
| kern.maxfilesperproc not affected | henosx | General | 4 | April 16th, 2010 23:41 |
| kern.securelevel usage | z662 | General | 0 | January 20th, 2010 18:18 |
| Maximum kern.hz ? | DigiSoft | General | 7 | January 20th, 2010 02:30 |
| kern.hz | DemoDoG | General | 2 | December 30th, 2008 14:35 |