Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
logtime
Parse the date and time from log files and print an ASCII graph of the occurrences. Time can be grouped by minute, hour or day.
matth-at-mtingers.com
Usage
Usage:
logtime <grouping> <timepattern> <timespec> < FILENAME
Example Usage:
Apache logs grouped by hour
grep FOO /var/log/apache2/access.log | \
logtime H '\[(.+?) ' '%d/%b/%Y:%H:%M:%S'
logtime H '\[(.+?) ' '%d/%b/%Y:%H:%M:%S' < /path/file
Grouping spec:
H - hour
M - Minute
S - Second
y - year
m - month
d - day
Timespecs:
Directive Meaning
%a Locale's abbreviated weekday name.
%A Locale's full weekday name.
%b Locale's abbreviated month name.
%B Locale's full month name.
%c Locale's appropriate date and time representation
%d Day of the month as a decimal number [01,31]
%H Hour (24-hour clock) as a decimal number [00,23]
%I Hour (12-hour clock) as a decimal number [01,12]
%j Day of the year as a decimal number [001,366]
%m Month as a decimal number [01,12]
%M Minute as a decimal number [00,59].
%p Locale's equivalent of either AM or PM.
%S Second as a decimal number [00,61].
%U Week number of the year (Sunday as the first day of the
week) as a decimal number [00,53].
%w Weekday as a decimal number [0(Sunday),6]
%W Week number of the year (Monday as the first day of the
week) as a decimal number [00,53].
%x Locale's appropriate date representation
%X Locale's appropriate time representation
%y Year without century as a decimal number [00,99]
%Y Year with century as a decimal number
%Z Time zone name (no characters if no time zone exists)
%% A literal '%' character.
Important notes:
Regex is Python regex re.findall()
Timepsec is Python's time module
Metadata
Release files for logtime 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| logtime-1.0.1.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logtime-1.0.1-py3.8.egg | Legacy Egg format | - | - | Details |
Total release size: 6.9 kB
Release files / logtime-1.0.1.tar.gz
| Download URL | logtime-1.0.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e8fd7c90c66dc3a76aab86b755a78e894766ec280f3e2c8ff3c3c60f0dfaffe
|
|
BLAKE2b-256 checksum How to use checksums |
fb546761eeb3fc016f80e9549106bc03fb779f2a7cf7fe1d5bf678af7ee3a697
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2
|
Release files / logtime-1.0.1-py3.8.egg
| Download URL | logtime-1.0.1-py3.8.egg |
|---|---|
| Size | 3.6 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
7e7f5408857aa65ff2560f3465fc07e3d732da0aba53df396cd24ee6908e2a9a
|
|
BLAKE2b-256 checksum How to use checksums |
bcddfd32ff6eb2f9ba14ea9fe3e9f849ed20cdb9fc4be15ac6e2c97ca26b1617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2
|