/[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

Annotation of /report.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (hide annotations)
Sat Apr 11 09:33:43 2009 UTC (10 years, 2 months ago) by dpavlin
File size: 404 byte(s)
make sample report on hosts, programs and facilities
1 dpavlin 7 select
2     count(ip),
3     ip
4     from log
5     group by ip
6     order by count(ip) desc
7     limit 10
8     ;
9 dpavlin 4
10 dpavlin 7 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