Commit f74909c0 authored by Michael Ott's avatar Michael Ott

Format dcdbquery usage printout properly

parent 7aa66a81
......@@ -44,24 +44,19 @@ void usage(void)
{
if (isatty(fileno(stdin))) {
/* 0---------1---------2---------3---------4---------5---------6---------7--------- */
std::cout << "Usage:" << std::endl
<< "dcdbquery [-h <hostname>] [-d] [-r] [-l] <Sensor 1> [<Sensor 2> ...] <Start> <End>" << std::endl
<< "where" << std::endl
<< " <hostname> - the name of the DB server" << std::endl
<< " <Sensor n> - a public sensor name" << std::endl
<< " <Start> - start of time series" << std::endl
<< " <End> - end of time series" << std::endl
<< "Return the readings for the sensors in the interval from <Start> to <End>." << std::endl
<< "<Start> and <End> times should be supplied as 'yyyy-mm-dd hh:mm:ss' or unix" << std::endl
<< "timestamps." << std::endl
<< "When the -d option is specified, specified sensor names are used to perform" << std::endl
<< "a direct raw query without looking up public sensor names." << std::endl
<< "When the -r option is specified, timestamps will be reported in internal (raw)" << std::endl
<< "format (nanoseconds since epoch) insted of ISO human readable form." << std::endl
<< "When the -l option is specified, times for <Start>, <End>, and in the generated" << std::endl
<< "output will be interpreted / printed in the local time zone." << std::endl
<< "To print out sensor operations, type <operation>(<Sensor>), e.g., derivative(sensor name)." << std::endl
<< "Currently available options for the <operation> field are: delta, derivative, integral." << std::endl;
std::cout << "Usage:" << std::endl;
std::cout << " dcdbquery [-h <host>] [-d] [-r] [-l] <Sensor 1> [<Sensor 2> ...] <Start> <End>" << std::endl;
std::cout << std::endl;
std::cout << "Parameters:" << std::endl;
std::cout << " <Sensor n> a sensor name" << std::endl;
std::cout << " <Start> start of time series" << std::endl;
std::cout << " <End> end of time series" << std::endl;
std::cout << std::endl;
std::cout << "Options:" << std::endl;
std::cout << " -h<host> Cassandra host [default: " << DEFAULT_CASSANDRAHOST << ":" << DEFAULT_CASSANDRAPORT << "]" << endl;
std::cout << " -d Don't look up sensor name" << std::endl;
std::cout << " -r Report timestamps in numerical format" << std::endl;
std::cout << " -l Report times in local time (not UTC)" << std::endl;
}
else {
std::cout << "Invalid request." << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment