clocktest - A test program for posix clock interfaces clocktest is a test program for clock access via the POSIX clock and timer interface as defined in the POSIX standard and the Single Unix Specification (on the web http://www.unix.org). clocktest allows to perform the following tests on a Unix system: - Discovery of available clocks - Display of current clock values and clock precision - Test if process clocks are supported - Verification of process clock operation - Test if thread clocks are supported - Verification of thread clock operation - Test timed generation of periodic and single shot signals - Access to arbitrary nonstandard clocks (such as CLOCK_SGI_CYCLE) - Test may be run directly through the kernel system call interface or via function calls through the system library - Verification of POSIX compliant behavior of system library for CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID (a known glibc deficiency) Usage ----- clocktest ... Available tests are --scan Perform a scan for available clocks. Test availability of process and thread clocks. Verify POSIX compliant behavior of CLOCK_*_CPUTIME_ID clocks if glibc interface is in use. --timer Perform a periodic timer test. By default the test is run on CLOCK_REALTIME with a period of 1234567ns and a count of 5 signals --show Show clock value and precision --clock-status Clock status summary for standard clocks (also default if no test specified) --process-clocks Tests the ability to retrieve process and thread clocks of other processes --single-thread Verify thread/process clock operation in a single process --multi-thread Verify thread/process clock operations using threads Available options are: --kernel Use kernel interface for clock tests [default] --glibc Use glibc library for clock tests --clock=N Use the named or numbered clock for the test --interval=N Use the specified interval for the timer test --count=N Specify the number of interations for a periodic timer test. Specify count=1 for single shot mode --busywait Busywait instead of giving up the time slice. This increases the reaction time of the process receiving the signal. Typical uses: clocktest Show default clocks and their resolutions clocktest --clock=SGI_CYCLE --timer Test intervals generated by SGI SHub RTC interrupts clocktest --glibc --scan Detect glibc limitations clocktest --kernel --scan Show kernel time capabilities