{{tag>Brouillon Mon}}
= Ksar pour sysstat
Voir [[Notes sysstat]]
https://sourceforge.net/projects/ksar/
Voir aussi :
* tload (procps)
chmod +x run.sh
./run.sh -help
kSar version: 5.0.6
Usage:
-version: show kSar version number
-help: show this help
-input : argument must be either ssh://user@host/command or cmd://command or file://path/to/file or just /path/to/file
-graph : space separated list of graph you want to be outputed
-showCPUstacked: will make the CPU used graph as stacked
-showMEMstacked: will make the Memory graph as stacked (linux only)
-cpuFixedAxis: will graph CPU used with fixed axis from 0% to 100%
-showIntrListstacked : will make the Interrupt List graph as stacked
-showTrigger: will show trigger on graph (disabled by default)
-noEmptyDisk: will not export disk with no data
-tile: will tile window
-userPrefs: will use the userPrefs for outputing graphs (last export of this host)
-showOnlygraphName: will only print graph name available for that data (to be use for -graph)
-addHTML: will create an html page with PNG/JPG image
-outputPDF : output the pdf report to the pdf file
-outputPNG : output the graphs to PNG file using argument as base filename
-outputJPG : output the graphs to JPG file using argument as base filename
-outputCSV : output the CSV file
-width : make JPG/PNG with specified width size (default: 800)
-height : make JPG/PNG with specified height size (default: 600)
-startdate : will graph the range begining at that time
-enddate : will graph the range until that date
-solarisPagesize : will set solaris pagesize
-wizard: open with unified login popup
-replaceShortcut : replace all shortcut with those in the xml file
-addShortcut : add shortcut from the xml file
-startup: open window marked for opening at startup
Exemple de génération de PDF
KSAR="/opt/ksar/kSar-5.0.6/run.sh"
# /var/log/sysstat pour Debian
ALLFIC=$(echo /var/log/sa/sar*)
OUTPUT="/tmp/sar"
for FIC in $ALLFIC
do
$KSAR -input file://$FIC -noEmptyDisk -showTrigger -outputPDF $OUTPUT/$(basename $FIC).pdf
done
Pb
java.lang.NumberFormatException: For input string: "1,03"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
at java.lang.Float.valueOf(Float.java:417)
at java.lang.Float.(Float.java:519)
at net.atomique.ksar.Linux.Parser.parse(Parser.java:830)
at net.atomique.ksar.kSar.parse(kSar.java:750)
at net.atomique.ksar.FileRead.run(FileRead.java:62)
time to parse: 12ms number of line: 1 line/msec: 0.0
Solution
LANG=C sar -A -f /var/log/sysstat/sa20 > sar20.txt