Skip to content

A simple and lightning-fast scanner for cpanel server stats written in bash, awk, and perl.

License

Notifications You must be signed in to change notification settings

korikori/A-Scanner-Darkly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABOUT

This is A Scanner Darkly, a script that processes cpanel's server stats. It is custom-built for our company and might not fit your needs, but it could give you hints to solving a fairly common problem. After we finished being so lazy, we published it under GPL v3 license which is included with this release in the file COPYING and for the sake of that, this file is now 100% Copyright 2010-2011 morbeo, korikori.

It currently consists of these three very small scripts:

splitter.sh, a bash/awk script that divides a page with all of our servers' logs into separate logfiles for each server. It was designed and coded by morbeo;

ascannerdarkly.pl, a perl script that takes the logs for each server and checks them for different predefined values for outgoing and incoming mail, domain hits and bandwidth. It then outputs the violating accounts in one file and the processed big files in another. It was designed and coded by korikori;

asd.sh, a bash script that combines the two scripts above for ease of use. It also asks the user how they feel, which is always nice.

It should run in any environment which supports the above three languages, while it was designed and tested in Linux.

It has been named after the BSFA Award winning 1977 science fiction novel by American writer Phillip K. Dick.

USAGE

Simple usage: 1) copy the full page of server logs into import.txt (or any empty file of your choice) 2) then run "$sh asd.sh import.txt" in a terminal 3) see the output in output.txt. The contents of the import.txt will be automatically copied into the LOGS folder with the date in it's filename for future reference.

Make sure you have set asd.sh to executable ($chmod +x asd.sh) before you run it.

GPL STUFF

This file is part of A Scanner Darkly.

A Scanner Darkly is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

A Scanner Darkly is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with A Scanner Darkly.  If not, see <http://www.gnu.org/licenses/>.

About

A simple and lightning-fast scanner for cpanel server stats written in bash, awk, and perl.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published