Firstly your going to need to collect hourly usage data into a datafile, cron is probably the best way perhaps something like this:
Code:
for filesystem in var usr tmp
do
df -Pm /$filesystem | awk -v d=$(date date '+%Y/%m/%d %T') 'NR==2{print d,$3,$4}' OFS="\t" >> /usr/lib/${filesystem}_disk_data
done
Once you have your data you can use gnuplot to produce the grap, below is an example for the var datafile:
Code:
#!/usr/bin/gnuplot
set terminal png font "helvetica"
set output 'var_graph.png'
# For pdf output (requires ps2pdf) replace with below
# set terminal postscript landscape color
# set output '| ps2pdf - var_usage.pdf'
set title "Var filesystem usage over Time"
set timestamp "Last updated: %m/%d/%Y, %H:%M" top
set xlabel "Date (mm/yy)"
set timefmt "%Y/%m/%d %H:%M"
set xdata time
set format x "%m/%Y"
set ylabel "GB"
set yrange [ 0 : ]
set key left
set grid
set datafile separator "\t"
show variables
plot '/usr/lib/var_disk_data' using 1:2 t 'Used' with lines
Hi, I am a beginner using UNIX, and was wondering how to use gnuplot from UNIX on my pc. I am connected remotely to my work's UNIX server using Secure Shell Client, and gnuplot won't open a new window when I use the plot command. How do I do this?
Moreover, is it possible to save things from the... (0 Replies)
Hi,
I am trying to make a plot of an ASCII file using GNUplot, but I keep getting error msg:
for example plot filename.txt
It says that (.txt ) is not identified ... I tried to write it without the .txt part, but I also get the error msg.
Any idea why? :confused: (1 Reply)
Hi All,
Seems I have an xargs stdin problem that I don't understand.
I have a script (call it myscript.sh) that takes the names of one or more file(s) specified on the command line and creates a single gnuplot command file containing multiple records, one for each specified file. Each of... (9 Replies)
Hi
I can't figure out why i get the "unexpected end of file".
#! /bin/bash
for file1 in /figures/*; do
gnuplot << EOF
set terminal postscript eps color enhanced
set output "$file1.eps"
set bar 1.000000
... (2 Replies)
Dear All,
I am new to GNUPLOT :D and dont know how it works, but actually there is a LINUX script generated by me which is running & capturing data in real time, the problem is that i want to plot that data in real time using GNUPLOT.:confused:
please help.:wall: (5 Replies)
I would like to ask if I have already plot a graph using gnuplot, the setting(made by others) is in "gnuplot.defaults":
gnuplot> load '<ParadisDir>/inputs/gnuplot.defaults'
gnuplot> splot 'box.in' with lines, '0t0001' w lines
How to transform it to bmp file? (or other types of pictures?)
... (2 Replies)
Hi!
i want to print ot my data of the last seven days with gnuplot.
in a script i put my gnuplot-script and at the top i generate my date-variable.
#/bin/bash -e
# Gnuplot script "API_Status.txt"
# set terminal postscript color landscape dl 2 lw 2 'Helvetica' 15 ;
# set output... (2 Replies)
Hello
I have a text file with tens of thousands of rows
The format is
x y
where both x and y can be anything between -100 and +100.
What I would like to do is have a 3d gnuplot where there are 10,000 squared or bins and each bin will count how many rows have a value that would be... (1 Reply)
Need assistance in getting a script right. It requires little tweaking and I am not getting it right .
Using below data and the below script it creates a table with png file but regarding the time it create 6,7,8 and i want each time 6:15 ,6:30 and so on
So that i can view the exact graph... (3 Replies)
Discussion started by: ajayram_arya
3 Replies
LEARN ABOUT V7
memusagestat
MEMUSAGESTAT(1) Linux programmer's manual MEMUSAGESTAT(1)NAME
memusagestat - generate graphic from memory profiling data
SYNOPSIS
memusagestat [option]... datafile [outfile]
DESCRIPTION
memusagestat creates a PNG file containing a graphical representation of the memory profiling data in the file datafile; that file is gen-
erated via the -d (or --data) option of memusage(1).
The red line in the graph shows the heap usage (allocated memory) and the green line shows the stack usage. The x-scale is either the num-
ber of memory-handling function calls or (if the -t option is specified) time.
OPTIONS -o file, --output=file
Name of the output file.
-s string, --string=string
Use string as the title inside the output graph.
-t, --time
Use time (rather than number of function calls) as the scale for the X axis.
-T, --total
Also draw a graph of total memory consumption.
-x size, --x-size=size
Make the output graph size pixels wide.
-y size, --y-size=size
Make the output graph size pixels high.
-?, --help
Print a help message and exit.
--usage
Print a short usage message and exit.
-V, --version
Print version information and exit.
BUGS
To report bugs, see <http://www.gnu.org/software/libc/bugs.html>
EXAMPLE
See memusage(1).
SEE ALSO memusage(1), mtrace(1)COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU 2017-09-15 MEMUSAGESTAT(1)