logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache Monitoring In Windows through Script
Author
arnabsaha



Joined: 20 Jan 2010
Posts: 3

PostPosted: Wed 27 Jan '10 8:31    Post subject: Apache Monitoring In Windows through Script Reply with quote

Hi,

I want to minitor the following Apache Information through script (VB script, Batch etc) Could anyoune please help me to get the same.

Server Version: Apache/2.2.14 (Win32)
Server Built: Sep 28 2009 22:41:08
Current Time: Wednesday, 27-Jan-2010 12:00:46 India Standard Time
Restart Time: Wednesday, 27-Jan-2010 09:27:29 India Standard Time
Parent Server Generation: 0
Server uptime: 2 hours 33 minutes 16 seconds
Total accesses: 1 - Total Traffic: 4 kB
.000109 requests/sec - 0 B/second - 4096 B/request
1 requests currently being processed, 63 idle workers

Thanks
Arnab Saha
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 27 Jan '10 11:16    Post subject: Reply with quote

This is the same as http://www.apachelounge.com/viewtopic.php?p=14872&highlight=#14872 Please do not double post!

Well as I wrote on your first topic. It is easy to use lynx.

Download lynx for windows

than the tiny batch script

Code:

@echo off
lynx -dump http://127.0.0.1/server-status


Easy, isn't it?
Back to top
arnabsaha



Joined: 20 Jan 2010
Posts: 3

PostPosted: Wed 27 Jan '10 14:23    Post subject: Apache Monitoring In Windows through Script Reply with quote

Thanks James, Very Happy

Now If i want only Active session from the Http://localhost/server-status then what parameter should i pass in Lynx?
Please help

Arnab Saha
Back to top
Brian White



Joined: 24 Aug 2008
Posts: 21

PostPosted: Fri 29 Jan '10 3:26    Post subject: Reply with quote

Whenever I need to do this, I use a regular expression to extract the scoreboard and another regular expression for an individual Apache scoreboard record.

The specific format of the regular expressions depends on whether or not extended status is enabled.

I typically write a quick C# program since the .NET framework is becoming ubiquitous. But its basically the same regular expression regardless of the language.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 03 Feb '10 12:46    Post subject: Reply with quote

Well I found something in PHP

http://www.phpclasses.org/browse/package/3613.html
Back to top


Reply to topic   Topic: Apache Monitoring In Windows through Script View previous topic :: View next topic
Post new topic   Forum Index -> Apache