Home: Perl Programming Help: Beginner:
Perl basic help needed



alexmahmood
New User

Aug 19, 2008, 5:31 PM


Views: 532
Perl basic help needed

The soruce is the url to get the status of the server page
Output is as following between lines
------------------------------------------------------------------------------------------
Apache Server Status for test01

Server Version: IBM_HTTP_Server
Server Built: Apr 7 2003 13:38:46

Current Time: Tuesday, 19-Aug-2008 16:11:09 EDT
Restart Time: Sunday, 17-Aug-2008 07:44:21 EDT
Parent Server Generation: 0
Server uptime: 2 days 8 hours 26 minutes 48 seconds
Total accesses: 980721 - Total Traffic: 3.9 GB
CPU Usage: u25654.1 s5329.57 cu0 cs0 - 15.2% CPU load
4.83 requests/sec - 20.2 kB/second - 4285 B/request
6 requests currently being processed, 69 idle workers

------------------------------------------------------------------------------------------
I can get above output in variable

I want to grab the underline values in 4 variables and print those on screen
For example
cpu=25654.1
requests_per_sec=4.83
current_requests=6
idle_workers=69



TIA
Alex