HostHist.exe 0.0.1 released

Discussion in 'Host History' started by -Ed-, Jan 12, 2005.

  1. -Ed-

    -Ed- [dSRC] Member


    With much guidance from Ian, I've ported his into C & managed to persuade it to build in Visual C++. The result is a command line .exe which I have tested to run under Win98 & WinXP Home.
    It's use if kind of limited, as it will only produce the standard large & small graphs in the style of this website.

    What it does:
    The program reads the host63392.txt file generated by the LFS Host & updates a 24 hour log 'hourly_history.log' file with the basic state of the host & the drivers connected. If the 'hourly_history.log' file does not exist (eg first time run) then it will be created.
    The contents of the 'hourly_history.log' file are then used to generate the small & large versions of the graph & save them as 'driver_history_small.png' &
    'driver_history_large.png' respectively
    The program should be run once per minute for the 24 hour time span to be correct.

    HostHist.exe - attatched as below
    bgd.dll - graphics library found here. See for details.


    HostHist [dest] [source] [alpha]

    dest: path of folder for graph images
    source: path to folder containing host63392.txt
    hourly_history.log is also written to this folder
    alpha: 1 = use transparent background
    else(default) white background

    If no path(s) given, folder of exe is used

    I havent posted the source code, as it is hardly model code, but it is available if anyone wants it, to modify / hack about or whatever.


    Attached Files:

    Last edited: Jan 12, 2005
  2. Ian.H

    Ian.H Administrator Staff Member

    Great work Ed! thanks for porting this over... you did all the hardwork for it :)

    Now pretty much all OSes should be covered.


  3. franky500

    franky500 New Member

    Hi, This is perfect as i could never get the host to work.

    However i have only one problem.

    Is there any way to get this to work with the host file being anything other than host63392.txt (eg host63393.txt 63394.txt ect ect ect)

  4. -Ed-

    -Ed- [dSRC] Member

    Hi franky

    It's hardcoded as 'host63392.txt' I'm afraid, but you have 3 options:

    1) Hack the exe & change the host63392.txt name if you can find it. :eek:
    2) PM me an email address & I'll send you the source code to play with (it's pretty straightforward).
    3) If you aren't a programmer, I can modify it to accept a name as well as the path.


    I love when a thread sleeps for 'a while' & then someone finds it. 8o)
  5. franky500

    franky500 New Member

    Hey ed. Thanks for the fast reply.

    option 3 would be brilliant if possible.

    I found it in the EXE but have no idea how to edit it or what to edit it to.(not a programmer here but normally work things out)

    I wouldnt mind having a look at the source code at all. would be fine if you do get a chance to send that. If not. Not to worry.

    Thanks for your reply. i actually expected it to be unanswered (knowing how busy some of you guys can get)
  6. -Ed-

    -Ed- [dSRC] Member

    No problem. 8o)

    I'll make the change - should only be a 5 minute job - & send it on, along with the source. It will be in a few days as I don't have VC++ installed at home at the moment.

  7. -Ed-

    -Ed- [dSRC] Member

    Well, I found a copy of C++, so went ahead & changed it. Wasn't exactly a 5 minute job (are they ever?) as I found a few bugs along the way. :-[ :D

    Anyway, here it is attached. Much the same as it was (requires GD.DLL) though with a couple of minor changes to where files are written to. Run it with ' /?' to see how it works now.
    I included the source - the program is all in 'HostHist.cpp' - all the rest is the GD library files.

    I gave it a quick test, and it seemed to work. If you have any trouble, just shout up.


    Attached Files:

  8. franky500

    franky500 New Member

    Thats brilliant.

    Thanks alot for that.

    Is there anywhere i should link to when i stick the graphs up on a webpage.?

    Thanks for the help, I have just managed to edit the origional EXE also so that i can rename what the graphs get called too. Quite handy.
  9. -Ed-

    -Ed- [dSRC] Member

    How do you mean?
  10. franky500

    franky500 New Member

    Where would you like me to link to. as a credit?

    eg, "Graphs powered by host-history by -Ed- of DSRC"

Share This Page