Exporting captive portal logs to Excel

Forums Network Management ZeroShell Exporting captive portal logs to Excel

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43226
    samirghaliz
    Member

    Hello all,

    I would like to export captive portal logs in syslog to excel and was wondering if you have any suggestions on how to extract the information and save as a text file.

    Thanks,
    sam

    #52120
    michael
    Member

    Try this as Cron job to list all accounts with the name “roomxx”:
    pakRad(){

    echo “Cost;IP;Last;MAC;NAS;RX;TX;Time;Traffic;start;stop;room” >/tmp/log.csv
    cd /Database/var/register/system/acct/entries/
    for DIRNAME in `find ./r* -name MAC -printf “%h “`
    do
    echo ${DIRNAME} | sed -e”s/./(room..)/.*/1/”
    # awk ‘FNR==1{f++}{a[f,FNR]=$1}END{for(x=1;x<=FNR;x++){for(y=1;y>/tmp/log.csv
    awk ‘FNR==1{f++}{a[f,FNR]=$1}END{for(x=1;x<=FNR;x++){for(y=1;y>/tmp/log.csv
    echo ${DIRNAME} | sed -e”s/./(room..)/.*/1/” >>/tmp/log.csv
    done

    ftp yourFtpServer.xx< ftpUser
    ftpPassword
    put /tmp/log.csv ./log.csv
    quit
    EOF
    rm -f /tmp/log.csv
    }

    pakRad

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.