Serv-u Alternative solution to stop service (batch monitoring and running) _FTP server

Source: Internet
Author: User
Tags ftp
Recently used serv-u to set up an FTP server for file transfer of the bridge. Not long, every once in a while, Serv-u service will automatically stop. Because this FTP service is very important, to ensure that the normal work every day, if only rely on people every day to see whether the service is normal, involved in energy does not say, is not very reliable. So, Google's. All kinds of sayings on the Internet, such as FTP in the case of large traffic, Serv-u will automatically stop service because of busy. In short, the reason for serv-u to stop service periodically is not found. No way, had to change the train of thought: Unable to find the cause of Serv-u periodic stop service, then the Serv-u service can detect the service stop automatically start Serv-u service, this scheme is also to try.

Scenario: Execution plan + batch processing. Set up the execution plan to perform a batch task every 30 minutes. What a batch does: Read the process list to see if the serv-u process exists, and if the process does not exist, start the service and output the log.

Here is the batch implementation section:

Copy Code code as follows:

@echo off
for/f "Usebackq"%%i in (' "Tasklist|find/c" Serv-u.exe "") Does (
Set chkstat=%%i
)

If%chkstat% = 0 (
net start Serv-u
echo ================ >>%date:~0,10%.log
echo%date%%time% Check serv-u service Stop >>%date:~0,10%.log
echo Restart Serv-u service! >>%date:~0,10%.log
echo ================ >>%date:~0,10%.log
)


Version of the program file name is not the same, we can also use this code to monitor other programs. The SERV_U6 version needs to replace Serv-u.exe with ServUDaemon.exe. You can see it in the tasklist. Be sure to correspond to the EXE filename, with the service name.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.