Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


TLS Monitoring Script

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Performance and Tuning
Author Message
Jay



Joined: 14 Nov 2004
Posts: 125
Location: NC, USA

Posted: Wed Mar 12, 2008 2:03 pm    Post subject: TLS Monitoring Script  

Hi all,

The other day, when I upgraded some packages on my box, apparently and upgrade to libc was there that I didn't see. Having /lib/tls on my box again killed performance, so I wrote up a little script to help monitor, and I'm sharing it here.

This script will write a syslog entry everytime it runs, saying whether or not /lib/tls exists, and if it finds a /lib/tls directory, it will remove it and email the address specified.

Basically, you copy the script to /usr/local/bin/ and add a cronjob to run it.

**Edit: It occured to me that my script should delete /lib/tls, instead of poking me to do it. Edited version below and uploaded.

Cronjob: (in /etc/crontab format)
Code: 00 1    * * *   root    /usr/local/bin/check_tls >/dev/null 2>/dev/null


Script: (can also be downloaded from http://j.oldos.org/check_tls.sh
Code:
#!/bin/bash
# check_tls.sh
#
# Script to see if TLS exists. If it exists, email $email
#
# Released into Public Domain 3/12/2008 by Jason Faulkner
#

# Put your email address here
email="nobody@example.com"

if [[ -d /lib/tls ]]; then
        echo "TLS Exists at /lib/tls on `hostname -f`. Removing." \
          | mail -s "TLS Exists" $email
        rm -rf /lib/tls
        logger -i -t "check_tls" "TLS Check: /lib/tls exists, removing and emailing $email"
else
        logger -i -t "check_tls" "TLS Check: /lib/tls does not exist, not emailing $email"
fi
Back to top  
Xan



Joined: 08 Feb 2004
Posts: 295
Location: Austin

Posted: Wed Mar 12, 2008 8:44 pm    Post subject:  

I was under the impression that UML had fixed the issue where TLS caused such performance problems. Is this not the case?
Back to top  
caker



Joined: 15 Apr 2003
Posts: 2371
Location: Galloway, NJ

Posted: Wed Mar 12, 2008 8:53 pm    Post subject:  

Xan wrote: I was under the impression that UML had fixed the issue where TLS caused such performance problems.
Me too :). I've never heard of anyone else hitting problems with NPTL/TLS.

Anyone want to test?

-Chris
Back to top  
Jay



Joined: 14 Nov 2004
Posts: 125
Location: NC, USA

Posted: Wed Mar 12, 2008 11:47 pm    Post subject:  

I certainly experienced some issues using hardy w/TLS ... moving the TLS libs out of the way fixed my problem.

Perhaps something specific to new libc?
Back to top  
 
       Linode.com Forum Forum Index -> Performance and Tuning
Page 1 of 1