iPlantCollaborativeOpenSource/irods_connection_counter

Name: irods_connection_counter

Owner: iPlant Collaborative Open Source

Description: A user connection counter for irods

Created: 2015-06-24 16:35:16.0

Updated: 2015-06-24 16:50:51.0

Pushed: 2015-07-22 20:53:20.0

Homepage:

Size: 268

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

irods_connection_counter

This project counts individual user connections from irods and outputs individual user file logs as well as a total connection count for each .log file.

Guide

parser.py <.log file or directory containing .log files>

Options

–hours for connections by hour

-m for connections by minute

By default, the log will output connections by second

-i “name1,name2,name3” for users you want to ignore

-y for the year the log was generated. Defaults to current year

-t to generate a total aggregate file of all logs parsed

Example

python parser.py . -o all -t –hours -i “joseph”

This will run the log parser on the current working directory. All .log files found have output generated in the “all” directory. We want the resolution to be in hours, and we want to ignore user “joseph”

Output

The script will create an output folder for each individual .log file titled _parser_output. Each folder will contain a file for every user found in the log as well as a “parser_total.out” file containing the aggregate of all user connections.

The format for Jun 16 08:10:17 would be

20150616, 08:10:17

20150616, 08:10

20150616, 08

Depending on the time formatting options described above.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.