18 lines
591 B
Bash
Executable File
18 lines
591 B
Bash
Executable File
#!/bin/sh
|
|
|
|
#echo "
|
|
#
|
|
#select device_id, msg from syslog where
|
|
#timestamp like '`date +"%Y-%m-%d"%`' and
|
|
#(msg like '%collision%' or msg like '%duplex%' or msg like '%mismatch%' or msg like '%excessive%')
|
|
#order by timestamp desc;
|
|
#
|
|
#" | mysql -uroot -p\@Defender2013! -Dobservium
|
|
|
|
echo "
|
|
select s.timestamp, d.hostname, s.msg
|
|
from devices d, syslog s
|
|
where s.device_id = d.device_id and d.hostname like '%switch%' and (msg like '%collision%' or msg like '%duplex%' or msg like '%mismatch%' or msg like '%excessive%')
|
|
order by s.timestamp asc;
|
|
" | mysql -uroot -p\@Defender2013! -Dobservium
|