Coder Social home page Coder Social logo

sargraph / sargraph.github.io Goto Github PK

View Code? Open in Web Editor NEW
161.0 10.0 32.0 6.38 MB

SARchart - An opensource version of the tool for viewing Unix SAR data as Charts/Graphs

Home Page: https://sargraph.github.io

License: GNU General Public License v3.0

HTML 0.58% JavaScript 1.80% Handlebars 96.83% Dockerfile 0.30% Just 0.48%
sar sarchart sargraph unix linux performance charts highcharts nodejs express

sargraph.github.io's Introduction

SARchart / SARgraph (System Activity Report chart/graph)

Hits Build Status

An Online/Offline Tool to view the server's SAR data as charts.

What is SARchart

SARchart is an online tool to view the performance of a Linux server using the SAR (System Activity Report) output in an impressive graphical chart layout.

Provides

This tool displays graphs for single day or multiple days to a server. Also provides information of Peak CPU/Load/Memory/IO in the dashboard. The tool helps you view the charts on CPU, Memory, Load, Run Queue, Swap usage, Processes, Contexts, Interrupts, Paging, Ethernet Devices, Interface traffic, Interface errors, NFS, Sockets etc. of a server in graphical layout.

Supports

  • Currently this tool supports the following OS:
    • Linux - RHEL/SuSE/Ubuntu
    • Solaris
    • AIX

Input

This tool expects the input of SAR extracts from the Unix/Linux servers. The SAR extracts depends on the sysstat package.

Sample Generated charts

Features

  • Client Interface We think data protection is important! No data is sent to the server. The magic happens in your browser. This tool uses native javascript and runs only on client browser.

  • Impressive Charts This tool displays the SAR file output into an impressive graphical chart layout. There is option to zoom in/out the chart, especially needed when data got narrowed down due to screen width.

  • Supports Multiple days input This tool can plot the charts for single day input as well as multiple days input to a server.

  • Export Charts This tool allows you to generate and download charts. This feature is not available in this standalone version. Please use the online version in the website.

How to use the tool

The steps involved in generating the SAR Graph are as follows:

  1. Create a SAR output as a text file from the Unix server.
  • Login as root or with sudo access run the following commands to fetch the sar output for a specific date. Example:
#LINUX
# Generate file for single day:
sar -A -f /var/log/sa/sa19 > /tmp/sa19_$(hostname).txt
# Generate file for multiple days files:
ls /var/log/sa/sa?? | xargs -i sar -A -f {} > /tmp/sar_$(uname -n).txt

# AIX
# Generate file for single day:
sar -A -f /var/adm/sa/sa23 > /tmp/sa23_$(uname -n).txt
# Generate file for multiple days files:
ls /var/adm/sa/sa?? | xargs -i sar -A -f {} > /tmp/sar_$(uname -n).txt

# SOLARIS
# Generate file for single day:
sar -A -f /var/log/sysstat/sa23 > /tmp/sa23_$(uname -n).txt
# Generate file for multiple days files:
ls /var/log/sysstat/sa?? | xargs -i sar -A -f {} > /tmp/sar_$(uname -n).txt
  1. Download the SAR text file to the desktop
  • Use any SCP software like Winscp or pscp to download the file from the server. I prefer pscp command to download the files from Unix server to the desktop. Example:
pscp suresh@hostname143:/tmp/sa19_hostname143.txt .
  1. Upload the SAR text file to this site.
  • Navigate on to the SARchart. Just click or drag your file to the upload section of the site.
  1. The site will create all the charts.
  • That's all folks! the charts are ready for viewing.
  • Kindly star this repository if you found this interesting.

OS Platform supported

  • Currently the output is tested in the following OS: Linux (RHEL/SuSE/Ubuntu), AIX, Solaris
  • Planning to include other OS in future

How to run this offline

  • Clone/Download this repository
  • Run npm install
  • npm start to run or npm run dev to run nodemon
  • The site will be available on default port 3000. http://localhost:3000/
  • Enjoy!

How to run this offline in Docker

  • Clone/Download this repository
docker build -t sarchart .
docker run -dp 3000:3000 sarchart
docker run -it sarchart bash
  • The site will be available on default port 3000. http://<docker-default-machine-ip>:3000/

Website Links

SAR Chart

Contributors

Author

Suresh Raju
copyright 2016 - 2023

sargraph.github.io's People

Contributors

dependabot[bot] avatar iamsureshraju avatar thimslugga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sargraph.github.io's Issues

Font Icons not loading properly

Font Icons not loading properly. The fonticons needs to localized to the webserver instead of loading from website directly.

sarchart thinks bread/s is zero when it isn't.

total-amount-of-data-rea
zz-sa07.txt

Aha! I see what it's doing wrong -- it doesn't know about dtps (discards/second) so it's got the columns shuffled over:

00:00:01 tps rtps wtps dtps bread/s bwrtn/s bdscd/s 00:05:01 2320.63 1173.76 1146.88 0.00 22881.72 17956.20 0.00 00:15:01 1796.06 1467.28 328.77 0.00 30624.19 6129.47 0.00 00:25:01 1396.10 1255.40 140.70 0.00 20632.76 1790.89 0.00 00:35:01 1390.50 1250.94 139.56 0.00 31099.70 2831.88 0.00 00:45:01 771.80 636.81 134.99 0.00 120398.78 1752.56 0.00 00:55:01 303.80 144.82 158.99 0.00 16727.99 1945.64 0.00 01:05:01 184.55 10.04 174.51 0.00 82.13 1786.43 0.00 01:15:01 220.62 14.92 205.70 0.00 210.37 2177.60 0.00 01:25:01 212.87 9.46 203.41 0.00 161.30 2057.72 0.00 01:35:01 134.80 4.34 130.47 0.00 35.16 1816.00 0.00

