Ksar is a
BSD-licensed Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
-based application that creates graphs of all parameters from
data
In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpret ...
collected by
Unix sar utilities. Usually, Unix sar is part of
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
'
Sysstat
sysstat (''system statistics'') is a collection of performance monitoring tools for Linux. It is available on Unix and Unix-like operating systems.
Software included in sysstat package:
* sar Collect, report, or save system activity informa ...
package, and runs sa1, sa2, and sadc through
cron
The cron command-line utility is a job scheduler on Unix-like operating systems. Users who set up and maintain software environments use cron to schedule jobs (commands or shell scripts), also known as cron jobs, to run periodically at fixed ti ...
to created
data file
A data file is a computer file which stores data to be used by a computer application or system, including input and output data. A data file usually does not contain instructions or code to be executed (that is, a computer program).
Most of the ...
s in /var/log/sa/saNN. Characteristics include:
* Images can be zoomed by dragging the
mouse
A mouse ( : mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus' ...
on an image to pinpoint problems
* Results can be exported to
PDF
Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
or
JPEG
JPEG ( ) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and im ...
format
Syntax and options
Below is the list of
CLI CLI may refer to:
Computing
* Call Level Interface, an SQL database management API
* Command-line interface, of a computer program
* Command-line interpreter or command language interpreter; see List of command-line interpreters
* CLI (x86 instru ...
options supported by Ksar. Ksar's -help option will list all supported options of the applicable Ksar version.
$ java -jar kSar.jar -help
kSar version: 5.0.6
Usage:
-version: show kSar version number
-help: show this help
- input : argument
An argument is a statement or group of statements called premises intended to determine the degree of truth or acceptability of another statement called conclusion. Arguments can be studied from three main perspectives: the logical, the dialect ...
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 to be output
-showCPUstacked: will make the CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, an ...
used graph as stacked
-showMEMstacked: will make the memory graph as stacked (Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
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
A window is an opening in a wall, door, roof, or vehicle that allows the exchange of light and may also allow the passage of sound and sometimes air. Modern windows are usually glazed or covered in some other transparent or translucent mate ...
-userPrefs: will use the userPrefs for outputting 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
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
page with PNG/JPG
JPEG ( ) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image ...
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 beginning at that time
-enddate : will graph the range until that date
-solarisPagesize : will set solaris pagesize
- wizard: open with unified login
In computer security, logging in (or logging on, signing in, or signing on) is the process by which an individual gains access to a computer system by identifying and authenticating themselves. The user credentials are typically some form ...
popup
-replaceShortcut : replace all shortcuts with those in the .xml
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. ...
file
-addShortcut : add shortcut from the xml file
-startup: open window marked for opening at startup
A startup or start-up is a company or project undertaken by an entrepreneur to seek, develop, and validate a scalable business model. While entrepreneurship refers to all new businesses, including self-employment and businesses that never intend t ...
Generating SAR Text Files for Ksar Use
* To begin gathering sysstat history information for use of the sar command, systat should be configured to run through cron (preferably every minute). More instructions are available o
the systat web site
* Generating sar text file with all system resources information
*:
DT="10"
LC_ALL=C sar -A -f /var/log/sa/sa$DT > /tmp/sar-$(hostname)-$DT.txt
ls -l /tmp/sar-$(hostname)-$DT.txt
* Generating only disk information from a sar data file
*:(Note that sar will collect disk information only if sadc is running with -d option thru cron)
*:
DT="10"
LC_ALL=C sar -d -p -f /var/log/sa/sa$DT > /tmp/sar-$(hostname)-$DT.txt
ls -l /tmp/sar-$(hostname)-$DT.txt
* Generating a text file for multiple days
*:
DT="12 13 14"
>/tmp/sar-$(hostname)-multiple.txt
for i in $DT; do
LC_ALL=C sar -A -f /var/log/sa/sa$i >> /tmp/sar-$(hostname)-multiple.txt
done
ls -l /tmp/sar-$(hostname)-multiple.txt
For getting all the days in the default folder, you can replace the hardcoded DT variable with:
DT=$(ls /var/log/sa/sa -90-9] , sed 's_/var/log/sa/sa_ _g' , xargs)
See also
*
Sar (Unix)
System Activity Report (sar) is a Unix System V-derived system monitor command used to report on various system loads, including CPU activity, memory/paging, interrupts, device load, network and swap space utilization. Sar uses / proc filesys ...
External links
How to use ksar - cyberciti articleSourceforge Ksar Project Page
Job scheduling
Computer performance
System administration
BSD software