Go Back   FlashFXP Forums > > > >

Suggestions Got a new idea or addition which would benefit IOFTPD? Post it here!

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-21-2003, 11:01 AM   #1
NorLan
Senior Member
 
Join Date: Sep 2003
Posts: 110
Default site syslog * searchstring

hello

is it possible to search the whole syslog/errlog for a specific string?! if not this would fine to have in one of the next versions.

thx in advance
NorLan is offline   Reply With Quote
Old 12-21-2003, 11:10 AM   #2
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

no it's not possible.

syslog = EXEC ..\scripts\ioa.exe syslog

syslog is a ioA feature.
so WarC is the one this suggestion should be directed to.

I think i'll make a simple grep.itcl script to do that. Need that too myself sometimes...
Mouton is offline   Reply With Quote
Old 12-21-2003, 11:24 AM   #3
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

grep.itcl:
Code:
if {[llength $args]!=2} {
    iputs "Syntax: SITE GREP <search_string> <logfile>            "
    iputs "<logfile>: Error, ioFTPD, SysOp, SystemError or xferlog"
    return
}

set lookup [lindex $args 0]
if {[lindex $args 1]=="xferlog"} {
    set filename "../logs/[lindex $args 1]"
} else {
    set filename "../logs/[lindex $args 1].log"
}

iputs -nobuffer "Looking for '$lookup' in $filename"
set ferror [catch {set fp [open $filename r]}]
if {!$ferror} {
    set dc 0
    while {![eof $fp]} {
        set line [gets $fp]
        if {[string match -nocase "*$lookup*" $line]} {
            iputs -nobuffer $line
            incr dc
        }
    }
    close $fp
    iputs "$dc entries found"
} else {
    iputs "Error opening '$filename'."
}
[Scripts]
GREP = TCL ..\scripts\grep.itcl

Code:
[11:22:49] [L] site grep Mouton xferlog
[11:22:49] [L] 200-Looking for 'Mouton' in ../logs/xferlog
[11:22:49] [L] 200-Wed Nov 19 16:01:13 2003 31 64.221.14.121 5492588 /!ioftpd/logs/ioFTPD.log b _ i r Mouton ftp 1 gb l
...
[11:22:49] [L] 200-21 entries found
[11:22:49] [L] 200 Command successful.
Mouton is offline   Reply With Quote
Old 12-21-2003, 11:32 AM   #4
Zer0Racer
Senior Member
ioFTPD Scripter
 
Join Date: Oct 2002
Posts: 703
Default

Just use SITE SYSLOG *searchstring* in ioA.

Taken from ioA manual:
* site syslog <days> <search>
site syslog purge
Show loglines from sysop.log. Days and search can vary in following ways:
Examples:
site syslog *hubba* (starts can be added to give better search)
site syslog *hubba*bubba*my*leet*long*line*
site syslog 5
site syslog 5 *hubba*
site syslog * (Will show entire syslog)

Note that it does not count days as usually. If you issue "site syslog 1" that will
display what happend last 24 hours even if that might not be "last" day.
Zer0Racer is offline   Reply With Quote
Old 12-21-2003, 10:02 PM   #5
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

oh. my bad. didn't know that ioA feature
Mouton is offline   Reply With Quote
Old 12-22-2003, 06:04 AM   #6
NorLan
Senior Member
 
Join Date: Sep 2003
Posts: 110
Default

*hehe

-> those who can read have a serious advantage <-

i am bad too
NorLan is offline   Reply With Quote
Old 12-22-2003, 01:44 PM   #7
Zer0Racer
Senior Member
ioFTPD Scripter
 
Join Date: Oct 2002
Posts: 703
Default

syslog (and errlog) syntax is "borrowed" from glftpd.
Zer0Racer is offline   Reply With Quote
Reply

Tags
advance, fine, specific, thx, versions

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GuildFTPd command set (import) Jesper Custom Commands 4 07-29-2011 12:41 AM


All times are GMT -5. The time now is 05:47 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)