Monitoring Graphs using GNUPLOT


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Monitoring Graphs using GNUPLOT
# 1  
Old 12-29-2014
Code Monitoring Graphs using GNUPLOT

Need assistance in getting a monitoring script to create Grpahs Using GNUPLOT using below data.

Graph for CPU, MEMORY , NETWORK in png. For memory can we convert the GB TO MB

Code:
----system---- ----total-cpu-usage---- ------memory-usage----- -net/total-
     time     |usr sys idl wai hiq siq| used  buff  cach  free| recv  send
29-12 16:03:20|  0   1  98   0   0   0|15.5G 1396M 44.0G 2209M|   0     0
29-12 16:04:20|  0   0  99   0   0   0|15.5G 1396M 44.1G 2138M|1953k 5639k
29-12 16:05:20|  0   0  99   0   0   0|15.5G 1396M 44.0G 2235M|2223k 5589k
29-12 16:06:20|  0   0  99   0   0   0|15.5G 1396M 44.0G 2201M|1519k 5764k

# 2  
Old 12-29-2014
It can help to follow examples like this one...

A collection of Gnuplot examples | alvinalexander.com


# 3  
Old 12-29-2014
Can you guide me on how I can convert a Kb to MB using gnuplot example and creat a graph with the below data .

Code:
29-12 20:19:48 14995353600.0 1415991296.0 49501515776.0 1763774464.0
29-12 20:19:49 14996996096.0 1415991296.0 49503875072.0 1759772672.0
29-12 20:19:50 15169667072.0 1415979008.0 49490980864.0 1600008192.0
29-12 20:19:51 14989484032.0 1415979008.0 49485000704.0 1786171392.0

I couldn't get much help by reading the article blackrageous
# 4  
Old 12-30-2014
This might get you started - note that your label field (#1) contains a space so it's best to use tab for field separator.

Code:
#!/usr/bin/gnuplot

set terminal png size 1024,768
set output 'graph.png'
set title "System monitoring"

set style data histogram
set style histogram cluster gap 1
set style fill solid border -1
set boxwidth 0.75 
set xtic scale 0
set key outside

set ylabel "MB"
set key left
set datafile separator "\t"

plot 'datafile' using ($2/1e6):xtic(1) title "Memory" fc rgb '#99ffff', \
     'datafile' using ($3/1e6)         title "Buffer" fc rgb '#4671d5', \
     'datafile' using ($4/1e6)         title "Cache"  fc rgb '#06d075', \
     'datafile' using ($5/1e6)         title "Free"   fc rgb '#4f4f4f'

Result:

Image
This User Gave Thanks to Chubler_XL For This Post:
# 5  
Old 01-05-2015
Chubler_XL thank you for the excellent grpah . It works.

Instead of bars can we also have a wave graph
# 6  
Old 01-05-2015
You can have whatever you want. Gnuplot has thousands of options, see examples here. Fiddle until you find the combination you want.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Do not show graphs cacti

hi installed caci and Snmp connection is established 10.10 (192.168.10.10) SNMP Information System:Hardware: Intel64 Family 6 Model 23 Stepping 6 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7601 Multiprocessor Free) Uptime: 7550665 (0 days,... (2 Replies)
Discussion started by: mnnn
2 Replies

2. Shell Programming and Scripting

Generating graphs for many number of files

Hi, I have a series of data files for which I wish to plot using "splot". Say, the files names are like: 950_data,951_data,952_data,......1000_data. For one file , say to plot 950_data, i write following lines into a single file and load it in the gnuplot as : gnuplot> load 'plot' ... (6 Replies)
Discussion started by: begin_shell
6 Replies

3. Programming

Help with Graphs (BFS mostly)

Okay so I posted a thread about my project before, how I need to create generated word ladders and all that. Now I am to the point where I need to create a method which will find the shortests path between a start word and an end word. For example: startWord: Head endWord: Feet And then a... (3 Replies)
Discussion started by: SilvarHawke
3 Replies

4. Programming

Creating area graphs in jqplot

How can area graphs be created in jqplot? Example can be seen here: dygraphs JavaScript Visualization Library In the example the line graphs and the grid are superimposed on the area graphs. I dont think it is supported out of the box for jqplot. I would normally do this with a double fill: -... (0 Replies)
Discussion started by: figaro
0 Replies

5. Post Here to Contact Site Administrators and Moderators

Suggestion: visitor graphs

Perhaps we could think of visitor graphs that would give a sense of both the popularity of the forum and - more importantly - the popularity of Linux and the Open Source operating systems movement. Something similar to what sourceforge has done for their projects: SourceForge.net: Project... (2 Replies)
Discussion started by: figaro
2 Replies

6. UNIX for Dummies Questions & Answers

multiple graphs on same window

Hi All, I have written a script to get live data after 5 minutes from a remote system and then plot the graph using gnuplot.All this has been working correctly with only one problem where i need to pull all these graphs into one page.I am not able to get this working.I tried reading about... (1 Reply)
Discussion started by: pistachio
1 Replies

7. UNIX for Dummies Questions & Answers

CPU graphs in unix

Hi, How to get the CPU graphs to see the performance? I use Linux version. I got some commands in the net. xload and xosview. It's mentioned like below: To start xload, simply open an xterminal on the system and type the following: $ xload &Couple of doubts here .. what is... (0 Replies)
Discussion started by: venkatesht
0 Replies

8. Shell Programming and Scripting

Creating graphs

Platform: solaris 9 x86 I want to be able to create excel like line graphs with basic input data and use it on a webpage or worst case so I can use it to insert to a document type of input file I would have, example below datainput.txt: date,requests,failures,success 20100501,80,10,70... (5 Replies)
Discussion started by: frustrated1
5 Replies
Login or Register to Ask a Question