diff --git a/README.md b/README.md index 628a377..ceb6eb2 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,61 @@ Read CONCEPT.md and ONTOLOGY.md files. ## INSTALL -TODO +Unzip the package and move the `statoolinfos.jar` and `statoolinfo.sh` files in `/srv/statoolinfos/bin/`. -### Unit test environment -For unit tests, install the TestNG: -* https://marketplace.eclipse.org/content/testng-eclipse -* Eclipse menu > Help > Eclipse Marketplace > Find "TestNG" > TestNG for Eclipse: Install button +Create link: + +``` +cd /srv/statoolinfos/bin/ ; ln -s statoolinfos.sh statoolinfos +``` + + +## Usage + +``` +Usage: + statoolinfos [ -h | -help | --help ] + statoolinfos [ -v | -version | --version ] + + statoolinfos build build property files from conf and input + statoolinfos clear remove property files from conf + statoolinfos crawl crawl all file from conf and input + statoolinfos htmlize generate web pages from conf + statoolinfos probe OPTION [|] generate metrics files from conf + OPTION = [-full|-today|-previousday|-NN] with NN a day count + statoolinfos uptime update uptime journal + + statoolinfos format format property files in tiny way + statoolinfos list ip [-bot|-nobot] generate ip list from log file + statoolinfos list ua [-bot|-nobot] generate user agent list from log file + statoolinfos list visitors [-bot|-nobot] generate visitors (ip+ua) list from log file + statoolinfos stat ip [-bot|-nobot] generate stats about ip from log file + statoolinfos stat ua [-bot|-nobot] generate stats about user agent from log file + statoolinfos stat visitors [-bot|-nobot] generate stats about visitors (ip+ua) from log file + statoolinfos tagdate update the file.datetime file +``` + + +### Generate metrics files + +Create a configuration file `/srv/statoolInfos/conf/foo.bar.org.conf`: + +``` +conf.probe.types=HttpAccessLog, HttpErrorLog +conf.probe.httpaccesslog.file=/var/log/apache2/foo.bar.org-access.log* +conf.probe.httperrorlog.file=/var/log/apache2/foo.bar.org-error.log* +conf.probe.target=/srv/statoolinfos/well-known/statoolinfos/foo.bar.org.metrics + +``` + +Generate the metric file for the first time: + +``` +/srv/statoolinfos/bin/statoolinfos probe -full /srv/statoolinfos/conf/foo.bar.org.conf +``` + +Create a cron file to update the metric file everyday: + +``` +1 * * * * root /srv/statoolinfos/bin/probe -previousday /srv/statoolinfos/conf/foo.bar.org.conf +```