sysstat sar provides ascendancy draw based monitoring data. Those who are novel or migrating from Windows or MAC together with used to the graphical output, it mightiness larn confusing together with boring. Hence the evolution of kSar sar grapher. kSar sar grapher is a graphing tool that tin graph for Linux, MAC together with Solaris sar outputs. Using KSar y'all tin output graphs to a pdf file. kSar sar grapher is developed past times Alexandre Cherif together with uses a BSD license for distribution.
kSar sar grapher is a coffee based application that graphs your sar data.
You tin charge information from 3 method :
- local file
- local ascendancy execution and
- remote ascendancy execution via SSH
kSar sar grapher supports the sar output of the next OS:
- Solaris 8, nine together with 10
- Mac OS/X 10.4+
- Linux (Systat Version >= 5.0.5)
- AIX (4.3 & 5.3)
- HPUX 11.00+
So let’s larn onto draw of piece of job organisation together with install kSar sar grapher.
Step 1: How to download ksar using wget?
kSar sar grapheris non available inwards Linux repositories. You bring the larn to the Sourceforge projection page together with download it manually.
Link: http://sourceforge.net/projects/ksar/
Run the next ascendancy to download it to whatsoever folder. I’ve downloaded it to my /root
directory. At the fourth dimension of writing this guide, kSar v 5.0.6
was available.
root@kali: # wget http://downloads.sourceforge.net/project/ksar/ksar/5.0.6/kSar-5.0.6.zip
Step 2: How to unpack kSar cypher file?
There’s no installation for kSar sar grapher. You only unpack it together with position inwards whatsoever directory. I prefer /opt
folder (opt = optional packages).
Run the next ascendancy to unzip kSar-5.0.6.zip
together with movement the extracted directory to /opt
folder.
root@kali: # unzip kSar-5.0.6.zip
root@kali: #
root@kali: # mv kSar-5.0.6 /opt/
root@kali: #
root@kali: # cd /opt/kSar-5.0.6/
Step 2.1: kSar dependencies together with requirements
kSar sar grapher got solely i dependency equally far I tin see. You only to install Java JDK on your machine. There are lot’s of guides on how to create that. Those who are Kali Linux used similar me should use this guide to install Java JDK.
Minimum Requirements:
- sysstat or SAR inwards the system
- JRE Version 1.5 or +
Step 3: How to run kSar?
By default the run.sh
file is non executable. You demand to chmod +x
it.
root@kali:/opt/kSar-5.0.6/# ls
root@kali:/opt/kSar-5.0.6/#
root@kali:/opt/kSar-5.0.6/# chmod +x run.sh
root@kali:/opt/kSar-5.0.6/#
root@kali:/opt/kSar-5.0.6/# ./run.sh
Once kSar is running, travel out the lastly open, if y'all unopen the lastly kSar volition unopen too.
Step 4: How to generate graphs using kSar?
As I’ve mentioned before, y'all tin generate sar graphs using kSar from 3 dissimilar inputs:
- Local text file
- Remote ascendancy execution via SSH and
- Local ascendancy execution.
Let’s larn through them all.
Step 4.1 How to generate graphs using kSar from local text file?
Run the next ascendancy to generate a sar file that volition live used inwards kSar sar grapher.
First, y'all demand to select handgrip of sar ascendancy statistics. Type the next ascendancy to larn stats, larn inwards (type it on your server):
root@kali: # LC_ALL=C sar -A > /root/sar.data.txt
I’ve saved this file inwards my /root
directory.
In kSar, click on Data
> Load from text file
option.
Browse to /root
folder together with opened upwards sar.data.txt
file.
Now double click on kSar icon
(it changes when the file is loaded) together with select Processes
. Click on each options (memory, swap, page etc.). You should live able to drag your mouse to zoom inwards or out.
Step 4.2 How to generate graphs using kSar via Launch SSH command?
What SSH ascendancy does is it allows y'all to connect to whatsoever auto that is running a SSH server together with sentiment together with generate SAR graphs remotely or locally is realtime. There’s 2 pace to this option:
- You connect to a auto via SSH
- You run a SAR ascendancy which together with hence collects data.
In kSar
, click on Data
> Launch SSH command
.
On the adjacent popup window, it should come upwards up a SSH connexion popup.
In my instance I am only going to login to localhost (which is ain machine). If y'all know IP address for a remote host (a remote host tin live anything from a Linux machine, Webserver, Solaris machine) running SAR. In my instance I only press YES
.
Next window asks me if I am to trust the authenticity telephone substitution for the host. Because it’s my OWN machines, I am going to press YES
.
If y'all are non able to connect, via SSH command, that only agency next following 3 things:
- The remote server does non bring SSH server enabled
- You are non allowed
- A Firewall is blocking connection
In instance it’s your local machine, y'all MUST install together with enable openssh-server on your local machine.
Next popup should inquire y'all for your password. Type inwards the right password together with press OK
.
On the adjacent popup window, it should come upwards up with SAR -A
command past times default. Press OK
now.
Give it a few minutes together with y'all should run across the graphs are loaded.
Step 4.3 How to generate graphs using kSar using local SSH command?
For Step 4.2 I’ve used root@localhost which logs on to my ain machine. If y'all are actually going to sentiment your ain machines graphs only, together with hence Running Local ascendancy is the amend together with faster way. It allows y'all to sentiment your ain workstations SAR graphs inwards a squeamish together with slow to sympathise graphical interface.
In kSar
, click on Data
> Run Local command
.
On the adjacent popup window, it should come upwards up with SAR -A
command past times default. Press OK
now.
Give it a few minutes together with y'all should run across the graphs are loaded.
How to zoom inwards together with out on kSar graphs?
If y'all drag your mouse on the graphs, y'all tin zoom on that portion of it. To unzoom, create the drag your mouse to the contrary direction. Another mode is to right click together with select zoom.
Command specific to kSar:
Running kSar GUI:
You tin run the GUI amongst four ways:
- GUI solely :
java -jar kSar-x.x.x.jar
- GUI default information grabbing :
java -jar kSar-x.x.x.jar -startup
- GUI amongst the “
one login for all
” utilisation :java -jar kSar-x.x.x.jar -wizard
- GUI together with collect :
java -jar kSar-x.x.x.jar -input 'ssh:// or file:// or cmd://'
- eg. :
java -jar kSar-x.x.x.jar -input 'cmd:///usr/bin/sar -f /tmp/mysar.file'
- eg. :
Running kSar from ascendancy line
To run kSar sar grapher on the ascendancy line, y'all MUST specify input together with output argument:
example: java -jar kSar-x.x.x.jar -input 'file:///var/log/sa/sarXX' -outputPDF today.pdf
kSar help
To show kSar sar grapher assist menu/instructions
java -jar kSar-x.x.x.jar -help
Using shortcut XML
You tin brand template of information collection via XML (see contrib/shortcut.xml
). This shortcut tin live opened upwards amongst (-startup
or -wizard cf
. upper)
Replace electrical current shortcut
java -jar kSar-x.x.x.jar -replaceShortcut newxml_shortcut_file.xml
Add some shortcut
java -jar kSar-x.x.x.jar -addShortcut newxml_shortcut_file.xml
ADMIN commands:
Clear all the preferences on kSar sar grapher
java -jar kSar-x.x.x.jar -ClearAllPrefs
That’s it. Thanks for reading. Please share.
References together with assist doco
- sysstat (sar): http://sebastien.godard.pagesperso-orange.fr/]
- ksar: http://sourceforge.net/projects/ksar/
- Howtoforge: http://www.howtoforge.com/system-monitoring-with-sar-and-ksar
- Cyberciti: http://www.cyberciti.biz/tips/identifying-linux-bottlenecks-sar-graphs-with-ksar.html
- Debian: http://www.debian.org/
- Ubuntu: http://www.ubuntu.com/
- CentOS: http://www.centos.org/
- Gentoo: http://www.gentoo.org/