|
NAMEipastat -- statistics viewerSYNOPSISipastat -h|v ipastat [-c dir] [-u user] [-g group] [-f conf_file] -t [-t] ipastat [-c dir] [-u user] [-g group] [-f conf_file] -q query DESCRIPTIONipastat is an utility for outputting statistics. The ipastat.conf(5) manual page gives the complete description how to configure ipastat and describes all its features.ipastat queries IPA statistics modules and outputs results to the standard output (stdout) accordingly to settings in the ipastat.conf(5) configuration file and settings in the command line. This utility allows to output rules, limits and thresholds list, output statistics for rules, limits and thresholds. It is possible to use several statistics systems at once and query statistics for several rules, limits and thresholds at once. ipastat does not accept any signals and signals handling is undefined. Available options are:
Query options are:
It is allowed to use short arguments in all -a options. If the -a option is not given, then statistics for rules, limits or thresholds is outputted. It is not allowed to mix -l and -t options, also it is not allowed to mix single -r options and -r options with -l or -t options. In other words: it is possible to query statistics only for rules, only for limits or only for thresholds. If a rule given in the -r option does not exist in the configuration file, then ipastat will create a rule with the given name on-the-fly if this is allowed in ipastat.conf(5) and this rule will inherit settings from rulepat and global sections. The same effect exists for limits and thresholds (even for static rules). Time intervalsThe general and complete form of a time interval is the following:
Y1.M1.D1/h1:m1:s1-Y2.M2.D2/h2:m2:s2 where Y1, Y2 -- years; M1, M2 -- months; D1, D2 -- days; h1, h2 -- hours; m1, m2 -- minutes and s1, s2 -- seconds. A month can be given as the first three characters of English language month name. Any time interval consists of left and right parts. Each part is not required to be completely specified. If the left part of a time interval is not complete, then first second of first minute of first hour (and so on) is taken. If the right part of a time interval is incomplete, then the end of last second of last minute of last hour (and so on) is taken. The right part of a time interval can be omitted. In this case the right part is equal to the left part. A time interval for a rule means that rule's database records timestamps should be in the range of dates given in a time interval. If a time interval is given in the -i option, then only one of rule's database records timestamps should be in the range of dates. If a time interval is given in the -I option, then both of rule's database records timestamps should be in the range of dates. If a time interval is not given, then by default time interval for the current month is used. A time interval for a limit means that limit's start time should be in the range of dates given in a time interval. If time interval is not given, then the current state of a limit is queried. A time interval for a threshold does not have any effect. EXAMPLESOutput rules list:
ipastat -q -a rul Output rules list, which starts with ``10'':
ipastat -q -x ^10 -a rul Output limits list for my and lan rules:
ipastat -q -a lim -r my -r lan Output thresholds list for the given rules: rule1 and rule2 use statistics system sdb, rule3 should use statistics system from the configuration file:
ipastat -q -a thr -s sdb -r rule1 -r rule2 -s "" rule3 Output statistics for rules rule1 and rule2 for current month:
ipastat -q -r rule1 -r rule2 Output statistics for the rule rule1 for January and March of the current year:
ipastat -q -i jan -i mar -r rule1 Output statistics for the rule rule1 from 10:00 till 12:00 for the current day:
ipastat -q -i /10-/12 -r rule1 Output statistics for rules rule1, rule2 and rule3 for 2005 year:
ipastat -q -i 2005 -r rule1 -r rule2 -r rule3 Output current states of limits lim1 for rule1 and limx for rule2:
ipastat -q -r rule1 -l lim1 -r rule2 -l limx Output statistics for the same limits, but all states of all limits should have start time in January of 2004 year:
ipastat -q -i 2004.jan -r rule1 -l lim1 -r rule2 -l limx Output statistics for thresholds thr1 for rule1, thrx and thry for rule2, threshold thrx should use statistics system sdb, other thresholds should use statistics systems from the configuration file:
ipastat -q -r rule1 -t thr1 -r rule2 -s sdb -t thrx -s "" -t thry DIAGNOSTICSipastat exits with a return code 0 on success, and with a non-zero return code if any error occurred.FILESipastat.conf(run ipastat with the -h switch and check default path) SEE ALSOipa(8), ipactl(8), ipa.conf(5), ipastat.conf(5), ipa_mod(3)AUTHORAndrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>BUGSIf you find any, please send email me.
Visit the GSP FreeBSD Man Page Interface. |