Commit Graph

14 Commits

Author SHA1 Message Date
XiaojueGuan 3ab0acd63a Trivial: Update pypi url to new url
Change-Id: I4d2afc18167ed3b7945330fb4db62535e72f426c
2018-05-01 15:45:04 +00:00
Matthew Booth dedd78ec27 README.rst: fix typo
Change-Id: I4f59a5a70b004c173c2c4718e153f0f721098c4e
2017-05-25 10:18:10 +01:00
Matthew Booth f2be96fe6a Always merge sort input files with heapq.merge
heapq.merge does an extremely efficient merge sort. Being a merge sort
it has constant memory overhead, and is very fast. It also starts
producing output immediately. It obsoletes both previous sorting
methods, so we deprecate the --min-memory option.

Change-Id: I8384b7214ba54dffa61d1c2195f3b4c238ba253a
2017-05-25 10:18:10 +01:00
Miguel Angel Ajo e901627f16 Updated netprobe, and added netprobe.log to auto alias 2016-04-26 10:50:19 -05:00
Miguel Angel Ajo 7eb4f383db Added a new probe: netprobe
This is an standalone .py file that can be uploaded to remote
servers and used to log network packets over network interfaces.

It will discover new interfaces automatically, in the root or
inside network namespaces.

Interfaces and namespaces are filtered via regular expressions.

usage: netprobe [-h] [-v] [--netns-re NETNS_REGEX]
                [--netdev-re NETDEV_REGEX]
                [--tcpdump-filter TCPDUMP_FILTER]
                [--check-interval CHECK_INTERVAL]

This tool will track system network devices as they appear in a host,
and start tcpdump processes for each of them, while the output of all
the tcpdumps goes in a single openstack-like log.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --netns-re NETNS_REGEX, -n NETNS_REGEX
  --netdev-re NETDEV_REGEX, -d NETDEV_REGEX
  --tcpdump-filter TCPDUMP_FILTER, -t TCPDUMP_FILTER
  --check-interval CHECK_INTERVAL, -i CHECK_INTERVAL
                        The interval between interface checks
2016-04-23 18:53:37 +02:00
Gorka Eguileor ef9b9bd54f Fix #7: Add support for timestamped logs
This patch adds support for timestamped log files with the format
"[    0.003036]".

Since timestamp many times will not take epoc time as the source of the
timestamp but the time the system started, the initial datetime will be
calculated by substracting from the file modified datetime the last
timestamp in the file.

Option added is --timestamp-logs or -tl, and it also supports ALIAS and
globs, and is also affected by base directory and postfix options.
2016-03-25 15:14:45 +01:00
Gorka Eguileor 8c3ae25c17 Add Support /var/log/messages type of logs
This patch adds support for log files that use the same datetime format
as /var/log/messages, which is in the for of Oct 15 14:11:19.

Year will from last modification to the file will be used to complete
missing year.

In the process of refactoring the read of the logs the OpenStack log
reading has been simplified to not require the presence of PID or LEVEL,
thus providing more compatibility with custom log formats (as long as
default datetime format is being used).

With this refactoring it is now easier to add new datetime formats to
the script.

Option added is --msg-logs or -ml and it also supports ALIAS and globs,
and is also affected by base directory and postfix options.

TODO: If year of file creation and file last modification are different
we should start with the cration year and then change to the next year
once the months go back.
2016-03-25 15:14:25 +01:00
Gorka Eguileor 8c09862156 Update README file
This patch updates the README.rst to include the new command line
options:

- Auto alias generation
- Log base directory
- Log postfix
2016-03-22 22:26:30 +01:00
Gorka Eguileor beb65181e7 Add shields to README file
This patch adds 3 shields to the README file:
- Pypi current version
- Supported Python versions
- Software license
2016-03-22 22:13:20 +01:00
Gorka Eguileor 8459bad993 Optionally reduce memory footprint
This patch adds an option to reduce program's memory footprint during
runtime and updates README file accordingly.

Instead of loading all contents into memory and then sorting the
entries, it will go entry by entry saving the oldest one.

Memory reduced footprint operation increases time to merge logs by
approximately 25%.

Option is `-m` or `--min-memory`.
2016-03-20 23:37:45 +01:00
Miguel Ángel Ajo c5445528de Update README.rst with new exec name
We modified the project name from oslogmerger to os-log-merger,
and we did the same thing to the exec name.

While we're keeping the old oslogmerger executable, that one has
been deprecated, and should go away some time in the future.
2016-02-09 09:50:34 +01:00
Miguel Angel Ajo 30aa4dea1e Update from the RDO day presentation details. 2016-01-31 21:44:25 +01:00
Miguel Angel Ajo 183efe3b13 Support for URLS instead of local log files, simple caching. 2015-11-06 14:11:56 +01:00
Miguel Angel Ajo d95458a5f4 Fixed rst file, bumped version, fixed homepage link 2015-10-27 14:48:05 +01:00