Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: TLS Monitoring Script
PostPosted: Wed Mar 12, 2008 3:03 pm 
Offline
Senior Member

Joined: Sun Nov 14, 2004 6:37 pm
Posts: 138
Website: http://oldos.org
WLM: jasonlfaulkner@hotmail.com
Yahoo Messenger: jasonfncsu
AOL: jaylfaulkner
Location: NC, USA
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

_________________
Jay Faulkner
http://oldos.org


Top
   
 Post subject:
PostPosted: Wed Mar 12, 2008 9:44 pm 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
I was under the impression that UML had fixed the issue where TLS caused such performance problems. Is this not the case?


Top
   
 Post subject:
PostPosted: Wed Mar 12, 2008 9:53 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
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


Top
   
 Post subject:
PostPosted: Thu Mar 13, 2008 12:47 am 
Offline
Senior Member

Joined: Sun Nov 14, 2004 6:37 pm
Posts: 138
Website: http://oldos.org
WLM: jasonlfaulkner@hotmail.com
Yahoo Messenger: jasonfncsu
AOL: jaylfaulkner
Location: NC, USA
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?

_________________
Jay Faulkner

http://oldos.org


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group