Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fixed #203 cpustats searchd cli option to work with unsupported systems
- Loading branch information
|
@@ -132,7 +132,7 @@ The options available to ``searchd`` on all builds are: |
|
|
- ``--cpustats`` is used to provide actual CPU time report (in addition |
|
|
to wall time) in both query log file (for every given query) and |
|
|
status report (aggregated). It depends on clock_gettime() system |
|
|
call and might therefore be unavailable on certain systems. You might |
|
|
call or fall back to less precise call on certain systems. You might |
|
|
start ``searchd`` thus: |
|
|
|
|
|
.. code-block:: bash |
|
|
|
@@ -6979,7 +6979,7 @@ int64_t sphCpuTimer () |
|
|
|
|
|
return tp.tv_sec*1000000 + tp.tv_nsec/1000; |
|
|
#else |
|
|
return 0; |
|
|
return sphMicroTimer(); |
|
|
#endif |
|
|
} |
|
|
|
|
|
|
|
"--status\t\tget ant print status variables\n" |
|
|
"\t\t\t(PID is taken from pid_file specified in config file)\n" |
|
|
"--iostats\t\tlog per-query io stats\n" |
|
|
#ifdef HAVE_CLOCK_GETTIME |
|
|
"--cpustats\t\tlog per-query cpu stats\n" |
|
|
#endif |
|
|
#if USE_WINDOWS |
|
|
"--install\t\tinstall as Windows service\n" |
|
|
"--delete\t\tdelete Windows service\n" |
|
|
|
|
OPT1 ( "--status" ) bOptStatus = true; |
|
|
OPT1 ( "--pidfile" ) bOptPIDFile = true; |
|
|
OPT1 ( "--iostats" ) g_bIOStats = true; |
|
|
#if !USE_WINDOWS |
|
|
OPT1 ( "--cpustats" ) g_bCpuStats = true; |
|
|
#endif |
|
|
#if USE_WINDOWS |
|
|
OPT1 ( "--install" ) { if ( !g_bService ) { ServiceInstall ( argc, argv ); return 0; } } |
|
|
OPT1 ( "--delete" ) { if ( !g_bService ) { ServiceDelete (); return 0; } } |