New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Check file size in folder alarm below x value

Votes:

0

Your Vote:

Up

Down

ls,

I am a new in PRTG. Now I need the following.

I have a folder monitoring where various files are located in and which are then uploaded to an FTP server.

I want to know immediately when a file in that folder is below 2kb. In that folder wil be different files with different names.

Now my question is I have the sensor and settings for use here.

alarm file folder size value

Created on Nov 20, 2014 10:23:13 PM by  vdvu (0) 1



1 Reply

Accepted Answer

Votes:

4

Your Vote:

Up

Down

Hi,

This can be done with a simple batch sensor folowing the script below:

@echo off
set /a counter=0
for /F "tokens=3" %%a in ('dir c:\temp /-c') do (
  if %%a LSS 2048 set /a counter=counter+1
)
echo %counter%:Found %counter% file(s) with size less than 2 Kb.

The example above will return the number of files in 'c:\temp' having a filesize less than 2 Kb. Using limits, you can set the sensor to a waring or error state.

Created on Nov 21, 2014 1:32:53 PM by  PRTG Tools Family [prtgtoolsfamily.com] (12,995) 3 4



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.