NASLite Network Attached Storage

www.serverelements.com
Task-specific simplicity with low hardware requirements.
It is currently Thu Mar 28, 2024 6:18 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: BATCH / Temp / Free
PostPosted: Thu Nov 23, 2006 3:23 am 
Offline

Joined: Fri Sep 15, 2006 9:00 am
Posts: 2
Location: Vienna, AUSTRIA, EU
batch file 4 networkdrive

read freespace and temperature

______________________________________________________________

@ECHO OFF
TITLE Free NAS


set %Drive=N


set %Disk-1=
set %Disk-2=
set %Disk-3=
set %Disk-4=

set %Disk-1-temp=
set %Disk-2-temp=
set %Disk-3-temp=
set %Disk-4-temp=



for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "Linux"') DO Set OS=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "vendor_id"') DO Set vendor_id=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "model name"') DO Set model name=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "cpu MHz"') DO Set cpu MHz=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "bogomips"') DO Set bogomips=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "load average"') DO Set load average=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "Buffers"') DO Set Buffers=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "Mem:"') DO Set Mem:=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "Device"') DO Set Device=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "RAM Disk"') DO Set RAM Disk=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "NAS Disk-1"') DO Set Disk-1=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "NAS Disk-2"') DO Set Disk-2=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "NAS Disk-3"') DO Set Disk-3=%%i
for /f "tokens=1* Delims==" %%i in ('type %Drive%:\System.htm^|Find /i "NAS Disk-4"') DO Set Disk-4=%%i







for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-1.htm^|Find /i "Temperature_Celsius"') DO Set Disk-1-temp=%%i
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-2.htm^|Find /i "Temperature_Celsius"') DO Set Disk-2-temp=%%i
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-3.htm^|Find /i "Temperature_Celsius"') DO Set Disk-3-temp=%%i
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-4.htm^|Find /i "Temperature_Celsius"') DO Set Disk-4-temp=%%i


for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-1.htm^|Find /i "ATAPI CD/DVD-ROM drive"') DO Set Disk-1=Storage Area ATAPI CD/DVD-ROM Disk-1
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-2.htm^|Find /i "ATAPI CD/DVD-ROM drive"') DO Set Disk-2=Storage Area ATAPI CD/DVD-ROM Disk-2
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-3.htm^|Find /i "ATAPI CD/DVD-ROM drive"') DO Set Disk-3=Storage Area ATAPI CD/DVD-ROM Disk-3
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-4.htm^|Find /i "ATAPI CD/DVD-ROM drive"') DO Set Disk-4=Storage Area ATAPI CD/DVD-ROM Disk-4

for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-1.htm^|Find /i "Disk-1 is not installed."') DO Set Disk-1=Storage Area is not installed Disk-1
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-2.htm^|Find /i "Disk-2 is not installed."') DO Set Disk-2=Storage Area is not installed Disk-2
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-3.htm^|Find /i "Disk-3 is not installed."') DO Set Disk-3=Storage Area is not installed Disk-3
for /f "tokens=2 Delims=-" %%i in ('type %Drive%:\Disk-4.htm^|Find /i "Disk-4 is not installed."') DO Set Disk-4=Storage Area is not installed Disk-4


if "%Disk-1-temp%"=="" (set %Disk-1-temp= 0) ELSE goto next2

:next2

if "%Disk-2-temp%"=="" (set %Disk-2-temp= 0) ELSE goto next3

:next3

if "%Disk-3-temp%"=="" (set %Disk-3-temp= 0) ELSE goto next4

:next4

if "%Disk-4-temp%"=="" (set %Disk-4-temp= 0)



cls

echo NAS OS : %OS%
echo %vendor_id%
echo %model name%
echo %cpu MHz%
echo %bogomips%
echo Uptime : %load average%
echo ----------------------------------------------------------------------------
echo %Buffers%
echo %Mem:%
echo ----------------------------------------------------------------------------
echo %Device%
echo %RAM Disk%
echo %Disk-1%
echo %Disk-2%
echo %Disk-3%
echo %Disk-4%
echo ----------------------------------------------------------------------------
echo Disk-1 Temp:%Disk-1-temp%
echo Disk-2 Temp:%Disk-2-temp%
echo Disk-3 Temp:%Disk-3-temp%
echo Disk-4 Temp:%Disk-4-temp%


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 01, 2006 8:59 am 
Offline

Joined: Tue May 30, 2006 2:15 pm
Posts: 138
Location: UK / FRANCE 44290
well...yes! What do I do to use it?? How does it get to access the NAS PC?? Can you show output? Thanks jeff


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group