EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   Bash script to filter logins from log files (https://www.eqemulator.org/forums/showthread.php?t=30091)

cubber 12-15-2009 08:15 PM

Bash script to filter logins from log files
 
I created this simple script so that I could parse the log files to see login activity on the server from the command line on the server.

The script parses the eqemu_debug_world.log file and returns a list of account names as well as date and time that they logged in.

Change the logfile="" line to point to your log file location.


Code:

#!/bin/bash

logfile="/opt/eqemu/logs/eqemu_debug_world.log";

grep Logged $logfile | awk {'print $6, $2, $3, $4'}

exit


The output of the script looks like so:

Code:

accountname: [12.04. - 12:52:58]
accountname2: [12.06. - 16:35:49]
accountname: [12.07. - 20:45:52]
anotheraccountname: [12.07. - 20:47:54]

Enjoy!


All times are GMT -4. The time now is 04:21 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.