-
A python based simulator that generates nearly 172 million logs (per minute) for a single day for 1000 servers with 2 CPUs each
- Logs will be generated using python's multiprocessing module.
- A pool for workers will create logs by locking a single file for writing.
<EPOCH_TIMESTAMP_FOR_DATE> <SERVER_IP> <CPU_ID> <USAGE_PERCENT>
1596870180 192.168.0.2 0 71
Parses the logs and creates a trie to query within a second
./generate.sh <DATA_PATH> [date]
- A folder with name
logs
will be generated in theDATA_PATH
- Logs and locks will be generated inside the
logs
directory and locks will the removed once logs created
./query.sh <LOGS_PARENT_DIR>
========================================================
Please wait !!! Parsing logs...
# A few seconds/minutes
Logs parsed successfully. You can query the logs
Usage : QUERY <IP_ADDRESS> <CPU_ID> <DATE(YYYY-MM-DD)> <TIME_START> <TIME_END> OR EXIT to exit.
# User input
> _
> QUERY 192.168.1.10 1 2014-10-31 00:00 2014-10-31 00:05