/[sysplogd]/report.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /report.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (show annotations)
Sat Apr 11 09:33:43 2009 UTC (14 years, 11 months ago) by dpavlin
File size: 404 byte(s)
make sample report on hosts, programs and facilities
1 select
2 count(ip),
3 ip
4 from log
5 group by ip
6 order by count(ip) desc
7 limit 10
8 ;
9
10 select
11 count(program),
12 program
13 from log
14 group by program
15 order by count(program) desc
16 limit 10
17 ;
18
19 select
20 count(facility),
21 facilities.name
22 from log
23 full join facilities on facilities.id = log.facility
24 group by program,facilities.name
25 order by count(facility) desc
26 limit 10
27 ;
28
29 select * from log order by id desc limit 5 ;

  ViewVC Help
Powered by ViewVC 1.1.26