|
Uptime script - windows: msg#00279sysutils.tivoli.tme10
Hi I put together this script to retrieve uptime stats at the beginning of the month off windows boxes. @ECHO OFF
::***********************************************************
FOR /F "TOKENS=2* DELIMS= " %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International\sDate"') DO SET sDate=%%B IF %iDate%==0 FOR /F "TOKENS=1-4* DELIMS=%sDate% " %%A IN ('DATE/T') DO SET SortDate=%%B/%%C/%%D
::***********************************************************
FOR /F "tokens=1-3 delims=/ " %%i in ("%SortDate%") do (set month=%%i) & (set day=%%j) & (set year=%%k)
If %month% EQU 01 (set /a LASTMONTH=12 & set /a year=%year%-1)
set REPORTINGDATE=%LASTMONTH%/1/%year%
::************************************************************
If anyone has any suggestions and improvements, or nicer code would appreciate any feedback. I would particularly be interested in any solutions to authenicating to the folder where the uptime output is copied to. When I have time I will post a script to take the relevant information from the text files and a nice html page. In the past I used, qgrep.exe and csv2htm.exe David Weir
IMPORTANT NOTICE This communication including any file attachments is intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering this communication to the intended recipient, please immediately notify the sender by e-mail and delete the original transmission and its contents. Any unauthorised use, dissemination, forwarding, printing, or copying of this communication including any file attachments is prohibited. It is your responsibility to scan this communication including any file attachment for viruses and other defects. To the extent permitted by law, ING and its associates will not be liable for any loss or damage arising in any way from this communication including file attachments. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [EC] State C0rrelation Engine duplicate rule doesn't suppress duplicates: 00279, Jane Curry |
|---|---|
| Next by Date: | RE: Uptime script - windows: 00279, Bontrager, Greg |
| Previous by Thread: | TME Job Posting Inquiryi: 00279, Brian Backer |
| Next by Thread: | RE: Uptime script - windows: 00279, john willis |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |