kSar can't read sarNN files on Fedora 20 or RHEL 6.5
Status: Beta
Brought to you by:
xcherif
I'm running fedora 20 and RHEL 6.5. The Fedora sar files generated by sa2 all have lines starting with '12:00:00 AM' (date does not appear) and kSar pukes on reading them. If I use 'LC_ALL=C' in the sa2 command line on fedora, the lines are all prefaced with '00:00:00' (the hour/min/sec) without 'AM' (the same as RHEL without the LC_ALL).
kSar still pukes. What must be done for this tool to be able to parse the files?
Note that sa2 is a shell script. I'm a guru. Tell me what kSar needs and I can provide it, but it's worthless if it won't even read the input data.......
thanks.
/Bill
If someone could provide an example of the expected sar text file format I might be able to work with that. Can anyone help here? gnuplot is not nearly as nice as kSar seems to be - if I could get it working, that is.
FYI, looks like only the 'beta4' 5.1 is broken this way. Also FYI, I had to remove the 'kbhugfree kbhugused %hugused' section as it was not recognized (I don't use Huge Pages so no loss there).
Hello,
I just came on this and spent some time to check.
It seems strange nobody gave feedback. Perhaps some other tools than sar are being used now...?
Anyway I find this kind of sed conversions are working to get the file generated on Oracle Linux 6.6 then correctly parsed by kSar 5.0.6
Suppose original file is sar20
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cp sar20 sar20_new
AM 01-11
for string in AM
do
for i in $(seq -w 01 11)
do
sed -i -r "s/^${i}(\:[0-9]+\:[0-9]+) ${string}/${i}\1 /" sar20_new
done
done
AM 12
for string in AM
do
for i in 12
do
sed -i -r "s/^${i}(\:[0-9]+\:[0-9]+) ${string}/00\1 /" sar20_new
done
done
PM 01-11
for string in PM
do
for i in $(seq -w 01 11)
do
j=$(expr $i + 12)
sed -i -r "s/^${i}(\:[0-9]+\:[0-9]+) ${string}/${j}\1 /" sar20_new
done
done
PM 12
for string in PM
do
for i in 12
do
sed -i -r "s/^${i}(\:[0-9]+\:[0-9]+) ${string}/12\1 /" sar20_new
done
done
java -jar /home/g.cecchi/kSar-5.0.6/kSar.jar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And then load from text file sar20_new
I correctly see the graphs.
I need yet to crosscheck better if text values match the graph but a preliminary check seems ok.
So we can check OS version and depending on it we can provide a pre-transformed temporary file and have the jar work on it instead that on the original one...
Can anyone check and let me know if it works for him/her too?
Gianluca