How to contribute ?

Hi, How I can run this locally. So that after doing changes and testing I can do git push.

How to export all graphs at once

Hi!

Maybe I missed something, but when using the "Export Report" -> Save button the generated PDF contains the CPU graphs only.
How to export all graphs at once?

Request to upload to npm registry

I'd like to package this software within Fedora Linux and it would be a lot easier to implement and maintain via automation if this was uploaded to the npm registry. Submitting this as a request to have it uploaded to the npm registry.

Devices graph for Solaris is not created

Thanks for the tool, it’s very useful.
I’d like to report that tool doesn't create Solaris graph for devices/disks.
Here is shortened example of Solaris 11.4 SAR report for disks:

SunOS host-name 5.11 11.4.17.3.0 sun4v  
08:00:00   device  	  %busy   avque   r+w/s  blks/s  avwait  avserv
08:20:00   iscsi0            0     0.0       0       0     0.0     0.0
           mpt_sas2          3     0.1       7     162     0.0    13.7
           mpt_sas3          0     0.0       8     162     0.0     2.0
           scsa2usb          0     0.0       0       0     0.0     0.0
           sd4.t2.m          3     0.1       7     175     0.0    14.1
           sd5.t1.m          1     0.0       8     173     0.0     2.3
           nfs1              0     0.0       0       0     0.0     0.0
           nfs2              0     0.0       0       0     0.0     0.0

The tool doesn’t read this and doesn’t produce the graph.

Required docker image for arm64 platform

Hi Team,

I am trying to use the sarchart image on the arm64 platform, but it seems docker image for both amd64 and arm64 are not available on dockerhub.

I have followed the below steps to build arm64 docker image for sargraph and then deployed the container on my arm64 instance on default port 3000.


docker build -t sarchart .  

docker run -dp 3000:3000 sarchart  

docker run -it sarchart bash  

I have used Travis-CI to build and push the image for both platforms.

Commit Link: odidev@a79a694

Travis-CI link: https://app.travis-ci.com/github/odidev/sargraph.github.io/builds/259532887

Docker Hub Link: https://hub.docker.com/repository/docker/odidev/sarchart/general

Do you have any plans on releasing images on dockerhub?

It will be very helpful if an arm64 image is available. If interested, I will raise a PR.

Feature Request - Add volume to Docker Image for access to sar files

Great product and thanks for your effort. Wondering if you would be open to adding an alternative browse and upload option for the docker container. Would like to be able to mount a host volume containing the sar export files to the container and browse the container file system to select the file.

Incorrect summarization for kilobytes received/send

Hi,

As you can see from the attached screenshot on Y axis the summarization is incorrect, it doesn't provide any indicator that those values are in thousands. A better improvement might be to calculate and show mbps data as that would be much useful.

Screenshot 2021-10-14 at 7 46 17 AM

Sarchart assume M/Y/D

Seems like sarchart assumes US date formats, it thinks there are many days between 06/06/23 and
07/06/23

Normalize Y axe in memory section.

Hi! Thanks a lot for this project. Is useful as hell and looks amazing.

It would be great if the Y axe in memory section were in Mb or Gb instead of k or millions. I tried to find this in the code but my node skill are awful.

BTW, I made a very simple Dockerfile to create a docker image. Ill PR as soon as posible.
Thanks!!

ReferenceError: proc is not defined and Solaris sysstat

Hello again,

I got this error with Solaris sa files : ReferenceError: proc is not defined
https://sarchart.dotsuresh.com/custom/sarchart-v4.3.min.js:1:1980

I wanted to test sar files from Solaris 5.8 and 5.10n since you don't list it as a compatible OS.
Here's 2 files.
sa17_server_sol5.8.txt
sa17_server_sol5.10.txt

Unrelated question, may i host your solution on an internal server ? I would like to make it able to fetch itself sar files when given the server (our servers don't have access to the net).
Code and copyright would be left unchanged, except for adding a box to put the targetted server name and fetching sar from it.

How to use files that are local sar file

Hi ! @iamsureshraju
I'm using it too well. Thank you for sharing a good tool.

I'd like to know how to use the file local to the Linux server, not to upload the files.

I think you need to change the js code.
Could you give me a brief guide?

Also, I would like to change the name of the file in the text box so that it works with the same logic as uploading the file. Will it be possible?

It is possible new functions?

Hi, thank you for tool, it is very helpful - keep up the great work!
Will it be possible to uploading a sar file using the curl post and is it possible to embed the graph in iframe?

No memory graphs created

The following was created on a Debian system with the sysstat cronjob enabled (and tuned to do its job every minute) and afterwards converted into the .txt file using the command in the Readme of this repo.

When uploading this file the memory bars stay empty.

There is a javascript error, maybe this is the root cause.

sarchart-v4.32.min.js:1 Uncaught TypeError: Cannot read property 'clientWidth' of null
    at v (sarchart-v4.32.min.js:1)
    at HTMLAnchorElement.<anonymous> (sarchart-v4.32.min.js:1)
    at HTMLAnchorElement.dispatch (jquery.min.js:2)
    at HTMLAnchorElement.y.handle (jquery.min.js:2)

Testfile:
report.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.