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
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
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.
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.
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`.
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.