I must state that this is my first time dealing with gnuplot. I am getting cpu temp via ipmitool and sending it to a file. The data is appended to the file in this format $TIME $CPU1 $CPU2, the time var is TIME=$(date +”%Y-%m-%d %H:%M”) in the script that generates the data.
Here is the script im using to plot the data:
#!/usr/bin/gnuplot
# Set the output file type and name
set terminal png size 800,600
set output 'cpu_temps_plot.png'
# Set the title and labels
set title "CPU Temperatures Over Time"
set xlabel "Time"
set ylabel "Temperature (°C)"
# Set the x-axis to use time format
#original code
set xdata time
set timefmt "%Y-%m-%d %H:%M"
set format x "%H:%Mn%m/%d"
# Plot the data
plot "cpu_temps.dat" using 1:2 with lines title "CPU1 Temp",
"cpu_temps.dat" using 1:3 with lines title "CPU2 Temp"
When executing the plot script, I get the following error. I have run to the end of my rope
#gnuplot plot_temp.gp
Warning: empty x range [1.72181e+09:1.72181e+09], adjusting to [1.7046e+09:1.73903e+09]
terrywhitejr2000 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.