hi all
i changed the logging level to : save all info
but as you know this will result in a big logfile
is it possible to config the software that it will be
rotating the logfile after 30Mb (or so) and then move that "old" logfile
to a dedicated directory and rename it to log<date>.htm
is it possible to add the date to the logfile name ?
for example:
c:\hostmonitor\log.htm............................current log
c:\hostmonitor\oldlogs\log21122008.htm...rotated log file
under option -> logprocessing this is NOT working
cmd /c move /y "%log%" "%logpath%oldlog\%dd%-%mm%-%yy%-%logname%"
many thanks in advance
menno
rotating log files
Sure, you can.
Please check the manual. Printable manual in MS Word format located in the folder where HostMonitor is installed.
Please check the following sections:
- Options dialog -> Log settings -> File log
- Options dialog -> Log processing
or simply start HostMonitor, click Options menu, go to Log setting -> Log Processing page and click Help
However you can use static name for log file and then rename it using current date. For such purpose you need script file (BAT) file that will retrieve current date.
Something like this
Regards
Alex
Please check the manual. Printable manual in MS Word format located in the folder where HostMonitor is installed.
Please check the following sections:
- Options dialog -> Log settings -> File log
- Options dialog -> Log processing
or simply start HostMonitor, click Options menu, go to Log setting -> Log Processing page and click Help
Its much more easier to setup HostMonitor to use date variables for current log file. Just specify file name like C:\Program Files\HostMon\Logs\log%mmyyyy%.htmis it possible to add the date to the logfile name ?
for example:
c:\hostmonitor\log.htm............................current log
c:\hostmonitor\oldlogs\log21122008.htm...rotated log file
However you can use static name for log file and then rename it using current date. For such purpose you need script file (BAT) file that will retrieve current date.
Something like this
Code: Select all
@echo off
REM Script retrieves system date and parse it.
REM Output variables:
REM %Year%, %Month%, %Day%
REM %iDate%,%sDate% - Date Separators from registry
rem Select date
:: Export registry's date format settings to a temporary file
START /W REGEDIT /E _TEMP.REG "HKEY_CURRENT_USER\Control Panel\International"
:: Read the exported data
FOR /F "tokens=2* delims==" %%A IN ('TYPE _TEMP.REG ^| FIND /I "iDate"') DO SET iDate=%%A
FOR /F "tokens=2* delims==" %%A IN ('TYPE _TEMP.REG ^| FIND /I "sDate"') DO SET sDate=%%A
DEL _TEMP.REG
SET iDate=%iDate:"=%
SET sDate=%sDate:"=%
IF %iDate%==0 FOR /F "TOKENS=1-4* DELIMS=%sDate%" %%A IN ('DATE/T') DO (
SET Year=%%C
SET Month=%%A
SET Day=%%B
)
IF %iDate%==1 FOR /F "TOKENS=1-4* DELIMS=%sDate%" %%A IN ('DATE/T') DO (
SET Year=%%C
SET Month=%%B
SET Day=%%A
)
IF %iDate%==2 FOR /F "TOKENS=1-4* DELIMS=%sDate%" %%A IN ('DATE/T') DO (
SET Year=%%A
SET Month=%%B
SET Day=%%C
)
:: Remove the day of week if applicable
FOR %%A IN (%Year%) DO SET Year=%%A
FOR %%A IN (%Month%) DO SET Month=%%A
FOR %%A IN (%Day%) DO SET Day=%%A
REM move and rename log file
MOVE /y log.htm oldlogs\log%day%%month%%year%.htm
Alex
That's because you are trying to use variables that are not suported hereunder option -> logprocessing this is NOT working
cmd /c move /y "%log%" "%logpath%oldlog\%dd%-%mm%-%yy%-%logname%"
Quote from the manual
RegardsExecute command:
You may specify 2 commands for execution: one for common log files, another for private logs. You may use special variables in the command line: %log% - represents full name (including path) of the log file (e.g. C:\Program Files\HostMonitor\Logs\04-2004.htm)
%logpath% - represents path to the log file (including trailing back slash. E.g. C:\Program Files\HostMonitor\Logs\)
%logname% - represents name of the log file (e.g. 04-2002.htm)
%logext% - represents extension of the log file (e.g. ".htm")
Alex
thanks
thanks for the help so far
i saw also this option...so i tried that function
but stil this is not working....
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=5029
many thanks so far for all the help to everybody !!!
menno
i saw also this option...so i tried that function
but stil this is not working....

http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=5029
many thanks so far for all the help to everybody !!!
menno