|
Mailing Lists
|
Home /
Groups /
ColdFusion Linux (CF-Linux)
Bash script cfmonitor sh
Author: Wil Genovese
Short Link: http://www.houseoffusion.com/groups/cf-linux/thread.cfm/threadid:1072#4345
Just so people know I am responding to requests and sending the script
to peoples private emails as they ask. Also note that this is just for
CFMX 7.0x and is tested with the standard server installation.
Cheers,
--
Wil Genovese
One man with courage makes a majority.
-Andrew Jackson
A fine is a tax for doing wrong. A tax is a fine for doing well.
Author: Leon Oosterwijk
Short Link: http://www.houseoffusion.com/groups/cf-linux/thread.cfm/threadid:1072#4344
All,
I don't have the script you asked for, but we also use a script to get
the memory status of our jrun instances. we feed this into snmp which
allows us to graph it over time using cacti. Here's the juicy part:
<snip>
#!/bin/bash
tail -n 1 /opt/jrun4/logs/instancename-metrics.log | cut -d"=" -f 2,3 |
perl -e'
$input = <STDIN>;
if ($input =~ m/.*?(\d+).+?(\d+).*/g)
{print $1-$2 . "\n";
}'
</snip>
On Jun 1, 2007 4:23 AM, Wil Genovese <juggler@visi.com> wrote:
> I've already done this. My bash script does two things. It checks a
> specified URL for a certain string to see if CF is still responsive
> and it also calls a cf script which reports back an integer that is
> the amount of free JVM memory left.
>
>
Ooh - I'd love a copy of this!
--
mac jordan
www.webhorus.net
www.nibblous.com
www.photocena.com
Author: mac jordan
Short Link: http://www.houseoffusion.com/groups/cf-linux/thread.cfm/threadid:1072#4343
On Jun 1, 2007 4:23 AM, Wil Genovese <juggler@visi.com> wrote:
> I've already done this. My bash script does two things. It checks a
> specified URL for a certain string to see if CF is still responsive and
> it also calls a cf script which reports back an integer that is the
> amount of free JVM memory left.
>
>
Ooh - I'd love a copy of this!
--
mac jordan
www.webhorus.net
www.nibblous.com
www.photocena.com
Author: Matthew Scalf
Short Link: http://www.houseoffusion.com/groups/cf-linux/thread.cfm/threadid:1072#4342
What would it take to get a copy of this script?
Author: Matthew Scalf
Short Link: http://www.houseoffusion.com/groups/cf-linux/thread.cfm/threadid:1072#4341
Can I get a copy of this?
----- Excess quoted text cut - see Original Post for more -----
Author: Wil Genovese
Short Link: http://www.houseoffusion.com/groups/cf-linux/thread.cfm/threadid:1072#4313
I've already done this. My bash script does two things. It checks a
specified URL for a certain string to see if CF is still responsive and
it also calls a cf script which reports back an integer that is the
amount of free JVM memory left.
If a hang situation is detected the script will pause for a specified
amount of time and try again. If the second attempt fails then it
issues a restart command. I've also scripted a way to perform automatic
stack dumps (it can even find the proper PID on it's own) when when a
hang situation is detected. This way you can go into your logs and try
to figure out what went wrong.
If your JVM memory usage creeps up and is causing unresponsive behavior
this script will also record the memory usage when memory reaches a
threshold that you set. It can also restart CF if the low memory
reaches a second threshold that you set.
The script also logs everything into it's own log file in /var/logs/ so
you can track actions taken by the script.
The reason I wrote this was that when we migrated from CF5 to CFMX 7 the
code base was so bad this was the only way to keep the server running.
It took me months to track down all the bugs and bad queries to get the
code stable. This is what can happen when there is no version control,
ten years of development, hacking and re-hacking by so many different
programmers that the owner can't name them all. Now we have SVN, good
programmers and a bug hound (me).
Email me and I can send you a generic copy.
--
Wil Genovese (The Juggler)
One man with courage makes a majority.
-Andrew Jackson
A fine is a tax for doing wrong. A tax is a fine for doing well.
|
May 23, 2012
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||