linux - gnuplot doesn't work through ssh command -


so have csv, , have plt file. run gnuplot plt-file.plt , png born.

but if run ssh sameuser@samemachine 'gnuplot plt-file.plt' pngcario error.

the csv: sar.csv

time,               average io writes  4/15/2014 22:28,    6.040546875 4/15/2014 22:28,    7.943100586 4/15/2014 22:29,    8.686162109 4/15/2014 22:29,    7.693891602 4/15/2014 22:30,    8.579804688 4/15/2014 22:30,    7.900537109 

the plt:

clear reset print "sar" set terminal pngcairo transparent enhanced font "arial,25" fontscale 1.0 size 1920, 1080 set key outside bottom center box title "sar" enhanced set key maxrows 4 set key font ",25" spacing 1 samplen 2.9 width 2 height 1 set xlabel "time (hours)" font ",25" set ylabel "utilization (%)" font ",25"  set output "./sar.png" set title "sar" font ",35" set datafile separator "," set timefmt "%y-%m-%d %h:%m:%s" set ytics font ",25"  set style line 1 lt 1 lc rgb "red" lw 4  show style line  offset = 0 starting_time = 37824 t0(x)=(offset=($0==0) ? x : offset, x - offset)  plot "./sar.csv" using (t0(timecolumn(1))/3600):2 every ::3 ls 1 t "sar" lines 

final note: i've compiled gnuplot png flag. needed sort of standard image format.

that means, self-compiled gnuplot isn't found when log-in ssh. type which gnuplot in both cases see binary used.

usually when using ssh non-interactive shell, sources different configuration files , has different environmental variables login shell, see e.g. why ssh remote command fewer environment variables when run manually?.

so can either change respective configuration files (which ones used, depends on distribution), or can use full path gnuplot binary.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -