|-c dir||Set the directory ipastat should chroot(2) into immediately, the directory should be given with absolute path. The working directory is not changed.|
|-f conf_file||Use the given configuration file instead of using the default configuration file, the configuration file name should be given with absolute pathname.|
|-t||Parse the configuration file, output its content and exit. This option allows to check whether ipastat and IPA modules understand your configuration file(s). Two -tt switches enable so called mimic real configuration regime. ipastat will set all default values and will apply settings from rulepat sections to rule sections in this regime.|
|-q query||Query statistics from IPA statistics modules (described in the separate query options list).|
|-u user||Change the UID of the running copy of ipastat to the given user. The given value may be either a user name or the UID. If the -g option is not given, then the GID will be the primary group of the given user, all supplementary users groups are set as well.|
|-g group||Change the GID of the running copy of ipastat to the given group. The value given may be either a group name or a GID. This option also changes all supplementary users groups.|
|-h||Print the help message about available options and exit.|
|-v||Show the version number, some settings, what is supported from ipastat.conf(5) and exit.|
|Query options are:|
|-a rules||Output rules list.|
|-a limits||Output limits list for given rules in the -r options.|
|-a thresholds||Output thresholds list for given rules in the -r options.|
|-s stat1 stat2 ...||Specify st_list for next rules, limits or thresholds. New -s option starts new list of statistics systems. This list changes list of statistics systems given in the configuration file for rule, limit or threshold. It is possible to specify built-in null statistics system. If the list in this option is empty, then previous list is forgotten and the list from the appropriate section from the configuration file is used.|
|-i|I interval||Specify time interval, to specify non continuous time interval use several options. The -I option means exact interval and has an effect only for statistics for rules. The description of formats and what are time intervals see below.|
|-r rule||Specify a rule name, it is possible to use several rules at once.|
|-l limit||Specify a limit name, it is possible to use several limits at once.|
|-t threshold||Specify a threshold name, it is possible to use several thresholds at once.|
|-x regexp||Filter output of names (the -a option) with the given POSIX extended regular expression.|
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).
The general and complete form of a time interval is the following:
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 rules 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 rules database records timestamps should be in the range of dates. If a time interval is given in the -I option, then both of rules 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 limits 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.
Output 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
ipastat exits with a return code 0 on success, and with a non-zero return code if any error occurred.
(run ipastat with the -h switch and check default path)
Andrey Simonenko <firstname.lastname@example.org>
If you find any, please send email me.
|-->||IPASTAT (8)||April 16, 2005|