MU-IT Cacti User
Joined: 06 Nov 2007 Posts: 55
|
Posted: Tue Aug 26, 2008 8:38 am Post subject: How To Compile a Weathermap Animation in Windows Server 2003 |
|
|
after a long list of dumb questions and frustrations, i have something potentially useful to contribute.
Directions for creating frames to compile an animation in Windows Server 2003:
Basically, you want to match the behavior of this cron job, but have it work with win2k3:
| Code: |
SRC_MAP="C:/inetupub/wwwroot/cacti/plugins/weathermap/output/weathermap_1.png"
HISTORY_DIR="C:/weathermapmovie/my_weathermap_frames"
DATE=`date '+%y%m%d%H%M'`
cp $SRC_MAP $HISTORY_DIR/map_$DATE.png
find $HISTORY_DIR -name '*.png' -mtime +7 -type f -exec rm {} \;
|
First, I concocted a command-line ...command. Launch cmd.exe and navigate to your weathermap directory. then type something like:
| Code: |
C:\php\php.exe C:\inetpub\wwwroot\cacti\plugins\weathermap\weathermap --config C:\inetpub\wwwroot\cacti\plugins\weathermap\configs\totalnet.conf --output C:\weathermovie\test.png
|
Obviously, your paths would have to match your install, and the output directory has to exist.
So, once you have the command working, and generating the test.png file, you need to write some VB6 code
| Code: |
Private Sub Form_Load()
Shell ("C:\php\php.exe C:\inetpub\wwwroot\cacti\plugins\weathermap\weathermap --config C:\inetpub\wwwroot\cacti\plugins\weathermap\configs\totalnet.conf --output C:\weathermovie\" & Format(Time(), "mmddhhmmss") & ".png")
End
End Sub
|
Compile, and place in your weathermap directory ( be sure security is appropriate for this! ). Double-click to run. You should see a file in your output directory with the timestamp.png, if everything's working.
Now, you need to schedule a task. To have cacti running in win2k3, you should be familiar with this already...
You'll want this task to repeat every x minutes (I chose 10, in a week it compiles to @ 50 seconds of 20fps video) and have it end in one week.
You should see png files, with incrementing file names, start to show up.
From there, I'm going to use flash and compile the images into a movie, but I'm sure there's hundreds of other software solutions for something like this.
This is just my solution, and it works for me. I figured it might help someone else, so here it is. If there are tweaks or suggestions, please feel free to post up!
-MUIT |
|