Permalink
Browse files

fixed #203 cpustats searchd cli option to work with unsupported systems

  • Loading branch information...
tomatolog committed Feb 27, 2018
1 parent 8740fd6 commit ce528f37eb5d8284661928f6f3b340a4a1985253
Showing with 2 additions and 6 deletions.
  1. +1 −1 docs/command_line_tools_reference/searchd_command_reference.rst
  2. +1 −5 src/searchd.cpp
@@ -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
}
@@ -20331,9 +20331,7 @@ void ShowHelp ()
"--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"
@@ -23650,9 +23648,7 @@ int WINAPI ServiceMain ( int argc, char **argv )
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; } }

0 comments on commit ce528f3

Please sign in to comment.