|
|
@ -422,7 +422,7 @@ int main(int argc, char** argv)
|
|
|
|
{ 0, 0, 0 }
|
|
|
|
{ 0, 0, 0 }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//while ((c = optparse(&optparse_state, "46ADMNRadeghlmnoqsuvzB:C:H:I:O:Q:S:T:b:c:f:i:p:r:t:")) != EOF) {
|
|
|
|
float opt_value_float;
|
|
|
|
while ((c = optparse_long(&optparse_state, longopts, NULL)) != EOF) {
|
|
|
|
while ((c = optparse_long(&optparse_state, longopts, NULL)) != EOF) {
|
|
|
|
switch (c) {
|
|
|
|
switch (c) {
|
|
|
|
case '4':
|
|
|
|
case '4':
|
|
|
@ -467,10 +467,13 @@ int main(int argc, char** argv)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 't':
|
|
|
|
case 't':
|
|
|
|
if (!(timeout = (unsigned int)atoi(optparse_state.optarg) * 100))
|
|
|
|
if (!sscanf(optparse_state.optarg, "%f", &opt_value_float))
|
|
|
|
usage(1);
|
|
|
|
usage(1);
|
|
|
|
|
|
|
|
if (opt_value_float < 0) {
|
|
|
|
|
|
|
|
usage(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
timeout = opt_value_float * 100;
|
|
|
|
timeout_flag = 1;
|
|
|
|
timeout_flag = 1;
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 'r':
|
|
|
|
case 'r':
|
|
|
@ -479,14 +482,21 @@ int main(int argc, char** argv)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 'i':
|
|
|
|
case 'i':
|
|
|
|
if (!sscanf(optparse_state.optarg, "%u", &interval))
|
|
|
|
if (!sscanf(optparse_state.optarg, "%f", &opt_value_float))
|
|
|
|
usage(1);
|
|
|
|
usage(1);
|
|
|
|
interval *= 100;
|
|
|
|
if (opt_value_float < 0) {
|
|
|
|
|
|
|
|
usage(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
interval = opt_value_float * 100;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 'p':
|
|
|
|
case 'p':
|
|
|
|
if (!(perhost_interval = (unsigned int)atoi(optparse_state.optarg) * 100))
|
|
|
|
if (!sscanf(optparse_state.optarg, "%f", &opt_value_float))
|
|
|
|
usage(1);
|
|
|
|
usage(1);
|
|
|
|
|
|
|
|
if (opt_value_float < 0) {
|
|
|
|
|
|
|
|
usage(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
perhost_interval = opt_value_float * 100;
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
@ -523,8 +533,12 @@ int main(int argc, char** argv)
|
|
|
|
case 'Q':
|
|
|
|
case 'Q':
|
|
|
|
verbose_flag = 0;
|
|
|
|
verbose_flag = 0;
|
|
|
|
quiet_flag = 1;
|
|
|
|
quiet_flag = 1;
|
|
|
|
if (!(report_interval = (unsigned int)atoi(optparse_state.optarg) * 100000))
|
|
|
|
if (!sscanf(optparse_state.optarg, "%f", &opt_value_float))
|
|
|
|
usage(1);
|
|
|
|
usage(1);
|
|
|
|
|
|
|
|
if (opt_value_float < 0) {
|
|
|
|
|
|
|
|
usage(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
report_interval = opt_value_float * 100000;
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|