Generating graphs using ksar utility from sar output files.
The sar command collect, report, or save UNIX / Linux system activity information. It will save selected counters in the operating system to the /var/log/sa/sadd file. From the collected data, you get lots of information about your server:
1. CPU utilization
2. Memory paging and its utilization
3. Network I/O, and transfer statistics
4. Process creation activity
5. All block devices activity
6. Interrupts/sec etc.
sar output can be used for identifying server bottlenecks. However, analyzing information provided by sar can be difficult, so use kSar, which can take sar output and plot a nice easy to understand graph over period of time.
kSar which is a java application that graph your sar data. It also permit to export data to PDF/JPG/PNG/CSV. You can load data from three method : local file, local command execution, and remote command execution via SSH. kSar supports the sar output of the following OS:
1. Solaris 8, 9 and 10
2. Mac OS/X 10.4+
3. Linux (Systat Version >= 5.0.5)
4. AIX (4.3 & 5.3)
5. HPUX 11.00+
Download And Install kSar
Visit the official website and grab the latest source code. Use wget to download the source code, enter:
$ wget http://ksar.atomique.net/kSar/kSar-5.0.6.zip
Use unzip command to extract files, enter:
$ unzip kSar-5.0.6.zip
How Do I Run kSar?
Make sure JAVA jdk is installed and working correctly. Type the following command to start kSar, run:
$ cd kSar-5.0.6/
$ sh run.sh
Next you will see main kSar window, and menus with two panels.
The left one will have a list of graphs available depending on the data kSar has parsed. The right window will show you the graph you have selected.
How Do I Generate sar Graphs Using kSar?
First, you need to grab sar command statistics. Type the following command to get stats, enter (type it on your server):
[server1 ]# LC_ALL=C sar -A > /tmp/sar.data.txt
# copy file to local desktop
[desktop ]$ scp user@server1.nixcraft.com:/tmp/sar.data.txt /tmp
Click on Data > Load data from text file > Select sar.data.txt > Open button.
Now, the graph type tree is deployed in left pane and a graph has been selected.
Zoom in and out
Using the move, you can interactively zoom onto up a part of a graph. To select a zone to zoom, click on the upper left conner and while still holding the mouse but on move to the lower-right of the zone you want to zoom. To come back to unzoomed view click and drag the mouse to any corner location except a lower-right one. You can also right click and select zoom options
Understanding kSar Graphs And sar Data
I strongly recommend reading sar and sadf command man page:
$ man sar
$ man sadf
kSar graphs can be understood from the sar command man page.
Note:
====
We can generate ksar graphs for selected date range and selected time interval.
1. CPU utilization
2. Memory paging and its utilization
3. Network I/O, and transfer statistics
4. Process creation activity
5. All block devices activity
6. Interrupts/sec etc.
sar output can be used for identifying server bottlenecks. However, analyzing information provided by sar can be difficult, so use kSar, which can take sar output and plot a nice easy to understand graph over period of time.
kSar which is a java application that graph your sar data. It also permit to export data to PDF/JPG/PNG/CSV. You can load data from three method : local file, local command execution, and remote command execution via SSH. kSar supports the sar output of the following OS:
1. Solaris 8, 9 and 10
2. Mac OS/X 10.4+
3. Linux (Systat Version >= 5.0.5)
4. AIX (4.3 & 5.3)
5. HPUX 11.00+
Download And Install kSar
Visit the official website and grab the latest source code. Use wget to download the source code, enter:
$ wget http://ksar.atomique.net/kSar/kSar-5.0.6.zip
Use unzip command to extract files, enter:
$ unzip kSar-5.0.6.zip
How Do I Run kSar?
Make sure JAVA jdk is installed and working correctly. Type the following command to start kSar, run:
$ cd kSar-5.0.6/
$ sh run.sh
Next you will see main kSar window, and menus with two panels.
The left one will have a list of graphs available depending on the data kSar has parsed. The right window will show you the graph you have selected.
How Do I Generate sar Graphs Using kSar?
First, you need to grab sar command statistics. Type the following command to get stats, enter (type it on your server):
[server1 ]# LC_ALL=C sar -A > /tmp/sar.data.txt
# copy file to local desktop
[desktop ]$ scp user@server1.nixcraft.com:/tmp/sar.data.txt /tmp
Click on Data > Load data from text file > Select sar.data.txt > Open button.
Now, the graph type tree is deployed in left pane and a graph has been selected.
Zoom in and out
Using the move, you can interactively zoom onto up a part of a graph. To select a zone to zoom, click on the upper left conner and while still holding the mouse but on move to the lower-right of the zone you want to zoom. To come back to unzoomed view click and drag the mouse to any corner location except a lower-right one. You can also right click and select zoom options
Understanding kSar Graphs And sar Data
I strongly recommend reading sar and sadf command man page:
$ man sar
$ man sadf
kSar graphs can be understood from the sar command man page.
Note:
====
We can generate ksar graphs for selected date range and selected time interval.
Comments
Thanks