Posts

Showing posts from June, 2008

Mysql fix

I don't believe this post will be very useful to anyone else, but I want to record it anyway. I noticed a few weeks ago that my drupal installation was complaining that the watchdog table had crashed. With my limited understanding of mysql , I didn't event know that a table *could* crash. Everything else on the site looked fine to the anonymous user so I just ignored it. That brings me to today. I found this interesting script online that will dump all of my mysql databases every hour to another file system . I figured I would give a shot. I entered my root db password and the dst directory and let her rip. I got a few errors right away: [root@www storage]# mysql -backup.sh mysqldump : Error 1194: Table 'watchdog' is marked as crashed and should be repaired when dumping table `watchdog` at row: 283 mysqldump : Got error: 145: Table './drupal/watchdog' is marked as crashed and should be repaired when using LOCK TABLES mysqldump : Got error: 145: Table '.

Some snort login kung-fu...

I was recently playing around with my .bash_profile file looking for new ways to alert myself as well as my team to problems with production snorts. I ended up with two little tricks that I have found really useful and I figured I would share. For those that don't know, the .bash_profile file is an sh script that runs at user login. At a bare minimum it sets the users PATH, but it can be used for a whole lot more. It's located in the root of the users home directory. Ex: /home/snort/.bash_profile, or /root/.bash_profile Before I go any further I will tell you that both of these tricks are obviously reactive in nature. They only let you know there is a problem the next time you log into the device. A more proactive solution would involve setting thresholds and sending emails to admins, but 1) there are already plenty of scripts that do that, and 2) that is not a luxury I have on my sensors. I have inbound ssh, outbound 80 for updates and outbound 443 for logging. Nevertheless, t