PW Log Viewer

Results 1 to 15 of 15
  1. #1
    The One And Only DaMadBoy is offline
    MemberRank
    Jun 2009 Join Date
    Behind You!Location
    545Posts

    PW Log Viewer

    I have been trying to use the PWlogviewer by Kenpachi but infortunately it doesn't show any information when I load the world2.log into it.

    I've tried running the program as adminstrator with no luck and I also tried to get it working using capability mode and again with no luck.

    Anyone got any suggestions on how to get it working?


  2. #2
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: PW Log Viewer

    I think it reads from formatlog and not world2.log

  3. #3
    The One And Only DaMadBoy is offline
    MemberRank
    Jun 2009 Join Date
    Behind You!Location
    545Posts

    Re: PW Log Viewer

    Just gave the formatlog a go but it still didn't read it. I'll have a go at opening all the logs, mabe I'll get lucky.

    Gave it a try with the other world2 files but again none of them opened.

  4. #4
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: PW Log Viewer

    It's just plain text... Open it in Notepad or something...

  5. #5
    The One And Only DaMadBoy is offline
    MemberRank
    Jun 2009 Join Date
    Behind You!Location
    545Posts

    Re: PW Log Viewer

    I have O.o but was hoping to use the log viewer as it puts it all in a nice neat order.

  6. #6
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: PW Log Viewer

    Quote Originally Posted by twister495 View Post
    I have O.o but was hoping to use the log viewer as it puts it all in a nice neat order.
    So does Notepad++ because of it's nifty tabs

  7. #7
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: PW Log Viewer

    I agree that notepad is great but not as a log viewer. Try searching some values within a log file of 150mb ... It will take a while and maybe notepad will crash.

    Btw better to do a log viewer in php or java. So you can read the log directly on the server via your browser without downloading everytime the log file to check something.

  8. #8
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: PW Log Viewer

    Quote Originally Posted by Romulan View Post
    I agree that notepad is great but not as a log viewer. Try searching some values within a log file of 150mb ... It will take a while and maybe notepad will crash.

    Btw better to do a log viewer in php or java. So you can read the log directly on the server via your browser without downloading everytime the log file to check something.
    Then use nano and Ctrl-W (which is search in nano)

  9. #9
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: PW Log Viewer

    Command line is not very convenient for editing/viewing large text files. I still believe in doing a php web panel for every log files would be cool...

    PS: I sucks with stripos and substr in php, that's why I can't do my own panel for that -.-

  10. #10
    The One And Only DaMadBoy is offline
    MemberRank
    Jun 2009 Join Date
    Behind You!Location
    545Posts

    Re: PW Log Viewer

    A web based log viewer would be very handy actually, especially for those using dedicated servers instead of home servers. Do you think anyone would put one together?

    I would do myself but I know nothing about php at this time, although I plan to learn it at some point, once I'm done learning what need to for my server.

  11. #11
    Angelemu founder tbnanubis is offline
    MemberRank
    Mar 2011 Join Date
    Unicorn ForestLocation
    527Posts

    Re: PW Log Viewer

    anyone ever considered using grep, awk/sed and pipes on the server console? :D its much faster than any viewer because you dont have to download the full log, but a small snippet that is of interest.

  12. #12
    The One And Only DaMadBoy is offline
    MemberRank
    Jun 2009 Join Date
    Behind You!Location
    545Posts

    Re: PW Log Viewer

    I'm still a complete novice when it comes to linux programs but now you've mentioned it, it's something worth learning.

  13. #13
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: PW Log Viewer

    I found this script made by Robb for his pvp ranking:
    Code:
    #!/bin/sh
    
    cd /PWServer/logs
    grep -e ':type=2:' world2.formatlog > kills.formatlog
    chmod 755 kills.formatlog
    sed -i 's/ /,/g' kills.formatlog
    sed -i 's/=/,/g' kills.formatlog
    sed -i 's/:/,/g' kills.formatlog
    sed -i 's/,,,/,/g' kills.formatlog
    sed -i 's/,,/,/g' kills.formatlog
    I know what does the 3 first lines but wtf does the others lines? xD

    What is the meaning of: sed -i 's/ /,/g' ?

    Oh here is a sample of the line in world2.formatlog:
    Code:
    2011-10-15 18:42:28 pwserver gamed: notice : formatlog:die:roleid=32:type=2:attacker=48
    Maybe it will help you to find out what sed does on that line.

  14. #14
    Angelemu founder tbnanubis is offline
    MemberRank
    Mar 2011 Join Date
    Unicorn ForestLocation
    527Posts

    Re: PW Log Viewer

    in-place edit
    -i means instead of taking streams/files as input and output, only one file is read and changed

    s/y/x/g is a replace function, which is used to replace all occurences of y with x
    it supports regular expressions

    what the script does is replace delimiter chars like " ", "=", ":" with "," and then delete all multiple occurences

    when that is done you can use simple line.split(",") with any program and select the array index you want without any further processing to display the data fields in a page or program

    In short sed is a stream editor which means it ignore line breaks...
    when you want to do per-line-manipulation you can use line based editors like awk scripts, which are also very powerful, but limited to whole lines..

    when viewing logs for exploit/cheat discovery or something that you server rules don't want to happen, its easier to just grep a bit of info directly to a file and look into it, like:
    Code:
    grep "2011-10-23 16:1" > x.txt
    to get everything that has happened within 10 minutes, or use
    Code:
    grep -e "2011-10-23.*task:roleid=1024" world2.log
    to get all quest stuff a certain character has done in one day... feel free to use
    Code:
    grep -e "2011-10-23.*task:roleid=1024" world2.log|last -n x> test.txt
    to only get the last x actions/lines

    the possibilities are countless as most unix tools support regular expressions in some way


    Edit: read pages like this when you want to do something special and after that you should know what stuff to google to get all information you need....

    Just keep in mind the internet-knowledge-gather-rule: search engines are you friend, use them whenever possible before asking anything anywhere

  15. #15
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: PW Log Viewer

    Quote Originally Posted by tbnanubis View Post
    Spoiler:
    in-place edit
    -i means instead of taking streams/files as input and output, only one file is read and changed

    s/y/x/g is a replace function, which is used to replace all occurences of y with x
    it supports regular expressions

    what the script does is replace delimiter chars like " ", "=", ":" with "," and then delete all multiple occurences

    when that is done you can use simple line.split(",") with any program and select the array index you want without any further processing to display the data fields in a page or program

    In short sed is a stream editor which means it ignore line breaks...
    when you want to do per-line-manipulation you can use line based editors like awk scripts, which are also very powerful, but limited to whole lines..

    when viewing logs for exploit/cheat discovery or something that you server rules don't want to happen, its easier to just grep a bit of info directly to a file and look into it, like:
    Code:
    grep "2011-10-23 16:1" > x.txt
    to get everything that has happened within 10 minutes, or use
    Code:
    grep -e "2011-10-23.*task:roleid=1024" world2.log
    to get all quest stuff a certain character has done in one day... feel free to use
    Code:
    grep -e "2011-10-23.*task:roleid=1024" world2.log|last -n x> test.txt
    to only get the last x actions/lines

    the possibilities are countless as most unix tools support regular expressions in some way


    Edit: read pages like this when you want to do something special and after that you should know what stuff to google to get all information you need....

    Just keep in mind the internet-knowledge-gather-rule: search engines are you friend, use them whenever possible before asking anything anywhere
    All commands | commandlinefu.com is a great resource for useful little tidbits. I've also found sed useful for so much... I spend quite a bit of time in command line and to me it is just easier to explain to computer exactly what I want to do than figure out what the developer of an application thought would be a good place to put something in a GUI



Advertisement