I'm going to do some parsing of large SAR files and I'd like to use PHP
to do it so it's more of an automated process as far as logging this
type of info. Does anyone have any suggestions as far as how to go about
doing this? The real question I suppose is how could I parse this type
of output into something I could use to make a graph.

Example:
12:20:00 PM       CPU     %user     %nice   %system     %idle
12:30:00 PM       all      2.17      0.79      0.77     96.27
12:40:00 PM       all      5.11      0.29      0.97     93.63
12:50:00 PM       all      2.80      0.28      0.75     96.17
01:00:00 PM       all      2.16      0.81      0.81     96.22
01:10:00 PM       all      2.26      0.77      0.87     96.10
01:20:00 PM       all      2.02      0.75      0.76     96.47
01:30:00 PM       all      3.31      0.28      0.67     95.74
01:40:00 PM       all      2.05      0.00      0.44     97.51
01:50:00 PM       all      3.32      0.00      0.66     96.02
02:00:00 PM       all      4.04      0.00      0.64     95.32
02:10:00 PM       all      1.54      0.00      0.33     98.14
02:20:00 PM       all      3.81      0.00      0.59     95.61
02:30:00 PM       all      5.41      0.00      1.12     93.46
02:40:00 PM       all      5.86      0.00      1.09     93.05
02:50:00 PM       all      6.82      0.00      1.18     92.00
03:00:00 PM       all      7.48      0.00      1.32     91.20
03:10:00 PM       all      2.79      0.00      0.91     96.30
03:20:00 PM       all      3.94      0.00      1.26     94.81
03:30:00 PM       all      4.72      0.00      1.15     94.13
03:40:00 PM       all      4.22      0.00      1.28     94.51
03:50:00 PM       all      3.57      1.12      1.45     93.86
04:00:00 PM       all      3.21      0.87      1.31     94.61
04:10:00 PM       all      3.18      0.96      1.35     94.51
04:20:00 PM       all      3.53      0.96      1.39     94.12
04:30:00 PM       all      2.80      0.90      1.30     95.00
04:40:00 PM       all      3.42      1.06      1.38     94.14
04:50:00 PM       all      9.03      0.00      1.77     89.20
05:00:00 PM       all      4.41      0.23      1.40     93.97
05:10:00 PM       all      4.84      0.19      1.31     93.66
05:20:00 PM       all      9.81      0.00      1.65     88.54
Average:          all      2.28      0.60      0.71     96.40

I was thinking of possibly creating a php SAR parsing library that would
put this data into a database(postgres, oracle, or mysql), and then use
something like JPGraph to pull the data out of the DB and then display
it. Problem is I'm not sure how to go about breaking up the rows to
allow them to be inserted into the db. Thanks in advance for any ideas. 

-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-698-7250
email: [EMAIL PROTECTED]

"It is the part of a good shepherd to shear his flock, not to skin it."
Latin Proverb

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to