Skip to content

Commit

Permalink
Updated README to include new data-structures and flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkw31 committed Sep 5, 2024
1 parent 1f82fd6 commit 232f75c
Showing 1 changed file with 36 additions and 11 deletions.
47 changes: 36 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,46 @@ This package provides a simple server that listens on a port for simple analytic

The server takes the following arguments:

| Argument | Default | Description |
|--------------|-------------|----------------------------|
| -p | 1234 | The TCP port to listen on. |
| -o | - (stdout) | The file to print to. |
| Argument | Default | Description |
|--------------|-------------|-----------------------------------|
| -p | 1234 | The TCP port to listen on. |
| -d | | DB file to write to. |
| -t | | TSV file to import into database. |

NB: TSV file import is to import flatfile database created with earlier version of this program.

## Output

The generated file will be a TSV with the following fields:
The generated file will be an SQLite Database with the following tables:

events:

| Column | Type | Description |
|------------|------------------------------------------------------------------------------------------------------|
| username | String | The user the ran the executable.Human |
| command | String | The path of the executable that was passed to the analytics server. |
| ip | String | The IP Address on which the executable was ran. |
| time | Integer | The Unix timestamp (Seconds since 1970-01-01 00:00:00 UTC) when the command was executed. |

modules:

| Column | Type | Description |
|------------|----------|-------------------------------------------------------|
| module | String | Module that executable is determined to be a part of. |
| count | Integer | Number of times that this module has been used. |
| firstuse | Integer | Unix timestamp of the earliest use of the module. |
| lastuse | Integer | Unix timestamp of the latest used of the module. |

usermodules:

| Column | Type | Description |
|------------|----------|----------------------------------------------------------------|
| module | String | Module that executable is determined to be a part of. |
| username | String | User than ran the executable. |
| count | Integer | Number of times that this module has been used by this user. |
| firstuse | Integer | Unix timestamp of the earliest use of the module by this user. |
| lastuse | Integer | Unix timestamp of the latest used of the module by this user. |

| Field | Description |
|-----------|---------------------------------------------------------------------|
| Time | Human readable timestamp of the format: YYYY-MM-DD HH:mm:ss |
| Path | The path of the executable that was passed to the analytics server. |
| Username | The user the ran the executable. |
| IP Address| The IP Address on which the executable was ran. |

## Sending Data

Expand Down

0 comments on commit 232f75c

Please sign in to comment.