File:
[LON-CAPA] /
loncom /
lonmemcached
Revision
1.6:
download - view:
text,
annotated -
select for diffs
Tue Oct 17 05:56:34 2006 UTC (18 years, 3 months ago) by
albertel
Branches:
MAIN
CVS tags:
version_2_5_X,
version_2_5_2,
version_2_5_1,
version_2_5_0,
version_2_4_X,
version_2_4_99_0,
version_2_4_2,
version_2_4_1,
version_2_4_0,
version_2_3_X,
version_2_3_99_0,
version_2_3_2,
version_2_3_1,
version_2_3_0,
version_2_2_99_1,
version_2_2_99_0,
HEAD
- upping to amount of memeory memcached grabs
- turning on the ability for auto gzipping large structs when sending them to memcached
#!/usr/bin/perl
$pidfile="/home/httpd/perl/logs/lonmemcached.pid";
$logfile="/home/httpd/perl/logs/lonmemcached.log";
if (-e $pidfile) {
open(LFH,"$pidfile");
my $pide=<LFH>;
chomp($pide);
close(LFH);
if (kill 0 => $pide) { die "already running $pide"; }
}
if ($pid=fork()) { exit; }
open (PIDSAVE,">$pidfile");
print PIDSAVE "$$\n";
close(PIDSAVE);
if (-e '/usr/sbin/memcached') {
exec('/usr/sbin/memcached','-m','400','-v');
} elsif (-e '/usr/bin/memcached') {
exec('/usr/bin/memcached','-m','400','-v');
} else {
die("Unable to find memcached");
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>