Ask a Question related to Linux / Unix Administration, Design and Development.
-
Brian Bouchard #1
admin newbie seeking script assistance
I just recently joined a group of system administrators, after working
for about 5 years in programming on OS/390.
I have been asked to write a perl script to monitor httpd daemons over
time, initially worried about the Size field in a ps -efl
I started working on this by isolating what I wanted to look for with
the following command:
ps -efl | grep "httpd -k start"
which seems to be getting what I wanted, but while I was getting this
started, it occurred to me, there must be a billion other similar
scripts out there as to what I am about to start writing.
Does anyone have anything like this? I realize it would actually be a
good learning for me to start this from scratch, but the script is
needed ASAP for aid in troubleshooting some production problems, and I
would rather not have to do this from scratch if someone else has
something that would work for our purposes and is relatively simple so
I could modify as needed.
Credit would be given to whomever helped me out. I'm not looking to
impress anyone by getting it done faster than anticipated... I just
want to have something soon so the guys working on the problem aren't
being held up by me trying to learn the ins and outs of a new
language/system.
Any and all help is appreciated
Brian Bouchard Guest
-
Newbie in need of desparate assistance
Did you ever work through this? Write back if its still a problem. Cheers, Davo -
seeking modem script for cdma cell phone
If anyone has a modem script that will work with the LG VX4400, or a pointer to such a script, please post here. If you have a script for some... -
newbie seeking opinion
"tnhoe" <tnhoe@pc.jaring.my> wrote in news:bj3qa2$58b$2@news5.jaring.my: Whatever you're most comfortable with ... I use Homesite5 or Topstyle... -
PHP Newbie needs assistance to highlight a specific item in a framewindow
While I am technically capable, having worked with COBOL and perl extensively (but not at the same time <g>!), I am a newbie to PHP. I have the... -
newbie seeking guidance
John, I've worked with someone who was new to .NET and the web. And here is my experience. Wether you choose VB or Csharp is not really a big... -
Dave Hinz #2
Re: admin newbie seeking script assistance
On 2 Aug 2004 09:05:46 -0700, Brian Bouchard <bbouch@mcio.org> wrote:
Well, I'd actually suggest using something like wget, lynx, or curl to> I just recently joined a group of system administrators, after working
> for about 5 years in programming on OS/390.
>
> I have been asked to write a perl script to monitor httpd daemons over
> time, initially worried about the Size field in a ps -efl
fetch the http served by the webserver, rather than the output of ps.
You can have processes that have gone stupid and still show up in
ps, but not be actually doing anything useful.
Yup. Depending on what other things you want to do, you might consider> ps -efl | grep "httpd -k start"
>
> which seems to be getting what I wanted, but while I was getting this
> started, it occurred to me, there must be a billion other similar
> scripts out there as to what I am about to start writing.
using a program that's already written and spend your time adapting
it. Big Brother comes to mind - [url]http://bb4.org/[/url]
In that case, definately look at BigBrother. About a half day to install> Does anyone have anything like this? I realize it would actually be a
> good learning for me to start this from scratch, but the script is
> needed ASAP for aid in troubleshooting some production problems, and I
> would rather not have to do this from scratch if someone else has
> something that would work for our purposes and is relatively simple so
> I could modify as needed.
and config, assuming you have access to compilers.
It'll be good to write a script well and quickly, maybe setting up a system> Credit would be given to whomever helped me out. I'm not looking to
> impress anyone by getting it done faster than anticipated... I just
> want to have something soon so the guys working on the problem aren't
> being held up by me trying to learn the ins and outs of a new
> language/system.
that can be extended for more than just that purpose would be even more
helpful to your organization and your reputation. Worth considering,
anyway. But, if you want to roll your own, condider the wget, curl, or
lynx approach rather than the ps approach.
Dave Hinz
Dave Hinz Guest
-
Michael Heiming #3
Re: admin newbie seeking script assistance
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message
In comp.unix.admin Brian Bouchard <bbouch@mcio.org> suggested:
[..]
Perl might be OTT for that.> I have been asked to write a perl script to monitor httpd daemons over
> time, initially worried about the Size field in a ps -efl
> I started working on this by isolating what I wanted to look for with
> the following command:ps -C httpd > /dev/null && echo "apache up" || echo "no apache"> ps -efl | grep "httpd -k start"
Should AFAIK work with a UNIX95 compliant ps in bash/ksh. Adjust
to your needs.
--
Michael Heiming (GPG-Key ID: 0xEDD27B94)
mail: echo [email]zvpunry@urvzvat.qr[/email] | perl -pe 'y/a-z/n-za-m/'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBDng1AkPEju3Se5QRAvCVAKCQWEzYgPhjZsdSbAD6qF JDoyIpvwCdGHZB
4lvw9S2PWmzwPOeifYdPQTU=
=zIe4
-----END PGP SIGNATURE-----
Michael Heiming Guest



Reply With Quote

